Merge lp:~stellarium/stellarium/deltaT-advanced into lp:stellarium

Proposed by Alexander Wolf
Status: Merged
Approved by: Alexander Wolf
Approved revision: 5814
Merged at revision: 5822
Proposed branch: lp:~stellarium/stellarium/deltaT-advanced
Merge into: lp:stellarium
Diff against target: 3043 lines (+2156/-340)
19 files modified
data/gui/normalStyle.css (+6/-0)
po/stellarium/POTFILES.in (+1/-0)
src/CMakeLists.txt (+3/-0)
src/core/SimbadSearcher.hpp (+1/-1)
src/core/StelCore.cpp (+441/-2)
src/core/StelCore.hpp (+101/-17)
src/core/StelObserver.cpp (+1/-1)
src/core/StelUtils.cpp (+537/-16)
src/core/StelUtils.hpp (+163/-4)
src/gui/ConfigurationDialog.cpp (+100/-1)
src/gui/ConfigurationDialog.hpp (+8/-0)
src/gui/CustomDeltaTEquationDialog.cpp (+122/-0)
src/gui/CustomDeltaTEquationDialog.hpp (+69/-0)
src/gui/CustomDeltaTEquationDialog.ui (+262/-0)
src/gui/DateTimeDialog.cpp (+3/-3)
src/gui/StelGuiItems.cpp (+15/-7)
src/gui/configurationDialog.ui (+321/-286)
src/scripting/StelMainScriptAPI.cpp (+1/-1)
src/tests/testDeltaT.cpp (+1/-1)
To merge this branch: bzr merge lp:~stellarium/stellarium/deltaT-advanced
Reviewer Review Type Date Requested Status
Alexander Wolf Approve
gzotti Pending
Review via email: mp+148938@code.launchpad.net

This proposal supersedes a proposal from 2013-02-15.

Description of the change

Implementation of GUI which give users choose and apply different formulae for DeltaT calculations.

To post a comment you must log in.
Revision history for this message
gzotti (georg-zotti) wrote : Posted in a previous version of this proposal

In all, it looks great. However, there is still the problem that in "current time/real-time" mode, the time displayed is not the system (PC clock) time, but system time corrected by DeltaT. This must be fixed before merge, IMHO. Small changes (docfix etc.) can be done later.
I also had liked the warning signs for "out of recommended range", if possible.
I am afraid the JPL Horizons value for the present time cannot be correct, and likewise Meeus&Simmons (2000), Montenbruck&Pfleger(2000).

review: Needs Fixing
Revision history for this message
barrykgerdes (barrygastro) wrote : Posted in a previous version of this proposal

Hi George
I see you have added a nebula texture for Eta Carina
There is already a four panel mozaic of the eta carina area that I provided years ago along with many others
We originally stopped adding nebula because we were going to use DSS images.
If you check the images available in the wiki you will find the package.

Barry

> To: <email address hidden>
> From: <email address hidden>
> Subject: Re: [Merge] lp:~stellarium/stellarium/deltaT-advanced into lp:stellarium
> Date: Sat, 16 Feb 2013 15:46:20 +0000
>
> Review: Needs Fixing
>
> In all, it looks great. However, there is still the problem that in "current time/real-time" mode, the time displayed is not the system (PC clock) time, but system time corrected by DeltaT. This must be fixed before merge, IMHO. Small changes (docfix etc.) can be done later.
> I also had liked the warning signs for "out of recommended range", if possible.
> I am afraid the JPL Horizons value for the present time cannot be correct, and likewise Meeus&Simmons (2000), Montenbruck&Pfleger(2000).
>
> --
> https://code.launchpad.net/~stellarium/stellarium/deltaT-advanced/+merge/148792
> Your team Stellarium is requested to review the proposed merge of lp:~stellarium/stellarium/deltaT-advanced into lp:stellarium.

Revision history for this message
gzotti (georg-zotti) wrote : Posted in a previous version of this proposal

Dear Barry,

thanks for the info. There was just a bug report on eta Car, and one of my
best shots from 2002 (slide film, hand guided, remember? ;-D happened to
have been this. What are the plans/state on DSS?

Regards,
Georg.

On Sa, 16.02.2013, 21:31, barrykgerdes wrote:
>
> Hi George
> I see you have added a nebula texture for Eta Carina
> There is already a four panel mozaic of the eta carina area that I
> provided years ago along with many others
> We originally stopped adding nebula because we were going to use DSS
> images.
> If you check the images available in the wiki you will find the package.
>
> Barry
>
>
>> To: <email address hidden>
>> From: <email address hidden>
>> Subject: Re: [Merge] lp:~stellarium/stellarium/deltaT-advanced into
>> lp:stellarium
>> Date: Sat, 16 Feb 2013 15:46:20 +0000
>>
>> Review: Needs Fixing
>>
>> In all, it looks great. However, there is still the problem that in
>> "current time/real-time" mode, the time displayed is not the system (PC
>> clock) time, but system time corrected by DeltaT. This must be fixed
>> before merge, IMHO. Small changes (docfix etc.) can be done later.
>> I also had liked the warning signs for "out of recommended range", if
>> possible.
>> I am afraid the JPL Horizons value for the present time cannot be
>> correct, and likewise Meeus&Simmons (2000), Montenbruck&Pfleger(2000).
>>
>> --
>> https://code.launchpad.net/~stellarium/stellarium/deltaT-advanced/+merge/148792
>> Your team Stellarium is requested to review the proposed merge of
>> lp:~stellarium/stellarium/deltaT-advanced into lp:stellarium.
>
> --
> https://code.launchpad.net/~stellarium/stellarium/deltaT-advanced/+merge/148792
> You are reviewing the proposed merge of
> lp:~stellarium/stellarium/deltaT-advanced into lp:stellarium.
>

Revision history for this message
barrykgerdes (barrygastro) wrote : Posted in a previous version of this proposal
Download full text (3.2 KiB)

Hi George

I don't know what is going on about the DSS. It was supposed to be a requirement for 1.0.0 but since Fabien has reduced his input , the program for release of 1.0.0 has been forgotten. I think there is some dificulty with hosting, Fabien had it all ready to roll, but I still have the Virgo version (0.10.3) that accesses the DSS so I use this. I have a suite of images that I have collected from our astro imaging group including some of mine and Trevor's of around 30MB with about 190 images. It contains many improved Messier's and better positions. It includes mosaics of Rho ophiuchus ,SMC and LMC. Large areas need to be mosaics as registration gets poor with fields over 1 degree. We have a very dark site in mid western NSW where we go every new moon to photograph (all digital and guided these days). I have access to some really good highres images of eta carina enhanced with H alpha that are very highly detailed.

Barry

> To: <email address hidden>
> From: <email address hidden>
> Subject: RE: [Merge] lp:~stellarium/stellarium/deltaT-advanced into lp:stellarium
> Date: Sat, 16 Feb 2013 20:52:20 +0000
>
> Dear Barry,
>
> thanks for the info. There was just a bug report on eta Car, and one of my
> best shots from 2002 (slide film, hand guided, remember? ;-D happened to
> have been this. What are the plans/state on DSS?
>
> Regards,
> Georg.
>
> On Sa, 16.02.2013, 21:31, barrykgerdes wrote:
> >
> > Hi George
> > I see you have added a nebula texture for Eta Carina
> > There is already a four panel mozaic of the eta carina area that I
> > provided years ago along with many others
> > We originally stopped adding nebula because we were going to use DSS
> > images.
> > If you check the images available in the wiki you will find the package.
> >
> > Barry
> >
> >
> >> To: <email address hidden>
> >> From: <email address hidden>
> >> Subject: Re: [Merge] lp:~stellarium/stellarium/deltaT-advanced into
> >> lp:stellarium
> >> Date: Sat, 16 Feb 2013 15:46:20 +0000
> >>
> >> Review: Needs Fixing
> >>
> >> In all, it looks great. However, there is still the problem that in
> >> "current time/real-time" mode, the time displayed is not the system (PC
> >> clock) time, but system time corrected by DeltaT. This must be fixed
> >> before merge, IMHO. Small changes (docfix etc.) can be done later.
> >> I also had liked the warning signs for "out of recommended range", if
> >> possible.
> >> I am afraid the JPL Horizons value for the present time cannot be
> >> correct, and likewise Meeus&Simmons (2000), Montenbruck&Pfleger(2000).
> >>
> >> --
> >> https://code.launchpad.net/~stellarium/stellarium/deltaT-advanced/+merge/148792
> >> Your team Stellarium is requested to review the proposed merge of
> >> lp:~stellarium/stellarium/deltaT-advanced into lp:stellarium.
> >
> > --
> > https://code.launchpad.net/~stellarium/stellarium/deltaT-advanced/+merge/148792
> > You are reviewing the proposed merge of
> > lp:~stellarium/stellarium/deltaT-advanced into lp:stellarium.
> >
>
>
>
> --
> https://code.launchpad.net/~stellarium/stellarium/deltaT-advanced/+merge/148792
> Your team Stellarium is requested to review the proposed merge of...

Read more...

Revision history for this message
Alexander Wolf (alexwolf) wrote : Posted in a previous version of this proposal

Startup time fixed via correction Delta-T (IMHO this is better way) + implemented getting and showing valid range usage of Delta-T for different algorithms (possible value: within valid range; not in valid range (*); valid range are unknown (?)).

review: Needs Resubmitting
Revision history for this message
Alexander Wolf (alexwolf) :
review: Approve
5814. By gzotti

small typofix

Revision history for this message
gzotti (georg-zotti) wrote : Posted in a previous version of this proposal

The current solution is fine. The only distraction is that when changing DeltaT algorithm, displayed (zone) time changes. Should not matter if you just select your favorite version and save settings - on next startup all is fine. The optimal solution would IMHO be if the displayed time - and with it the sky image in the background (which depends on UT, i.e. mean solar time) - would not jump, but e.g. for solar eclipses you can target&lock the sun.
Another tiny GUI issue: One of the options of the dropdown [e.g. Espenak-Meeus (2006)] should be marked as "default".
More formulae can then be added to trunk as required. Wow, this is really unique!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/gui/normalStyle.css'
--- data/gui/normalStyle.css 2013-02-09 14:19:04 +0000
+++ data/gui/normalStyle.css 2013-02-17 21:34:20 +0000
@@ -166,6 +166,12 @@
166 padding-left:11px;166 padding-left:11px;
167}167}
168168
169QTextBrowser#deltaTAlgorithmDescription {
170 background: transparent;
171 padding: 0px;
172 margin: 0px;
173}
174
169/***************************************************SearchDialog********************************************************/175/***************************************************SearchDialog********************************************************/
170176
171QFrame#horizontalSearchLayout {177QFrame#horizontalSearchLayout {
172178
=== modified file 'po/stellarium/POTFILES.in'
--- po/stellarium/POTFILES.in 2012-11-03 13:35:53 +0000
+++ po/stellarium/POTFILES.in 2013-02-17 21:34:20 +0000
@@ -27,6 +27,7 @@
27src/gui/ScriptConsole.cpp27src/gui/ScriptConsole.cpp
28src/gui/SearchDialog.cpp28src/gui/SearchDialog.cpp
29src/gui/ShortcutsDialog.cpp29src/gui/ShortcutsDialog.cpp
30src/gui/CustomDeltaTEquationDialog.cpp
30src/main.cpp31src/main.cpp
3132
32# Translations of strings not contained in the source code33# Translations of strings not contained in the source code
3334
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2013-01-12 17:31:51 +0000
+++ src/CMakeLists.txt 2013-02-17 21:34:20 +0000
@@ -414,6 +414,8 @@
414 gui/AddRemoveLandscapesDialog.cpp414 gui/AddRemoveLandscapesDialog.cpp
415 gui/AtmosphereDialog.hpp415 gui/AtmosphereDialog.hpp
416 gui/AtmosphereDialog.cpp416 gui/AtmosphereDialog.cpp
417 gui/CustomDeltaTEquationDialog.hpp
418 gui/CustomDeltaTEquationDialog.cpp
417 gui/StelDialog.hpp419 gui/StelDialog.hpp
418 gui/StelDialog.cpp)420 gui/StelDialog.cpp)
419421
@@ -427,6 +429,7 @@
427 gui/searchDialogGui.ui429 gui/searchDialogGui.ui
428 gui/configurationDialog.ui430 gui/configurationDialog.ui
429 gui/AtmosphereDialog.ui431 gui/AtmosphereDialog.ui
432 gui/CustomDeltaTEquationDialog.ui
430 gui/addRemoveLandscapesDialog.ui)433 gui/addRemoveLandscapesDialog.ui)
431434
432 IF(ENABLE_SCRIPT_CONSOLE)435 IF(ENABLE_SCRIPT_CONSOLE)
433436
=== modified file 'src/core/SimbadSearcher.hpp'
--- src/core/SimbadSearcher.hpp 2012-03-14 14:18:10 +0000
+++ src/core/SimbadSearcher.hpp 2013-02-17 21:34:20 +0000
@@ -32,7 +32,7 @@
32class SimbadLookupReply : public QObject32class SimbadLookupReply : public QObject
33{33{
34 Q_OBJECT34 Q_OBJECT
35 Q_ENUMS(SimbadLookupStatus);35 Q_ENUMS(SimbadLookupStatus)
3636
37public:37public:
38 friend class SimbadSearcher;38 friend class SimbadSearcher;
3939
=== modified file 'src/core/StelCore.cpp'
--- src/core/StelCore.cpp 2013-02-08 16:40:32 +0000
+++ src/core/StelCore.cpp 2013-02-17 21:34:20 +0000
@@ -36,6 +36,7 @@
36#include "renderer/GenericVertexTypes.hpp"36#include "renderer/GenericVertexTypes.hpp"
37#include "renderer/StelRenderer.hpp"37#include "renderer/StelRenderer.hpp"
38#include "LandscapeMgr.hpp"38#include "LandscapeMgr.hpp"
39#include "StelTranslator.hpp"
3940
40#include <QSettings>41#include <QSettings>
41#include <QDebug>42#include <QDebug>
@@ -103,6 +104,17 @@
103 }104 }
104 position = new StelObserver(location);105 position = new StelObserver(location);
105106
107 // Delta-T stuff
108 // Define default algorithm for time correction (Delta T)
109 QString tmpDT = conf->value("navigation/time_correction_algorithm", "EspenakMeeus").toString();
110 setCurrentDeltaTAlgorithmKey(tmpDT);
111
112 // Define variables of custom equation for calculation of Delta T
113 // Default: ndot = -26.0 "/cy/cy; year = 1820; DeltaT = -20 + 32*u^2, where u = (currentYear-1820)/100
114 setCustomYear(conf->value("custom_time_correction/year", 1820.0).toFloat());
115 setCustomNDot(conf->value("custom_time_correction/ndot", -26.0).toFloat());
116 setCustomEquationCoefficients(StelUtils::strToVec3f(conf->value("custom_time_correction/coefficients", "-20,0,32").toString()));
117
106 // Time stuff118 // Time stuff
107 setTimeNow();119 setTimeNow();
108120
@@ -138,7 +150,7 @@
138 skyDrawer->init();150 skyDrawer->init();
139151
140 QString tmpstr = conf->value("projection/type", "ProjectionStereographic").toString();152 QString tmpstr = conf->value("projection/type", "ProjectionStereographic").toString();
141 setCurrentProjectionTypeKey(tmpstr);153 setCurrentProjectionTypeKey(tmpstr);
142}154}
143155
144156
@@ -855,7 +867,9 @@
855//! Set stellarium time to current real world time867//! Set stellarium time to current real world time
856void StelCore::setTimeNow()868void StelCore::setTimeNow()
857{869{
858 setJDay(StelUtils::getJDFromSystem());870 double JD = StelUtils::getJDFromSystem();
871 // add Delta-T correction for actual time
872 setJDay(JD+getDeltaT(JD)/86400);
859}873}
860874
861void StelCore::setTodayTime(const QTime& target)875void StelCore::setTodayTime(const QTime& target)
@@ -1213,3 +1227,428 @@
1213{1227{
1214 startupTimeMode = s;1228 startupTimeMode = s;
1215}1229}
1230
1231double StelCore::getDeltaT(double jDay)
1232{
1233 double DeltaT = 0.;
1234 double ndot = 0.;
1235 bool dontUseMoon = false;
1236 switch (getCurrentDeltaTAlgorithm()) {
1237 case WithoutCorrection:
1238 // Without correction, DeltaT is disabled
1239 DeltaT = 0.;
1240 dontUseMoon = true;
1241 break;
1242 case Schoch:
1243 // Schoch (1931) algorithm for DeltaT
1244 ndot = -29.68; // n.dot = -29.68"/cy/cy
1245 DeltaT = StelUtils::getDeltaTBySchoch(jDay);
1246 break;
1247 case Clemence:
1248 // Clemence (1948) algorithm for DeltaT
1249 ndot = -22.44; // n.dot = -22.44 "/cy/cy
1250 DeltaT = StelUtils::getDeltaTByClemence(jDay);
1251 break;
1252 case IAU:
1253 // IAU (1952) algorithm for DeltaT, based on observations by Spencer Jones (1939)
1254 ndot = -22.44; // n.dot = -22.44 "/cy/cy
1255 DeltaT = StelUtils::getDeltaTByIAU(jDay);
1256 break;
1257 case AstronomicalEphemeris:
1258 // Astronomical Ephemeris (1960) algorithm for DeltaT
1259 ndot = -22.44; // n.dot = -22.44 "/cy/cy
1260 DeltaT = StelUtils::getDeltaTByAstronomicalEphemeris(jDay);
1261 break;
1262 case TuckermanGoldstine:
1263 // Tuckerman (1962, 1964) & Goldstine (1973) algorithm for DeltaT
1264 //FIXME: n.dot
1265 ndot = -22.44; // n.dot = -22.44 "/cy/cy ???
1266 DeltaT = StelUtils::getDeltaTByTuckermanGoldstine(jDay);
1267 break;
1268 case MullerStephenson:
1269 // Muller & Stephenson (1975) algorithm for DeltaT
1270 ndot = -37.5; // n.dot = -37.5 "/cy/cy
1271 DeltaT = StelUtils::getDeltaTByMullerStephenson(jDay);
1272 break;
1273 case Stephenson1978:
1274 // Stephenson (1978) algorithm for DeltaT
1275 ndot = -30.0; // n.dot = -30.0 "/cy/cy
1276 DeltaT = StelUtils::getDeltaTByStephenson1978(jDay);
1277 break;
1278 case SchmadelZech1979:
1279 // Schmadel & Zech (1979) algorithm for DeltaT
1280 ndot = -23.8946; // n.dot = -23.8946 "/cy/cy
1281 DeltaT = StelUtils::getDeltaTBySchmadelZech1979(jDay);
1282 break;
1283 case MorrisonStephenson1982:
1284 // Morrison & Stephenson (1982) algorithm for DeltaT (used by RedShift)
1285 ndot = -26.0; // n.dot = -26.0 "/cy/cy
1286 DeltaT = StelUtils::getDeltaTByMorrisonStephenson1982(jDay);
1287 break;
1288 case StephensonMorrison1984:
1289 // Stephenson & Morrison (1984) algorithm for DeltaT
1290 ndot = -26.0; // n.dot = -26.0 "/cy/cy
1291 DeltaT = StelUtils::getDeltaTByStephensonMorrison1984(jDay);
1292 break;
1293 case StephensonHoulden:
1294 // Stephenson & Houlden (1986) algorithm for DeltaT
1295 ndot = -26.0; // n.dot = -26.0 "/cy/cy
1296 DeltaT = StelUtils::getDeltaTByStephensonHoulden(jDay);
1297 break;
1298 case Espenak:
1299 // Espenak (1987, 1989) algorithm for DeltaT
1300 //FIXME: n.dot
1301 ndot = -23.8946; // n.dot = -23.8946 "/cy/cy ???
1302 DeltaT = StelUtils::getDeltaTByEspenak(jDay);
1303 break;
1304 case Borkowski:
1305 // Borkowski (1988) algorithm for DeltaT
1306 ndot = -23.859; // n.dot = -23.859 "/cy/cy
1307 DeltaT = StelUtils::getDeltaTByBorkowski(jDay);
1308 break;
1309 case SchmadelZech1988:
1310 // Schmadel & Zech (1988) algorithm for DeltaT
1311 //FIXME: n.dot
1312 ndot = -26.0; // n.dot = -26.0 "/cy/cy ???
1313 DeltaT = StelUtils::getDeltaTBySchmadelZech1988(jDay);
1314 break;
1315 case ChaprontTouze:
1316 // Chapront-Touzé & Chapront (1991) algorithm for DeltaT
1317 ndot = -23.8946; // n.dot = -23.8946 "/cy/cy
1318 DeltaT = StelUtils::getDeltaTByChaprontTouze(jDay);
1319 break;
1320 case StephensonMorrison1995:
1321 // Stephenson & Morrison (1995) algorithm for DeltaT
1322 ndot = -26.0; // n.dot = -26.0 "/cy/cy
1323 DeltaT = StelUtils::getDeltaTByStephensonMorrison1995(jDay);
1324 break;
1325 case Stephenson1997:
1326 // Stephenson (1997) algorithm for DeltaT
1327 ndot = -26.0; // n.dot = -26.0 "/cy/cy
1328 DeltaT = StelUtils::getDeltaTByStephenson1997(jDay);
1329 break;
1330 case ChaprontFrancou:
1331 // Chapront, Chapront-Touzé & Francou (1997) algorithm for DeltaT
1332 ndot = -25.7376; // n.dot = -25.7376 "/cy/cy
1333 DeltaT = StelUtils::getDeltaTByChaprontFrancou(jDay);
1334 break;
1335 case Meeus:
1336 // Meeus (1998) algorithm for DeltaT
1337 ndot = -26.0; // n.dot = -26.0 "/cy/cy
1338 DeltaT = StelUtils::getDeltaTByMeeus(jDay);
1339 break;
1340 case JPLHorizons:
1341 // JPL Horizons algorithm for DeltaT
1342 ndot = -25.7376; // n.dot = -25.7376 "/cy/cy
1343 DeltaT = StelUtils::getDeltaTByJPLHorizons(jDay);
1344 break;
1345 case MeeusSimons:
1346 // Meeus & Simons (2000) algorithm for DeltaT
1347 ndot = -25.7376; // n.dot = -25.7376 "/cy/cy
1348 DeltaT = StelUtils::getDeltaTByMeeusSimons(jDay);
1349 break;
1350 case MontenbruckPfleger:
1351 // Montenbruck & Pfleger (2000) algorithm for DeltaT
1352 // NOTE: book not contains n.dot value
1353 // FIXME: n.dot
1354 ndot = -26.0; // n.dot = -26.0 "/cy/cy ???
1355 DeltaT = StelUtils::getDeltaTByMontenbruckPfleger(jDay);
1356 break;
1357 case ReingoldDershowitz:
1358 // Reingold & Dershowitz (2001, 2002) algorithm for DeltaT
1359 // FIXME: n.dot
1360 ndot = -26.0; // n.dot = -26.0 "/cy/cy ???
1361 DeltaT = StelUtils::getDeltaTByReingoldDershowitz(jDay);
1362 break;
1363 case MorrisonStephenson2004:
1364 // Morrison & Stephenson (2004, 2005) algorithm for DeltaT
1365 ndot = -26.0; // n.dot = -26.0 "/cy/cy
1366 DeltaT = StelUtils::getDeltaTByMorrisonStephenson2004(jDay);
1367 break;
1368 case Reijs:
1369 // Reijs (2006) algorithm for DeltaT
1370 ndot = -26.0; // n.dot = -26.0 "/cy/cy
1371 DeltaT = StelUtils::getDeltaTByReijs(jDay);
1372 break;
1373 case EspenakMeeus:
1374 // Espenak & Meeus (2006) algorithm for DeltaT
1375 ndot = -25.858; // n.dot = -25.858 "/cy/cy
1376 DeltaT = StelUtils::getDeltaTByEspenakMeeus(jDay);
1377 break;
1378 case Custom:
1379 // User defined coefficients for quadratic equation for DeltaT
1380 ndot = getCustomNDot(); // n.dot = custom value "/cy/cy
1381 int year, month, day;
1382 Vec3f coeff = getCustomEquationCoefficients();
1383 StelUtils::getDateFromJulianDay(jDay, &year, &month, &day);
1384 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1385 double u = (yeardec-getCustomYear())/100;
1386 DeltaT = coeff[0] + coeff[1]*u + coeff[2]*std::pow(u,2);
1387 break;
1388 }
1389
1390 if (!dontUseMoon)
1391 DeltaT += StelUtils::getMoonSecularAcceleration(jDay, ndot);
1392
1393 return DeltaT;
1394}
1395
1396//! Set the current algorithm for time correction to use
1397void StelCore::setCurrentDeltaTAlgorithmKey(QString key)
1398{
1399 const QMetaEnum& en = metaObject()->enumerator(metaObject()->indexOfEnumerator("DeltaTAlgorithm"));
1400 DeltaTAlgorithm algo = (DeltaTAlgorithm)en.keyToValue(key.toAscii().data());
1401 if (algo<0)
1402 {
1403 qWarning() << "Unknown DeltaT algorithm: " << key << "setting \"WithoutCorrection\" instead";
1404 algo = WithoutCorrection;
1405 }
1406 setCurrentDeltaTAlgorithm(algo);
1407}
1408
1409//! Get the current algorithm used by the DeltaT
1410QString StelCore::getCurrentDeltaTAlgorithmKey(void) const
1411{
1412 return metaObject()->enumerator(metaObject()->indexOfEnumerator("DeltaTAlgorithm")).key(currentDeltaTAlgorithm);
1413}
1414
1415//! Get description of the current algorithm for time correction
1416QString StelCore::getCurrentDeltaTAlgorithmDescription(void) const
1417{ // GZ remarked where more info would be desirable. Generally, a full citation and the math. term would be nice to have displayed if it's just one formula, and the range of valid dates.
1418 QString description;
1419 double jd = 0;
1420 QString marker;
1421 switch (getCurrentDeltaTAlgorithm()) {
1422 case WithoutCorrection:
1423 description = q_("Correction is disabled. Use only if you know what you are doing!");
1424 break;
1425 case Schoch:
1426 description = q_("This formula was obtained by C. Schoch in 1931 year and was used by G. Henriksson in article <em>Einstein's Theory of Relativity Confirmed by Ancient Solar Eclipses</em> (%1). See for more info %2here%3.").arg("<a href='http://adsabs.harvard.edu/abs/2009ASPC..409..166H'>2010</a>").arg("<a href='http://journalofcosmology.com/AncientAstronomy123.html'>").arg("</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1427 break;
1428 case Clemence:
1429 description = q_("This empirical equation was published by G. M. Clemence in article <em>On the system of astronomical constants</em> (%1).").arg("<a href='http://adsabs.harvard.edu/abs/1948AJ.....53..169C'>1948</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1430 break;
1431 case IAU:
1432 description = q_("This formula is based on a study of the post-1650 observations of the Sun, the Moon and the planets by Spencer Jones (%1) and used by Jean Meeus in his <em>Astronomical Formulae for Calculators</em>. It was also adopted in the PC program SunTracker Pro.").arg("<a href='http://adsabs.harvard.edu/abs/1939MNRAS..99..541S'>1939</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1433 // find year of publication of AFFC
1434 break;
1435 case AstronomicalEphemeris:
1436 description = q_("This is a slightly modified version of the IAU (1952) formula which was adopted in the <em>Astronomical Ephemeris</em>.").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1437 // TODO: expand the sentence: ... adopted ... from 19xx-19yy?
1438 break;
1439 case TuckermanGoldstine:
1440 description = q_("The tables of Tuckerman (1962, 1964) list the positions of the Sun, the Moon and the planets at 5- and 10-day intervals from 601 BCE to 1649 CE. The listed positions are for 19h 00m (mean) local time at Babylon/Baghdad (i.e. near sunset) or 16h 00m GMT. The same relation was also implicitly adopted in the syzygy tables of Goldstine (1973).").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1441 // TODO: These tables are sometimes found cited, but I have no details. Maybe add "based on ... " ?
1442 break;
1443 case MullerStephenson:
1444 description = q_("This equation was published by P. M. Muller and F. R. Stephenson in article <em>The accelerations of the earth and moon from early astronomical observations</em> (%1).").arg("<a href='http://adsabs.harvard.edu/abs/1975grhe.conf..459M'>1975</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1445 break;
1446 case Stephenson1978:
1447 description = q_("This equation was published by F. R. Stephenson in article <em>Pre-Telescopic Astronomical Observations</em> (%1).").arg("<a href='http://adsabs.harvard.edu/abs/1978tfer.conf....5S'>1978</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1448 break;
1449 case SchmadelZech1979:
1450 description = q_("This equation was published by L. D. Schmadel and G. Zech in article <em>Polynomial approximations for the correction delta T E.T.-U.T. in the period 1800-1975</em> (%1).").arg("<a href='http://adsabs.harvard.edu/abs/1979AcA....29..101S'>1979</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1451 break;
1452 case MorrisonStephenson1982:
1453 description = q_("This algorithm was adopted in P. Bretagnon & L. Simon's <em>Planetary Programs and Tables from -4000 to +2800</em> (1986) and in the PC planetarium program RedShift.").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1454 break;
1455 case StephensonMorrison1984:
1456 description = q_("This formula was published by Stephenson, F. R.; Morrison, L. V. in article <em>Long-term changes in the rotation of the earth - 700 B.C. to A.D. 1980</em> (%1).").arg("<a href='http://adsabs.harvard.edu/abs/1984RSPTA.313...47S'>1984</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1457 break;
1458 case StephensonHoulden:
1459 description = q_("This algorithm is used in the PC planetarium program Guide 7.").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1460 break;
1461 case Espenak:
1462 description = q_("This algorithm was given by F. Espenak in his <em>Fifty Year Canon of Solar Eclipses: 1986-2035</em> (1987) and in his <em>Fifty Year Canon of Lunar Eclipses: 1986-2035</em> (1989).").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1463 break;
1464 case Borkowski:
1465 description = q_("This formula was obtained by K.M. Borkowski (%1) from an analysis of 31 solar eclipse records dating between 2137 BCE and 1715 CE.").arg("<a href='http://adsabs.harvard.edu/abs/1988A&A...205L...8B'>1988</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1466 break;
1467 case SchmadelZech1988:
1468 description = q_("This equation was published by L. D. Schmadel and G. Zech in article <em>Empirical Transformations from U.T. to E.T. for the Period 1800-1988</em> (%1).").arg("<a href='http://adsabs.harvard.edu/abs/1988AN....309..219S'>1988</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1469 break;
1470 case ChaprontTouze:
1471 description = q_("This formula was adopted by M. Chapront-Touze & J. Chapront in the shortened version of the ELP 2000-85 lunar theory in their <em>Lunar Tables and Programs from 4000 B.C. to A.D. 8000</em> (1991).").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1472 break;
1473 case StephensonMorrison1995:
1474 description = q_("This equation was published by F. R. Stephenson and L. V. Morrison in article <em>Long-Term Fluctuations in the Earth's Rotation: 700 BC to AD 1990</em> (%1).").arg("<a href='http://adsabs.harvard.edu/abs/1995RSPTA.351..165S'>1995</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1475 break;
1476 case Stephenson1997:
1477 description = q_("F. R. Stephenson published this formula in their book <em>Historical Eclipses and Earth's Rotation</em> (%1).").arg("<a href='http://ebooks.cambridge.org/ebook.jsf?bid=CBO9780511525186'>1997</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1478 break;
1479 case ChaprontFrancou:
1480 description = q_("This formula is recommended by J. Meeus in the second edition of his <em>Astronomical Algorithms</em> (1998) and used in Shinobu Takesako's EmapWin program for plotting the circumstances of solar eclipses from 3000 B.C. to A.D. 3000 and in Kerry Shetline's interactive planetarium Sky View Cafe.").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1481 break;
1482 case Meeus:
1483 description = q_("J. Meeus, in the second edition of his <em>Astronomical Algorithms</em> (1998), gives a 12th-order formula.").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1484 // TODO: specify which one this is? (I have the book at home only)
1485 break;
1486 case JPLHorizons:
1487 description = q_("The JPL Solar System Dynamics Group of the NASA Jet Propulsion Laboratory used this formula in their interactive website %1JPL Horizons%2.").arg("<a href='http://ssd.jpl.nasa.gov/?horizons'>").arg("</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1488 break;
1489 case MeeusSimons:
1490 description = q_("This polinom was published by J. Meeus and L. Simons in article <em>Polynomial approximations to Delta T, 1620-2000 AD</em> (%1).").arg("<a href='http://adsabs.harvard.edu/abs/2000JBAA..110..323M'>2000</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1491 break;
1492 case MontenbruckPfleger:
1493 description = q_("The fourth edition of O. Montenbruck & T. Pfleger's <em>Astronomy on the Personal Computer</em> (2000) provides the 3rd-order polynomials.").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1494 break;
1495 case ReingoldDershowitz:
1496 description = q_("E. M. Reingold & N. Dershowitz adopt the approximate formula in the second edition of <em>Calendrical Calculations</em> (2001) and in their <em>Calendrical Tabulations</em> (2002).").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1497 break;
1498 case MorrisonStephenson2004:
1499 description = q_("This equation was published by L. V. Morrison and F. R. Stephenson in article <em>Historical values of the Earth's clock error %1T and the calculation of eclipses</em> (%2) with addendum in (%3).").arg(QChar(0x0394)).arg("<a href='http://adsabs.harvard.edu/abs/2004JHA....35..327M'>2004</a>").arg("<a href='http://adsabs.harvard.edu/abs/2005JHA....36..339M'>2005</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1500 break;
1501 case Reijs:
1502 description = q_("From the Length of Day (LOD; as determined by Stephenson & Morrison (%2), Victor Reijs derived a %1T formula by using a Simplex optimisation with a cosine and square function. This is based on a possible periodicy described by Stephenson (%2). See for more info %3here%4.").arg(QChar(0x0394)).arg("<a href='http://adsabs.harvard.edu/abs/2004JHA....35..327M'>2004</a>").arg("<a href='http://www.iol.ie/~geniet/eng/DeltaTeval.htm'>").arg("</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1503 break;
1504 case EspenakMeeus:
1505 description = q_("This formula by F. Espenak and J. Meeus is used for the %1NASA Eclipse Web Site%2. This formula is also used in the solar, lunar and planetary ephemeris program SOLEX.").arg("<a href='http://eclipse.gsfc.nasa.gov/eclipse.html'>").arg("</a>").append(getCurrentDeltaTAlgorithmValigRange(jd, &marker));
1506 break;
1507 case Custom:
1508 description = q_("This is quadratic formula for calculation of %1T with coefficients defined by user.").arg(QChar(0x0394));
1509 break;
1510 default:
1511 description = q_("Error");
1512 }
1513 return description;
1514}
1515
1516QString StelCore::getCurrentDeltaTAlgorithmValigRange(double jDay, QString *marker) const
1517{
1518 QString validRange = "";
1519 QString validRangeAppendix = "";
1520 *marker = "";
1521 int year, month, day;
1522 int start = 0;
1523 int finish = 0;
1524 StelUtils::getDateFromJulianDay(jDay, &year, &month, &day);
1525 switch (getCurrentDeltaTAlgorithm()) {
1526 case WithoutCorrection:
1527 // Nothing make
1528 break;
1529 case Schoch:
1530 // Valid range unknown
1531 break;
1532 case Clemence:
1533 start = 1681;
1534 finish = 1900;
1535 break;
1536 case IAU:
1537 start = 1681;
1538 finish = 1900;
1539 break;
1540 case AstronomicalEphemeris:
1541 start = 1681;
1542 finish = 1900;
1543 break;
1544 case TuckermanGoldstine:
1545 start = -600;
1546 finish = 1649;
1547 break;
1548 case MullerStephenson:
1549 start = -1375;
1550 finish = 1975;
1551 break;
1552 case Stephenson1978:
1553 // Valid range unknown
1554 break;
1555 case SchmadelZech1979:
1556 start = 1800;
1557 finish = 1975;
1558 break;
1559 case MorrisonStephenson1982:
1560 // FIXME: This is correct valid range?
1561 start = -4000;
1562 finish = 2800;
1563 break;
1564 case StephensonMorrison1984:
1565 start = -391;
1566 finish = 1600;
1567 break;
1568 case StephensonHoulden:
1569 start = -600;
1570 finish = 1600;
1571 break;
1572 case Espenak:
1573 start = 1950;
1574 finish = 2100;
1575 break;
1576 case Borkowski:
1577 start = -2136;
1578 finish = 1715;
1579 break;
1580 case SchmadelZech1988:
1581 start = 1800;
1582 finish = 1988;
1583 break;
1584 case ChaprontTouze:
1585 // FIXME: This is valid range?
1586 start = -4000;
1587 finish = 8000;
1588 break;
1589 case StephensonMorrison1995:
1590 start = -700;
1591 finish = 1600;
1592 break;
1593 case Stephenson1997:
1594 start = -500;
1595 finish = 1600;
1596 break;
1597 case ChaprontFrancou:
1598 // FIXME: This is valid range?
1599 start = -3000;
1600 finish = 3000;
1601 break;
1602 case Meeus:
1603 start = 1800;
1604 finish = 1997;
1605 validRangeAppendix = q_("with a maximum error of 2.3 seconds");
1606 break;
1607 case JPLHorizons:
1608 start = -2999;
1609 finish = 1620;
1610 break;
1611 case MeeusSimons:
1612 start = 1620;
1613 finish = 2000;
1614 break;
1615 case MontenbruckPfleger:
1616 start = 1825;
1617 finish = 2000;
1618 validRangeAppendix = q_("with a typical 1-second accuracy");
1619 break;
1620 case ReingoldDershowitz:
1621 start = 1620;
1622 finish = 2019;
1623 break;
1624 case MorrisonStephenson2004:
1625 start = -1000;
1626 finish = 2000;
1627 break;
1628 case Reijs:
1629 start = -500;
1630 finish = 1990;
1631 break;
1632 case EspenakMeeus:
1633 start = -500;
1634 finish = 2150;
1635 break;
1636 case Custom:
1637 // Valid range unknown
1638 break;
1639 }
1640
1641 if (start!=finish)
1642 {
1643 if (validRangeAppendix!="")
1644 validRange = q_("Valid range of usage: between years %1 and %2, %3.").arg(start).arg(finish).arg(validRangeAppendix);
1645 else
1646 validRange = q_("Valid range of usage: between years %1 and %2.").arg(start).arg(finish);
1647 if (start > year or year > finish)
1648 *marker = "*";
1649 }
1650 else
1651 *marker = "?";
1652
1653 return QString(" %1").arg(validRange);
1654}
12161655
=== modified file 'src/core/StelCore.hpp'
--- src/core/StelCore.hpp 2013-01-25 03:34:37 +0000
+++ src/core/StelCore.hpp 2013-02-17 21:34:20 +0000
@@ -47,34 +47,35 @@
47{47{
48 Q_OBJECT48 Q_OBJECT
49 Q_ENUMS(ProjectionType)49 Q_ENUMS(ProjectionType)
50 Q_ENUMS(DeltaTAlgorithm)
5051
51public:52public:
52 //! @enum FrameType53 //! @enum FrameType
53 //! Supported reference frame types54 //! Supported reference frame types
54 enum FrameType55 enum FrameType
55 {56 {
56 FrameUninitialized, //!< Reference frame is not set (FMajerech: Added to avoid condition on uninitialized value in StelSkyLayerMgr::draw())57 FrameUninitialized, //!< Reference frame is not set (FMajerech: Added to avoid condition on uninitialized value in StelSkyLayerMgr::draw())
57 FrameAltAz, //!< Altazimuthal reference frame centered on observer.58 FrameAltAz, //!< Altazimuthal reference frame centered on observer.
58 FrameHeliocentricEcliptic, //!< Ecliptic reference frame centered on the Sun59 FrameHeliocentricEcliptic, //!< Ecliptic reference frame centered on the Sun
59 FrameObservercentricEcliptic, //!< Ecliptic reference frame centered on the Observer60 FrameObservercentricEcliptic, //!< Ecliptic reference frame centered on the Observer
60 FrameEquinoxEqu, //!< Equatorial reference frame at the current equinox centered on the observer.61 FrameEquinoxEqu, //!< Equatorial reference frame at the current equinox centered on the observer.
61 //! The north pole follows the precession of the planet on which the observer is located.62 //! The north pole follows the precession of the planet on which the observer is located.
62 FrameJ2000, //!< Equatorial reference frame at the J2000 equinox centered on the observer.63 FrameJ2000, //!< Equatorial reference frame at the J2000 equinox centered on the observer.
63 //! This is also the ICRS reference frame.64 //! This is also the ICRS reference frame.
64 FrameGalactic //! Galactic reference frame centered on observer.65 FrameGalactic //! Galactic reference frame centered on observer.
65 };66 };
6667
67 //! Available projection types. A value of 1000 indicate the default projection68 //! Available projection types. A value of 1000 indicate the default projection
68 enum ProjectionType69 enum ProjectionType
69 {70 {
70 ProjectionPerspective, //!< Perspective projection71 ProjectionPerspective, //!< Perspective projection
71 ProjectionEqualArea, //!< Equal Area projection72 ProjectionEqualArea, //!< Equal Area projection
72 ProjectionStereographic, //!< Stereograhic projection73 ProjectionStereographic, //!< Stereograhic projection
73 ProjectionFisheye, //!< Fisheye projection74 ProjectionFisheye, //!< Fisheye projection
74 ProjectionHammer, //!< Hammer-Aitoff projection75 ProjectionHammer, //!< Hammer-Aitoff projection
75 ProjectionCylinder, //!< Cylinder projection76 ProjectionCylinder, //!< Cylinder projection
76 ProjectionMercator, //!< Mercator projection77 ProjectionMercator, //!< Mercator projection
77 ProjectionOrthographic //!< Orthographic projection78 ProjectionOrthographic //!< Orthographic projection
78 };79 };
7980
80 //! Available refraction mode.81 //! Available refraction mode.
@@ -85,6 +86,40 @@
85 RefractionOff //!< Never add refraction (i.e. geometric coordinates)86 RefractionOff //!< Never add refraction (i.e. geometric coordinates)
86 };87 };
8788
89 //! @enum DeltaTAlgorithm
90 //! Available DeltaT algorithms
91 enum DeltaTAlgorithm
92 {
93 WithoutCorrection, //!< Without correction, DeltaT is disabled
94 Schoch, //!< Schoch (1931) algorithm for DeltaT
95 Clemence, //!< Clemence (1948) algorithm for DeltaT
96 IAU, //!< IAU (1952) algorithm for DeltaT (based on observations by Spencer Jones (1939))
97 AstronomicalEphemeris, //!< Astronomical Ephemeris (1960) algorithm for DeltaT
98 TuckermanGoldstine, //!< Tuckerman (1962, 1964) & Goldstine (1973) algorithm for DeltaT
99 MullerStephenson, //!< Muller & Stephenson (1975) algorithm for DeltaT
100 Stephenson1978, //!< Stephenson (1978) algorithm for DeltaT
101 SchmadelZech1979, //!< Schmadel & Zech (1979) algorithm for DeltaT
102 MorrisonStephenson1982, //!< Morrison & Stephenson (1982) algorithm for DeltaT (used by RedShift)
103 StephensonMorrison1984, //!< Stephenson & Morrison (1984) algorithm for DeltaT
104 StephensonHoulden, //!< Stephenson & Houlden (1986) algorithm for DeltaT
105 Espenak, //!< Espenak (1987, 1989) algorithm for DeltaT
106 Borkowski, //!< Borkowski (1988) algorithm for DeltaT
107 SchmadelZech1988, //!< Schmadel & Zech (1988) algorithm for DeltaT
108 ChaprontTouze, //!< Chapront-Touzé & Chapront (1991) algorithm for DeltaT
109 StephensonMorrison1995, //!< Stephenson & Morrison (1995) algorithm for DeltaT
110 Stephenson1997, //!< Stephenson (1997) algorithm for DeltaT
111 ChaprontFrancou, //!< Chapront, Chapront-Touzé & Francou (1997) algorithm for DeltaT
112 Meeus, //!< Meeus (1998) algorithm for DeltaT
113 JPLHorizons, //!< JPL Horizons algorithm for DeltaT
114 MeeusSimons, //!< Meeus & Simons (2000) algorithm for DeltaT
115 MontenbruckPfleger, //!< Montenbruck & Pfleger (2000) algorithm for DeltaT
116 ReingoldDershowitz, //!< Reingold & Dershowitz (2001, 2002) algorithm for DeltaT
117 MorrisonStephenson2004, //!< Morrison & Stephenson (2004, 2005) algorithm for DeltaT
118 Reijs, //!< Reijs (2006) algorithm for DeltaT
119 EspenakMeeus, //!< Espenak & Meeus (2006) algorithm for DeltaT
120 Custom //!< User defined coefficients for quadratic equation for DeltaT
121 };
122
88 StelCore();123 StelCore();
89 virtual ~StelCore();124 virtual ~StelCore();
90125
@@ -230,6 +265,18 @@
230 QString getStartupTimeMode();265 QString getStartupTimeMode();
231 void setStartupTimeMode(const QString& s);266 void setStartupTimeMode(const QString& s);
232267
268 //! Get Delta-T estimation for a given date.
269 //! @param jDay the date and time expressed as a julian day
270 //! @return Delta-T in seconds
271 //! @note Thanks to Rob van Gent which create a collection from many formulas for calculation of Delta-T: http://www.staff.science.uu.nl/~gent0113/deltat/deltat.htm
272 double getDeltaT(double jDay);
273
274 //! Get info about valid range for current algorithm for calculation of Delta-T
275 //! @param jDay the JD
276 //! @param marker the marker for valid range
277 //! @return valid range
278 QString getCurrentDeltaTAlgorithmValigRange(double jDay, QString* marker) const;
279
233public slots:280public slots:
234 //! Set the current ProjectionType to use281 //! Set the current ProjectionType to use
235 void setCurrentProjectionType(ProjectionType type);282 void setCurrentProjectionType(ProjectionType type);
@@ -243,6 +290,17 @@
243 //! Get the list of all the available projections290 //! Get the list of all the available projections
244 QStringList getAllProjectionTypeKeys() const;291 QStringList getAllProjectionTypeKeys() const;
245292
293 //! Set the current algorithm for time correction (DeltaT)
294 void setCurrentDeltaTAlgorithm(DeltaTAlgorithm algorithm) { currentDeltaTAlgorithm=algorithm; }
295 //! Get the current algorithm for time correction (DeltaT)
296 DeltaTAlgorithm getCurrentDeltaTAlgorithm() const { return currentDeltaTAlgorithm; }
297 //! Get description of the current algorithm for time correction
298 QString getCurrentDeltaTAlgorithmDescription(void) const;
299 //! Get the current algorithm used by the DeltaT
300 QString getCurrentDeltaTAlgorithmKey(void) const;
301 //! Set the current algorithm to use from its key
302 void setCurrentDeltaTAlgorithmKey(QString type);
303
246 //! Set the mask type.304 //! Set the mask type.
247 void setMaskType(StelProjector::StelProjectorMaskType m);305 void setMaskType(StelProjector::StelProjectorMaskType m);
248306
@@ -425,6 +483,23 @@
425 //! the selected object is of the correct type - i.e. a planet.483 //! the selected object is of the correct type - i.e. a planet.
426 void moveObserverToSelected();484 void moveObserverToSelected();
427485
486 //! Set year for custom equation for calculation of Delta-T
487 //! @param y the year, e.g. 1820
488 void setCustomYear(float y) { customYear=y; }
489 //! Set n-dot for custom equation for calculation of Delta-T
490 //! @param y the n-dot value, e.g. -26.0
491 void setCustomNDot(float v) { customNDot=v; }
492 //! Set coefficients for custom equation for calculation of Delta-T
493 //! @param y the coefficients, e.g. -20,0,32
494 void setCustomEquationCoefficients(Vec3f c) { customEquationCoeff=c; }
495
496 //! Get year for custom equation for calculation of Delta-T
497 float getCustomYear() { return customYear; }
498 //! Get n-dot for custom equation for calculation of Delta-T
499 float getCustomNDot() { return customNDot; }
500 //! Get coefficients for custom equation for calculation of Delta-T
501 Vec3f getCustomEquationCoefficients() { return customEquationCoeff; }
502
428signals:503signals:
429 //! This signal is emitted when the observer location has changed.504 //! This signal is emitted when the observer location has changed.
430 void locationChanged(StelLocation);505 void locationChanged(StelLocation);
@@ -442,6 +517,9 @@
442 // The currently used projection type517 // The currently used projection type
443 ProjectionType currentProjectionType;518 ProjectionType currentProjectionType;
444519
520 // The currentrly used time correction (DeltaT)
521 DeltaTAlgorithm currentDeltaTAlgorithm;
522
445 // Parameters to use when creating new instances of StelProjector523 // Parameters to use when creating new instances of StelProjector
446 StelProjector::StelProjectorParams currentProjectorParams;524 StelProjector::StelProjectorParams currentProjectorParams;
447525
@@ -472,6 +550,12 @@
472 double presetSkyTime;550 double presetSkyTime;
473 QTime initTodayTime;551 QTime initTodayTime;
474 QString startupTimeMode;552 QString startupTimeMode;
553
554 // Variables for custom equation of Delta-T
555 Vec3f customEquationCoeff;
556 float customNDot;
557 float customYear;
558
475};559};
476560
477#endif // _STELCORE_HPP_561#endif // _STELCORE_HPP_
478562
=== modified file 'src/core/StelObserver.cpp'
--- src/core/StelObserver.cpp 2013-01-27 19:19:38 +0000
+++ src/core/StelObserver.cpp 2013-02-17 21:34:20 +0000
@@ -208,7 +208,7 @@
208 // Apply DeltaT correction only for Earth208 // Apply DeltaT correction only for Earth
209 double deltaT = 0.;209 double deltaT = 0.;
210 if (getHomePlanet()->getEnglishName()=="Earth")210 if (getHomePlanet()->getEnglishName()=="Earth")
211 deltaT = StelUtils::getDeltaT(jd)/240.;211 deltaT = StelApp::getInstance().getCore()->getDeltaT(jd)/240.;
212 return Mat4d::zrotation((getHomePlanet()->getSiderealTime(jd)+currentLocation.longitude-deltaT)*M_PI/180.)212 return Mat4d::zrotation((getHomePlanet()->getSiderealTime(jd)+currentLocation.longitude-deltaT)*M_PI/180.)
213 * Mat4d::yrotation((90.-lat)*M_PI/180.);213 * Mat4d::yrotation((90.-lat)*M_PI/180.);
214}214}
215215
=== modified file 'src/core/StelUtils.cpp'
--- src/core/StelUtils.cpp 2013-02-08 16:40:32 +0000
+++ src/core/StelUtils.cpp 2013-02-17 21:34:20 +0000
@@ -1065,8 +1065,8 @@
1065QString hoursToHmsStr(double hours)1065QString hoursToHmsStr(double hours)
1066{1066{
1067 int h = (int)hours;1067 int h = (int)hours;
1068 int m = (int)((hours-h)*60);1068 int m = (int)((std::abs(hours)-std::abs(h))*60);
1069 float s = (((hours-h)*60)-m)*60;1069 float s = (((std::abs(hours)-std::abs(h))*60)-m)*60;
10701070
1071 return QString("%1h%2m%3s").arg(h).arg(m).arg(QString::number(s, 'f', 1));1071 return QString("%1h%2m%3s").arg(h).arg(m).arg(QString::number(s, 'f', 1));
1072}1072}
@@ -1195,26 +1195,547 @@
1195 return r;1195 return r;
1196}1196}
11971197
1198double getDeltaT(double jDay)1198// Implementation algorithm by Espenak & Meeus (2006) for DeltaT computation
1199double getDeltaTByEspenakMeeus(double jDay)
1199{1200{
1200 int year, month, day;1201 int year, month, day;
1201 double moon = 0.;
1202 getDateFromJulianDay(jDay, &year, &month, &day);1202 getDateFromJulianDay(jDay, &year, &month, &day);
1203 if (year<1955 or year>2005)1203
1204 moon = getMoonSecularAcceleration(jDay);
1205 // approximate "decimal year" = year + (month - 0.5)/121204 // approximate "decimal year" = year + (month - 0.5)/12
1206 return decYear2DeltaT(year + (month - 0.5)/12)+moon;1205 //return decYear2DeltaT(year + (month - 0.5)/12);
1207}1206 return decYear2DeltaT(year+((month-1)*30.5+day/31*30.5)/366);
12081207}
1209double getMoonSecularAcceleration(double jDay)1208
1209// Implementation algorithm by Schoch (1931) for DeltaT computation
1210double getDeltaTBySchoch(double jDay)
1211{
1212 // On the system of astronomical constants.
1213 // Clemence, G. M.
1214 // Astronomical Journal, Vol. 53, p. 169
1215 // 1948AJ.....53..169C [http://adsabs.harvard.edu/abs/1948AJ.....53..169C]
1216 int year, month, day;
1217 getDateFromJulianDay(jDay, &year, &month, &day);
1218
1219 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1220 double u = (yeardec-1800)/100;
1221
1222 return -36.28 + 36.28*std::pow(u,2);
1223}
1224
1225// Implementation algorithm by Clemence (1948) for DeltaT computation
1226double getDeltaTByClemence(double jDay)
1227{
1228 // On the system of astronomical constants.
1229 // Clemence, G. M.
1230 // Astronomical Journal, Vol. 53, p. 169
1231 // 1948AJ.....53..169C [http://adsabs.harvard.edu/abs/1948AJ.....53..169C]
1232 int year, month, day;
1233 getDateFromJulianDay(jDay, &year, &month, &day);
1234
1235 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1236 double u = (yeardec-1900)/100;
1237
1238 return +8.72 + 26.75*u + 11.22*std::pow(u,2);
1239}
1240
1241// Implementation algorithm by IAU (1952) for DeltaT computation
1242double getDeltaTByIAU(double jDay)
1243{
1244 int year, month, day;
1245 getDateFromJulianDay(jDay, &year, &month, &day);
1246
1247 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1248 double u = (yeardec-1900)/100;
1249 // TODO: Calculate Moon's longitude fluctuation
1250 // Spencer Jones, H., "The Rotation of the Earth, and the Secular Accelerations of the Sun, Moon and Planets",
1251 // Monthly Notices of the Royal Astronomical Society, 99 (1939), 541-558
1252 // http://adsabs.harvard.edu/abs/1939MNRAS..99..541S
1253 return 24.349+72.3165*u+29.949*std::pow(u,2)/* + 1.821*b*/;
1254}
1255
1256// Implementation algorithm by Astronomical Ephemeris (1960) for DeltaT computation
1257double getDeltaTByAstronomicalEphemeris(double jDay)
1258{
1259 int year, month, day;
1260 getDateFromJulianDay(jDay, &year, &month, &day);
1261
1262 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1263 double u = (yeardec-1900)/100;
1264 // TODO: Calculate Moon's longitude fluctuation
1265 // Spencer Jones, H., "The Rotation of the Earth, and the Secular Accelerations of the Sun, Moon and Planets",
1266 // Monthly Notices of the Royal Astronomical Society, 99 (1939), 541-558
1267 // http://adsabs.harvard.edu/abs/1939MNRAS..99..541S
1268 return 24.349+72.318*u+29.950*std::pow(u,2)/* + 1.82144*b*/;
1269}
1270
1271// Implementation algorithm by Tuckerman (1962, 1964) & Goldstine (1973) for DeltaT computation
1272double getDeltaTByTuckermanGoldstine(double jDay)
1273{
1274 int year, month, day;
1275 getDateFromJulianDay(jDay, &year, &month, &day);
1276
1277 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1278 double u = (yeardec-1900)/100;
1279
1280 return 4.87+35.06*u+36.79*std::pow(u,2);
1281}
1282
1283// Implementation algorithm by Muller & Stephenson (1975) for DeltaT computation
1284double getDeltaTByMullerStephenson(double jDay)
1285{
1286 int year, month, day;
1287 getDateFromJulianDay(jDay, &year, &month, &day);
1288
1289 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1290 double u = (yeardec-1900)/100;
1291
1292 return 66.0+120.38*u+45.78*std::pow(u,2);
1293}
1294
1295// Implementation algorithm by Stephenson (1978) for DeltaT computation
1296double getDeltaTByStephenson1978(double jDay)
1297{
1298 int year, month, day;
1299 getDateFromJulianDay(jDay, &year, &month, &day);
1300
1301 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1302 double u = (yeardec-1900)/100;
1303
1304 return 20.0+114.0*u+38.30*std::pow(u,2);
1305}
1306
1307// Implementation algorithm by Stephenson (1997) for DeltaT computation
1308double getDeltaTByStephenson1997(double jDay)
1309{
1310 int year, month, day;
1311 getDateFromJulianDay(jDay, &year, &month, &day);
1312
1313 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1314 double u = (yeardec-1735)/100;
1315
1316 return -20.0 + 35.0*std::pow(u,2);
1317}
1318
1319// Implementation algorithm by Schmadel & Zech (1979) for DeltaT computation
1320double getDeltaTBySchmadelZech1979(double jDay)
1321{
1322 // Polynomial approximations for the correction delta T E.T.-U.T. in the period 1800-1975
1323 // Schmadel, L. D.; Zech, G.
1324 // Acta Astronomica, vol. 29, no. 1, 1979, p. 101-104.
1325 // 1979AcA....29..101S [http://adsabs.harvard.edu/abs/1979AcA....29..101S]
1326 int year, month, day;
1327 getDateFromJulianDay(jDay, &year, &month, &day);
1328
1329 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1330 double u = (yeardec-1900)/100;
1331
1332 double deltaT = -0.000029 + 0.001233*u + 0.003081*std::pow(u,2) - 0.013867*std::pow(u,3) - 0.020446*std::pow(u,4) + 0.076929*std::pow(u,5)
1333 + 0.075456*std::pow(u,6) - 0.200097*std::pow(u,7) - 0.159732*std::pow(u,8) + 0.247433*std::pow(u,9) + 0.185489*std::pow(u,10)
1334 - 0.117389*std::pow(u,11) - 0.089491*std::pow(u,12);
1335
1336 return deltaT;
1337}
1338
1339// Implementation algorithm by Morrison & Stephenson (1982) for DeltaT computation
1340double getDeltaTByMorrisonStephenson1982(double jDay)
1341{
1342 int year, month, day;
1343 getDateFromJulianDay(jDay, &year, &month, &day);
1344
1345 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1346 double u = (yeardec-1810)/100;
1347
1348 return -15.0+32.50*std::pow(u,2);
1349}
1350
1351// Implementation algorithm by Stephenson & Morrison (1984) for DeltaT computation
1352double getDeltaTByStephensonMorrison1984(double jDay)
1353{
1354 int year, month, day;
1355 double deltaT = 0.;
1356 getDateFromJulianDay(jDay, &year, &month, &day);
1357
1358 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1359 double u = (yeardec-1800)/100;
1360
1361 if (-391 < year and year <= 948)
1362 deltaT = 1360.0 + 320*u + 44.3*std::pow(u,2);
1363 if (948 < year and year <= 1600)
1364 deltaT = 25.5*std::pow(u,2);
1365
1366 return deltaT;
1367}
1368
1369// Implementation algorithm by Stephenson & Morrison (1995) for DeltaT computation
1370double getDeltaTByStephensonMorrison1995(double jDay)
1371{
1372 int year, month, day;
1373 getDateFromJulianDay(jDay, &year, &month, &day);
1374
1375 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1376 double u = (yeardec-1820)/100;
1377
1378
1379 return -20.0 + 31.0*std::pow(u,2);
1380}
1381
1382// Implementation algorithm by Stephenson & Houlden (1986) for DeltaT computation
1383double getDeltaTByStephensonHoulden(double jDay)
1384{
1385 int year, month, day;
1386 double u;
1387 double deltaT = 0.;
1388 getDateFromJulianDay(jDay, &year, &month, &day);
1389
1390 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1391
1392 if (year <= 948)
1393 {
1394 u = (yeardec-948)/100;
1395 deltaT = 1830.0 - 405.0*u + 46.5*std::pow(u,2);
1396 }
1397 if (948 < year and year <= 1600)
1398 {
1399 u = (yeardec-1850)/100;
1400 deltaT = 25.5*std::pow(u,2);
1401 }
1402
1403 return deltaT;
1404}
1405
1406// Implementation algorithm by Espenak (1987, 1989) for DeltaT computation
1407// This relation should not be used before around 1950 or after around 2100 (Espenak, pers. comm.).
1408double getDeltaTByEspenak(double jDay)
1409{
1410 int year, month, day;
1411 getDateFromJulianDay(jDay, &year, &month, &day);
1412
1413 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1414 double u = (yeardec-2000)/100;
1415
1416 return 67.0+61.0*u + 64.3*std::pow(u,2);
1417}
1418
1419// Implementation algorithm by Borkowski (1988) for DeltaT computation
1420double getDeltaTByBorkowski(double jDay)
1421{
1422 // ELP 2000-85 and the dynamic time-universal time relation
1423 // Borkowski, K. M.
1424 // Astronomy and Astrophysics (ISSN 0004-6361), vol. 205, no. 1-2, Oct. 1988, p. L8-L10.
1425 // 1988A&A...205L...8B [http://adsabs.harvard.edu/abs/1988A&A...205L...8B]
1426 int year, month, day;
1427 getDateFromJulianDay(jDay, &year, &month, &day);
1428
1429 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1430 double u = (yeardec-1625)/100;
1431
1432 return 40.0 + 35.0*std::pow(u,2);
1433}
1434
1435// Implementation algorithm by Schmadel & Zech (1988) for DeltaT computation
1436double getDeltaTBySchmadelZech1988(double jDay)
1437{
1438 // Empirical Transformations from U.T. to E.T. for the Period 1800-1988
1439 // Schmadel, L. D.; Zech, G.
1440 // Astronomische Nachrichten 309, 219-221
1441 // 1988AN....309..219S [http://adsabs.harvard.edu/abs/1988AN....309..219S]
1442 int year, month, day;
1443 getDateFromJulianDay(jDay, &year, &month, &day);
1444
1445 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1446 double u = (yeardec-1900)/100;
1447
1448 double deltaT = -0.000014 + 0.001148*u + 0.003357*std::pow(u,2) - 0.012462*std::pow(u,3) - 0.022542*std::pow(u,4) + 0.062971*std::pow(u,5)
1449 + 0.079441*std::pow(u,6) - 0.146960*std::pow(u,7) - 0.149279*std::pow(u,8) + 0.161416*std::pow(u,9) + 0.145932*std::pow(u,10)
1450 - 0.067471*std::pow(u,11) - 0.058091*std::pow(u,12);
1451
1452 return deltaT;
1453}
1454
1455// Implementation algorithm by Chapront-Touzé & Chapront (1991) for DeltaT computation
1456double getDeltaTByChaprontTouze(double jDay)
1457{
1458 int year, month, day;
1459 double deltaT = 0.;
1460 getDateFromJulianDay(jDay, &year, &month, &day);
1461
1462 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1463 double u = (yeardec-2000)/100;
1464
1465 if (-391 < year and year <= 948)
1466 deltaT = 2177.0 - 495.0*u + 42.4*std::pow(u,2);
1467 if (948 < year and year <= 1600)
1468 deltaT = 102.0 + 100.0*u + 23.6*std::pow(u,2);
1469
1470 return deltaT;
1471}
1472
1473// Implementation algorithm by Chapront, Chapront-Touzé & Francou (1997) for DeltaT computation
1474double getDeltaTByChaprontFrancou(double jDay)
1475{
1476 int year, month, day;
1477 double deltaT = 0.;
1478 getDateFromJulianDay(jDay, &year, &month, &day);
1479
1480 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1481 double u = (yeardec-2000)/100;
1482
1483 if (year <= 948)
1484 deltaT = 2177.0 - 497.0*u + 44.1*std::pow(u,2);
1485 if (948 < year and year <= 1600)
1486 deltaT = 102.0 + 102.0*u + 25.3*std::pow(u,2);
1487 if (2000 < year and year <= 2100)
1488 deltaT = 102.0 + 102.0*u + 25.3*std::pow(u,2) + 0.37*(year - 2100);
1489
1490 return deltaT;
1491}
1492
1493// Implementation algorithm by JPL Horizons for DeltaT computation
1494double getDeltaTByJPLHorizons(double jDay)
1495{
1496 int year, month, day;
1497 double u;
1498 double deltaT = 0.;
1499 getDateFromJulianDay(jDay, &year, &month, &day);
1500
1501 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1502
1503 if (-2999 < year and year < 948)
1504 {
1505 u = (yeardec-1820)/100;
1506 deltaT = 31.0*std::pow(u,2);
1507 }
1508 if (948 < year and year <= 1620)
1509 {
1510 u = (yeardec-2000)/100;
1511 deltaT = 50.6 + 67.5*u + 22.5*std::pow(u,2);
1512 }
1513
1514 return deltaT;
1515}
1516
1517// Implementation algorithm by Morrison & Stephenson (2004, 2005) for DeltaT computation
1518double getDeltaTByMorrisonStephenson2004(double jDay)
1519{
1520 // Historical values of the Earth's clock error ΔT and the calculation of eclipses
1521 // Morrison, L. V.; Stephenson, F. R.
1522 // Journal for the History of Astronomy (ISSN 0021-8286), Vol. 35, Part 3, No. 120, p. 327 - 336 (2004)
1523 // 2004JHA....35..327M [http://adsabs.harvard.edu/abs/2004JHA....35..327M]
1524 //
1525 // Addendum: Historical values of the Earth's clock error
1526 // Morrison, L. V.; Stephenson, F. R.
1527 // Journal for the History of Astronomy (ISSN 0021-8286), Vol. 36, Part 3, No. 124, p. 339 (2005)
1528 // 2005JHA....36..339M [http://adsabs.harvard.edu/abs/2005JHA....36..339M]
1529 int year, month, day;
1530 getDateFromJulianDay(jDay, &year, &month, &day);
1531
1532 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1533 double u = (yeardec-1820)/100;
1534
1535 return -20.0 + 32.0 * std::pow(u, 2);
1536}
1537
1538// Implementation algorithm by Reijs (2006) for DeltaT computation
1539double getDeltaTByReijs(double jDay)
1540{
1541 int year, month, day;
1542 getDateFromJulianDay(jDay, &year, &month, &day);
1543 double OffSetYear = (2385800 - jDay)/365.25;
1544
1545 return ((1.8 * std::pow(OffSetYear,2)/200 + 1443*3.76/(2*M_PI)*(std::cos(2*M_PI*OffSetYear/1443)-1))*365.25)/1000;
1546}
1547
1548// Implementation algorithm by Meeus (1998) for DeltaT computation
1549double getDeltaTByMeeus(double jDay)
1550{
1551 int year, month, day;
1552 double deltaT = 0.;
1553 getDateFromJulianDay(jDay, &year, &month, &day);
1554
1555 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1556 double u = (yeardec-1900)/100;
1557
1558 if (1800 <= year and year < 1900)
1559 deltaT = -2.50 + 228.95*u + 5218.61*std::pow(u,2) + 56282.84*std::pow(u,3) + 324011.78*std::pow(u,4) + 1061660.75*std::pow(u,5)
1560 + 2087298.89*std::pow(u,6) + 2513807.78*std::pow(u,7) + 1818961.41*std::pow(u,8) + 727058.63*std::pow(u,9) + 58353.42*std::pow(u,10);
1561
1562 if (1900 <= year and year < 1997)
1563 deltaT = -2.44 + 87.24*u + 815.20*std::pow(u,2) - 2637.80*std::pow(u,3) - 18756.33*std::pow(u,4) + 124906.15*std::pow(u,5)
1564 -303191.19*std::pow(u,6) + 372919.88*std::pow(u,7) - 232424.66*std::pow(u,8) + 58353.42*std::pow(u,9);
1565
1566 return deltaT;
1567}
1568
1569// Implementation algorithm by Montenbruck & Pfleger (2000) for DeltaT computation
1570double getDeltaTByMontenbruckPfleger(double jDay)
1571{
1572 int year, month, day;
1573 double u;
1574 double deltaT = 0.;
1575 getDateFromJulianDay(jDay, &year, &month, &day);
1576
1577 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1578
1579 if (1825 <= year and year < 1850)
1580 {
1581 u = (yeardec-1825)/100;
1582 deltaT = +10.4 - 80.8*u + 413.9*std::pow(u,2) - 572.3*std::pow(u,3);
1583 }
1584 if (1850 <= year and year < 1875)
1585 {
1586 u = (yeardec-1850)/100;
1587 deltaT = +6.6 + 46.3*u - 358.4*std::pow(u,2) + 18.8*std::pow(u,3);
1588 }
1589 if (1875 <= year and year < 1900)
1590 {
1591 u = (yeardec-1875)/100;
1592 deltaT = -3.9 - 10.8*u - 166.2*std::pow(u,2) + 867.4*std::pow(u,3);
1593 }
1594 if (1900 <= year and year < 1925)
1595 {
1596 u = (yeardec-1900)/100;
1597 deltaT = -2.6 + 114.1*u + 327.5*std::pow(u,2) - 1467.4*std::pow(u,3);
1598 }
1599 if (1925 <= year and year < 1950)
1600 {
1601 u = (yeardec-1925)/100;
1602 deltaT = +24.2 - 6.3*u - 8.2*std::pow(u,2) + 483.4*std::pow(u,3);
1603 }
1604 if (1950 <= year and year < 1975)
1605 {
1606 u = (yeardec-1950)/100;
1607 deltaT = +29.3 + 32.5*u - 3.8*std::pow(u,2) + 550.7*std::pow(u,3);
1608 }
1609 if (1975 <= year and year <= 2000)
1610 {
1611 u = (yeardec-1975)/100;
1612 deltaT = +45.3 + 130.5*u - 570.5*std::pow(u,2) + 1516.7*std::pow(u,3);
1613 }
1614
1615 return deltaT;
1616}
1617
1618// Implementation algorithm by Meeus & Simons (2000) for DeltaT computation
1619double getDeltaTByMeeusSimons(double jDay)
1620{
1621 // Polynomial approximations to Delta T, 1620-2000 AD
1622 // Meeus, J.; Simons, L.
1623 // Journal of the British Astronomical Association, vol.110, no.6, 323
1624 // 2000JBAA..110..323M [http://adsabs.harvard.edu/abs/2000JBAA..110..323M]
1625 int year, month, day;
1626 double u;
1627 double deltaT = 0.;
1628 getDateFromJulianDay(jDay, &year, &month, &day);
1629
1630 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1631 double ub = (yeardec-2000)/100;
1632
1633 if (1620 <= year and year < 1690)
1634 {
1635 u = 3.45 + ub;
1636 deltaT = +40.3 - 107.0*u + 50.0*std::pow(u,2) - 454.0*std::pow(u,3) + 1244.0*std::pow(u,4);
1637 }
1638 if (1690 <= year and year < 1770)
1639 {
1640 u = 2.70 + ub;
1641 deltaT = +10.2 + 11.3*u - std::pow(u,2) - 16.0*std::pow(u,3) + 70.0*std::pow(u,4);
1642 }
1643 if (1770 <= year and year < 1820)
1644 {
1645 u = 2.05 + ub;
1646 deltaT = +14.7 - 18.8*u - 22.0*std::pow(u,2) + 173.0*std::pow(u,3) + 6.0*std::pow(u,4);
1647 }
1648 if (1820 <= year and year < 1870)
1649 {
1650 u = 1.55 + ub;
1651 deltaT = +5.7 + 12.7*u + 111.0*std::pow(u,2) - 534.0*std::pow(u,3) + 1654.0*std::pow(u,4);
1652 }
1653 if (1870 <= year and year < 1900)
1654 {
1655 u = 1.15 + ub;
1656 deltaT = -5.8 - 14.6*u + 27.0*std::pow(u,2) + 101.0*std::pow(u,3) + 8234.0*std::pow(u,4);
1657 }
1658 if (1900 <= year and year < 1940)
1659 {
1660 u = 0.80 + ub;
1661 deltaT = +21.4 + 67.0*u + 443.0*std::pow(u,2) + 19.0*std::pow(u,3) + 4441.0*std::pow(u,4);
1662 }
1663 if (1940 <= year and year < 1990)
1664 {
1665 u = 0.35 + ub;
1666 deltaT = +36.2 + 74.0*u + 189.0*std::pow(u,2) - 140.0*std::pow(u,3) - 1883.0*std::pow(u,4);
1667 }
1668 if (1900 <= year and year <= 2000)
1669 {
1670 u = 0.05 + ub;
1671 deltaT = +60.8 + 82.0*u + 188.0*std::pow(u,2) - 5034.0*std::pow(u,3);
1672 }
1673
1674 return deltaT;
1675}
1676
1677// Implementation algorithm by Reingold & Dershowitz (2001, 2002) for DeltaT computation
1678double getDeltaTByReingoldDershowitz(double jDay)
1679{
1680 int year, month, day;
1681 getDateFromJulianDay(jDay, &year, &month, &day);
1682
1683 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1684 double u = (yeardec-1810)/100;;
1685 double deltaT = -15.0 + 32.5*std::pow(u,2);
1686
1687 if (1620 <= year and year < 1800)
1688 {
1689 u = (yeardec-1600)/100;
1690 deltaT = +196.58333 - 406.75*u + 219.167*std::pow(u,2);
1691 }
1692 if (1800 <= year and year < 1900)
1693 {
1694 u = (yeardec-1900)/100;
1695 deltaT = (-0.000009 + 0.003844*u + 0.083563*std::pow(u,2) + 0.865736*std::pow(u,3) + 4.867575*std::pow(u,4) + 15.845535*std::pow(u,5)
1696 + 31.332267*std::pow(u,6) + 38.291999*std::pow(u,7) + 28.316289*std::pow(u,8) + 11.636204*std::pow(u,9) + 2.043794*std::pow(u,10))*86400;
1697 }
1698 if (1900 <= year and year < 1987)
1699 {
1700 u = (yeardec-1900)/100;
1701 deltaT = (-0.00002 + 0.000297*u + 0.025184*std::pow(u,2) - 0.181133*std::pow(u,3) + 0.553040*std::pow(u,4) - 0.861938*std::pow(u,5) + 0.677066*std::pow(u,6) - 0.212591*std::pow(u,7))*86400;
1702 }
1703 if (1987 <= year and year < 2019)
1704 {
1705 u = (yeardec-1933)/100;
1706 deltaT = 100.0*u;
1707 }
1708
1709 return deltaT;
1710}
1711
1712double getMoonSecularAcceleration(double jDay, double nd)
1210{1713{
1211 // Method described is here: http://eclipse.gsfc.nasa.gov/SEcat5/secular.html1714 // Method described is here: http://eclipse.gsfc.nasa.gov/SEcat5/secular.html
1212 // For adapting from -26 to -25.858, use -0.91072 * (-25.858 + 26.0) = -0.129322241715 // For adapting from -26 to -25.858, use -0.91072 * (-25.858 + 26.0) = -0.12932224
1213 // For adapting from -26 to -23.895, use -0.91072 * (-23.895 + 26.0) = -1.91706561716 // For adapting from -26 to -23.895, use -0.91072 * (-23.895 + 26.0) = -1.9170656
1214 int year, month, day;1717 int year, month, day;
1215 getDateFromJulianDay(jDay, &year, &month, &day);1718 getDateFromJulianDay(jDay, &year, &month, &day);
1216 double t = (year-1955)/100;1719
1217 return -0.12932224 * t * t;1720 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1721 double t = (yeardec-1955.5)/100;
1722 // n.dot for secular acceleration of the Moon in ELP2000-82B
1723 // have value -23.8946 "/cy/cy
1724 return -0.91072 * (-23.8946 + std::abs(nd))*std::pow(t, 2);
1725}
1726
1727double getDeltaTStandardError(double jDay)
1728{
1729 int year, month, day;
1730 getDateFromJulianDay(jDay, &year, &month, &day);
1731
1732 double yeardec=year+((month-1)*30.5+day/31*30.5)/366;
1733 double sigma = -1.;
1734
1735 if (-1000 <= year and year <= 1600)
1736 sigma = 0.8 * std::pow((yeardec-1820.0)/100,2); // sigma(DeltaT) = 0.8*u^2
1737
1738 return sigma;
1218}1739}
12191740
1220} // end of the StelUtils namespace1741} // end of the StelUtils namespace
12211742
=== modified file 'src/core/StelUtils.hpp'
--- src/core/StelUtils.hpp 2013-02-08 16:40:32 +0000
+++ src/core/StelUtils.hpp 2013-02-17 21:34:20 +0000
@@ -293,13 +293,172 @@
293 //! Get Delta-T estimation for a given date.293 //! Get Delta-T estimation for a given date.
294 //! Note that this method is valid for the year range:294 //! Note that this method is valid for the year range:
295 //! -1999 to +3000, outside of which "0" will be returned.295 //! -1999 to +3000, outside of which "0" will be returned.
296 //! @param jDay the date and time expressed as a julian day296 //! Implementation algorithm by Espenak & Meeus (2006) for DeltaT computation
297 //! @return Delta-T in seconds297 //! @param jDay the date and time expressed as a julian day
298 double getDeltaT(double jDay);298 //! @return Delta-T in seconds
299 double getDeltaTByEspenakMeeus(double jDay);
300
301 //! Get Delta-T estimation for a given date.
302 //! Implementation algorithm by Schoch (1931) for DeltaT computation
303 //! @param jDay the date and time expressed as a julian day
304 //! @return Delta-T in seconds
305 double getDeltaTBySchoch(double jDay);
306
307 //! Get Delta-T estimation for a given date.
308 //! Implementation algorithm by Clemence (1948) for DeltaT computation
309 //! @param jDay the date and time expressed as a julian day
310 //! @return Delta-T in seconds
311 double getDeltaTByClemence(double jDay);
312
313 //! Get Delta-T estimation for a given date.
314 //! Implementation algorithm by IAU (1952) for DeltaT computation
315 //! @param jDay the date and time expressed as a julian day
316 //! @return Delta-T in seconds
317 double getDeltaTByIAU(double jDay);
318
319 //! Get Delta-T estimation for a given date.
320 //! Implementation algorithm by Astronomical Ephemeris (1960) for DeltaT computation
321 //! @param jDay the date and time expressed as a julian day
322 //! @return Delta-T in seconds
323 double getDeltaTByAstronomicalEphemeris(double jDay);
324
325 //! Get Delta-T estimation for a given date.
326 //! Implementation algorithm by Tuckerman (1962, 1964) & Goldstine (1973) for DeltaT computation
327 //! @param jDay the date and time expressed as a julian day
328 //! @return Delta-T in seconds
329 double getDeltaTByTuckermanGoldstine(double jDay);
330
331 //! Get Delta-T estimation for a given date.
332 //! Implementation algorithm by Muller & Stephenson (1975) for DeltaT computation
333 //! @param jDay the date and time expressed as a julian day
334 //! @return Delta-T in seconds
335 double getDeltaTByMullerStephenson(double jDay);
336
337 //! Get Delta-T estimation for a given date.
338 //! Implementation algorithm by Stephenson (1978) for DeltaT computation
339 //! @param jDay the date and time expressed as a julian day
340 //! @return Delta-T in seconds
341 double getDeltaTByStephenson1978(double jDay);
342
343 //! Get Delta-T estimation for a given date.
344 //! Implementation algorithm by Stephenson (1997) for DeltaT computation
345 //! @param jDay the date and time expressed as a julian day
346 //! @return Delta-T in seconds
347 double getDeltaTByStephenson1997(double jDay);
348
349 //! Get Delta-T estimation for a given date.
350 //! Implementation algorithm by Schmadel & Zech (1979) for DeltaT computation
351 //! @param jDay the date and time expressed as a julian day
352 //! @return Delta-T in seconds
353 double getDeltaTBySchmadelZech1979(double jDay);
354
355 //! Get Delta-T estimation for a given date.
356 //! Implementation algorithm by Morrison & Stephenson (1982) for DeltaT computation
357 //! @param jDay the date and time expressed as a julian day
358 //! @return Delta-T in seconds
359 double getDeltaTByMorrisonStephenson1982(double jDay);
360
361 //! Get Delta-T estimation for a given date.
362 //! Implementation algorithm by Stephenson & Morrison (1984) for DeltaT computation
363 //! @param jDay the date and time expressed as a julian day
364 //! @return Delta-T in seconds
365 double getDeltaTByStephensonMorrison1984(double jDay);
366
367 //! Get Delta-T estimation for a given date.
368 //! Implementation algorithm by Stephenson & Morrison (1995) for DeltaT computation
369 //! @param jDay the date and time expressed as a julian day
370 //! @return Delta-T in seconds
371 double getDeltaTByStephensonMorrison1995(double jDay);
372
373 //! Get Delta-T estimation for a given date.
374 //! Implementation algorithm by Stephenson & Houlden (1986) for DeltaT computation
375 //! @param jDay the date and time expressed as a julian day
376 //! @return Delta-T in seconds
377 double getDeltaTByStephensonHoulden(double jDay);
378
379 //! Get Delta-T estimation for a given date.
380 //! Implementation algorithm by Espenak (1987, 1989) for DeltaT computation
381 //! @param jDay the date and time expressed as a julian day
382 //! @return Delta-T in seconds
383 double getDeltaTByEspenak(double jDay);
384
385 //! Get Delta-T estimation for a given date.
386 //! Implementation algorithm by Borkowski (1988) for DeltaT computation
387 //! @param jDay the date and time expressed as a julian day
388 //! @return Delta-T in seconds
389 double getDeltaTByBorkowski(double jDay);
390
391 //! Get Delta-T estimation for a given date.
392 //! Implementation algorithm by Schmadel & Zech (1988) for DeltaT computation
393 //! @param jDay the date and time expressed as a julian day
394 //! @return Delta-T in seconds
395 double getDeltaTBySchmadelZech1988(double jDay);
396
397 //! Get Delta-T estimation for a given date.
398 //! Implementation algorithm by Chapront-Touzé & Chapront (1991) for DeltaT computation
399 //! @param jDay the date and time expressed as a julian day
400 //! @return Delta-T in seconds
401 double getDeltaTByChaprontTouze(double jDay);
402
403 //! Get Delta-T estimation for a given date.
404 //! Implementation algorithm by Chapront, Chapront-Touzé & Francou (1997) for DeltaT computation
405 //! @param jDay the date and time expressed as a julian day
406 //! @return Delta-T in seconds
407 double getDeltaTByChaprontFrancou(double jDay);
408
409 //! Get Delta-T estimation for a given date.
410 //! Implementation algorithm by JPL Horizons for DeltaT computation
411 //! @param jDay the date and time expressed as a julian day
412 //! @return Delta-T in seconds
413 double getDeltaTByJPLHorizons(double jDay);
414
415 //! Get Delta-T estimation for a given date.
416 //! Implementation algorithm by Morrison & Stephenson (2004, 2005) for DeltaT computation
417 //! @param jDay the date and time expressed as a julian day
418 //! @return Delta-T in seconds
419 double getDeltaTByMorrisonStephenson2004(double jDay);
420
421 //! Get Delta-T estimation for a given date.
422 //! Implementation algorithm by Reijs (2006) for DeltaT computation
423 //! @param jDay the date and time expressed as a julian day
424 //! @return Delta-T in seconds
425 double getDeltaTByReijs(double jDay);
426
427 //! Get Delta-T estimation for a given date.
428 //! Implementation algorithm by Meeus (1998) for DeltaT computation
429 //! @param jDay the date and time expressed as a julian day
430 //! @return Delta-T in seconds
431 double getDeltaTByMeeus(double jDay);
432
433 //! Get Delta-T estimation for a given date.
434 //! Implementation algorithm by Meeus & Simons (2000) for DeltaT computation
435 //! @param jDay the date and time expressed as a julian day
436 //! @return Delta-T in seconds
437 double getDeltaTByMeeusSimons(double jDay);
438
439 //! Get Delta-T estimation for a given date.
440 //! Implementation algorithm by Montenbruck & Pfleger (2000) for DeltaT computation
441 //! @param jDay the date and time expressed as a julian day
442 //! @return Delta-T in seconds
443 double getDeltaTByMontenbruckPfleger(double jDay);
444
445 //! Get Delta-T estimation for a given date.
446 //! Implementation algorithm by Reingold & Dershowitz (2001, 2002) for DeltaT computation
447 //! @param jDay the date and time expressed as a julian day
448 //! @return Delta-T in seconds
449 double getDeltaTByReingoldDershowitz(double jDay);
450
299 //! Get Secular Acceleration estimation for a given year.451 //! Get Secular Acceleration estimation for a given year.
300 //! @param jDay the JD452 //! @param jDay the JD
453 //! @param ndot value n-dot which use in the algorithm
301 //! @return SecularAcceleration in seconds454 //! @return SecularAcceleration in seconds
302 double getMoonSecularAcceleration(double jDay);455 //! @note n-dot for secular acceleration of the Moon in ELP2000-82B have value -23.8946 "/cy/cy
456 double getMoonSecularAcceleration(double jDay, double ndot);
457
458 //! Get the standard error (sigma) for the value of DeltaT
459 //! @param jDay the JD
460 //! @return sigma in seconds
461 double getDeltaTStandardError(double jDay);
303}462}
304463
305#endif // _STELUTILS_HPP_464#endif // _STELUTILS_HPP_
306465
=== modified file 'src/gui/ConfigurationDialog.cpp'
--- src/gui/ConfigurationDialog.cpp 2012-10-03 20:25:38 +0000
+++ src/gui/ConfigurationDialog.cpp 2013-02-17 21:34:20 +0000
@@ -21,6 +21,7 @@
2121
22#include "Dialog.hpp"22#include "Dialog.hpp"
23#include "ConfigurationDialog.hpp"23#include "ConfigurationDialog.hpp"
24#include "CustomDeltaTEquationDialog.hpp"
24#include "StelMainGraphicsView.hpp"25#include "StelMainGraphicsView.hpp"
25#include "StelMainWindow.hpp"26#include "StelMainWindow.hpp"
26#include "ui_configurationDialog.h"27#include "ui_configurationDialog.h"
@@ -60,10 +61,12 @@
60#include <QDebug>61#include <QDebug>
61#include <QFile>62#include <QFile>
62#include <QFileDialog>63#include <QFileDialog>
64#include <QComboBox>
6365
64ConfigurationDialog::ConfigurationDialog(StelGui* agui) : StelDialog(agui), starCatalogDownloadReply(NULL), currentDownloadFile(NULL), progressBar(NULL), gui(agui)66ConfigurationDialog::ConfigurationDialog(StelGui* agui) : StelDialog(agui), starCatalogDownloadReply(NULL), currentDownloadFile(NULL), progressBar(NULL), gui(agui)
65{67{
66 ui = new Ui_configurationDialogForm;68 ui = new Ui_configurationDialogForm;
69 customDeltaTEquationDialog = NULL;
67 hasDownloadedStarCatalog = false;70 hasDownloadedStarCatalog = false;
68 isDownloadingStarCatalog = false;71 isDownloadingStarCatalog = false;
69 savedProjectionType = StelApp::getInstance().getCore()->getCurrentProjectionType(); 72 savedProjectionType = StelApp::getInstance().getCore()->getCurrentProjectionType();
@@ -72,7 +75,9 @@
72ConfigurationDialog::~ConfigurationDialog()75ConfigurationDialog::~ConfigurationDialog()
73{76{
74 delete ui;77 delete ui;
75 ui = 0;78 ui = NULL;
79 delete customDeltaTEquationDialog;
80 customDeltaTEquationDialog = NULL;
76}81}
7782
78void ConfigurationDialog::retranslate()83void ConfigurationDialog::retranslate()
@@ -99,6 +104,8 @@
99104
100 //Plug-in information105 //Plug-in information
101 populatePluginsList();106 populatePluginsList();
107
108 populateDeltaTAlgorithmsList();
102 }109 }
103}110}
104111
@@ -221,6 +228,18 @@
221 this,228 this,
222 SLOT(showShortcutsWindow()));229 SLOT(showShortcutsWindow()));
223230
231 // Delta-T
232 populateDeltaTAlgorithmsList();
233 int idx = ui->deltaTAlgorithmComboBox->findData(core->getCurrentDeltaTAlgorithmKey(), Qt::UserRole, Qt::MatchCaseSensitive);
234 if (idx==-1)
235 {
236 // Use Espenak & Meeus (2006) as default
237 idx = ui->deltaTAlgorithmComboBox->findData(QVariant("EspenakMeeus"), Qt::UserRole, Qt::MatchCaseSensitive);
238 }
239 ui->deltaTAlgorithmComboBox->setCurrentIndex(idx);
240 connect(ui->deltaTAlgorithmComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setDeltaTAlgorithm(int)));
241 connect(ui->pushButtonCustomDeltaTEquationDialog, SIGNAL(clicked()), this, SLOT(showCustomDeltaTEquationDialog()));
242
224 // Tools tab243 // Tools tab
225 ConstellationMgr* cmgr = GETSTELMODULE(ConstellationMgr);244 ConstellationMgr* cmgr = GETSTELMODULE(ConstellationMgr);
226 Q_ASSERT(cmgr);245 Q_ASSERT(cmgr);
@@ -591,6 +610,7 @@
591 conf->setValue("navigation/startup_time_mode", core->getStartupTimeMode());610 conf->setValue("navigation/startup_time_mode", core->getStartupTimeMode());
592 conf->setValue("navigation/today_time", core->getInitTodayTime());611 conf->setValue("navigation/today_time", core->getInitTodayTime());
593 conf->setValue("navigation/preset_sky_time", core->getPresetSkyTime());612 conf->setValue("navigation/preset_sky_time", core->getPresetSkyTime());
613 conf->setValue("navigation/time_correction_algorithm", core->getCurrentDeltaTAlgorithmKey());
594 conf->setValue("navigation/init_fov", mvmgr->getInitFov());614 conf->setValue("navigation/init_fov", mvmgr->getInitFov());
595 if (mvmgr->getMountMode() == StelMovementMgr::MountAltAzimuthal)615 if (mvmgr->getMountMode() == StelMovementMgr::MountAltAzimuthal)
596 conf->setValue("navigation/viewing_mode", "horizon");616 conf->setValue("navigation/viewing_mode", "horizon");
@@ -1087,3 +1107,82 @@
1087 ui->stackListWidget->setMinimumWidth(0);1107 ui->stackListWidget->setMinimumWidth(0);
1088 */1108 */
1089}1109}
1110
1111void ConfigurationDialog::populateDeltaTAlgorithmsList()
1112{
1113 Q_ASSERT(ui->deltaTAlgorithmComboBox);
1114
1115 // TRANSLATORS: Full phrase is "Algorithm of DeltaT"
1116 ui->deltaTLabel->setText(QString("%1 %2T:").arg("Algorithm of").arg(QChar(0x0394)));
1117
1118 QComboBox* algorithms = ui->deltaTAlgorithmComboBox;
1119
1120 //Save the current selection to be restored later
1121 algorithms->blockSignals(true);
1122 int index = algorithms->currentIndex();
1123 QVariant selectedAlgorithmId = algorithms->itemData(index);
1124 algorithms->clear();
1125 //For each algorithm, display the localized name and store the key as user
1126 //data. Unfortunately, there's no other way to do this than with a cycle.
1127 algorithms->addItem(q_("Without correction"), "WithoutCorrection");
1128 algorithms->addItem(q_("Schoch (1931)"), "Schoch");
1129 algorithms->addItem(q_("Clemence (1948)"), "Clemence");
1130 algorithms->addItem(q_("IAU (1952)"), "IAU");
1131 algorithms->addItem(q_("Astronomical Ephemeris (1960)"), "AstronomicalEphemeris");
1132 algorithms->addItem(q_("Tuckerman (1962, 1964) & Goldstine (1973)"), "TuckermanGoldstine");
1133 algorithms->addItem(q_("Muller & Stephenson (1975)"), "MullerStephenson");
1134 algorithms->addItem(q_("Stephenson (1978)"), "Stephenson1978");
1135 algorithms->addItem(q_("Schmadel & Zech (1979)"), "SchmadelZech1979");
1136 algorithms->addItem(q_("Morrison & Stephenson (1982)"), "MorrisonStephenson1982");
1137 algorithms->addItem(q_("Stephenson & Morrison (1984)"), "StephensonMorrison1984");
1138 algorithms->addItem(q_("Stephenson & Houlden (1986)"), "StephensonHoulden");
1139 algorithms->addItem(q_("Espenak (1987, 1989)"), "Espenak");
1140 algorithms->addItem(q_("Borkowski (1988)"), "Borkowski");
1141 algorithms->addItem(q_("Schmadel & Zech (1988)"), "SchmadelZech1988");
1142 algorithms->addItem(q_("Chapront-Touze & Chapront (1991)"), "ChaprontTouze");
1143 algorithms->addItem(q_("Stephenson & Morrison (1995)"), "StephensonMorrison1995");
1144 algorithms->addItem(q_("Stephenson (1997)"), "Stephenson1997");
1145 algorithms->addItem(q_("Chapront, Chapront-Touze & Francou (1997)"), "ChaprontFrancou");
1146 algorithms->addItem(q_("Meeus (1998)"), "Meeus");
1147 algorithms->addItem(q_("JPL Horizons"), "JPLHorizons");
1148 algorithms->addItem(q_("Meeus & Simons (2000)"), "MeeusSimons");
1149 algorithms->addItem(q_("Montenbruck & Pfleger (2000)"), "MontenbruckPfleger");
1150 algorithms->addItem(q_("Reingold & Dershowitz (2001, 2002)"), "ReingoldDershowitz");
1151 algorithms->addItem(q_("Morrison & Stephenson (2004, 2005)"), "MorrisonStephenson2004");
1152 algorithms->addItem(q_("Espenak & Meeus (2006)"), "EspenakMeeus");
1153 algorithms->addItem(q_("Reijs (2006)"), "Reijs");
1154 algorithms->addItem(q_("Custom equation of %1T").arg(QChar(0x0394)), "Custom");
1155
1156 //Restore the selection
1157 index = algorithms->findData(selectedAlgorithmId, Qt::UserRole, Qt::MatchCaseSensitive);
1158 algorithms->setCurrentIndex(index);
1159 //algorithms->model()->sort(0);
1160 algorithms->blockSignals(false);
1161 setDeltaTAlgorithmDescription();
1162}
1163
1164void ConfigurationDialog::setDeltaTAlgorithm(int algorithmID)
1165{
1166 StelCore* core = StelApp::getInstance().getCore();
1167 QString currentAlgorithm = ui->deltaTAlgorithmComboBox->itemData(algorithmID).toString();
1168 core->setCurrentDeltaTAlgorithmKey(currentAlgorithm);
1169 setDeltaTAlgorithmDescription();
1170 if (currentAlgorithm.contains("Custom"))
1171 ui->pushButtonCustomDeltaTEquationDialog->setEnabled(true);
1172 else
1173 ui->pushButtonCustomDeltaTEquationDialog->setEnabled(false);
1174}
1175
1176void ConfigurationDialog::setDeltaTAlgorithmDescription()
1177{
1178 ui->deltaTAlgorithmDescription->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet));
1179 ui->deltaTAlgorithmDescription->setHtml(StelApp::getInstance().getCore()->getCurrentDeltaTAlgorithmDescription());
1180}
1181
1182void ConfigurationDialog::showCustomDeltaTEquationDialog()
1183{
1184 if (customDeltaTEquationDialog == NULL)
1185 customDeltaTEquationDialog = new CustomDeltaTEquationDialog();
1186
1187 customDeltaTEquationDialog->setVisible(true);
1188}
10901189
=== modified file 'src/gui/ConfigurationDialog.hpp'
--- src/gui/ConfigurationDialog.hpp 2012-10-03 20:25:38 +0000
+++ src/gui/ConfigurationDialog.hpp 2013-02-17 21:34:20 +0000
@@ -32,6 +32,7 @@
32class QNetworkAccessManager;32class QNetworkAccessManager;
33class QListWidgetItem;33class QListWidgetItem;
34class StelGui;34class StelGui;
35class CustomDeltaTEquationDialog;
3536
36class ConfigurationDialog : public StelDialog37class ConfigurationDialog : public StelDialog
37{38{
@@ -120,6 +121,11 @@
120 void pluginConfigureCurrentSelection();121 void pluginConfigureCurrentSelection();
121 void loadAtStartupChanged(int);122 void loadAtStartupChanged(int);
122123
124 void populateDeltaTAlgorithmsList();
125 void setDeltaTAlgorithm(int algorithmID);
126 void setDeltaTAlgorithmDescription();
127 void showCustomDeltaTEquationDialog();
128
123 #ifndef DISABLE_SCRIPTING129 #ifndef DISABLE_SCRIPTING
124 //! The selection of script in the script list has changed130 //! The selection of script in the script list has changed
125 //! Updates the script information panel131 //! Updates the script information panel
@@ -140,6 +146,8 @@
140private:146private:
141 StelGui* gui;147 StelGui* gui;
142148
149 CustomDeltaTEquationDialog* customDeltaTEquationDialog;
150
143 int savedProjectionType;151 int savedProjectionType;
144 152
145 //! Set the displayed fields checkboxes from the current displayed fields.153 //! Set the displayed fields checkboxes from the current displayed fields.
146154
=== added file 'src/gui/CustomDeltaTEquationDialog.cpp'
--- src/gui/CustomDeltaTEquationDialog.cpp 1970-01-01 00:00:00 +0000
+++ src/gui/CustomDeltaTEquationDialog.cpp 2013-02-17 21:34:20 +0000
@@ -0,0 +1,122 @@
1/*
2 * This program is distributed in the hope that it will be useful,
3 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5 * GNU General Public License for more details.
6 * You should have received a copy of the GNU General Public License
7 * along with this program; if not, write to the Free Software
8 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
9*/
10
11#include "CustomDeltaTEquationDialog.hpp"
12#include "ui_CustomDeltaTEquationDialog.h"
13
14#include "Dialog.hpp"
15#include "StelApp.hpp"
16#include "StelTranslator.hpp"
17#include "StelObjectMgr.hpp"
18
19#include <QDebug>
20
21CustomDeltaTEquationDialog::CustomDeltaTEquationDialog()
22{
23 ui = new Ui_CustomDeltaTEquationDialogForm;
24 conf = StelApp::getInstance().getSettings();
25 core = StelApp::getInstance().getCore();
26
27 ndot = core->getCustomNDot();
28 year = core->getCustomYear();
29 coeff = core->getCustomEquationCoefficients();
30}
31
32CustomDeltaTEquationDialog::~CustomDeltaTEquationDialog()
33{
34 delete ui;
35 ui=NULL;
36}
37
38void CustomDeltaTEquationDialog::retranslate()
39{
40 if (dialog)
41 ui->retranslateUi(dialog);
42}
43
44
45void CustomDeltaTEquationDialog::createDialogContent()
46{
47 ui->setupUi(dialog);
48
49 ui->stelWindowTitle->setText(q_("Custom equation for %1T").arg(QChar(0x0394)));
50 ui->labelDescription->setText(q_("A typical equation for calculation of %1T looks like:").arg(QChar(0x0394)));
51 ui->labelEquation->setText(QString("<strong>%1T = a + b%2u + c%3u%4,</strong>").arg(QChar(0x0394)).arg(QChar(0x00B7)).arg(QChar(0x00B7)).arg(QChar(0x00B2)));
52 ui->labelSubEquation->setText(QString("%1 <em>u = (%2 - y)/100</em>").arg(q_("where")).arg(q_("year")));
53 ui->labelNDot->setText(QString("%1:").arg(QChar(0x1E45)));
54
55 ui->lineEditCoefficientA->setText(QString("%1").arg(coeff[0]));
56 ui->lineEditCoefficientB->setText(QString("%1").arg(coeff[1]));
57 ui->lineEditCoefficientC->setText(QString("%1").arg(coeff[2]));
58 ui->lineEditYear->setText(QString("%1").arg(year));
59 ui->lineEditNDot->setText(QString("%1").arg(ndot));
60
61 //Signals and slots
62 connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
63 connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
64
65 connect(ui->lineEditNDot, SIGNAL(textEdited(const QString&)), this, SLOT(setNDot(const QString&)));
66 connect(ui->lineEditYear, SIGNAL(textEdited(const QString&)), this, SLOT(setYear(const QString&)));
67 connect(ui->lineEditCoefficientA, SIGNAL(textEdited(const QString&)), this, SLOT(setCoeffA(const QString&)));
68 connect(ui->lineEditCoefficientB, SIGNAL(textEdited(const QString&)), this, SLOT(setCoeffB(const QString&)));
69 connect(ui->lineEditCoefficientC, SIGNAL(textEdited(const QString&)), this, SLOT(setCoeffC(const QString&)));
70
71}
72
73void CustomDeltaTEquationDialog::setVisible(bool v)
74{
75 StelDialog::setVisible(v);
76}
77
78void CustomDeltaTEquationDialog::saveSettings(void) const
79{
80 conf->beginGroup("custom_time_correction");
81
82 conf->setValue("year", year);
83 conf->setValue("ndot", ndot);
84 conf->setValue("coefficients", QString("%1,%2,%3").arg(coeff[0]).arg(coeff[1]).arg(coeff[2]));
85
86 conf->endGroup();
87}
88
89void CustomDeltaTEquationDialog::setNDot(const QString& v)
90{
91 ndot = v.toFloat();
92 core->setCustomNDot(ndot);
93 saveSettings();
94}
95
96void CustomDeltaTEquationDialog::setYear(const QString& v)
97{
98 year = v.toFloat();
99 core->setCustomYear(year);
100 saveSettings();
101}
102
103void CustomDeltaTEquationDialog::setCoeffA(const QString& v)
104{
105 coeff[0] = v.toFloat();
106 core->setCustomEquationCoefficients(coeff);
107 saveSettings();
108}
109
110void CustomDeltaTEquationDialog::setCoeffB(const QString& v)
111{
112 coeff[1] = v.toFloat();
113 core->setCustomEquationCoefficients(coeff);
114 saveSettings();
115}
116
117void CustomDeltaTEquationDialog::setCoeffC(const QString& v)
118{
119 coeff[2] = v.toFloat();
120 core->setCustomEquationCoefficients(coeff);
121 saveSettings();
122}
0123
=== added file 'src/gui/CustomDeltaTEquationDialog.hpp'
--- src/gui/CustomDeltaTEquationDialog.hpp 1970-01-01 00:00:00 +0000
+++ src/gui/CustomDeltaTEquationDialog.hpp 2013-02-17 21:34:20 +0000
@@ -0,0 +1,69 @@
1/*
2 * Stellarium
3 *
4 * Copyright (C) 2013 Alexander Wolf
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18*/
19
20// AW: Methods copied largely from AddRemoveLandscapesDialog
21
22#ifndef _CUSTOMDELTATEQUATIONDIALOG_HPP_
23#define _CUSTOMDELTATEQUATIONDIALOG_HPP_
24
25#include <QObject>
26#include <QSettings>
27#include "StelDialog.hpp"
28#include "StelCore.hpp"
29
30class Ui_CustomDeltaTEquationDialogForm;
31
32//! @class CustomDeltaTEquationDialog
33class CustomDeltaTEquationDialog : public StelDialog
34{
35 Q_OBJECT
36
37public:
38 CustomDeltaTEquationDialog();
39 virtual ~CustomDeltaTEquationDialog();
40
41public slots:
42 void retranslate();
43 void setVisible(bool);
44
45protected:
46 //! Initialize the dialog widgets and connect the signals/slots.
47 virtual void createDialogContent();
48 Ui_CustomDeltaTEquationDialogForm *ui;
49
50private slots:
51 void saveSettings(void) const;
52
53 void setNDot(const QString& v);
54 void setYear(const QString& v);
55 void setCoeffA(const QString& v);
56 void setCoeffB(const QString& v);
57 void setCoeffC(const QString& v);
58
59private:
60 QSettings* conf;
61 StelCore* core;
62
63 float year;
64 float ndot;
65 Vec3f coeff;
66
67};
68
69#endif // _CUSTOMDELTATEQUATIONDIALOG_HPP_
070
=== added file 'src/gui/CustomDeltaTEquationDialog.ui'
--- src/gui/CustomDeltaTEquationDialog.ui 1970-01-01 00:00:00 +0000
+++ src/gui/CustomDeltaTEquationDialog.ui 2013-02-17 21:34:20 +0000
@@ -0,0 +1,262 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>CustomDeltaTEquationDialogForm</class>
4 <widget class="QWidget" name="CustomDeltaTEquationDialogForm">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>168</width>
10 <height>261</height>
11 </rect>
12 </property>
13 <layout class="QVBoxLayout" name="verticalLayout">
14 <property name="spacing">
15 <number>0</number>
16 </property>
17 <property name="margin">
18 <number>0</number>
19 </property>
20 <item>
21 <widget class="BarFrame" name="TitleBar">
22 <property name="minimumSize">
23 <size>
24 <width>16</width>
25 <height>25</height>
26 </size>
27 </property>
28 <property name="maximumSize">
29 <size>
30 <width>16777215</width>
31 <height>25</height>
32 </size>
33 </property>
34 <property name="frameShape">
35 <enum>QFrame::StyledPanel</enum>
36 </property>
37 <layout class="QHBoxLayout">
38 <property name="leftMargin">
39 <number>0</number>
40 </property>
41 <property name="topMargin">
42 <number>0</number>
43 </property>
44 <property name="rightMargin">
45 <number>4</number>
46 </property>
47 <property name="bottomMargin">
48 <number>0</number>
49 </property>
50 <item>
51 <spacer>
52 <property name="orientation">
53 <enum>Qt::Horizontal</enum>
54 </property>
55 <property name="sizeHint" stdset="0">
56 <size>
57 <width>40</width>
58 <height>20</height>
59 </size>
60 </property>
61 </spacer>
62 </item>
63 <item>
64 <widget class="QLabel" name="stelWindowTitle">
65 <property name="palette">
66 <palette>
67 <active/>
68 <inactive/>
69 <disabled/>
70 </palette>
71 </property>
72 <property name="font">
73 <font/>
74 </property>
75 <property name="text">
76 <string/>
77 </property>
78 </widget>
79 </item>
80 <item>
81 <spacer>
82 <property name="orientation">
83 <enum>Qt::Horizontal</enum>
84 </property>
85 <property name="sizeHint" stdset="0">
86 <size>
87 <width>40</width>
88 <height>20</height>
89 </size>
90 </property>
91 </spacer>
92 </item>
93 <item>
94 <widget class="QPushButton" name="closeStelWindow">
95 <property name="minimumSize">
96 <size>
97 <width>16</width>
98 <height>16</height>
99 </size>
100 </property>
101 <property name="maximumSize">
102 <size>
103 <width>16</width>
104 <height>16</height>
105 </size>
106 </property>
107 <property name="focusPolicy">
108 <enum>Qt::NoFocus</enum>
109 </property>
110 <property name="text">
111 <string/>
112 </property>
113 </widget>
114 </item>
115 </layout>
116 </widget>
117 </item>
118 <item>
119 <widget class="QGroupBox" name="customDeltaTEquationGroupBox">
120 <property name="title">
121 <string/>
122 </property>
123 <property name="alignment">
124 <set>Qt::AlignCenter</set>
125 </property>
126 <layout class="QVBoxLayout" name="verticalLayout_3">
127 <property name="margin">
128 <number>0</number>
129 </property>
130 <item>
131 <widget class="QLabel" name="labelDescription">
132 <property name="text">
133 <string notr="true">description</string>
134 </property>
135 </widget>
136 </item>
137 <item>
138 <widget class="QLabel" name="labelEquation">
139 <property name="text">
140 <string notr="true">equation</string>
141 </property>
142 <property name="textFormat">
143 <enum>Qt::RichText</enum>
144 </property>
145 <property name="alignment">
146 <set>Qt::AlignCenter</set>
147 </property>
148 </widget>
149 </item>
150 <item>
151 <widget class="QLabel" name="labelSubEquation">
152 <property name="text">
153 <string notr="true">subequation</string>
154 </property>
155 </widget>
156 </item>
157 <item>
158 <layout class="QHBoxLayout" name="horizontalLayout">
159 <item>
160 <widget class="QLabel" name="labelCoefficientA">
161 <property name="text">
162 <string notr="true">a:</string>
163 </property>
164 </widget>
165 </item>
166 <item>
167 <widget class="QLineEdit" name="lineEditCoefficientA">
168 <property name="alignment">
169 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
170 </property>
171 </widget>
172 </item>
173 </layout>
174 </item>
175 <item>
176 <layout class="QHBoxLayout" name="horizontalLayout_2">
177 <item>
178 <widget class="QLabel" name="labelCoefficientB">
179 <property name="text">
180 <string notr="true">b:</string>
181 </property>
182 </widget>
183 </item>
184 <item>
185 <widget class="QLineEdit" name="lineEditCoefficientB">
186 <property name="alignment">
187 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
188 </property>
189 </widget>
190 </item>
191 </layout>
192 </item>
193 <item>
194 <layout class="QHBoxLayout" name="horizontalLayout_4">
195 <item>
196 <widget class="QLabel" name="labelCoefficientC">
197 <property name="text">
198 <string notr="true">c:</string>
199 </property>
200 </widget>
201 </item>
202 <item>
203 <widget class="QLineEdit" name="lineEditCoefficientC">
204 <property name="alignment">
205 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
206 </property>
207 </widget>
208 </item>
209 </layout>
210 </item>
211 <item>
212 <layout class="QHBoxLayout" name="horizontalLayout_5">
213 <item>
214 <widget class="QLabel" name="labelYear">
215 <property name="text">
216 <string notr="true">y:</string>
217 </property>
218 </widget>
219 </item>
220 <item>
221 <widget class="QLineEdit" name="lineEditYear">
222 <property name="alignment">
223 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
224 </property>
225 </widget>
226 </item>
227 </layout>
228 </item>
229 <item>
230 <layout class="QHBoxLayout" name="horizontalLayout_6">
231 <item>
232 <widget class="QLabel" name="labelNDot">
233 <property name="text">
234 <string notr="true">ndot:</string>
235 </property>
236 </widget>
237 </item>
238 <item>
239 <widget class="QLineEdit" name="lineEditNDot">
240 <property name="alignment">
241 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
242 </property>
243 </widget>
244 </item>
245 </layout>
246 </item>
247 </layout>
248 </widget>
249 </item>
250 </layout>
251 </widget>
252 <customwidgets>
253 <customwidget>
254 <class>BarFrame</class>
255 <extends>QFrame</extends>
256 <header>Dialog.hpp</header>
257 <container>1</container>
258 </customwidget>
259 </customwidgets>
260 <resources/>
261 <connections/>
262</ui>
0263
=== modified file 'src/gui/DateTimeDialog.cpp'
--- src/gui/DateTimeDialog.cpp 2013-01-27 19:19:38 +0000
+++ src/gui/DateTimeDialog.cpp 2013-02-17 21:34:20 +0000
@@ -55,7 +55,7 @@
55 // Add in a DeltaT correction. Divide DeltaT by 86400 to convert from seconds to days.55 // Add in a DeltaT correction. Divide DeltaT by 86400 to convert from seconds to days.
56 double deltaT = 0.;56 double deltaT = 0.;
57 if (StelApp::getInstance().getCore()->getCurrentLocation().planetName=="Earth")57 if (StelApp::getInstance().getCore()->getCurrentLocation().planetName=="Earth")
58 deltaT = StelUtils::getDeltaT(jd)/86400.;58 deltaT = StelApp::getInstance().getCore()->getDeltaT(jd)/86400.;
59 setDateTime(jd + (StelApp::getInstance().getLocaleMgr().getGMTShift(jd)/24.0)-deltaT);59 setDateTime(jd + (StelApp::getInstance().getLocaleMgr().getGMTShift(jd)/24.0)-deltaT);
6060
61 connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));61 connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
@@ -177,7 +177,7 @@
177 // Add in a DeltaT correction. Divide DeltaT by 86400 to convert from seconds to days.177 // Add in a DeltaT correction. Divide DeltaT by 86400 to convert from seconds to days.
178 double deltaT = 0.;178 double deltaT = 0.;
179 if (StelApp::getInstance().getCore()->getCurrentLocation().planetName=="Earth")179 if (StelApp::getInstance().getCore()->getCurrentLocation().planetName=="Earth")
180 deltaT = StelUtils::getDeltaT(jd)/86400.;180 deltaT = StelApp::getInstance().getCore()->getDeltaT(jd)/86400.;
181 jd -= (StelApp::getInstance().getLocaleMgr().getGMTShift(jd)/24.0-deltaT); // local tz -> UTC181 jd -= (StelApp::getInstance().getLocaleMgr().getGMTShift(jd)/24.0-deltaT); // local tz -> UTC
182 return jd;182 return jd;
183}183}
@@ -211,7 +211,7 @@
211 // Add in a DeltaT correction. Divide DeltaT by 86400 to convert from seconds to days.211 // Add in a DeltaT correction. Divide DeltaT by 86400 to convert from seconds to days.
212 double deltaT = 0.;212 double deltaT = 0.;
213 if (StelApp::getInstance().getCore()->getCurrentLocation().planetName=="Earth")213 if (StelApp::getInstance().getCore()->getCurrentLocation().planetName=="Earth")
214 deltaT = StelUtils::getDeltaT(newJd)/86400.;214 deltaT = StelApp::getInstance().getCore()->getDeltaT(newJd)/86400.;
215 newJd += (StelApp::getInstance().getLocaleMgr().getGMTShift(newJd)/24.0-deltaT); // UTC -> local tz215 newJd += (StelApp::getInstance().getLocaleMgr().getGMTShift(newJd)/24.0-deltaT); // UTC -> local tz
216 StelUtils::getDateFromJulianDay(newJd, &year, &month, &day);216 StelUtils::getDateFromJulianDay(newJd, &year, &month, &day);
217 StelUtils::getTimeFromJulianDay(newJd, &hour, &minute, &second);217 StelUtils::getTimeFromJulianDay(newJd, &hour, &minute, &second);
218218
=== modified file 'src/gui/StelGuiItems.cpp'
--- src/gui/StelGuiItems.cpp 2013-01-30 18:50:32 +0000
+++ src/gui/StelGuiItems.cpp 2013-02-17 21:34:20 +0000
@@ -582,11 +582,16 @@
582 StelCore* core = StelApp::getInstance().getCore();582 StelCore* core = StelApp::getInstance().getCore();
583 double jd = core->getJDay();583 double jd = core->getJDay();
584 double deltaT = 0.;584 double deltaT = 0.;
585 double sigma = -1.;
586 QString sigmaInfo = "";
587 QString validRangeInfo = "";
585 bool displayDeltaT = false;588 bool displayDeltaT = false;
586 if (StelApp::getInstance().getCore()->getCurrentLocation().planetName=="Earth")589 if (core->getCurrentLocation().planetName.contains("Earth"))
587 {590 {
588 deltaT = StelUtils::getDeltaT(jd);591 deltaT = core->getDeltaT(jd);
589 displayDeltaT = true;592 displayDeltaT = true;
593 sigma = StelUtils::getDeltaTStandardError(jd);
594 core->getCurrentDeltaTAlgorithmValigRange(jd, &validRangeInfo);
590 }595 }
591596
592 // Add in a DeltaT correction. Divide DeltaT by 86400 to convert from seconds to days.597 // Add in a DeltaT correction. Divide DeltaT by 86400 to convert from seconds to days.
@@ -596,12 +601,15 @@
596 {601 {
597 updatePos = true;602 updatePos = true;
598 datetime->setText(newDate);603 datetime->setText(newDate);
599 if (displayDeltaT)604 if (displayDeltaT && core->getCurrentDeltaTAlgorithm()!=StelCore::WithoutCorrection)
600 {605 {
601 if (deltaT>60.)606 if (sigma>0)
602 datetime->setToolTip(QString("%1T = %2 (%3s)").arg(QChar(0x0394)).arg(StelUtils::hoursToHmsStr(deltaT/3600.)).arg(deltaT, 5, 'f', 2));607 sigmaInfo = QString("; %1(%2T) = %3s").arg(QChar(0x03c3)).arg(QChar(0x0394)).arg(sigma, 3, 'f', 1);
608
609 if (std::abs(deltaT)>60.)
610 datetime->setToolTip(QString("%1T = %2 (%3s)%8 [%4 @ -23.8946%5/cy%6%7]").arg(QChar(0x0394)).arg(StelUtils::hoursToHmsStr(deltaT/3600.)).arg(deltaT, 5, 'f', 2).arg(QChar(0x1e45)).arg(QChar(0x2033)).arg(QChar(0x00B2)).arg(sigmaInfo).arg(validRangeInfo));
603 else611 else
604 datetime->setToolTip(QString("%1T = %2s").arg(QChar(0x0394)).arg(deltaT, 3, 'f', 3));612 datetime->setToolTip(QString("%1T = %2s%7 [%3 @ -23.8946%4/cy%5%6]").arg(QChar(0x0394)).arg(deltaT, 3, 'f', 3).arg(QChar(0x1e45)).arg(QChar(0x2033)).arg(QChar(0x00B2)).arg(sigmaInfo).arg(validRangeInfo));
605 }613 }
606 else614 else
607 datetime->setToolTip("");615 datetime->setToolTip("");
608616
=== modified file 'src/gui/configurationDialog.ui'
--- src/gui/configurationDialog.ui 2012-10-03 20:25:38 +0000
+++ src/gui/configurationDialog.ui 2013-02-17 21:34:20 +0000
@@ -6,8 +6,8 @@
6 <rect>6 <rect>
7 <x>0</x>7 <x>0</x>
8 <y>0</y>8 <y>0</y>
9 <width>521</width>9 <width>481</width>
10 <height>483</height>10 <height>445</height>
11 </rect>11 </rect>
12 </property>12 </property>
13 <layout class="QVBoxLayout">13 <layout class="QVBoxLayout">
@@ -130,7 +130,7 @@
130 <item row="1" column="0">130 <item row="1" column="0">
131 <widget class="QStackedWidget" name="configurationStackedWidget">131 <widget class="QStackedWidget" name="configurationStackedWidget">
132 <property name="currentIndex">132 <property name="currentIndex">
133 <number>0</number>133 <number>2</number>
134 </property>134 </property>
135 <widget class="QWidget" name="page">135 <widget class="QWidget" name="page">
136 <layout class="QVBoxLayout" name="verticalLayout_10">136 <layout class="QVBoxLayout" name="verticalLayout_10">
@@ -310,11 +310,8 @@
310 <property name="title">310 <property name="title">
311 <string>Selected object information</string>311 <string>Selected object information</string>
312 </property>312 </property>
313 <layout class="QVBoxLayout" name="verticalLayout_5">313 <layout class="QGridLayout" name="gridLayout_2">
314 <property name="margin">314 <item row="0" column="0">
315 <number>0</number>
316 </property>
317 <item>
318 <widget class="QRadioButton" name="allSelectedInfoRadio">315 <widget class="QRadioButton" name="allSelectedInfoRadio">
319 <property name="toolTip">316 <property name="toolTip">
320 <string>Display all information available</string>317 <string>Display all information available</string>
@@ -324,7 +321,17 @@
324 </property>321 </property>
325 </widget>322 </widget>
326 </item>323 </item>
327 <item>324 <item row="0" column="1">
325 <widget class="QRadioButton" name="noSelectedInfoRadio">
326 <property name="toolTip">
327 <string>Display no information</string>
328 </property>
329 <property name="text">
330 <string>None</string>
331 </property>
332 </widget>
333 </item>
334 <item row="1" column="0">
328 <widget class="QRadioButton" name="briefSelectedInfoRadio">335 <widget class="QRadioButton" name="briefSelectedInfoRadio">
329 <property name="toolTip">336 <property name="toolTip">
330 <string>Display less information</string>337 <string>Display less information</string>
@@ -334,17 +341,7 @@
334 </property>341 </property>
335 </widget>342 </widget>
336 </item>343 </item>
337 <item>344 <item row="1" column="1">
338 <widget class="QRadioButton" name="noSelectedInfoRadio">
339 <property name="toolTip">
340 <string>Display no information</string>
341 </property>
342 <property name="text">
343 <string>None</string>
344 </property>
345 </widget>
346 </item>
347 <item>
348 <widget class="QRadioButton" name="customSelectedInfoRadio">345 <widget class="QRadioButton" name="customSelectedInfoRadio">
349 <property name="toolTip">346 <property name="toolTip">
350 <string>Display user settings information</string>347 <string>Display user settings information</string>
@@ -385,19 +382,6 @@
385 </attribute>382 </attribute>
386 </widget>383 </widget>
387 </item>384 </item>
388 <item row="4" column="0">
389 <widget class="QCheckBox" name="checkBoxHourAngle">
390 <property name="toolTip">
391 <string>Topocentric equatorial coordinates</string>
392 </property>
393 <property name="text">
394 <string>Hour angle/Declination</string>
395 </property>
396 <attribute name="buttonGroup">
397 <string notr="true">buttonGroupDisplayedFields</string>
398 </attribute>
399 </widget>
400 </item>
401 <item row="4" column="1">385 <item row="4" column="1">
402 <widget class="QCheckBox" name="checkBoxAltAz">386 <widget class="QCheckBox" name="checkBoxAltAz">
403 <property name="toolTip">387 <property name="toolTip">
@@ -421,42 +405,6 @@
421 </attribute>405 </attribute>
422 </widget>406 </widget>
423 </item>407 </item>
424 <item row="5" column="1">
425 <widget class="QCheckBox" name="checkBoxSize">
426 <property name="toolTip">
427 <string>Angular or physical size</string>
428 </property>
429 <property name="text">
430 <string>Size</string>
431 </property>
432 <attribute name="buttonGroup">
433 <string notr="true">buttonGroupDisplayedFields</string>
434 </attribute>
435 </widget>
436 </item>
437 <item row="7" column="0" colspan="2">
438 <widget class="QCheckBox" name="checkBoxExtra3">
439 <property name="text">
440 <string>Additional information 3</string>
441 </property>
442 <attribute name="buttonGroup">
443 <string notr="true">buttonGroupDisplayedFields</string>
444 </attribute>
445 </widget>
446 </item>
447 <item row="6" column="1">
448 <widget class="QCheckBox" name="checkBoxExtra2">
449 <property name="toolTip">
450 <string/>
451 </property>
452 <property name="text">
453 <string>Additional information 2</string>
454 </property>
455 <attribute name="buttonGroup">
456 <string notr="true">buttonGroupDisplayedFields</string>
457 </attribute>
458 </widget>
459 </item>
460 <item row="1" column="1">408 <item row="1" column="1">
461 <widget class="QCheckBox" name="checkBoxAbsoluteMag">409 <widget class="QCheckBox" name="checkBoxAbsoluteMag">
462 <property name="text">410 <property name="text">
@@ -467,16 +415,6 @@
467 </attribute>415 </attribute>
468 </widget>416 </widget>
469 </item>417 </item>
470 <item row="5" column="0">
471 <widget class="QCheckBox" name="checkBoxDistance">
472 <property name="text">
473 <string>Distance</string>
474 </property>
475 <attribute name="buttonGroup">
476 <string notr="true">buttonGroupDisplayedFields</string>
477 </attribute>
478 </widget>
479 </item>
480 <item row="1" column="0">418 <item row="1" column="0">
481 <widget class="QCheckBox" name="checkBoxCatalogNumbers">419 <widget class="QCheckBox" name="checkBoxCatalogNumbers">
482 <property name="text">420 <property name="text">
@@ -497,19 +435,6 @@
497 </attribute>435 </attribute>
498 </widget>436 </widget>
499 </item>437 </item>
500 <item row="6" column="0">
501 <widget class="QCheckBox" name="checkBoxExtra1">
502 <property name="toolTip">
503 <string>Spectral class, nebula type, etc.</string>
504 </property>
505 <property name="text">
506 <string>Additional information 1</string>
507 </property>
508 <attribute name="buttonGroup">
509 <string notr="true">buttonGroupDisplayedFields</string>
510 </attribute>
511 </widget>
512 </item>
513 <item row="3" column="0">438 <item row="3" column="0">
514 <widget class="QCheckBox" name="checkBoxRaDecOfDate">439 <widget class="QCheckBox" name="checkBoxRaDecOfDate">
515 <property name="toolTip">440 <property name="toolTip">
@@ -533,6 +458,78 @@
533 </property>458 </property>
534 </widget>459 </widget>
535 </item>460 </item>
461 <item row="3" column="1">
462 <widget class="QCheckBox" name="checkBoxHourAngle">
463 <property name="toolTip">
464 <string>Topocentric equatorial coordinates</string>
465 </property>
466 <property name="text">
467 <string>Hour angle/Declination</string>
468 </property>
469 <attribute name="buttonGroup">
470 <string notr="true">buttonGroupDisplayedFields</string>
471 </attribute>
472 </widget>
473 </item>
474 <item row="4" column="0">
475 <widget class="QCheckBox" name="checkBoxDistance">
476 <property name="text">
477 <string>Distance</string>
478 </property>
479 <attribute name="buttonGroup">
480 <string notr="true">buttonGroupDisplayedFields</string>
481 </attribute>
482 </widget>
483 </item>
484 <item row="5" column="0">
485 <widget class="QCheckBox" name="checkBoxSize">
486 <property name="toolTip">
487 <string>Angular or physical size</string>
488 </property>
489 <property name="text">
490 <string>Size</string>
491 </property>
492 <attribute name="buttonGroup">
493 <string notr="true">buttonGroupDisplayedFields</string>
494 </attribute>
495 </widget>
496 </item>
497 <item row="5" column="1">
498 <widget class="QCheckBox" name="checkBoxExtra1">
499 <property name="toolTip">
500 <string>Spectral class, nebula type, etc.</string>
501 </property>
502 <property name="text">
503 <string>Additional information 1</string>
504 </property>
505 <attribute name="buttonGroup">
506 <string notr="true">buttonGroupDisplayedFields</string>
507 </attribute>
508 </widget>
509 </item>
510 <item row="6" column="0">
511 <widget class="QCheckBox" name="checkBoxExtra2">
512 <property name="toolTip">
513 <string/>
514 </property>
515 <property name="text">
516 <string>Additional information 2</string>
517 </property>
518 <attribute name="buttonGroup">
519 <string notr="true">buttonGroupDisplayedFields</string>
520 </attribute>
521 </widget>
522 </item>
523 <item row="6" column="1">
524 <widget class="QCheckBox" name="checkBoxExtra3">
525 <property name="text">
526 <string>Additional information 3</string>
527 </property>
528 <attribute name="buttonGroup">
529 <string notr="true">buttonGroupDisplayedFields</string>
530 </attribute>
531 </widget>
532 </item>
536 </layout>533 </layout>
537 </widget>534 </widget>
538 </item>535 </item>
@@ -551,7 +548,7 @@
551 <property name="title">548 <property name="title">
552 <string>Control</string>549 <string>Control</string>
553 </property>550 </property>
554 <layout class="QGridLayout" name="gridLayout">551 <layout class="QGridLayout" name="gridLayoutStartup">
555 <property name="margin">552 <property name="margin">
556 <number>0</number>553 <number>0</number>
557 </property>554 </property>
@@ -565,7 +562,7 @@
565 </property>562 </property>
566 </widget>563 </widget>
567 </item>564 </item>
568 <item row="1" column="0" colspan="2">565 <item row="1" column="0">
569 <widget class="QCheckBox" name="enableMouseNavigationCheckBox">566 <widget class="QCheckBox" name="enableMouseNavigationCheckBox">
570 <property name="toolTip">567 <property name="toolTip">
571 <string>Allow mouse to pan (drag) and zoom (mousewheel)</string>568 <string>Allow mouse to pan (drag) and zoom (mousewheel)</string>
@@ -582,6 +579,58 @@
582 </property>579 </property>
583 </widget>580 </widget>
584 </item>581 </item>
582 <item row="1" column="1">
583 <layout class="QHBoxLayout" name="_8">
584 <item>
585 <widget class="QCheckBox" name="mouseTimeoutCheckbox">
586 <property name="toolTip">
587 <string>Hides the mouse cursor when inactive</string>
588 </property>
589 <property name="text">
590 <string>Mouse cursor timeout:</string>
591 </property>
592 </widget>
593 </item>
594 <item>
595 <widget class="QDoubleSpinBox" name="mouseTimeoutSpinBox">
596 <property name="maximumSize">
597 <size>
598 <width>16777215</width>
599 <height>24</height>
600 </size>
601 </property>
602 <property name="toolTip">
603 <string>seconds</string>
604 </property>
605 <property name="decimals">
606 <number>1</number>
607 </property>
608 <property name="minimum">
609 <double>0.000000000000000</double>
610 </property>
611 <property name="maximum">
612 <double>3600.000000000000000</double>
613 </property>
614 <property name="value">
615 <double>10.000000000000000</double>
616 </property>
617 </widget>
618 </item>
619 <item>
620 <spacer name="horizontalSpacer">
621 <property name="orientation">
622 <enum>Qt::Horizontal</enum>
623 </property>
624 <property name="sizeHint" stdset="0">
625 <size>
626 <width>40</width>
627 <height>20</height>
628 </size>
629 </property>
630 </spacer>
631 </item>
632 </layout>
633 </item>
585 </layout>634 </layout>
586 </widget>635 </widget>
587 </item>636 </item>
@@ -594,6 +643,60 @@
594 <property name="margin">643 <property name="margin">
595 <number>0</number>644 <number>0</number>
596 </property>645 </property>
646 <item row="2" column="0">
647 <layout class="QHBoxLayout" name="_4">
648 <item>
649 <widget class="QRadioButton" name="fixedTimeRadio">
650 <property name="toolTip">
651 <string>Use a specific date and time when Stellarium starts up</string>
652 </property>
653 <property name="text">
654 <string>Other:</string>
655 </property>
656 </widget>
657 </item>
658 <item>
659 <widget class="QDateTimeEdit" name="fixedDateTimeEdit">
660 <property name="minimumSize">
661 <size>
662 <width>0</width>
663 <height>24</height>
664 </size>
665 </property>
666 <property name="maximumSize">
667 <size>
668 <width>16777215</width>
669 <height>24</height>
670 </size>
671 </property>
672 <property name="date">
673 <date>
674 <year>1952</year>
675 <month>5</month>
676 <day>11</day>
677 </date>
678 </property>
679 <property name="time">
680 <time>
681 <hour>0</hour>
682 <minute>42</minute>
683 <second>0</second>
684 </time>
685 </property>
686 <property name="calendarPopup">
687 <bool>true</bool>
688 </property>
689 </widget>
690 </item>
691 </layout>
692 </item>
693 <item row="2" column="1">
694 <widget class="QPushButton" name="fixedDateTimeCurrentButton">
695 <property name="text">
696 <string>use current</string>
697 </property>
698 </widget>
699 </item>
597 <item row="0" column="0">700 <item row="0" column="0">
598 <widget class="QRadioButton" name="systemTimeRadio">701 <widget class="QRadioButton" name="systemTimeRadio">
599 <property name="toolTip">702 <property name="toolTip">
@@ -604,7 +707,7 @@
604 </property>707 </property>
605 </widget>708 </widget>
606 </item>709 </item>
607 <item row="1" column="0">710 <item row="0" column="1">
608 <layout class="QHBoxLayout" name="_3">711 <layout class="QHBoxLayout" name="_3">
609 <property name="spacing">712 <property name="spacing">
610 <number>6</number>713 <number>6</number>
@@ -662,165 +765,87 @@
662 </item>765 </item>
663 </layout>766 </layout>
664 </item>767 </item>
665 <item row="2" column="0">
666 <layout class="QHBoxLayout" name="_4">
667 <item>
668 <widget class="QRadioButton" name="fixedTimeRadio">
669 <property name="toolTip">
670 <string>Use a specific date and time when Stellarium starts up</string>
671 </property>
672 <property name="text">
673 <string>Other:</string>
674 </property>
675 </widget>
676 </item>
677 <item>
678 <widget class="QDateTimeEdit" name="fixedDateTimeEdit">
679 <property name="minimumSize">
680 <size>
681 <width>0</width>
682 <height>24</height>
683 </size>
684 </property>
685 <property name="maximumSize">
686 <size>
687 <width>16777215</width>
688 <height>24</height>
689 </size>
690 </property>
691 <property name="date">
692 <date>
693 <year>1952</year>
694 <month>5</month>
695 <day>11</day>
696 </date>
697 </property>
698 <property name="time">
699 <time>
700 <hour>0</hour>
701 <minute>42</minute>
702 <second>0</second>
703 </time>
704 </property>
705 <property name="calendarPopup">
706 <bool>true</bool>
707 </property>
708 </widget>
709 </item>
710 </layout>
711 </item>
712 <item row="1" column="1">
713 <spacer name="horizontalSpacer_2">
714 <property name="orientation">
715 <enum>Qt::Horizontal</enum>
716 </property>
717 <property name="sizeHint" stdset="0">
718 <size>
719 <width>123</width>
720 <height>20</height>
721 </size>
722 </property>
723 </spacer>
724 </item>
725 <item row="2" column="1">
726 <widget class="QPushButton" name="fixedDateTimeCurrentButton">
727 <property name="text">
728 <string>use current</string>
729 </property>
730 </widget>
731 </item>
732 <item row="2" column="2">
733 <spacer name="horizontalSpacer_3">
734 <property name="orientation">
735 <enum>Qt::Horizontal</enum>
736 </property>
737 <property name="sizeHint" stdset="0">
738 <size>
739 <width>40</width>
740 <height>20</height>
741 </size>
742 </property>
743 </spacer>
744 </item>
745 </layout>768 </layout>
746 </widget>769 </widget>
747 </item>770 </item>
748 <item>771 <item>
749 <widget class="QGroupBox" name="groupBox_9">772 <widget class="QGroupBox" name="deltaTGroupBox">
750 <property name="title">773 <property name="title">
751 <string>Other</string>774 <string>Time correction</string>
752 </property>775 </property>
753 <layout class="QVBoxLayout" name="verticalLayout">776 <layout class="QHBoxLayout" name="horizontalLayout_9">
754 <property name="margin">777 <property name="margin">
755 <number>0</number>778 <number>0</number>
756 </property>779 </property>
757 <item>780 <item>
758 <layout class="QHBoxLayout" name="_8">781 <widget class="QFrame" name="frame">
759 <item>782 <property name="frameShape">
760 <widget class="QCheckBox" name="mouseTimeoutCheckbox">783 <enum>QFrame::StyledPanel</enum>
761 <property name="toolTip">784 </property>
762 <string>Hides the mouse cursor when inactive</string>785 <property name="frameShadow">
763 </property>786 <enum>QFrame::Raised</enum>
764 <property name="text">787 </property>
765 <string>Mouse cursor timeout (seconds):</string>788 <layout class="QVBoxLayout" name="verticalLayout">
766 </property>789 <property name="margin">
767 </widget>790 <number>0</number>
768 </item>791 </property>
769 <item>792 <item>
770 <spacer name="horizontalSpacer">793 <layout class="QHBoxLayout" name="horizontalLayout_12">
771 <property name="orientation">794 <property name="leftMargin">
772 <enum>Qt::Horizontal</enum>795 <number>6</number>
773 </property>796 </property>
774 <property name="sizeHint" stdset="0">797 <item>
775 <size>798 <widget class="QLabel" name="deltaTLabel">
776 <width>40</width>799 <property name="text">
777 <height>20</height>800 <string/>
778 </size>801 </property>
779 </property>802 </widget>
780 </spacer>803 </item>
781 </item>804 <item>
782 <item>805 <widget class="QComboBox" name="deltaTAlgorithmComboBox"/>
783 <widget class="QDoubleSpinBox" name="mouseTimeoutSpinBox">806 </item>
784 <property name="maximumSize">807 <item>
785 <size>808 <widget class="QPushButton" name="pushButtonCustomDeltaTEquationDialog">
786 <width>16777215</width>809 <property name="enabled">
787 <height>24</height>810 <bool>false</bool>
788 </size>811 </property>
789 </property>812 <property name="toolTip">
790 <property name="decimals">813 <string>Edit equation</string>
791 <number>1</number>814 </property>
792 </property>815 <property name="text">
793 <property name="minimum">816 <string notr="true">...</string>
794 <double>0.000000000000000</double>817 </property>
795 </property>818 </widget>
796 <property name="maximum">819 </item>
797 <double>3600.000000000000000</double>820 <item>
798 </property>821 <spacer name="horizontalSpacer_2">
799 <property name="value">822 <property name="orientation">
800 <double>10.000000000000000</double>823 <enum>Qt::Horizontal</enum>
801 </property>824 </property>
802 </widget>825 <property name="sizeHint" stdset="0">
803 </item>826 <size>
804 </layout>827 <width>40</width>
805 </item>828 <height>20</height>
806 <item>829 </size>
807 <widget class="QCheckBox" name="showFlipButtonsCheckbox">830 </property>
808 <property name="toolTip">831 </spacer>
809 <string>Toggle vertical and horizontal image flip buttons.</string>832 </item>
810 </property>833 </layout>
811 <property name="text">834 </item>
812 <string>Show flip buttons</string>835 <item>
813 </property>836 <widget class="QTextBrowser" name="deltaTAlgorithmDescription">
814 </widget>837 <property name="autoFillBackground">
815 </item>838 <bool>true</bool>
816 <item>839 </property>
817 <widget class="QCheckBox" name="showNebulaBgButtonCheckbox">840 <property name="openExternalLinks">
818 <property name="toolTip">841 <bool>true</bool>
819 <string>Toggle display backgrounds of the nebulae.</string>842 </property>
820 </property>843 <property name="openLinks">
821 <property name="text">844 <bool>true</bool>
822 <string>Show nebula background button</string>845 </property>
823 </property>846 </widget>
847 </item>
848 </layout>
824 </widget>849 </widget>
825 </item>850 </item>
826 </layout>851 </layout>
@@ -838,14 +863,27 @@
838 </property>863 </property>
839 <item>864 <item>
840 <widget class="QGroupBox" name="groupBox_7">865 <widget class="QGroupBox" name="groupBox_7">
866 <property name="sizePolicy">
867 <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
868 <horstretch>0</horstretch>
869 <verstretch>0</verstretch>
870 </sizepolicy>
871 </property>
841 <property name="title">872 <property name="title">
842 <string>Planetarium options</string>873 <string>Planetarium options</string>
843 </property>874 </property>
844 <layout class="QGridLayout" name="gridLayoutx">875 <layout class="QGridLayout" name="gridLayoutOptions">
845 <property name="margin">876 <item row="0" column="0">
846 <number>0</number>877 <widget class="QCheckBox" name="sphericMirrorCheckbox">
847 </property>878 <property name="toolTip">
848 <item row="1" column="0">879 <string>Spheric mirror distortion is used when projecting Stellarium onto a spheric mirror for low-cost planetarium systems.</string>
880 </property>
881 <property name="text">
882 <string>Spheric mirror distortion</string>
883 </property>
884 </widget>
885 </item>
886 <item row="0" column="1">
849 <widget class="QCheckBox" name="diskViewportCheckbox">887 <widget class="QCheckBox" name="diskViewportCheckbox">
850 <property name="toolTip">888 <property name="toolTip">
851 <string>Mask out everything outside a central circle in the main view</string>889 <string>Mask out everything outside a central circle in the main view</string>
@@ -855,17 +893,17 @@
855 </property>893 </property>
856 </widget>894 </widget>
857 </item>895 </item>
858 <item row="0" column="0">896 <item row="1" column="0">
859 <widget class="QCheckBox" name="sphericMirrorCheckbox">897 <widget class="QCheckBox" name="selectSingleConstellationButton">
860 <property name="toolTip">898 <property name="statusTip">
861 <string>Spheric mirror distortion is used when projecting Stellarium onto a spheric mirror for low-cost planetarium systems.</string>899 <string>Hide other constellations when you click one</string>
862 </property>900 </property>
863 <property name="text">901 <property name="text">
864 <string>Spheric mirror distortion</string>902 <string>Select single constellation</string>
865 </property>903 </property>
866 </widget>904 </widget>
867 </item>905 </item>
868 <item row="2" column="0">906 <item row="1" column="1">
869 <widget class="QCheckBox" name="gravityLabelCheckbox">907 <widget class="QCheckBox" name="gravityLabelCheckbox">
870 <property name="toolTip">908 <property name="toolTip">
871 <string>Align labels with the horizon</string>909 <string>Align labels with the horizon</string>
@@ -875,24 +913,27 @@
875 </property>913 </property>
876 </widget>914 </widget>
877 </item>915 </item>
878 <item row="3" column="0">916 <item row="2" column="0">
879 <widget class="QCheckBox" name="selectSingleConstellationButton">917 <widget class="QCheckBox" name="showNebulaBgButtonCheckbox">
880 <property name="statusTip">918 <property name="toolTip">
881 <string>Hide other constellations when you click one</string>919 <string>Toggle display backgrounds of the nebulae.</string>
882 </property>920 </property>
883 <property name="text">921 <property name="text">
884 <string>Select single constellation</string>922 <string>Show nebula background button</string>
885 </property>923 </property>
886 </widget>924 </widget>
887 </item>925 </item>
888 <item row="6" column="0">926 <item row="2" column="1">
889 <widget class="QCheckBox" name="renderSolarShadowsCheckbox">927 <widget class="QCheckBox" name="showFlipButtonsCheckbox">
890 <property name="text">928 <property name="toolTip">
891 <string>Render Solar Shadows</string>929 <string>Toggle vertical and horizontal image flip buttons.</string>
892 </property>930 </property>
893 </widget>931 <property name="text">
894 </item>932 <string>Show flip buttons</string>
895 <item row="5" column="0">933 </property>
934 </widget>
935 </item>
936 <item row="3" column="0" colspan="2">
896 <widget class="QCheckBox" name="autoZoomResetsDirectionCheckbox">937 <widget class="QCheckBox" name="autoZoomResetsDirectionCheckbox">
897 <property name="toolTip">938 <property name="toolTip">
898 <string>When enabled, the &quot;auto zoom out&quot; key will also set the initial viewing direction</string>939 <string>When enabled, the &quot;auto zoom out&quot; key will also set the initial viewing direction</string>
@@ -902,6 +943,13 @@
902 </property>943 </property>
903 </widget>944 </widget>
904 </item>945 </item>
946 <item row="4" column="0">
947 <widget class="QCheckBox" name="renderSolarShadowsCheckbox">
948 <property name="text">
949 <string>Render Solar Shadows</string>
950 </property>
951 </widget>
952 </item>
905 </layout>953 </layout>
906 </widget>954 </widget>
907 </item>955 </item>
@@ -1344,10 +1392,6 @@
1344 <tabstop>programLanguageComboBox</tabstop>1392 <tabstop>programLanguageComboBox</tabstop>
1345 <tabstop>setViewingOptionAsDefaultPushButton</tabstop>1393 <tabstop>setViewingOptionAsDefaultPushButton</tabstop>
1346 <tabstop>restoreDefaultsButton</tabstop>1394 <tabstop>restoreDefaultsButton</tabstop>
1347 <tabstop>allSelectedInfoRadio</tabstop>
1348 <tabstop>briefSelectedInfoRadio</tabstop>
1349 <tabstop>noSelectedInfoRadio</tabstop>
1350 <tabstop>customSelectedInfoRadio</tabstop>
1351 <tabstop>checkBoxName</tabstop>1395 <tabstop>checkBoxName</tabstop>
1352 <tabstop>checkBoxCatalogNumbers</tabstop>1396 <tabstop>checkBoxCatalogNumbers</tabstop>
1353 <tabstop>checkBoxVisualMag</tabstop>1397 <tabstop>checkBoxVisualMag</tabstop>
@@ -1355,15 +1399,8 @@
1355 <tabstop>checkBoxRaDecJ2000</tabstop>1399 <tabstop>checkBoxRaDecJ2000</tabstop>
1356 <tabstop>checkBoxRaDecOfDate</tabstop>1400 <tabstop>checkBoxRaDecOfDate</tabstop>
1357 <tabstop>checkBoxGalacticCoordJ2000</tabstop>1401 <tabstop>checkBoxGalacticCoordJ2000</tabstop>
1358 <tabstop>checkBoxHourAngle</tabstop>
1359 <tabstop>checkBoxAltAz</tabstop>1402 <tabstop>checkBoxAltAz</tabstop>
1360 <tabstop>checkBoxDistance</tabstop>
1361 <tabstop>checkBoxSize</tabstop>
1362 <tabstop>checkBoxExtra1</tabstop>
1363 <tabstop>checkBoxExtra2</tabstop>
1364 <tabstop>checkBoxExtra3</tabstop>
1365 <tabstop>enableKeysNavigationCheckBox</tabstop>1403 <tabstop>enableKeysNavigationCheckBox</tabstop>
1366 <tabstop>enableMouseNavigationCheckBox</tabstop>
1367 <tabstop>editShortcutsPushButton</tabstop>1404 <tabstop>editShortcutsPushButton</tabstop>
1368 <tabstop>systemTimeRadio</tabstop>1405 <tabstop>systemTimeRadio</tabstop>
1369 <tabstop>todayRadio</tabstop>1406 <tabstop>todayRadio</tabstop>
@@ -1373,8 +1410,6 @@
1373 <tabstop>fixedDateTimeCurrentButton</tabstop>1410 <tabstop>fixedDateTimeCurrentButton</tabstop>
1374 <tabstop>mouseTimeoutCheckbox</tabstop>1411 <tabstop>mouseTimeoutCheckbox</tabstop>
1375 <tabstop>mouseTimeoutSpinBox</tabstop>1412 <tabstop>mouseTimeoutSpinBox</tabstop>
1376 <tabstop>showFlipButtonsCheckbox</tabstop>
1377 <tabstop>showNebulaBgButtonCheckbox</tabstop>
1378 <tabstop>sphericMirrorCheckbox</tabstop>1413 <tabstop>sphericMirrorCheckbox</tabstop>
1379 <tabstop>diskViewportCheckbox</tabstop>1414 <tabstop>diskViewportCheckbox</tabstop>
1380 <tabstop>gravityLabelCheckbox</tabstop>1415 <tabstop>gravityLabelCheckbox</tabstop>
13811416
=== modified file 'src/scripting/StelMainScriptAPI.cpp'
--- src/scripting/StelMainScriptAPI.cpp 2013-02-08 16:40:32 +0000
+++ src/scripting/StelMainScriptAPI.cpp 2013-02-17 21:34:20 +0000
@@ -146,7 +146,7 @@
146146
147QString StelMainScriptAPI::getDeltaT() const147QString StelMainScriptAPI::getDeltaT() const
148{148{
149 return StelUtils::hoursToHmsStr(StelUtils::getDeltaT(getJDay())/3600.);149 return StelUtils::hoursToHmsStr(StelApp::getInstance().getCore()->getDeltaT(getJDay())/3600.);
150}150}
151151
152//! Set time speed in JDay/sec152//! Set time speed in JDay/sec
153153
=== modified file 'src/tests/testDeltaT.cpp'
--- src/tests/testDeltaT.cpp 2013-01-03 09:27:01 +0000
+++ src/tests/testDeltaT.cpp 2013-02-17 21:34:20 +0000
@@ -88,7 +88,7 @@
88 double expectedResult = data.takeFirst().toDouble();88 double expectedResult = data.takeFirst().toDouble();
89 double acceptableError = data.takeFirst().toDouble(); 89 double acceptableError = data.takeFirst().toDouble();
90 StelUtils::getJDFromDate(&JD, year, 1, 1, 0, 0, 0);90 StelUtils::getJDFromDate(&JD, year, 1, 1, 0, 0, 0);
91 double result = StelUtils::getDeltaT(JD);91 double result = StelUtils::getDeltaTByEspenakMeeus(JD);
92 double actualError = std::abs(expectedResult) - std::abs(result);92 double actualError = std::abs(expectedResult) - std::abs(result);
93 StelUtils::getDateFromJulianDay(JD, &yout, &mout, &dout);93 StelUtils::getDateFromJulianDay(JD, &yout, &mout, &dout);
94 QVERIFY2(actualError <= acceptableError, QString("date=%2 year=%3 result=%4 error=%5 acceptable=%6")94 QVERIFY2(actualError <= acceptableError, QString("date=%2 year=%3 result=%4 error=%5 acceptable=%6")