Merge lp:~stellarium/stellarium/gz_planetSpeed into lp:stellarium

Proposed by gzotti
Status: Rejected
Rejected by: Alexander Wolf
Proposed branch: lp:~stellarium/stellarium/gz_planetSpeed
Merge into: lp:stellarium
Diff against target: 2735 lines (+877/-647)
35 files modified
src/StelMainView.cpp (+43/-4)
src/StelMainView.hpp (+24/-9)
src/core/StelApp.cpp (+19/-3)
src/core/StelApp.hpp (+9/-1)
src/core/StelMovementMgr.hpp (+6/-1)
src/core/StelObject.hpp (+14/-13)
src/core/modules/Comet.cpp (+19/-10)
src/core/modules/MinorPlanet.cpp (+17/-0)
src/core/modules/Orbit.cpp (+14/-24)
src/core/modules/Orbit.hpp (+3/-2)
src/core/modules/Planet.cpp (+50/-9)
src/core/modules/Planet.hpp (+21/-12)
src/core/modules/SolarSystem.cpp (+20/-22)
src/core/planetsephems/EphemWrapper.cpp (+253/-223)
src/core/planetsephems/EphemWrapper.hpp (+46/-46)
src/core/planetsephems/de430.cpp (+19/-10)
src/core/planetsephems/de431.cpp (+17/-9)
src/core/planetsephems/elliptic_to_rectangular.c (+2/-2)
src/core/planetsephems/elliptic_to_rectangular.h (+5/-0)
src/core/planetsephems/gust86.c (+10/-3)
src/core/planetsephems/gust86.h (+2/-1)
src/core/planetsephems/l1.c (+10/-3)
src/core/planetsephems/l1.h (+4/-1)
src/core/planetsephems/marssat.c (+17/-5)
src/core/planetsephems/marssat.h (+3/-2)
src/core/planetsephems/tass17.c (+10/-3)
src/core/planetsephems/tass17.h (+3/-1)
src/core/planetsephems/vsop87.c (+1/-2)
src/gui/ConfigurationDialog.cpp (+61/-74)
src/gui/ConfigurationDialog.hpp (+0/-7)
src/gui/SearchDialog.cpp (+2/-1)
src/gui/SkyGui.cpp (+2/-0)
src/gui/StelGui.cpp (+11/-10)
src/gui/StelGui.hpp (+33/-27)
src/gui/configurationDialog.ui (+107/-107)
To merge this branch: bzr merge lp:~stellarium/stellarium/gz_planetSpeed
Reviewer Review Type Date Requested Status
Stellarium Pending
Review via email: mp+333965@code.launchpad.net

Description of the change

This branch is actually just one commit. I re-activated the velocity computations from the various ephemerides and added an eclipticalVelocity field to the Planet class. We will require velocity for aberration correction which will follow in another branch past 0.17.0, so this re-discovery is a first step.

The current solution requires a few copying operations from a local six-element "buffer" array to the object's Vec3ds. Not sure if this could be simplified in any way. Any ideas from the C++ gurus? Store a 6-array and just use Vec3d in the get/set methods? But then those need the copying.

I don't have velocities in our lunar ELP82 and in the EllipticalOrbit class, so these objects (our Moon and small moons of outer planets) currently only deliver zero speed. The latter class could be entirely removed IMHO, and CometOrbit could take over as "KeplerOrbit" class, solving the 2-body problem with either orbital elements or state vector (JDE&position&speed). This could allow interplanetary spaceflight or "orbital observers with propulsion control", but needs again a larger change in the ssystem_*.ini files, so will come only after 0.17.

To post a comment you must log in.
9973. By gzotti

Added/fixed velocity display to Planets, MinorPlanets and Comets

9974. By gzotti

GUI changes for velocity display option. This also puts StelApp, StelGui and Mainview under StelProperty control. Also, Mouse Cursor hiding is back (still incomplete, though).

Revision history for this message
Marcos Cardinot (cardinot) wrote :

Unmerged revisions

9974. By gzotti

GUI changes for velocity display option. This also puts StelApp, StelGui and Mainview under StelProperty control. Also, Mouse Cursor hiding is back (still incomplete, though).

9973. By gzotti

Added/fixed velocity display to Planets, MinorPlanets and Comets

9972. By gzotti

Enabled computation of planet velocities. Most of the ephemerides already came with it, but it was never exploited so far, and the respective lines were commented away. We can use this for information, but will especially need this for aberration correction. Note that velocity of the outer moons (EllipticalOrbit) and even our Moon (ELP82) is not available! (The latter is included with DE43x solutions.)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/StelMainView.cpp'
--- src/StelMainView.cpp 2017-10-10 09:47:54 +0000
+++ src/StelMainView.cpp 2017-11-23 14:55:50 +0000
@@ -350,12 +350,10 @@
350 //important to call this, or Qt may have invalid state after we have drawn (wrong textures, etc...)350 //important to call this, or Qt may have invalid state after we have drawn (wrong textures, etc...)
351 painter->beginNativePainting();351 painter->beginNativePainting();
352352
353 //fix for bug 1628072 caused by QTBUG-56798353 //fix for bug LP:1628072 caused by QTBUG-56798
354#ifndef QT_NO_DEBUG354#ifndef QT_NO_DEBUG
355 StelOpenGL::clearGLErrors();355 StelOpenGL::clearGLErrors();
356#endif356#endif
357
358
359 QOpenGLFunctions* gl = QOpenGLContext::currentContext()->functions();357 QOpenGLFunctions* gl = QOpenGLContext::currentContext()->functions();
360358
361 //clear the buffer (not strictly required for us because we repaint all pixels, but should improve perf on tile-based renderers)359 //clear the buffer (not strictly required for us because we repaint all pixels, but should improve perf on tile-based renderers)
@@ -368,6 +366,7 @@
368 app.draw();366 app.draw();
369 painter->endNativePainting();367 painter->endNativePainting();
370368
369 mainView->handleMouseCursorTimeout(now);
371 mainView->drawEnded();370 mainView->drawEnded();
372 }371 }
373372
@@ -397,6 +396,10 @@
397396
398 void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE397 void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE
399 {398 {
399 // GZ TODO: Where to place the mouse cursor wake-up?
400 qDebug() << "StelRootItem::mouseMoveEvent()";
401 if (QGuiApplication::overrideCursor()!=0)
402 QGuiApplication::restoreOverrideCursor();
400 QMouseEvent ev = convertMouseEvent(event);403 QMouseEvent ev = convertMouseEvent(event);
401 QPointF pos = ev.pos();404 QPointF pos = ev.pos();
402 event->setAccepted(StelApp::getInstance().handleMove(pos.x(), pos.y(), ev.buttons()));405 event->setAccepted(StelApp::getInstance().handleMove(pos.x(), pos.y(), ev.buttons()));
@@ -574,7 +577,7 @@
574577
575 setWindowIcon(QIcon(":/mainWindow/icon.bmp"));578 setWindowIcon(QIcon(":/mainWindow/icon.bmp"));
576 initTitleI18n();579 initTitleI18n();
577 setObjectName("Mainview");580 setObjectName("MainView");
578581
579 setViewportUpdateMode(QGraphicsView::NoViewportUpdate);582 setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
580 setFrameShape(QFrame::NoFrame);583 setFrameShape(QFrame::NoFrame);
@@ -639,6 +642,8 @@
639 glWidget->makeCurrent();642 glWidget->makeCurrent();
640 glWidget->initializeGL();643 glWidget->initializeGL();
641#endif644#endif
645 // We cannot use global mousetracking. Only if mouse is hidden!
646 //setMouseTracking(true);
642}647}
643648
644void StelMainView::resizeEvent(QResizeEvent* event)649void StelMainView::resizeEvent(QResizeEvent* event)
@@ -654,6 +659,18 @@
654 QGraphicsView::resizeEvent(event);659 QGraphicsView::resizeEvent(event);
655}660}
656661
662// GZ: This should do something to make the cursor visible again when the mouse is moved.
663// However, any implementation of this method seems to gobble all mouse moves.
664//void StelMainView::mouseMoveEvent(QMouseEvent *event)
665//{
666//// //Q_UNUSED(event)
667////// thereWasAnEvent();
668// event->ignore();
669//// if (QGuiApplication::overrideCursor()!=0)
670//// QGuiApplication::restoreOverrideCursor();
671//}
672
673
657void StelMainView::focusSky() {674void StelMainView::focusSky() {
658 //scene()->setActiveWindow(0);675 //scene()->setActiveWindow(0);
659 rootItem->setFocus();676 rootItem->setFocus();
@@ -1277,6 +1294,28 @@
1277 }1294 }
1278}1295}
12791296
1297void StelMainView::handleMouseCursorTimeout(const double now)
1298{
1299 // GZ restore mouse cursor stuff from pre-0.15.2.
1300 // Manage cursor timeout
1301 if (cursorTimeout>0.f && (now-lastEventTimeSec>cursorTimeout) && flagCursorTimeout)
1302 {
1303 if (QGuiApplication::overrideCursor()==0)
1304 {
1305 QGuiApplication::setOverrideCursor(Qt::BlankCursor);
1306 setMouseTracking(true);
1307 }
1308 }
1309 else
1310 {
1311 if (QGuiApplication::overrideCursor()!=0)
1312 {
1313 QGuiApplication::restoreOverrideCursor();
1314 setMouseTracking(false);
1315 }
1316 }
1317}
1318
1280void StelMainView::minFPSUpdate()1319void StelMainView::minFPSUpdate()
1281{1320{
1282 if(!updateQueued)1321 if(!updateQueued)
12831322
=== modified file 'src/StelMainView.hpp'
--- src/StelMainView.hpp 2017-05-18 11:28:23 +0000
+++ src/StelMainView.hpp 2017-11-23 14:55:50 +0000
@@ -47,7 +47,13 @@
47 friend class StelGraphicsScene;47 friend class StelGraphicsScene;
48 friend class NightModeGraphicsEffect;48 friend class NightModeGraphicsEffect;
49 Q_OBJECT49 Q_OBJECT
50 Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen NOTIFY fullScreenChanged)50 Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen NOTIFY fullScreenChanged)
51 Q_PROPERTY(bool flagInvertScreenShotColors READ getFlagInvertScreenShotColors WRITE setFlagInvertScreenShotColors NOTIFY flagInvertScreenShotColorsChanged)
52 Q_PROPERTY(bool flagOverwriteScreenshots READ getFlagOverwriteScreenShots WRITE setFlagOverwriteScreenShots NOTIFY flagOverwriteScreenshotsChanged)
53 Q_PROPERTY(bool flagUseButtonsBackground READ getFlagUseButtonsBackground WRITE setFlagUseButtonsBackground NOTIFY flagUseButtonsBackgroundChanged)
54 Q_PROPERTY(bool flagCursorTimeout READ getFlagCursorTimeout WRITE setFlagCursorTimeout NOTIFY flagCursorTimeoutChanged)
55 Q_PROPERTY(double cursorTimeout READ getCursorTimeout WRITE setCursorTimeout NOTIFY cursorTimeoutChanged)
56
5157
52public:58public:
53 //! Contains some basic info about the OpenGL context used59 //! Contains some basic info about the OpenGL context used
@@ -117,21 +123,21 @@
117 //! Get whether colors are inverted when saving screenshot123 //! Get whether colors are inverted when saving screenshot
118 bool getFlagInvertScreenShotColors() const {return flagInvertScreenShotColors;}124 bool getFlagInvertScreenShotColors() const {return flagInvertScreenShotColors;}
119 //! Set whether colors should be inverted when saving screenshot125 //! Set whether colors should be inverted when saving screenshot
120 void setFlagInvertScreenShotColors(bool b) {flagInvertScreenShotColors=b;}126 void setFlagInvertScreenShotColors(bool b) {flagInvertScreenShotColors=b; emit flagInvertScreenShotColorsChanged(b);}
121127
122 //! Get whether existing files are overwritten when saving screenshot128 //! Get whether existing files are overwritten when saving screenshot
123 bool getFlagOverwriteScreenShots() const {return flagOverwriteScreenshots;}129 bool getFlagOverwriteScreenShots() const {return flagOverwriteScreenshots;}
124 //! Set whether existing files are overwritten when saving screenshot130 //! Set whether existing files are overwritten when saving screenshot
125 void setFlagOverwriteScreenShots(bool b) {flagOverwriteScreenshots=b;}131 void setFlagOverwriteScreenShots(bool b) {flagOverwriteScreenshots=b; emit flagOverwriteScreenshotsChanged(b);}
126132
127 //! Get the state of the mouse cursor timeout flag133 //! Get the state of the mouse cursor timeout flag
128 bool getFlagCursorTimeout() {return flagCursorTimeout;}134 bool getFlagCursorTimeout() {return flagCursorTimeout;}
129 //! Get the mouse cursor timeout in seconds135 //! Get the mouse cursor timeout in seconds
130 float getCursorTimeout() const {return cursorTimeout;}136 double getCursorTimeout() const {return cursorTimeout;}
131 //! Get the state of the mouse cursor timeout flag137 //! Get the state of the mouse cursor timeout flag
132 void setFlagCursorTimeout(bool b) {flagCursorTimeout=b;}138 void setFlagCursorTimeout(bool b) {flagCursorTimeout=b; emit flagCursorTimeoutChanged(b);}
133 //! Set the mouse cursor timeout in seconds139 //! Set the mouse cursor timeout in seconds
134 void setCursorTimeout(float t) {cursorTimeout=t;}140 void setCursorTimeout(double t) {cursorTimeout=t; emit cursorTimeoutChanged(t);}
135141
136 //! Set the minimum frames per second. Usually this minimum will be switched to after there are no142 //! Set the minimum frames per second. Usually this minimum will be switched to after there are no
137 //! user events for some seconds to save power. However, if can be useful to set this to a high143 //! user events for some seconds to save power. However, if can be useful to set this to a high
@@ -157,7 +163,7 @@
157 bool needsMaxFPS() const;163 bool needsMaxFPS() const;
158164
159 //! Set the state of the flag of usage background for GUI buttons165 //! Set the state of the flag of usage background for GUI buttons
160 void setFlagUseButtonsBackground(bool b) { flagUseButtonsBackground=b; }166 void setFlagUseButtonsBackground(bool b) { flagUseButtonsBackground=b; emit flagUseButtonsBackgroundChanged(b); }
161 //! Get the state of the flag of usage background for GUI buttons167 //! Get the state of the flag of usage background for GUI buttons
162 bool getFlagUseButtonsBackground() { return flagUseButtonsBackground; }168 bool getFlagUseButtonsBackground() { return flagUseButtonsBackground; }
163169
@@ -170,6 +176,8 @@
170 //! Handle window resized events, and change the size of the underlying176 //! Handle window resized events, and change the size of the underlying
171 //! QGraphicsScene to be the same177 //! QGraphicsScene to be the same
172 virtual void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE;178 virtual void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE;
179// //! Wake up mouse cursor (if it was hidden)
180// virtual void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
173signals:181signals:
174 //! emitted when saveScreenShot is requested with saveScreenShot().182 //! emitted when saveScreenShot is requested with saveScreenShot().
175 //! doScreenshot() does the actual work (it has to do it in the main183 //! doScreenshot() does the actual work (it has to do it in the main
@@ -184,6 +192,11 @@
184 void reloadShadersRequested();192 void reloadShadersRequested();
185193
186 void updateIconsRequested();194 void updateIconsRequested();
195 void flagInvertScreenShotColorsChanged(bool b);
196 void flagOverwriteScreenshotsChanged(bool b);
197 void flagUseButtonsBackgroundChanged(bool b);
198 void flagCursorTimeoutChanged(bool b);
199 void cursorTimeoutChanged(double t);
187200
188private slots:201private slots:
189 // Do the actual screenshot generation in the main thread with this method.202 // Do the actual screenshot generation in the main thread with this method.
@@ -200,6 +213,8 @@
200private:213private:
201 //! The graphics scene notifies us when a draw finished, so that we can queue the next one214 //! The graphics scene notifies us when a draw finished, so that we can queue the next one
202 void drawEnded();215 void drawEnded();
216 //! hide mouse cursor after some time if configured.
217 void handleMouseCursorTimeout(const double now);
203 //! Returns the desired OpenGL format settings,218 //! Returns the desired OpenGL format settings,
204 //! on desktop this corresponds to a GL 2.1 context,219 //! on desktop this corresponds to a GL 2.1 context,
205 //! with 32bit RGBA buffer and 24/8 depth/stencil buffer220 //! with 32bit RGBA buffer and 24/8 depth/stencil buffer
@@ -237,8 +252,8 @@
237 QString screenShotPrefix;252 QString screenShotPrefix;
238 QString screenShotDir;253 QString screenShotDir;
239254
240 // Number of second before the mouse cursor disappears255 // Number of seconds before the mouse cursor disappears
241 float cursorTimeout;256 double cursorTimeout;
242 bool flagCursorTimeout;257 bool flagCursorTimeout;
243258
244 bool flagUseButtonsBackground;259 bool flagUseButtonsBackground;
245260
=== modified file 'src/core/StelApp.cpp'
--- src/core/StelApp.cpp 2017-11-16 15:27:36 +0000
+++ src/core/StelApp.cpp 2017-11-23 14:55:50 +0000
@@ -439,6 +439,10 @@
439 planetLocationMgr = new StelLocationMgr();439 planetLocationMgr = new StelLocationMgr();
440 actionMgr = new StelActionMgr();440 actionMgr = new StelActionMgr();
441441
442 // register non-modules for StelProperty tracking
443 propMgr->registerObject(this);
444 propMgr->registerObject(mainWin);
445
442 // Stel Object Data Base manager446 // Stel Object Data Base manager
443 stelObjectMgr = new StelObjectMgr();447 stelObjectMgr = new StelObjectMgr();
444 stelObjectMgr->init();448 stelObjectMgr->init();
@@ -878,17 +882,29 @@
878882
879void StelApp::setFlagShowDecimalDegrees(bool b)883void StelApp::setFlagShowDecimalDegrees(bool b)
880{884{
881 flagShowDecimalDegrees = b;885 if (flagShowDecimalDegrees!=b)
886 {
887 flagShowDecimalDegrees = b;
888 emit flagShowDecimalDegreesChanged(b);
889 }
882}890}
883891
884void StelApp::setFlagUseFormattingOutput(bool b)892void StelApp::setFlagUseFormattingOutput(bool b)
885{893{
886 flagUseFormattingOutput = b;894 if (flagUseFormattingOutput!=b)
895 {
896 flagUseFormattingOutput = b;
897 emit flagUseFormattingOutputChanged(b);
898 }
887}899}
888900
889void StelApp::setFlagUseCCSDesignation(bool b)901void StelApp::setFlagUseCCSDesignation(bool b)
890{902{
891 flagUseCCSDesignation = b;903 if (flagUseCCSDesignation!=b)
904 {
905 flagUseCCSDesignation = b;
906 emit flagUseCCSDesignationChanged(b);
907 }
892}908}
893909
894// Update translations and font for sky everywhere in the program910// Update translations and font for sky everywhere in the program
895911
=== modified file 'src/core/StelApp.hpp'
--- src/core/StelApp.hpp 2017-10-23 05:06:42 +0000
+++ src/core/StelApp.hpp 2017-11-23 14:55:50 +0000
@@ -69,6 +69,10 @@
69{69{
70 Q_OBJECT70 Q_OBJECT
71 Q_PROPERTY(bool nightMode READ getVisionModeNight WRITE setVisionModeNight NOTIFY visionNightModeChanged)71 Q_PROPERTY(bool nightMode READ getVisionModeNight WRITE setVisionModeNight NOTIFY visionNightModeChanged)
72 Q_PROPERTY(bool flagShowDecimalDegrees READ getFlagShowDecimalDegrees WRITE setFlagShowDecimalDegrees NOTIFY flagShowDecimalDegreesChanged)
73 Q_PROPERTY(bool flagUseAzimuthFromSouth READ getFlagSouthAzimuthUsage WRITE setFlagSouthAzimuthUsage NOTIFY flagUseAzimuthFromSouthChanged)
74 Q_PROPERTY(bool flagUseCCSDesignation READ getFlagUseCCSDesignation WRITE setFlagUseCCSDesignation NOTIFY flagUseCCSDesignationChanged)
75 Q_PROPERTY(bool flagUseFormattingOutput READ getFlagUseFormattingOutput WRITE setFlagUseFormattingOutput NOTIFY flagUseFormattingOutputChanged)
7276
73public:77public:
74 friend class StelAppGraphicsWidget;78 friend class StelAppGraphicsWidget;
@@ -237,7 +241,7 @@
237 //! Set flag for using calculation of azimuth from south towards west (instead north towards east)241 //! Set flag for using calculation of azimuth from south towards west (instead north towards east)
238 bool getFlagSouthAzimuthUsage() const { return flagUseAzimuthFromSouth; }242 bool getFlagSouthAzimuthUsage() const { return flagUseAzimuthFromSouth; }
239 //! Get flag for using calculation of azimuth from south towards west (instead north towards east)243 //! Get flag for using calculation of azimuth from south towards west (instead north towards east)
240 void setFlagSouthAzimuthUsage(bool use) { flagUseAzimuthFromSouth=use; }244 void setFlagSouthAzimuthUsage(bool use) { flagUseAzimuthFromSouth=use; emit flagUseAzimuthFromSouthChanged(use);}
241 245
242 //! Set flag for using of formatting output for coordinates246 //! Set flag for using of formatting output for coordinates
243 void setFlagUseFormattingOutput(bool b);247 void setFlagUseFormattingOutput(bool b);
@@ -278,6 +282,10 @@
278 void quit();282 void quit();
279signals:283signals:
280 void visionNightModeChanged(bool);284 void visionNightModeChanged(bool);
285 void flagShowDecimalDegreesChanged(bool);
286 void flagUseAzimuthFromSouthChanged(bool);
287 void flagUseCCSDesignationChanged(bool);
288 void flagUseFormattingOutputChanged(bool);
281 void colorSchemeChanged(const QString&);289 void colorSchemeChanged(const QString&);
282 void languageChanged();290 void languageChanged();
283291
284292
=== modified file 'src/core/StelMovementMgr.hpp'
--- src/core/StelMovementMgr.hpp 2017-11-17 00:14:42 +0000
+++ src/core/StelMovementMgr.hpp 2017-11-23 14:55:50 +0000
@@ -41,6 +41,10 @@
41 READ getFlagTracking41 READ getFlagTracking
42 WRITE setFlagTracking42 WRITE setFlagTracking
43 NOTIFY flagTrackingChanged)43 NOTIFY flagTrackingChanged)
44 Q_PROPERTY(bool flagIndicationMountMode
45 READ getFlagIndicationMountMode
46 WRITE setFlagIndicationMountMode
47 NOTIFY flagIndicationMountModeChanged)
4448
45 //The targets of viewport offset animation49 //The targets of viewport offset animation
46 Q_PROPERTY(float viewportHorizontalOffsetTarget50 Q_PROPERTY(float viewportHorizontalOffsetTarget
@@ -182,7 +186,7 @@
182 //! Get the state of flag for indication of mount mode186 //! Get the state of flag for indication of mount mode
183 bool getFlagIndicationMountMode() const {return flagIndicationMountMode;}187 bool getFlagIndicationMountMode() const {return flagIndicationMountMode;}
184 //! Set the state of flag for indication of mount mode188 //! Set the state of flag for indication of mount mode
185 void setFlagIndicationMountMode(bool b) { flagIndicationMountMode=b; }189 void setFlagIndicationMountMode(bool b) { flagIndicationMountMode=b; emit flagIndicationMountModeChanged(b); }
186190
187 //! Move the view to a specified J2000 position.191 //! Move the view to a specified J2000 position.
188 //! @param aim The position to move to expressed as a vector.192 //! @param aim The position to move to expressed as a vector.
@@ -309,6 +313,7 @@
309 //! Emitted when the tracking property changes313 //! Emitted when the tracking property changes
310 void flagTrackingChanged(bool b);314 void flagTrackingChanged(bool b);
311 void equatorialMountChanged(bool b);315 void equatorialMountChanged(bool b);
316 void flagIndicationMountModeChanged(bool b);
312317
313 void flagAutoZoomOutResetsDirectionChanged(bool b);318 void flagAutoZoomOutResetsDirectionChanged(bool b);
314319
315320
=== modified file 'src/core/StelObject.hpp'
--- src/core/StelObject.hpp 2017-07-10 12:38:17 +0000
+++ src/core/StelObject.hpp 2017-11-23 14:55:50 +0000
@@ -54,18 +54,19 @@
54 AltAzi = 0x00000020, //!< The position (Altitude/Azimuth)54 AltAzi = 0x00000020, //!< The position (Altitude/Azimuth)
55 Distance = 0x00000040, //!< Info about an object's distance55 Distance = 0x00000040, //!< Info about an object's distance
56 Size = 0x00000080, //!< Info about an object's size56 Size = 0x00000080, //!< Info about an object's size
57 Extra = 0x00000100, //!< Derived class-specific extra fields57 Velocity = 0x00000100, //!< Info about object's velocity
58 HourAngle = 0x00000200, //!< The hour angle + DE (of date)58 Extra = 0x00000200, //!< Derived class-specific extra fields
59 AbsoluteMagnitude = 0x00000400, //!< The absolute magnitude59 HourAngle = 0x00000400, //!< The hour angle + DE (of date)
60 GalacticCoord = 0x00000800, //!< The galactic position60 AbsoluteMagnitude = 0x00000800, //!< The absolute magnitude
61 SupergalacticCoord = 0x00001000, //!< The supergalactic position61 GalacticCoord = 0x00001000, //!< The galactic position
62 ObjectType = 0x00002000, //!< The type of the object (star, planet, etc.)62 SupergalacticCoord = 0x00002000, //!< The supergalactic position
63 EclipticCoordJ2000 = 0x00004000, //!< The ecliptic position (J2000.0 ref) [+ XYZ of VSOP87A (used mainly for debugging, not public)]63 ObjectType = 0x00004000, //!< The type of the object (star, planet, etc.)
64 EclipticCoordOfDate = 0x00008000, //!< The ecliptic position (of date)64 EclipticCoordJ2000 = 0x00008000, //!< The ecliptic position (J2000.0 ref) [+ XYZ of VSOP87A (used mainly for debugging, not public)]
65 IAUConstellation = 0x00010000, //!< Three-letter constellation code (And, Boo, Cas, ...)65 EclipticCoordOfDate = 0x00010000, //!< The ecliptic position (of date)
66 SiderealTime = 0x00020000, //!< Mean and Apparent Sidereal Time66 IAUConstellation = 0x00020000, //!< Three-letter constellation code (And, Boo, Cas, ...)
67 NoFont = 0x00040000,67 SiderealTime = 0x00040000, //!< Mean and Apparent Sidereal Time
68 PlainText = 0x00080000, //!< Strip HTML tags from output68 NoFont = 0x00080000,
69 PlainText = 0x00100000, //!< Strip HTML tags from output
69// TODO GZ70// TODO GZ
70// RaDecJ2000Planetocentric = 0x00020000, //!< The planetocentric equatorial position (J2000 ref) [Mostly to compare with almanacs]71// RaDecJ2000Planetocentric = 0x00020000, //!< The planetocentric equatorial position (J2000 ref) [Mostly to compare with almanacs]
71// RaDecOfDatePlanetocentric = 0x00040000 //!< The planetocentric equatorial position (of date)72// RaDecOfDatePlanetocentric = 0x00040000 //!< The planetocentric equatorial position (of date)
@@ -75,7 +76,7 @@
75 Q_DECLARE_FLAGS(InfoStringGroup, InfoStringGroupFlags)76 Q_DECLARE_FLAGS(InfoStringGroup, InfoStringGroupFlags)
7677
77 //! A pre-defined set of specifiers for the getInfoString flags argument to getInfoString78 //! A pre-defined set of specifiers for the getInfoString flags argument to getInfoString
78 static const InfoStringGroupFlags AllInfo = (InfoStringGroupFlags)(Name|CatalogNumber|Magnitude|RaDecJ2000|RaDecOfDate|AltAzi|Distance|Size|Extra|HourAngle|79 static const InfoStringGroupFlags AllInfo = (InfoStringGroupFlags)(Name|CatalogNumber|Magnitude|RaDecJ2000|RaDecOfDate|AltAzi|Distance|Size|Velocity|Extra|HourAngle|
79 AbsoluteMagnitude|GalacticCoord|SupergalacticCoord|ObjectType|EclipticCoordJ2000|80 AbsoluteMagnitude|GalacticCoord|SupergalacticCoord|ObjectType|EclipticCoordJ2000|
80 EclipticCoordOfDate|IAUConstellation|SiderealTime);81 EclipticCoordOfDate|IAUConstellation|SiderealTime);
81 //! A pre-defined set of specifiers for the getInfoString flags argument to getInfoString82 //! A pre-defined set of specifiers for the getInfoString flags argument to getInfoString
8283
=== modified file 'src/core/modules/Comet.cpp'
--- src/core/modules/Comet.cpp 2017-11-16 15:27:36 +0000
+++ src/core/modules/Comet.cpp 2017-11-23 14:55:50 +0000
@@ -187,6 +187,7 @@
187 oss << QString("%1: %2").arg(q_("Absolute Magnitude")).arg(absoluteMagnitude, 0, 'f', 2) << "<br>";187 oss << QString("%1: %2").arg(q_("Absolute Magnitude")).arg(absoluteMagnitude, 0, 'f', 2) << "<br>";
188 }188 }
189189
190
190 oss << getCommonInfoString(core, flags);191 oss << getCommonInfoString(core, flags);
191192
192 // TRANSLATORS: Unit of measure for distance - kilometers193 // TRANSLATORS: Unit of measure for distance - kilometers
@@ -231,6 +232,18 @@
231 oss << QString("%1: %2%3 (%4 %5)").arg(q_("Distance"), distAU, au, distKM, useKM ? km : Mkm) << "<br />";232 oss << QString("%1: %2%3 (%4 %5)").arg(q_("Distance"), distAU, au, distKM, useKM ? km : Mkm) << "<br />";
232 }233 }
233234
235 if (flags&Velocity)
236 {
237 QString kms = qc_("km/s", "speed");
238
239 Vec3d orbitalVel=getEclipticVelocity();
240 double orbVel=orbitalVel.length();
241 if (orbVel>0.)
242 { // AU/d * km/AU /24
243 oss << QString("%1: %2 %3").arg(q_("Velocity")).arg(orbVel* AU/86400., 0, 'f', 3).arg(kms) << "<br />";
244 }
245 }
246
234 if (flags&Extra)247 if (flags&Extra)
235 {248 {
236 // If semi-major axis not zero then calculate and display orbital period for comet in days249 // If semi-major axis not zero then calculate and display orbital period for comet in days
@@ -241,10 +254,10 @@
241 oss << QString("%1: %2 a").arg(q_("Sidereal period"), QString::number(siderealPeriod/365.25, 'f', 3)) << "<br />";254 oss << QString("%1: %2 a").arg(q_("Sidereal period"), QString::number(siderealPeriod/365.25, 'f', 3)) << "<br />";
242 }255 }
243256
244 // TRANSLATORS: Unit of measure for speed - kilometers per second257// // TRANSLATORS: Unit of measure for speed - kilometers per second
245 QString kms = qc_("km/s", "speed");258// QString kms = qc_("km/s", "speed");
246 // GZ: Add speed. I don't know where else to place that bit of information.259// // GZ: Add speed. I don't know where else to place that bit of information.
247 oss << QString("%1: %2 %3").arg(q_("Speed"), QString::number(((CometOrbit*)orbitPtr)->getVelocity().length()*AU/86400.0, 'f', 3), kms) << "<br />";260// oss << QString("%1: %2 %3").arg(q_("Speed"), QString::number(((CometOrbit*)orbitPtr)->getVelocity().length()*AU/86400.0, 'f', 3), kms) << "<br />";
248261
249 const Vec3d& observerHelioPos = core->getObserverHeliocentricEclipticPos();262 const Vec3d& observerHelioPos = core->getObserverHeliocentricEclipticPos();
250 const double elongation = getElongation(observerHelioPos);263 const double elongation = getElongation(observerHelioPos);
@@ -353,11 +366,6 @@
353 {366 {
354 lastJDEtail=dateJDE;367 lastJDEtail=dateJDE;
355368
356 // The CometOrbit is in fact available in userDataPtr!
357 CometOrbit* orbit=(CometOrbit*)orbitPtr;
358 Q_ASSERT(orbit);
359 if (!orbit->objectDateValid(dateJDE)) return; // out of useful date range. This should allow having hundreds of comet elements.
360
361 if (orbit->getUpdateTails()){369 if (orbit->getUpdateTails()){
362 // Compute lengths and orientations from orbit object, but only if required.370 // Compute lengths and orientations from orbit object, but only if required.
363 tailFactors=getComaDiameterAndTailLengthAU();371 tailFactors=getComaDiameterAndTailLengthAU();
@@ -434,7 +442,8 @@
434 float gasMagFactor=qMin(0.9f*aLum, 0.7f);442 float gasMagFactor=qMin(0.9f*aLum, 0.7f);
435 float dustMagFactor=qMin(dustTailBrightnessFactor*aLum, 0.7f);443 float dustMagFactor=qMin(dustTailBrightnessFactor*aLum, 0.7f);
436444
437 Vec3f gasColor(0.15f*gasMagFactor,0.35f*gasMagFactor,0.6f*gasMagFactor); // Orig color 0.15/0.15/0.6445 // TODO: Maybe make gas color distance dependent? (various typical ingredients outgas at different temperatures...)
446 Vec3f gasColor(0.15f*gasMagFactor,0.35f*gasMagFactor,0.6f*gasMagFactor); // Orig color 0.15/0.15/0.6.
438 Vec3f dustColor(dustMagFactor, dustMagFactor,0.6f*dustMagFactor);447 Vec3f dustColor(dustMagFactor, dustMagFactor,0.6f*dustMagFactor);
439448
440 if (withAtmosphere)449 if (withAtmosphere)
441450
=== modified file 'src/core/modules/MinorPlanet.cpp'
--- src/core/modules/MinorPlanet.cpp 2017-11-16 15:27:36 +0000
+++ src/core/modules/MinorPlanet.cpp 2017-11-23 14:55:50 +0000
@@ -302,6 +302,23 @@
302 oss << QString("%1: %2%3 (%4 %5)").arg(q_("Distance"), distAU, au, distKM, km) << "<br />";302 oss << QString("%1: %2%3 (%4 %5)").arg(q_("Distance"), distAU, au, distKM, km) << "<br />";
303 }303 }
304304
305 if (flags&Velocity)
306 {
307 // TRANSLATORS: Unit of measure for speed - kilometers per second
308 QString kms = qc_("km/s", "speed");
309
310 Vec3d orbitalVel=getEclipticVelocity();
311 double orbVel=orbitalVel.length();
312 if (orbVel>0.)
313 { // AU/d * km/AU /24
314 double orbVelKms=orbVel* AU/86400.;
315 oss << QString("%1: %2 %3").arg(q_("Orbital Velocity")).arg(orbVelKms, 0, 'f', 3).arg(kms) << "<br />";
316 double helioVel=getHeliocentricEclipticVelocity().length(); // just in case we have asteroid moons!
317 if (helioVel!=orbVel)
318 oss << QString("%1: %2 %3").arg(q_("Heliocentric velocity")).arg(helioVel* AU/86400., 0, 'f', 3).arg(kms) << "<br />";
319 }
320 }
321
305 double angularSize = 2.*getAngularSize(core)*M_PI/180.;322 double angularSize = 2.*getAngularSize(core)*M_PI/180.;
306 if (flags&Size && angularSize>=4.8e-7)323 if (flags&Size && angularSize>=4.8e-7)
307 {324 {
308325
=== modified file 'src/core/modules/Orbit.cpp'
--- src/core/modules/Orbit.cpp 2017-03-12 21:25:07 +0000
+++ src/core/modules/Orbit.cpp 2017-11-23 14:55:50 +0000
@@ -251,6 +251,7 @@
251251
252void CometOrbit::positionAtTimevInVSOP87Coordinates(double JDE, double *v, bool updateVelocityVector)252void CometOrbit::positionAtTimevInVSOP87Coordinates(double JDE, double *v, bool updateVelocityVector)
253{253{
254 Q_UNUSED(updateVelocityVector);
254 JDE -= t0;255 JDE -= t0;
255 double rCosNu,rSinNu;256 double rCosNu,rSinNu;
256 if (e < 1.0) InitEll(q,n,e,JDE,rCosNu,rSinNu); // Laguerre-Conway seems stable enough to go for <1.0.257 if (e < 1.0) InitEll(q,n,e,JDE,rCosNu,rSinNu); // Laguerre-Conway seems stable enough to go for <1.0.
@@ -261,16 +262,17 @@
261 }262 }
262 else InitPar(q,n,JDE,rCosNu,rSinNu);263 else InitPar(q,n,JDE,rCosNu,rSinNu);
263 double p0,p1,p2, s0, s1, s2;264 double p0,p1,p2, s0, s1, s2;
264 Init3D(i,Om,w,rCosNu,rSinNu,p0,p1,p2, s0, s1, s2, updateVelocityVector, e, q);265 //Init3D(i,Om,w,rCosNu,rSinNu,p0,p1,p2, s0, s1, s2, updateVelocityVector, e, q);
266 Init3D(i,Om,w,rCosNu,rSinNu,p0,p1,p2, s0, s1, s2, true, e, q);
265 v[0] = rotateToVsop87[0]*p0 + rotateToVsop87[1]*p1 + rotateToVsop87[2]*p2;267 v[0] = rotateToVsop87[0]*p0 + rotateToVsop87[1]*p1 + rotateToVsop87[2]*p2;
266 v[1] = rotateToVsop87[3]*p0 + rotateToVsop87[4]*p1 + rotateToVsop87[5]*p2;268 v[1] = rotateToVsop87[3]*p0 + rotateToVsop87[4]*p1 + rotateToVsop87[5]*p2;
267 v[2] = rotateToVsop87[6]*p0 + rotateToVsop87[7]*p1 + rotateToVsop87[8]*p2;269 v[2] = rotateToVsop87[6]*p0 + rotateToVsop87[7]*p1 + rotateToVsop87[8]*p2;
268270
269 if (updateVelocityVector)271 //if (updateVelocityVector)
270 {272 //{
271 rdot.set(s0, s1, s2);273 rdot.set(s0, s1, s2);
272 updateTails=true;274 updateTails=true;
273 }275 //}
274}276}
275277
276278
@@ -459,6 +461,7 @@
459 }461 }
460 else if (eccentricity > 1.0) // N.B. This is odd at least: elliptical must have ecc<1!462 else if (eccentricity > 1.0) // N.B. This is odd at least: elliptical must have ecc<1!
461 {463 {
464 Q_ASSERT(0); // We should never come here!
462 double a = pericenterDistance / (1.0 - eccentricity);465 double a = pericenterDistance / (1.0 - eccentricity);
463 x = -a * (eccentricity - cosh(E));466 x = -a * (eccentricity - cosh(E));
464 z = -a * std::sqrt(eccentricity * eccentricity - 1) * -sinh(E);467 z = -a * std::sqrt(eccentricity * eccentricity - 1) * -sinh(E);
@@ -466,6 +469,7 @@
466 else469 else
467 {470 {
468 // TODO: Handle parabolic orbits471 // TODO: Handle parabolic orbits
472 Q_ASSERT(0); // We should never come here!
469 x = 0.0;473 x = 0.0;
470 z = 0.0;474 z = 0.0;
471 }475 }
@@ -487,22 +491,6 @@
487 return positionAtE(E);491 return positionAtE(E);
488}492}
489493
490//void EllipticalOrbit::positionAtTime(double JDE, double * X, double * Y, double * Z) const
491//{
492// Vec3d pos = positionAtTime(JDE);
493// *X=pos[2];
494// *Y=pos[0];
495// *Z=pos[1];
496//}
497
498//void EllipticalOrbit::positionAtTimev(double JDE, double* v)
499//{
500// Vec3d pos = positionAtTime(JDE);
501// v[0]=pos[2];
502// v[1]=pos[0];
503// v[2]=pos[1];
504//}
505
506void EllipticalOrbit::positionAtTimevInVSOP87Coordinates(const double JDE, double* v) const494void EllipticalOrbit::positionAtTimevInVSOP87Coordinates(const double JDE, double* v) const
507{495{
508 Vec3d pos = positionAtTime(JDE);496 Vec3d pos = positionAtTime(JDE);
@@ -516,21 +504,23 @@
516 return period;504 return period;
517}505}
518506
519507/* Found undocumented and unused in pre-0.17.
508// return apocenter distance
520double EllipticalOrbit::getBoundingRadius() const509double EllipticalOrbit::getBoundingRadius() const
521{510{
522 // TODO: watch out for unbounded parabolic and hyperbolic orbits511 // TODO: watch out for unbounded parabolic and hyperbolic orbits
523 return pericenterDistance * ((1.0 + eccentricity) / (1.0 - eccentricity));512 return pericenterDistance * ((1.0 + eccentricity) / (1.0 - eccentricity));
524}513}
525514*/
526515/*
516 * Found undocumented and unused pre-0.17.
527void EllipticalOrbit::sample(double, double, int nSamples, OrbitSampleProc& proc) const517void EllipticalOrbit::sample(double, double, int nSamples, OrbitSampleProc& proc) const
528{518{
529 double dE = 2. * M_PI / (double) nSamples;519 double dE = 2. * M_PI / (double) nSamples;
530 for (int i = 0; i < nSamples; i++)520 for (int i = 0; i < nSamples; i++)
531 proc.sample(positionAtE(dE * i));521 proc.sample(positionAtE(dE * i));
532}522}
533523*/
534/*524/*
535 * Stuff found unused and deactivated pre-0.15525 * Stuff found unused and deactivated pre-0.15
536Vec3d CachingOrbit::positionAtTime(double JDE) const526Vec3d CachingOrbit::positionAtTime(double JDE) const
537527
=== modified file 'src/core/modules/Orbit.hpp'
--- src/core/modules/Orbit.hpp 2017-03-12 21:25:07 +0000
+++ src/core/modules/Orbit.hpp 2017-11-23 14:55:50 +0000
@@ -56,8 +56,8 @@
56 // Original one56 // Original one
57 Vec3d positionAtTime(const double JDE) const;57 Vec3d positionAtTime(const double JDE) const;
58 double getPeriod() const;58 double getPeriod() const;
59 double getBoundingRadius() const;59 // double getBoundingRadius() const; // Return apoapsis distance. UNUSED!
60 virtual void sample(double, double, int, OrbitSampleProc&) const;60 // virtual void sample(double, double, int, OrbitSampleProc&) const; //UNDOCUMENTED & UNUSED
6161
62private:62private:
63 //! returns eccentric anomaly E for Mean anomaly M63 //! returns eccentric anomaly E for Mean anomaly M
@@ -98,6 +98,7 @@
98 void setUpdateTails(const bool update){ updateTails=update; }98 void setUpdateTails(const bool update){ updateTails=update; }
99 //! return speed value [AU/d] last computed by positionAtTimevInVSOP87Coordinates(JDE, v, true)99 //! return speed value [AU/d] last computed by positionAtTimevInVSOP87Coordinates(JDE, v, true)
100 Vec3d getVelocity() const { return rdot; }100 Vec3d getVelocity() const { return rdot; }
101 void getVelocity(double *vel) const { vel[0]=rdot[0]; vel[1]=rdot[1]; vel[2]=rdot[2];}
101 double getSemimajorAxis() const { return (e==1. ? 0. : q / (1.-e)); }102 double getSemimajorAxis() const { return (e==1. ? 0. : q / (1.-e)); }
102 double getEccentricity() const { return e; }103 double getEccentricity() const { return e; }
103 bool objectDateValid(const double JDE) const { return (fabs(t0-JDE)<orbitGood); }104 bool objectDateValid(const double JDE) const { return (fabs(t0-JDE)<orbitGood); }
104105
=== modified file 'src/core/modules/Planet.cpp'
--- src/core/modules/Planet.cpp 2017-11-16 15:27:36 +0000
+++ src/core/modules/Planet.cpp 2017-11-23 14:55:50 +0000
@@ -197,6 +197,7 @@
197 radius(radius),197 radius(radius),
198 oneMinusOblateness(1.0-oblateness),198 oneMinusOblateness(1.0-oblateness),
199 eclipticPos(0.,0.,0.),199 eclipticPos(0.,0.,0.),
200 eclipticVelocity(0.,0.,0.),
200 haloColor(halocolor),201 haloColor(halocolor),
201 absoluteMagnitude(-99.0f),202 absoluteMagnitude(-99.0f),
202 albedo(albedo),203 albedo(albedo),
@@ -487,6 +488,26 @@
487 oss << QString("%1: %2%3 (%4 %5)").arg(q_("Distance"), distAU, au, distKM, km) << "<br />";488 oss << QString("%1: %2%3 (%4 %5)").arg(q_("Distance"), distAU, au, distKM, km) << "<br />";
488 }489 }
489490
491 if (flags&Velocity)
492 {
493 // TRANSLATORS: Unit of measure for speed - kilometers per second
494 QString kms = qc_("km/s", "speed");
495
496 Vec3d orbitalVel=getEclipticVelocity();
497 double orbVel=orbitalVel.length();
498 if (orbVel>0.)
499 { // AU/d * km/AU /24
500 double orbVelKms=orbVel* AU/86400.;
501 if (englishName=="moon")
502 orbVelKms=orbVel;
503 oss << QString("%1: %2 %3").arg(q_("Orbital Velocity")).arg(orbVelKms, 0, 'f', 3).arg(kms) << "<br />";
504 double helioVel=getHeliocentricEclipticVelocity().length();
505 if (helioVel!=orbVel)
506 oss << QString("%1: %2 %3").arg(q_("Heliocentric Velocity")).arg(helioVel* AU/86400., 0, 'f', 3).arg(kms) << "<br />";
507 }
508 }
509
510
490 double angularSize = 2.*getAngularSize(core)*M_PI/180.;511 double angularSize = 2.*getAngularSize(core)*M_PI/180.;
491 if (flags&Size && angularSize>=4.8e-7)512 if (flags&Size && angularSize>=4.8e-7)
492 {513 {
@@ -649,6 +670,9 @@
649 map.insert("elongation-deg", StelUtils::radToDecDegStr(elongation));670 map.insert("elongation-deg", StelUtils::radToDecDegStr(elongation));
650 map.insert("type", getPlanetTypeString()); // replace existing "type=Planet" by something more detailed.671 map.insert("type", getPlanetTypeString()); // replace existing "type=Planet" by something more detailed.
651 // TBD: Is there ANY reason to keep "type"="Planet" and add a "ptype"=getPlanetTypeString() field?672 // TBD: Is there ANY reason to keep "type"="Planet" and add a "ptype"=getPlanetTypeString() field?
673 map.insert("velocity", getEclipticVelocity().toString());
674 map.insert("heliocentric-velocity", getHeliocentricEclipticVelocity().toString());
675
652 }676 }
653677
654 return map;678 return map;
@@ -738,7 +762,7 @@
738{762{
739 if (fabs(lastJDE-dateJDE)>deltaJDE)763 if (fabs(lastJDE-dateJDE)>deltaJDE)
740 {764 {
741 coordFunc(dateJDE, eclipticPos, orbitPtr);765 coordFunc(dateJDE, eclipticPos, eclipticVelocity, orbitPtr);
742 lastJDE = dateJDE;766 lastJDE = dateJDE;
743 }767 }
744}768}
@@ -851,11 +875,11 @@
851 computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date);875 computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date);
852 if (osculatingFunc)876 if (osculatingFunc)
853 {877 {
854 (*osculatingFunc)(dateJDE,calc_date,eclipticPos);878 (*osculatingFunc)(dateJDE,calc_date,eclipticPos, eclipticVelocity);
855 }879 }
856 else880 else
857 {881 {
858 coordFunc(calc_date, eclipticPos, orbitPtr);882 coordFunc(calc_date, eclipticPos, eclipticVelocity, orbitPtr);
859 }883 }
860 orbitP[d] = eclipticPos;884 orbitP[d] = eclipticPos;
861 orbit[d] = getHeliocentricEclipticPos();885 orbit[d] = getHeliocentricEclipticPos();
@@ -881,11 +905,11 @@
881905
882 computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date);906 computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date);
883 if (osculatingFunc) {907 if (osculatingFunc) {
884 (*osculatingFunc)(dateJDE,calc_date,eclipticPos);908 (*osculatingFunc)(dateJDE,calc_date,eclipticPos, eclipticVelocity);
885 }909 }
886 else910 else
887 {911 {
888 coordFunc(calc_date, eclipticPos, orbitPtr);912 coordFunc(calc_date, eclipticPos, eclipticVelocity, orbitPtr);
889 }913 }
890 orbitP[d] = eclipticPos;914 orbitP[d] = eclipticPos;
891 orbit[d] = getHeliocentricEclipticPos();915 orbit[d] = getHeliocentricEclipticPos();
@@ -910,11 +934,11 @@
910 computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date);934 computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date);
911 if (osculatingFunc)935 if (osculatingFunc)
912 {936 {
913 (*osculatingFunc)(dateJDE,calc_date,eclipticPos);937 (*osculatingFunc)(dateJDE,calc_date,eclipticPos, eclipticVelocity);
914 }938 }
915 else939 else
916 {940 {
917 coordFunc(calc_date, eclipticPos, orbitPtr);941 coordFunc(calc_date, eclipticPos, eclipticVelocity, orbitPtr);
918 }942 }
919 orbitP[d] = eclipticPos;943 orbitP[d] = eclipticPos;
920 orbit[d] = getHeliocentricEclipticPos();944 orbit[d] = getHeliocentricEclipticPos();
@@ -926,7 +950,7 @@
926950
927951
928 // calculate actual Planet position952 // calculate actual Planet position
929 coordFunc(dateJDE, eclipticPos, orbitPtr);953 coordFunc(dateJDE, eclipticPos, eclipticVelocity, orbitPtr);
930954
931 lastJDE = dateJDE;955 lastJDE = dateJDE;
932956
@@ -934,7 +958,7 @@
934 else if (fabs(lastJDE-dateJDE)>deltaJDE)958 else if (fabs(lastJDE-dateJDE)>deltaJDE)
935 {959 {
936 // calculate actual Planet position960 // calculate actual Planet position
937 coordFunc(dateJDE, eclipticPos, orbitPtr);961 coordFunc(dateJDE, eclipticPos, eclipticVelocity, orbitPtr);
938 if (orbitFader.getInterstate()>0.000001)962 if (orbitFader.getInterstate()>0.000001)
939 for( int d=0; d<ORBIT_SEGMENTS; d++ )963 for( int d=0; d<ORBIT_SEGMENTS; d++ )
940 orbit[d]=getHeliocentricPos(orbitP[d]);964 orbit[d]=getHeliocentricPos(orbitP[d]);
@@ -1132,6 +1156,23 @@
1132 }1156 }
1133 }1157 }
1134}1158}
1159// Return heliocentric velocity of planet.
1160Vec3d Planet::getHeliocentricEclipticVelocity() const
1161{
1162 // Note: using shared copies is too slow here. So we use direct access
1163 // instead.
1164 Vec3d vel = eclipticVelocity;
1165 const Planet* pp = parent.data();
1166 if (pp)
1167 {
1168 while (pp->parent.data())
1169 {
1170 vel += pp->eclipticVelocity;
1171 pp = pp->parent.data();
1172 }
1173 }
1174 return vel;
1175}
11351176
1136// Compute the distance to the given position in heliocentric coordinate (in AU)1177// Compute the distance to the given position in heliocentric coordinate (in AU)
1137// This is called by SolarSystem::draw()1178// This is called by SolarSystem::draw()
11381179
=== modified file 'src/core/modules/Planet.hpp'
--- src/core/modules/Planet.hpp 2017-10-28 04:59:28 +0000
+++ src/core/modules/Planet.hpp 2017-11-23 14:55:50 +0000
@@ -31,10 +31,11 @@
31#include <QString>31#include <QString>
3232
33// The callback type for the external position computation function33// The callback type for the external position computation function
34// arguments are JDE, position[3], velocity[3].
34// The last variable is the userData pointer.35// The last variable is the userData pointer.
35typedef void (*posFuncType)(double, double*, void*);36typedef void (*posFuncType)(double, double*, double*, void*);
3637
37typedef void (OsculatingFunctType)(double jde0,double jde,double xyz[3]);38typedef void (OsculatingFunctType)(double jde0,double jde,double xyz[3], double xyzdot[3]);
3839
39// epoch J2000: 12 UT on 1 Jan 200040// epoch J2000: 12 UT on 1 Jan 2000
40#define J2000 2451545.041#define J2000 2451545.0
@@ -289,21 +290,27 @@
289 //! Get the Planet position in the parent Planet ecliptic coordinate in AU290 //! Get the Planet position in the parent Planet ecliptic coordinate in AU
290 Vec3d getEclipticPos() const;291 Vec3d getEclipticPos() const;
291292
292 // Return the heliocentric ecliptical position293 //! Return the heliocentric ecliptical position
293 Vec3d getHeliocentricEclipticPos() const {return getHeliocentricPos(eclipticPos);}294 Vec3d getHeliocentricEclipticPos() const {return getHeliocentricPos(eclipticPos);}
294295
295 // Return the heliocentric transformation for local coordinate296 //! Return the heliocentric transformation for local coordinate
296 Vec3d getHeliocentricPos(Vec3d) const;297 Vec3d getHeliocentricPos(Vec3d) const;
297 void setHeliocentricEclipticPos(const Vec3d &pos);298 void setHeliocentricEclipticPos(const Vec3d &pos);
298299
299 // Compute the distance to the given position in heliocentric coordinate (in AU)300 //! Get the planet velocity around the parent planet in ecliptical coordinates in AU/d
301 Vec3d getEclipticVelocity() const {return eclipticVelocity;}
302
303 //! Get the planet's heliocentric velocity in the solar system in ecliptical coordinates in AU/d. Required for aberration!
304 Vec3d getHeliocentricEclipticVelocity() const;
305
306 //! Compute the distance to the given position in heliocentric coordinates (in AU)
300 double computeDistance(const Vec3d& obsHelioPos);307 double computeDistance(const Vec3d& obsHelioPos);
301 double getDistance(void) const {return distance;}308 double getDistance(void) const {return distance;}
302309
303 void setRings(Ring* r) {rings = r;}310 void setRings(Ring* r) {rings = r;}
304311
305 void setSphereScale(float s) { if(s!=sphereScale) { sphereScale = s; if(objModel) objModel->needsRescale=true; } }312 void setSphereScale(float s) { if(s!=sphereScale) { sphereScale = s; if(objModel) objModel->needsRescale=true; } }
306 float getSphereScale() { return sphereScale; }313 float getSphereScale() const { return sphereScale; }
307314
308 const QSharedPointer<Planet> getParent(void) const {return parent;}315 const QSharedPointer<Planet> getParent(void) const {return parent;}
309316
@@ -321,11 +328,11 @@
321328
322 bool flagNativeName;329 bool flagNativeName;
323 void setFlagNativeName(bool b) { flagNativeName = b; }330 void setFlagNativeName(bool b) { flagNativeName = b; }
324 bool getFlagNativeName(void) { return flagNativeName; }331 bool getFlagNativeName(void) const { return flagNativeName; }
325332
326 bool flagTranslatedName;333 bool flagTranslatedName;
327 void setFlagTranslatedName(bool b) { flagTranslatedName = b; }334 void setFlagTranslatedName(bool b) { flagTranslatedName = b; }
328 bool getFlagTranslatedName(void) { return flagTranslatedName; }335 bool getFlagTranslatedName(void) const { return flagTranslatedName; }
329336
330 ///////////////////////////////////////////////////////////////////////////337 ///////////////////////////////////////////////////////////////////////////
331 // DEPRECATED338 // DEPRECATED
@@ -457,7 +464,6 @@
457 StelOBJ* obj;464 StelOBJ* obj;
458 //! The opengl array, created by loadObjModel() but filled later in main thread465 //! The opengl array, created by loadObjModel() but filled later in main thread
459 StelOpenGLArray* arr;466 StelOpenGLArray* arr;
460
461 };467 };
462468
463 static StelTextureSP texEarthShadow; // for lunar eclipses469 static StelTextureSP texEarthShadow; // for lunar eclipses
@@ -499,10 +505,13 @@
499 RotationElements re; // Rotation param505 RotationElements re; // Rotation param
500 double radius; // Planet radius in AU506 double radius; // Planet radius in AU
501 double oneMinusOblateness; // (polar radius)/(equatorial radius)507 double oneMinusOblateness; // (polar radius)/(equatorial radius)
502 Vec3d eclipticPos; // Position in AU in the rectangular ecliptic coordinate system around the parent body. To get heliocentric coordinates, use getHeliocentricEclipticPos()508 Vec3d eclipticPos; // Position in AU in the rectangular ecliptic coordinate system (J2000) around the parent body.
503 // centered on the parent Planet509 // To get heliocentric coordinates, use getHeliocentricEclipticPos()
510 Vec3d eclipticVelocity; // Speed in AU/d in the rectangular ecliptic coordinate system (J2000) around the parent body.
511 // NEW FEATURE in late 2017. For now, this may be 0/0/0 when we are not yet able to compute it.
512 // to get velocity, preferrably read getEclipticVelocity() and getHeliocentricEclipticVelocity()
513 // The "State Vector" [Heafner 1999] can be formed from (JDE, eclipticPos, eclipticVelocity)
504 Vec3d screenPos; // Used to store temporarily the 2D position on screen514 Vec3d screenPos; // Used to store temporarily the 2D position on screen
505// Vec3d previousScreenPos; // The position of this planet in the previous frame. 0.16pre: DEAD CODE!
506 Vec3f haloColor; // used for drawing the planet halo. Also, when non-spherical (OBJ) model without texture is used, its color is derived from haloColour*albedo.515 Vec3f haloColor; // used for drawing the planet halo. Also, when non-spherical (OBJ) model without texture is used, its color is derived from haloColour*albedo.
507516
508 float absoluteMagnitude; // since 2017 this moved to the Planet class: V(1,0) from Explanatory Supplement or WGCCRE2009 paper for the planets, H in the H,G magnitude system for Minor planets, H10 for comets.517 float absoluteMagnitude; // since 2017 this moved to the Planet class: V(1,0) from Explanatory Supplement or WGCCRE2009 paper for the planets, H in the H,G magnitude system for Minor planets, H10 for comets.
509518
=== modified file 'src/core/modules/SolarSystem.cpp'
--- src/core/modules/SolarSystem.cpp 2017-10-21 12:47:45 +0000
+++ src/core/modules/SolarSystem.cpp 2017-11-23 14:55:50 +0000
@@ -394,13 +394,16 @@
394 }394 }
395}395}
396396
397void ellipticalOrbitPosFunc(double jd,double xyz[3], void* userDataPtr)397void ellipticalOrbitPosFunc(double jd,double xyz[3], double xyzdot[3], void* orbitPtr)
398{398{
399 static_cast<EllipticalOrbit*>(userDataPtr)->positionAtTimevInVSOP87Coordinates(jd, xyz);399 static_cast<EllipticalOrbit*>(orbitPtr)->positionAtTimevInVSOP87Coordinates(jd, xyz);
400 // TODO: Implement a way to retrieve velocities.
401 xyzdot[0]=xyzdot[1]=xyzdot[2]=0.0;
400}402}
401void cometOrbitPosFunc(double jd,double xyz[3], void* userDataPtr)403void cometOrbitPosFunc(double jd,double xyz[3], double xyzdot[3], void* orbitPtr)
402{404{
403 static_cast<CometOrbit*>(userDataPtr)->positionAtTimevInVSOP87Coordinates(jd, xyz);405 static_cast<CometOrbit*>(orbitPtr)->positionAtTimevInVSOP87Coordinates(jd, xyz, true);
406 static_cast<CometOrbit*>(orbitPtr)->getVelocity(xyzdot);
404}407}
405408
406// Init and load the solar system data (2 files)409// Init and load the solar system data (2 files)
@@ -638,9 +641,8 @@
638 if (pericenterDistance <= 0.0) {641 if (pericenterDistance <= 0.0) {
639 semi_major_axis = pd.value(secname+"/orbit_SemiMajorAxis",-1e100).toDouble();642 semi_major_axis = pd.value(secname+"/orbit_SemiMajorAxis",-1e100).toDouble();
640 if (semi_major_axis <= -1e100) {643 if (semi_major_axis <= -1e100) {
641 qDebug() << "ERROR: " << englishName644 qDebug() << "ERROR loading " << englishName
642 << ": you must provide orbit_PericenterDistance or orbit_SemiMajorAxis";645 << ": you must provide orbit_PericenterDistance or orbit_SemiMajorAxis";
643 //abort();
644 continue;646 continue;
645 } else {647 } else {
646 semi_major_axis /= AU;648 semi_major_axis /= AU;
@@ -692,12 +694,8 @@
692 }694 }
693695
694 // when the parent is the sun use ecliptic rather than sun equator:696 // when the parent is the sun use ecliptic rather than sun equator:
695 const double parentRotObliquity = parent->getParent()697 const double parentRotObliquity = parent->getParent() ? parent->getRotObliquity(2451545.0) : 0.0;
696 ? parent->getRotObliquity(2451545.0)698 const double parent_rot_asc_node = parent->getParent() ? parent->getRotAscendingNode() : 0.0;
697 : 0.0;
698 const double parent_rot_asc_node = parent->getParent()
699 ? parent->getRotAscendingNode()
700 : 0.0;
701 double parent_rot_j2000_longitude = 0.0;699 double parent_rot_j2000_longitude = 0.0;
702 if (parent->getParent()) {700 if (parent->getParent()) {
703 const double c_obl = cos(parentRotObliquity);701 const double c_obl = cos(parentRotObliquity);
@@ -714,16 +712,16 @@
714 }712 }
715713
716 // Create an elliptical orbit714 // Create an elliptical orbit
717 EllipticalOrbit *orb = new EllipticalOrbit(pericenterDistance,715 EllipticalOrbit *orb = new EllipticalOrbit(pericenterDistance, // [AU]
718 eccentricity,716 eccentricity, // 0..>1, but practically only 0..1
719 inclination,717 inclination, // [radians]
720 ascending_node,718 ascending_node, // [radians]
721 arg_of_pericenter,719 arg_of_pericenter, // [radians]
722 mean_anomaly,720 mean_anomaly, // [radians]
723 period,721 period, // [days]
724 epoch,722 epoch, // [JDE]
725 parentRotObliquity,723 parentRotObliquity, // [radians]
726 parent_rot_asc_node,724 parent_rot_asc_node, // [radians]
727 parent_rot_j2000_longitude);725 parent_rot_j2000_longitude);
728 orbits.push_back(orb);726 orbits.push_back(orb);
729727
730728
=== modified file 'src/core/planetsephems/EphemWrapper.cpp'
--- src/core/planetsephems/EphemWrapper.cpp 2017-03-17 20:17:25 +0000
+++ src/core/planetsephems/EphemWrapper.cpp 2017-11-23 14:55:50 +0000
@@ -95,9 +95,10 @@
95}95}
9696
97// planet_id is ONLY one of the #defined values 0..8 above.97// planet_id is ONLY one of the #defined values 0..8 above.
98void get_planet_helio_coordsv(const double jd, double xyz[3], const int planet_id)98void get_planet_helio_coordsv(const double jd, double xyz[3], double xyzdot[3], const int planet_id)
99{99{
100 bool deOk=false;100 bool deOk=false;
101 double xyz6[6];
101 if(!std::isfinite(jd))102 if(!std::isfinite(jd))
102 {103 {
103 qDebug() << "get_planet_helio_coordsv(): SKIPPED CoordCalc, jd is infinite/nan: " << jd;104 qDebug() << "get_planet_helio_coordsv(): SKIPPED CoordCalc, jd is infinite/nan: " << jd;
@@ -106,23 +107,27 @@
106107
107 if(use_de430(jd))108 if(use_de430(jd))
108 {109 {
109 deOk=GetDe430Coor(jd, planet_id + 1, xyz);110 deOk=GetDe430Coor(jd, planet_id + 1, xyz6);
110 }111 }
111 else if(use_de431(jd))112 else if(use_de431(jd))
112 {113 {
113 deOk=GetDe431Coor(jd, planet_id + 1, xyz);114 deOk=GetDe431Coor(jd, planet_id + 1, xyz6);
114 }115 }
115 if (!deOk) //VSOP87 as fallback116 if (!deOk) //VSOP87 as fallback
116 {117 {
117 GetVsop87Coor(jd, planet_id, xyz);118 GetVsop87Coor(jd, planet_id, xyz6);
118 }119 }
120 xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2];
121 xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5];
122
119}123}
120124
121// Osculating positions for time JDE in elements for JDE0, if possible by the theory used (e.g. VSOP87).125// Osculating positions for time JDE in elements for JDE0, if possible by the theory used (e.g. VSOP87).
122// For ephemerides like DE4xx, JDE0 is irrelevant.126// For ephemerides like DE4xx, JDE0 is irrelevant.
123void get_planet_helio_osculating_coordsv(double jd0, double jd, double xyz[3], int planet_id)127void get_planet_helio_osculating_coordsv(double jd0, double jd, double xyz[3], double xyzdot[3], int planet_id)
124{128{
125 bool deOk=false;129 bool deOk=false;
130 double xyz6[6];
126 if(!(std::isfinite(jd) && std::isfinite(jd0)))131 if(!(std::isfinite(jd) && std::isfinite(jd0)))
127 {132 {
128 qDebug() << "get_planet_helio_osculating_coordsv(): SKIPPED CoordCalc, jd0 or jd is infinite/nan. jd0:" << jd0 << "jd: "<< jd;133 qDebug() << "get_planet_helio_osculating_coordsv(): SKIPPED CoordCalc, jd0 or jd is infinite/nan. jd0:" << jd0 << "jd: "<< jd;
@@ -131,16 +136,18 @@
131136
132 if(use_de430(jd))137 if(use_de430(jd))
133 {138 {
134 deOk=GetDe430Coor(jd, planet_id + 1, xyz);139 deOk=GetDe430Coor(jd, planet_id + 1, xyz6);
135 }140 }
136 else if(use_de431(jd))141 else if(use_de431(jd))
137 {142 {
138 deOk=GetDe431Coor(jd, planet_id + 1, xyz);143 deOk=GetDe431Coor(jd, planet_id + 1, xyz6);
139 }144 }
140 if (!deOk) //VSOP87 as fallback145 if (!deOk) //VSOP87 as fallback
141 {146 {
142 GetVsop87OsculatingCoor(jd0, jd, planet_id, xyz);147 GetVsop87OsculatingCoor(jd0, jd, planet_id, xyz6);
143 }148 }
149 xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2];
150 xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5];
144}151}
145152
146/* Chapter 31 Pg 206-207 Equ 31.1 31.2, 31.3 using VSOP 87153/* Chapter 31 Pg 206-207 Equ 31.1 31.2, 31.3 using VSOP 87
@@ -148,10 +155,11 @@
148 * for given Julian Day. Values are in AU.155 * for given Julian Day. Values are in AU.
149 * params : Julian day, rect coords */156 * params : Julian day, rect coords */
150157
151void get_pluto_helio_coordsv(double jd,double xyz[3], void* unused)158void get_pluto_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
152{159{
153 Q_UNUSED(unused);160 Q_UNUSED(unused);
154 bool deOk=false;161 bool deOk=false;
162 double xyz6[6];
155 if(!std::isfinite(jd))163 if(!std::isfinite(jd))
156 {164 {
157 qDebug() << "get_pluto_helio_coordsv(): SKIPPED PlutoCoordCalc, jd is infinite/nan:" << jd;165 qDebug() << "get_pluto_helio_coordsv(): SKIPPED PlutoCoordCalc, jd is infinite/nan:" << jd;
@@ -160,41 +168,50 @@
160168
161 if(use_de430(jd))169 if(use_de430(jd))
162 {170 {
163 deOk=GetDe430Coor(jd, EPHEM_JPL_PLUTO_ID, xyz);171 deOk=GetDe430Coor(jd, EPHEM_JPL_PLUTO_ID, xyz6);
164 }172 }
165 else if(use_de431(jd))173 else if(use_de431(jd))
166 {174 {
167 deOk=GetDe431Coor(jd, EPHEM_JPL_PLUTO_ID, xyz);175 deOk=GetDe431Coor(jd, EPHEM_JPL_PLUTO_ID, xyz6);
168 }176 }
169 if (!deOk) // fallback to previous solution177
178 if (deOk)
179 {
180 xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2];
181 xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5];
182 }
183 else // fallback to previous solution
170 {184 {
171 get_pluto_helio_coords(jd, &xyz[0], &xyz[1], &xyz[2]);185 get_pluto_helio_coords(jd, &xyz[0], &xyz[1], &xyz[2]);
186 xyzdot[0]=xyzdot[1]=xyzdot[2]=0.0; // TODO: Some meaningful way to get speed?
172 }187 }
173}188}
174189
175/* Return 0 for the sun */190/* Return 0 for the sun */
176void get_sun_helio_coordsv(double jd,double xyz[3], void* unused)191void get_sun_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
177{192{
178 Q_UNUSED(jd);193 Q_UNUSED(jd);
179 Q_UNUSED(unused);194 Q_UNUSED(unused);
180 xyz[0]=0.; xyz[1]=0.; xyz[2]=0.;195 xyz[0] =0.; xyz[1] =0.; xyz[2] =0.;
181}196 xyzdot[0]=0.; xyzdot[1]=0.; xyzdot[2]=0.;
182197}
183void get_mercury_helio_coordsv(double jd,double xyz[3], void* unused)198
184{199void get_mercury_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
185 Q_UNUSED(unused);200{
186 get_planet_helio_coordsv(jd, xyz, EPHEM_MERCURY_ID);201 Q_UNUSED(unused);
187}202 get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_MERCURY_ID);
188void get_venus_helio_coordsv(double jd,double xyz[3], void* unused)203}
189{204void get_venus_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
190 Q_UNUSED(unused);205{
191 get_planet_helio_coordsv(jd, xyz, EPHEM_VENUS_ID);206 Q_UNUSED(unused);
192}207 get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_VENUS_ID);
193208}
194void get_earth_helio_coordsv(const double jd,double xyz[3], void* unused) 209
210void get_earth_helio_coordsv(const double jd,double xyz[3], double xyzdot[3], void* unused)
195{211{
196 Q_UNUSED(unused);212 Q_UNUSED(unused);
197 bool deOk=false;213 bool deOk=false;
214 double xyz6[6];
198 if(!std::isfinite(jd))215 if(!std::isfinite(jd))
199 {216 {
200 qDebug() << "get_earth_helio_coordsv(): SKIPPED EarthCoordCalc, jd is infinite/nan:" << jd;217 qDebug() << "get_earth_helio_coordsv(): SKIPPED EarthCoordCalc, jd is infinite/nan:" << jd;
@@ -203,94 +220,97 @@
203220
204 if(use_de430(jd))221 if(use_de430(jd))
205 {222 {
206 deOk=GetDe430Coor(jd, EPHEM_JPL_EARTH_ID, xyz);223 deOk=GetDe430Coor(jd, EPHEM_JPL_EARTH_ID, xyz6);
207 }224 }
208 else if(use_de431(jd))225 else if(use_de431(jd))
209 {226 {
210 deOk=GetDe431Coor(jd, EPHEM_JPL_EARTH_ID, xyz);227 deOk=GetDe431Coor(jd, EPHEM_JPL_EARTH_ID, xyz6);
211 }228 }
212 if (!deOk) //VSOP87 as fallback229 if (!deOk) //VSOP87 as fallback
213 {230 {
214 double moon[3];231 double moon[3];
215 GetVsop87Coor(jd,EPHEM_EMB_ID,xyz);232 GetVsop87Coor(jd,EPHEM_EMB_ID,xyz6);
216 GetElp82bCoor(jd,moon);233 GetElp82bCoor(jd,moon);
217 /* Earth != EMB:234 /* Earth != EMB:
218 0.0121505677733761 = mu_m/(1+mu_m),235 0.0121505677733761 = mu_m/(1+mu_m),
219 mu_m = mass(moon)/mass(earth) = 0.01230002 */236 mu_m = mass(moon)/mass(earth) = 0.01230002 */
220 xyz[0] -= 0.0121505677733761 * moon[0];237 xyz6[0] -= 0.0121505677733761 * moon[0];
221 xyz[1] -= 0.0121505677733761 * moon[1];238 xyz6[1] -= 0.0121505677733761 * moon[1];
222 xyz[2] -= 0.0121505677733761 * moon[2];239 xyz6[2] -= 0.0121505677733761 * moon[2];
240 // TODO: HOW TO FIX EARTH SPEED?
223 }241 }
224}242 xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2];
225243 xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5];
226void get_mars_helio_coordsv(double jd,double xyz[3], void* unused)244}
227{245
228 Q_UNUSED(unused);246void get_mars_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
229 get_planet_helio_coordsv(jd, xyz, EPHEM_MARS_ID);247{
230}248 Q_UNUSED(unused);
231249 get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_MARS_ID);
232void get_jupiter_helio_coordsv(double jd,double xyz[3], void* unused)250}
233{251
234 Q_UNUSED(unused);252void get_jupiter_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
235 get_planet_helio_coordsv(jd, xyz, EPHEM_JUPITER_ID);253{
236}254 Q_UNUSED(unused);
237255 get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_JUPITER_ID);
238void get_saturn_helio_coordsv(double jd,double xyz[3], void* unused)256}
239{257
240 Q_UNUSED(unused);258void get_saturn_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
241 get_planet_helio_coordsv(jd, xyz, EPHEM_SATURN_ID);259{
242}260 Q_UNUSED(unused);
243261 get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_SATURN_ID);
244void get_uranus_helio_coordsv(double jd,double xyz[3], void* unused)262}
245{263
246 Q_UNUSED(unused);264void get_uranus_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
247 get_planet_helio_coordsv(jd, xyz, EPHEM_URANUS_ID);265{
248}266 Q_UNUSED(unused);
249267 get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_URANUS_ID);
250void get_neptune_helio_coordsv(double jd,double xyz[3], void* unused)268}
251{269
252 Q_UNUSED(unused);270void get_neptune_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused)
253 get_planet_helio_coordsv(jd, xyz, EPHEM_NEPTUNE_ID);271{
254}272 Q_UNUSED(unused);
255273 get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_NEPTUNE_ID);
256void get_mercury_helio_osculating_coords(double jd0,double jd,double xyz[3])274}
257{275
258 get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_MERCURY_ID);276void get_mercury_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3])
259}277{
260278 get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_MERCURY_ID);
261void get_venus_helio_osculating_coords(double jd0,double jd,double xyz[3])279}
262{280
263 get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_VENUS_ID);281void get_venus_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3])
264}282{
265283 get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_VENUS_ID);
266void get_earth_helio_osculating_coords(double jd0,double jd,double xyz[3])284}
267{285
268 get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_EMB_ID);286void get_earth_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3])
269}287{
270288 get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_EMB_ID);
271void get_mars_helio_osculating_coords(double jd0,double jd,double xyz[3])289}
272{290
273 get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_MARS_ID);291void get_mars_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3])
274}292{
275293 get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_MARS_ID);
276void get_jupiter_helio_osculating_coords(double jd0,double jd,double xyz[3])294}
277{295
278 get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_JUPITER_ID);296void get_jupiter_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3])
279}297{
280298 get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_JUPITER_ID);
281void get_saturn_helio_osculating_coords(double jd0,double jd,double xyz[3])299}
282{300
283 get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_SATURN_ID);301void get_saturn_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3])
284}302{
285303 get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_SATURN_ID);
286void get_uranus_helio_osculating_coords(double jd0,double jd,double xyz[3])304}
287{305
288 get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_URANUS_ID);306void get_uranus_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3])
289}307{
290308 get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_URANUS_ID);
291void get_neptune_helio_osculating_coords(double jd0,double jd,double xyz[3])309}
292{310
293 get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_NEPTUNE_ID);311void get_neptune_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3])
312{
313 get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_NEPTUNE_ID);
294}314}
295315
296/* Calculate the rectangular geocentric lunar coordinates to the inertial mean316/* Calculate the rectangular geocentric lunar coordinates to the inertial mean
@@ -300,129 +320,139 @@
300 * Michelle Chapront-Touze and Jean Chapront of the Bureau des Longitudes,320 * Michelle Chapront-Touze and Jean Chapront of the Bureau des Longitudes,
301 * Paris. ELP 2000-82B theory321 * Paris. ELP 2000-82B theory
302 * param jd Julian day, rect pos */322 * param jd Julian day, rect pos */
303void get_lunar_parent_coordsv(double jde,double xyz[3], void* unused)323void get_lunar_parent_coordsv(double jde, double xyz[3], double xyzdot[3], void* unused)
304{324{
305 Q_UNUSED(unused);325 Q_UNUSED(unused);
326 double xyz6[6];
306 bool deOk=false;327 bool deOk=false;
307 if(use_de430(jde))328 if(use_de430(jde))
308 deOk=GetDe430Coor(jde, EPHEM_JPL_MOON_ID, xyz, EPHEM_JPL_EARTH_ID);329 deOk=GetDe430Coor(jde, EPHEM_JPL_MOON_ID, xyz6, EPHEM_JPL_EARTH_ID);
309 else if(use_de431(jde))330 else if(use_de431(jde))
310 deOk=GetDe431Coor(jde, EPHEM_JPL_MOON_ID, xyz, EPHEM_JPL_EARTH_ID);331 deOk=GetDe431Coor(jde, EPHEM_JPL_MOON_ID, xyz6, EPHEM_JPL_EARTH_ID);
311 if (!deOk) // fallback...332
333 if (deOk)
334 {
335 xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2];
336 xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5];
337 }
338 else
339 { // fallback to DE-less solution.
312 GetElp82bCoor(jde,xyz);340 GetElp82bCoor(jde,xyz);
313}341 xyzdot[0]=xyzdot[1]=xyzdot[3]=0.0; // TODO: Some meaningful way to get speed?
314342 }
315void get_phobos_parent_coordsv(double jd,double xyz[3], void* unused)343}
316{344
317 Q_UNUSED(unused);345void get_phobos_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
318 GetMarsSatCoor(jd,MARS_SAT_PHOBOS,xyz);346{
319}347 Q_UNUSED(unused);
320348 GetMarsSatCoor(jd, MARS_SAT_PHOBOS, xyz, xyzdot);
321void get_deimos_parent_coordsv(double jd,double xyz[3], void* unused)349}
322{350
323 Q_UNUSED(unused);351void get_deimos_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
324 GetMarsSatCoor(jd,MARS_SAT_DEIMOS,xyz);352{
325}353 Q_UNUSED(unused);
326354 GetMarsSatCoor(jd, MARS_SAT_DEIMOS, xyz, xyzdot);
327void get_io_parent_coordsv(double jd,double xyz[3], void* unused)355}
328{356
329 Q_UNUSED(unused);357void get_io_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
330 GetL1Coor(jd,L1_IO,xyz);358{
331}359 Q_UNUSED(unused);
332360 GetL1Coor(jd, L1_IO, xyz, xyzdot);
333void get_europa_parent_coordsv(double jd,double xyz[3], void* unused)361}
334{362
335 Q_UNUSED(unused);363void get_europa_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
336 GetL1Coor(jd,L1_EUROPA,xyz);364{
337}365 Q_UNUSED(unused);
338366 GetL1Coor(jd, L1_EUROPA, xyz, xyzdot);
339void get_ganymede_parent_coordsv(double jd,double xyz[3], void* unused)367}
340{368
341 Q_UNUSED(unused);369void get_ganymede_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
342 GetL1Coor(jd,L1_GANYMEDE,xyz);370{
343}371 Q_UNUSED(unused);
344372 GetL1Coor(jd, L1_GANYMEDE, xyz, xyzdot);
345void get_callisto_parent_coordsv(double jd,double xyz[3], void* unused)373}
346{374
347 Q_UNUSED(unused);375void get_callisto_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
348 GetL1Coor(jd,L1_CALLISTO,xyz);376{
349}377 Q_UNUSED(unused);
350378 GetL1Coor(jd, L1_CALLISTO, xyz, xyzdot);
351void get_mimas_parent_coordsv(double jd,double xyz[3], void* unused)379}
352{ 380
353 Q_UNUSED(unused);381void get_mimas_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
354 GetTass17Coor(jd,TASS17_MIMAS,xyz);382{
355}383 Q_UNUSED(unused);
356384 GetTass17Coor(jd, TASS17_MIMAS, xyz, xyzdot);
357void get_enceladus_parent_coordsv(double jd,double xyz[3], void* unused)385}
358{386
359 Q_UNUSED(unused);387void get_enceladus_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
360 GetTass17Coor(jd,TASS17_ENCELADUS,xyz);388{
361}389 Q_UNUSED(unused);
362390 GetTass17Coor(jd, TASS17_ENCELADUS, xyz, xyzdot);
363void get_tethys_parent_coordsv(double jd,double xyz[3], void* unused)391}
364{ 392
365 Q_UNUSED(unused);393void get_tethys_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
366 GetTass17Coor(jd,TASS17_TETHYS,xyz);394{
367}395 Q_UNUSED(unused);
368396 GetTass17Coor(jd, TASS17_TETHYS, xyz, xyzdot);
369void get_dione_parent_coordsv(double jd,double xyz[3], void* unused)397}
370{ 398
371 Q_UNUSED(unused);399void get_dione_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
372 GetTass17Coor(jd,TASS17_DIONE,xyz);400{
373}401 Q_UNUSED(unused);
374402 GetTass17Coor(jd, TASS17_DIONE, xyz, xyzdot);
375void get_rhea_parent_coordsv(double jd,double xyz[3], void* unused)403}
376{ 404
377 Q_UNUSED(unused);405void get_rhea_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
378 GetTass17Coor(jd,TASS17_RHEA,xyz);406{
379}407 Q_UNUSED(unused);
380408 GetTass17Coor(jd, TASS17_RHEA, xyz, xyzdot);
381void get_titan_parent_coordsv(double jd,double xyz[3], void* unused)409}
382{ 410
383 Q_UNUSED(unused);411void get_titan_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
384 GetTass17Coor(jd,TASS17_TITAN,xyz);412{
385}413 Q_UNUSED(unused);
386414 GetTass17Coor(jd, TASS17_TITAN, xyz, xyzdot);
387void get_hyperion_parent_coordsv(double jd,double xyz[3], void* unused)415}
388{ 416
389 Q_UNUSED(unused);417void get_hyperion_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
390 GetTass17Coor(jd,TASS17_HYPERION,xyz);418{
391}419 Q_UNUSED(unused);
392420 GetTass17Coor(jd, TASS17_HYPERION, xyz, xyzdot);
393void get_iapetus_parent_coordsv(double jd,double xyz[3], void* unused)421}
394{ 422
395 Q_UNUSED(unused);423void get_iapetus_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
396 GetTass17Coor(jd,TASS17_IAPETUS,xyz);424{
397}425 Q_UNUSED(unused);
398426 GetTass17Coor(jd, TASS17_IAPETUS, xyz, xyzdot);
399void get_miranda_parent_coordsv(double jd,double xyz[3], void* unused)427}
400{428
401 Q_UNUSED(unused);429void get_miranda_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
402 GetGust86Coor(jd,GUST86_MIRANDA,xyz);430{
403}431 Q_UNUSED(unused);
404432 GetGust86Coor(jd, GUST86_MIRANDA, xyz, xyzdot);
405void get_ariel_parent_coordsv(double jd,double xyz[3], void* unused)433}
406{434
407 Q_UNUSED(unused);435void get_ariel_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
408 GetGust86Coor(jd,GUST86_ARIEL,xyz);436{
409}437 Q_UNUSED(unused);
410438 GetGust86Coor(jd, GUST86_ARIEL, xyz, xyzdot);
411void get_umbriel_parent_coordsv(double jd,double xyz[3], void* unused)439}
412{440
413 Q_UNUSED(unused);441void get_umbriel_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
414 GetGust86Coor(jd,GUST86_UMBRIEL,xyz);442{
415}443 Q_UNUSED(unused);
416444 GetGust86Coor(jd, GUST86_UMBRIEL, xyz, xyzdot);
417void get_titania_parent_coordsv(double jd,double xyz[3], void* unused)445}
418{446
419 Q_UNUSED(unused);447void get_titania_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
420 GetGust86Coor(jd,GUST86_TITANIA,xyz);448{
421}449 Q_UNUSED(unused);
422450 GetGust86Coor(jd, GUST86_TITANIA, xyz, xyzdot);
423void get_oberon_parent_coordsv(double jd,double xyz[3], void* unused)451}
424{452
425 Q_UNUSED(unused);453void get_oberon_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused)
426 GetGust86Coor(jd,GUST86_OBERON,xyz);454{
455 Q_UNUSED(unused);
456 GetGust86Coor(jd, GUST86_OBERON, xyz, xyzdot);
427}457}
428458
429459
=== modified file 'src/core/planetsephems/EphemWrapper.hpp'
--- src/core/planetsephems/EphemWrapper.hpp 2017-05-28 00:31:46 +0000
+++ src/core/planetsephems/EphemWrapper.hpp 2017-11-23 14:55:50 +0000
@@ -26,7 +26,7 @@
26 * - DE43126 * - DE431
27 *27 *
28 * Extending the old stellplanet-class, this updated version now28 * Extending the old stellplanet-class, this updated version now
29 * includes access to DE430 and DE431 for a more precise, yet storage-space intensive solution.29 * includes access to DE430 and DE431 for a more accurate, yet storage-space intensive solution.
30 */30 */
3131
32#ifndef _EPHEMWRAPPER_HPP_32#ifndef _EPHEMWRAPPER_HPP_
@@ -44,51 +44,51 @@
44};44};
4545
46// These functions have an unused void pointer to be compatible to PosFuncType in SolarSystem and Planet classes.46// These functions have an unused void pointer to be compatible to PosFuncType in SolarSystem and Planet classes.
47void get_sun_helio_coordsv(double jd,double xyz[3], void*);47void get_sun_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
48void get_mercury_helio_coordsv(double jd,double xyz[3], void*);48void get_mercury_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
49void get_venus_helio_coordsv(double jd,double xyz[3], void*);49void get_venus_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
50void get_earth_helio_coordsv(double jd,double xyz[3], void*);50void get_earth_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
51void get_mars_helio_coordsv(double jd,double xyz[3], void*);51void get_mars_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
52void get_jupiter_helio_coordsv(double jd,double xyz[3], void*);52void get_jupiter_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
53void get_saturn_helio_coordsv(double jd,double xyz[3], void*);53void get_saturn_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
54void get_uranus_helio_coordsv(double jd,double xyz[3], void*);54void get_uranus_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
55void get_neptune_helio_coordsv(double jd,double xyz[3], void*);55void get_neptune_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
56void get_pluto_helio_coordsv(double jd,double xyz[3], void*);56void get_pluto_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
5757
58void get_mercury_helio_osculating_coords(double jd0,double jd,double xyz[3]);58void get_mercury_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]);
59void get_venus_helio_osculating_coords(double jd0,double jd,double xyz[3]);59void get_venus_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]);
60void get_earth_helio_osculating_coords(double jd0,double jd,double xyz[3]);60void get_earth_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]);
61void get_mars_helio_osculating_coords(double jd0,double jd,double xyz[3]);61void get_mars_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]);
62void get_jupiter_helio_osculating_coords(double jd0,double jd,double xyz[3]);62void get_jupiter_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]);
63void get_saturn_helio_osculating_coords(double jd0,double jd,double xyz[3]);63void get_saturn_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]);
64void get_uranus_helio_osculating_coords(double jd0,double jd,double xyz[3]);64void get_uranus_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]);
65void get_neptune_helio_osculating_coords(double jd0,double jd,double xyz[3]);65void get_neptune_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]);
66void get_pluto_helio_osculating_coords(double jd0,double jd,double xyz[3]);66void get_pluto_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]);
6767
68void get_lunar_parent_coordsv(double jde, double xyz[3], void*);68void get_lunar_parent_coordsv(double jde, double xyz[3], double xyzdot[3], void*);
6969
70void get_phobos_parent_coordsv(double jd,double xyz[3], void*);70void get_phobos_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
71void get_deimos_parent_coordsv(double jd,double xyz[3], void*);71void get_deimos_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
7272
73void get_io_parent_coordsv(double jd,double xyz[3], void*);73void get_io_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
74void get_europa_parent_coordsv(double jd,double xyz[3], void*);74void get_europa_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
75void get_ganymede_parent_coordsv(double jd,double xyz[3], void*);75void get_ganymede_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
76void get_callisto_parent_coordsv(double jd,double xyz[3], void*);76void get_callisto_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
7777
78void get_mimas_parent_coordsv(double jd,double xyz[3], void*);78void get_mimas_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
79void get_enceladus_parent_coordsv(double jd,double xyz[3], void*);79void get_enceladus_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
80void get_tethys_parent_coordsv(double jd,double xyz[3], void*);80void get_tethys_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
81void get_dione_parent_coordsv(double jd,double xyz[3], void*);81void get_dione_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
82void get_rhea_parent_coordsv(double jd,double xyz[3], void*);82void get_rhea_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
83void get_titan_parent_coordsv(double jd,double xyz[3], void*);83void get_titan_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
84void get_hyperion_parent_coordsv(double jd,double xyz[3], void*);84void get_hyperion_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
85void get_iapetus_parent_coordsv(double jd,double xyz[3], void*);85void get_iapetus_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
8686
87void get_miranda_parent_coordsv(double jd,double xyz[3], void*);87void get_miranda_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
88void get_ariel_parent_coordsv(double jd,double xyz[3], void*);88void get_ariel_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
89void get_umbriel_parent_coordsv(double jd,double xyz[3], void*);89void get_umbriel_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
90void get_titania_parent_coordsv(double jd,double xyz[3], void*);90void get_titania_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
91void get_oberon_parent_coordsv(double jd,double xyz[3], void*);91void get_oberon_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*);
9292
93#endif // _EPHEMWRAPPER_HPP_93#endif // _EPHEMWRAPPER_HPP_
9494
9595
=== modified file 'src/core/planetsephems/de430.cpp'
--- src/core/planetsephems/de430.cpp 2016-08-18 13:45:26 +0000
+++ src/core/planetsephems/de430.cpp 2017-11-23 14:55:50 +0000
@@ -36,8 +36,10 @@
3636
37static void * ephem;37static void * ephem;
3838
39static Vec3d tempECL = Vec3d(0,0,0);39static Vec3d tempECLpos = Vec3d(0,0,0);
40static Vec3d tempICRF = Vec3d(0,0,0);40static Vec3d tempECLspd = Vec3d(0,0,0);
41static Vec3d tempICRFpos = Vec3d(0,0,0);
42static Vec3d tempICRFspd = Vec3d(0,0,0);
41static char nams[JPL_MAX_N_CONSTANTS][6];43static char nams[JPL_MAX_N_CONSTANTS][6];
42static double vals[JPL_MAX_N_CONSTANTS];44static double vals[JPL_MAX_N_CONSTANTS];
43static double tempXYZ[6];45static double tempXYZ[6];
@@ -79,7 +81,7 @@
79 if(initDone)81 if(initDone)
80 {82 {
81 // This may return some error code!83 // This may return some error code!
82 int jplresult=jpl_pleph(ephem, jde, planet_id, centralBody_id, tempXYZ, 0);84 int jplresult=jpl_pleph(ephem, jde, planet_id, centralBody_id, tempXYZ, 1);
8385
84 switch (jplresult)86 switch (jplresult)
85 {87 {
@@ -111,18 +113,25 @@
111 break;113 break;
112 }114 }
113115
114 jpl_pleph(ephem, jde, planet_id, centralBody_id, tempXYZ, 0);116 // Why do we duplicate this?
117 // jpl_pleph(ephem, jde, planet_id, centralBody_id, tempXYZ, 0);
115118
116 tempICRF = Vec3d(tempXYZ[0], tempXYZ[1], tempXYZ[2]);119 tempICRFpos = Vec3d(tempXYZ[0], tempXYZ[1], tempXYZ[2]);
120 tempICRFspd = Vec3d(tempXYZ[3], tempXYZ[4], tempXYZ[5]);
117 #ifdef UNIT_TEST121 #ifdef UNIT_TEST
118 tempECL = matJ2000ToVsop87 * tempICRF;122 tempECLpos = matJ2000ToVsop87 * tempICRFpos;
123 tempECLspd = matJ2000ToVsop87 * tempICRFspd;
119 #else124 #else
120 tempECL = StelCore::matJ2000ToVsop87 * tempICRF;125 tempECLpos = StelCore::matJ2000ToVsop87 * tempICRFpos;
126 tempECLspd = StelCore::matJ2000ToVsop87 * tempICRFspd;
121 #endif127 #endif
122128
123 xyz[0] = tempECL[0];129 xyz[0] = tempECLpos[0];
124 xyz[1] = tempECL[1];130 xyz[1] = tempECLpos[1];
125 xyz[2] = tempECL[2];131 xyz[2] = tempECLpos[2];
132 xyz[3] = tempECLspd[0];
133 xyz[4] = tempECLspd[1];
134 xyz[5] = tempECLspd[2];
126 return true;135 return true;
127 }136 }
128 return false;137 return false;
129138
=== modified file 'src/core/planetsephems/de431.cpp'
--- src/core/planetsephems/de431.cpp 2016-08-18 13:45:26 +0000
+++ src/core/planetsephems/de431.cpp 2017-11-23 14:55:50 +0000
@@ -37,8 +37,10 @@
3737
38static void * ephem;38static void * ephem;
39 39
40static Vec3d tempECL = Vec3d(0,0,0);40static Vec3d tempECLpos = Vec3d(0,0,0);
41static Vec3d tempICRF = Vec3d(0,0,0);41static Vec3d tempECLspd = Vec3d(0,0,0);
42static Vec3d tempICRFpos = Vec3d(0,0,0);
43static Vec3d tempICRFspd = Vec3d(0,0,0);
42static char nams[JPL_MAX_N_CONSTANTS][6];44static char nams[JPL_MAX_N_CONSTANTS][6];
43static double vals[JPL_MAX_N_CONSTANTS];45static double vals[JPL_MAX_N_CONSTANTS];
44static double tempXYZ[6];46static double tempXYZ[6];
@@ -80,7 +82,7 @@
80 if(initDone)82 if(initDone)
81 {83 {
82 // This may return some error code!84 // This may return some error code!
83 int jplresult=jpl_pleph(ephem, jde, planet_id, centralBody_id, tempXYZ, 0);85 int jplresult=jpl_pleph(ephem, jde, planet_id, centralBody_id, tempXYZ, 1);
8486
85 switch (jplresult)87 switch (jplresult)
86 {88 {
@@ -112,16 +114,22 @@
112 break;114 break;
113 }115 }
114116
115 tempICRF = Vec3d(tempXYZ[0], tempXYZ[1], tempXYZ[2]);117 tempICRFpos = Vec3d(tempXYZ[0], tempXYZ[1], tempXYZ[2]);
118 tempICRFspd = Vec3d(tempXYZ[3], tempXYZ[4], tempXYZ[5]);
116 #ifdef UNIT_TEST119 #ifdef UNIT_TEST
117 tempECL = matJ2000ToVsop87 * tempICRF;120 tempECLpos = matJ2000ToVsop87 * tempICRFpos;
121 tempECLspd = matJ2000ToVsop87 * tempICRFspd;
118 #else122 #else
119 tempECL = StelCore::matJ2000ToVsop87 * tempICRF;123 tempECLpos = StelCore::matJ2000ToVsop87 * tempICRFpos;
124 tempECLspd = StelCore::matJ2000ToVsop87 * tempICRFspd;
120 #endif125 #endif
121126
122 xyz[0] = tempECL[0];127 xyz[0] = tempECLpos[0];
123 xyz[1] = tempECL[1];128 xyz[1] = tempECLpos[1];
124 xyz[2] = tempECL[2];129 xyz[2] = tempECLpos[2];
130 xyz[3] = tempECLspd[0];
131 xyz[4] = tempECLspd[1];
132 xyz[5] = tempECLspd[2];
125 return true;133 return true;
126 }134 }
127 return false;135 return false;
128136
=== modified file 'src/core/planetsephems/elliptic_to_rectangular.c'
--- src/core/planetsephems/elliptic_to_rectangular.c 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/elliptic_to_rectangular.c 2017-11-23 14:55:50 +0000
@@ -116,7 +116,7 @@
116 xyz[1] = x1 * rdg + y1 * rtq;116 xyz[1] = x1 * rdg + y1 * rtq;
117 xyz[2] = (-x1 * elem[5] + y1 * elem[4]) * dwho;117 xyz[2] = (-x1 * elem[5] + y1 * elem[4]) * dwho;
118118
119/*119// /* GZ 2017-11: Re-enable these lines, they seem to be velocity!
120 const double rsam1 = -elem[2]*cLe - elem[3]*sLe;120 const double rsam1 = -elem[2]*cLe - elem[3]*sLe;
121 const double h = a*n / (1.0 + rsam1);121 const double h = a*n / (1.0 + rsam1);
122 const double vx1 = h * (-sLe - psi*rsam1*elem[3]);122 const double vx1 = h * (-sLe - psi*rsam1*elem[3]);
@@ -125,7 +125,7 @@
125 xyz[3] = vx1 * rtp + vy1 * rdg;125 xyz[3] = vx1 * rtp + vy1 * rdg;
126 xyz[4] = vx1 * rdg + vy1 * rtq;126 xyz[4] = vx1 * rdg + vy1 * rtq;
127 xyz[5] = (-vx1 * elem[5] + vy1 * elem[4]) * dwho;127 xyz[5] = (-vx1 * elem[5] + vy1 * elem[4]) * dwho;
128*/128// */
129 }129 }
130}130}
131131
132132
=== modified file 'src/core/planetsephems/elliptic_to_rectangular.h'
--- src/core/planetsephems/elliptic_to_rectangular.h 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/elliptic_to_rectangular.h 2017-11-23 14:55:50 +0000
@@ -65,6 +65,11 @@
65 e = excentricity65 e = excentricity
66 66
67 Units are suspected to be: Julian days, AU, rad67 Units are suspected to be: Julian days, AU, rad
68
69 Results:
70 xyz[0,1,2]=Position [AU]
71 xyz[3,4,5]=Velocity [AU/d]
72
68*/73*/
6974
70void EllipticToRectangularN(double mu,const double elem[6],double dt,75void EllipticToRectangularN(double mu,const double elem[6],double dt,
7176
=== modified file 'src/core/planetsephems/gust86.c'
--- src/core/planetsephems/gust86.c 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/gust86.c 2017-11-23 14:55:50 +0000
@@ -438,13 +438,16 @@
438static double gust86_jd0 = -1e100;438static double gust86_jd0 = -1e100;
439static double gust86_elem[GUST86_DIM];439static double gust86_elem[GUST86_DIM];
440440
441void GetGust86Coor(const double jd,const int body,double *xyz) {441void GetGust86Coor(const double jd, const int body, double *xyz, double *xyzdot) {
442 GetGust86OsculatingCoor(jd,jd,body,xyz);442 double xyz6[6];
443 GetGust86OsculatingCoor(jd,jd,body,xyz6);
444 xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2];
445 xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5];
443}446}
444447
445void GetGust86OsculatingCoor(const double jd0,const double jd,448void GetGust86OsculatingCoor(const double jd0,const double jd,
446 const int body,double *xyz) {449 const int body,double *xyz) {
447 double x[3];450 double x[6];
448 if (jd0 != gust86_jd0) {451 if (jd0 != gust86_jd0) {
449 const double t0 = jd0 - 2444239.5;452 const double t0 = jd0 - 2444239.5;
450 gust86_jd0 = jd0;453 gust86_jd0 = jd0;
@@ -465,4 +468,8 @@
465 xyz[0] = GUST86toVsop87[0]*x[0]+GUST86toVsop87[1]*x[1]+GUST86toVsop87[2]*x[2];468 xyz[0] = GUST86toVsop87[0]*x[0]+GUST86toVsop87[1]*x[1]+GUST86toVsop87[2]*x[2];
466 xyz[1] = GUST86toVsop87[3]*x[0]+GUST86toVsop87[4]*x[1]+GUST86toVsop87[5]*x[2];469 xyz[1] = GUST86toVsop87[3]*x[0]+GUST86toVsop87[4]*x[1]+GUST86toVsop87[5]*x[2];
467 xyz[2] = GUST86toVsop87[6]*x[0]+GUST86toVsop87[7]*x[1]+GUST86toVsop87[8]*x[2];470 xyz[2] = GUST86toVsop87[6]*x[0]+GUST86toVsop87[7]*x[1]+GUST86toVsop87[8]*x[2];
471 // GZ Updated to a 6-vector
472 xyz[3] = GUST86toVsop87[0]*x[3]+GUST86toVsop87[1]*x[4]+GUST86toVsop87[2]*x[5];
473 xyz[4] = GUST86toVsop87[3]*x[3]+GUST86toVsop87[4]*x[4]+GUST86toVsop87[5]*x[5];
474 xyz[5] = GUST86toVsop87[6]*x[3]+GUST86toVsop87[7]*x[4]+GUST86toVsop87[8]*x[5];
468}475}
469476
=== modified file 'src/core/planetsephems/gust86.h'
--- src/core/planetsephems/gust86.h 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/gust86.h 2017-11-23 14:55:50 +0000
@@ -60,7 +60,7 @@
60#define GUST86_TITANIA 360#define GUST86_TITANIA 3
61#define GUST86_OBERON 461#define GUST86_OBERON 4
6262
63void GetGust86Coor(const double jd, const int body, double *xyz);63void GetGust86Coor(const double jd, const int body, double *xyz, double *xyzdot);
64 /* Return the rectangular coordinates of the given satellite64 /* Return the rectangular coordinates of the given satellite
65 and the given julian date jd expressed in dynamical time (TAI+32.184s).65 and the given julian date jd expressed in dynamical time (TAI+32.184s).
66 The origin of the xyz-coordinates is the center of the planet.66 The origin of the xyz-coordinates is the center of the planet.
@@ -91,6 +91,7 @@
91 91
92void GetGust86OsculatingCoor(const double jd0, const double jd, const int body, double *xyz);92void GetGust86OsculatingCoor(const double jd0, const double jd, const int body, double *xyz);
93 /* The oculating orbit of epoch jd0, evaluated at jd, is returned.93 /* The oculating orbit of epoch jd0, evaluated at jd, is returned.
94 * xyz is a 6-vector (position&speed)
94 */95 */
9596
96#ifdef __cplusplus97#ifdef __cplusplus
9798
=== modified file 'src/core/planetsephems/l1.c'
--- src/core/planetsephems/l1.c 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/l1.c 2017-11-23 14:55:50 +0000
@@ -997,13 +997,16 @@
997 CalcL1Elem(t,ugly_static_parameter_body,elem);997 CalcL1Elem(t,ugly_static_parameter_body,elem);
998}998}
999999
1000void GetL1Coor(double jd,int body,double *xyz) {1000void GetL1Coor(double jd, int body, double *xyz, double *xyzdot) {
1001 GetL1OsculatingCoor(jd,jd,body,xyz);1001 double xyz6[6];
1002 GetL1OsculatingCoor(jd,jd,body,xyz6);
1003 xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2];
1004 xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5];
1002}1005}
10031006
1004void GetL1OsculatingCoor(const double jd0,const double jd,1007void GetL1OsculatingCoor(const double jd0,const double jd,
1005 const int body,double *xyz) {1008 const int body,double *xyz) {
1006 double x[3];1009 double x[6];
1007 if (jd0 != l1_jd0[body]) {1010 if (jd0 != l1_jd0[body]) {
1008 const double t0 = jd0 - 2433282.5;1011 const double t0 = jd0 - 2433282.5;
1009 l1_jd0[body] = jd0;1012 l1_jd0[body] = jd0;
@@ -1018,4 +1021,8 @@
1018 xyz[0] = L1toVsop87[0]*x[0]+L1toVsop87[1]*x[1]+L1toVsop87[2]*x[2];1021 xyz[0] = L1toVsop87[0]*x[0]+L1toVsop87[1]*x[1]+L1toVsop87[2]*x[2];
1019 xyz[1] = L1toVsop87[3]*x[0]+L1toVsop87[4]*x[1]+L1toVsop87[5]*x[2];1022 xyz[1] = L1toVsop87[3]*x[0]+L1toVsop87[4]*x[1]+L1toVsop87[5]*x[2];
1020 xyz[2] = L1toVsop87[6]*x[0]+L1toVsop87[7]*x[1]+L1toVsop87[8]*x[2];1023 xyz[2] = L1toVsop87[6]*x[0]+L1toVsop87[7]*x[1]+L1toVsop87[8]*x[2];
1024 // GZ Pure guesswork. I hope these make sense...
1025 xyz[3] = L1toVsop87[0]*x[3]+L1toVsop87[1]*x[4]+L1toVsop87[2]*x[5];
1026 xyz[4] = L1toVsop87[3]*x[3]+L1toVsop87[4]*x[4]+L1toVsop87[5]*x[5];
1027 xyz[5] = L1toVsop87[6]*x[3]+L1toVsop87[7]*x[4]+L1toVsop87[8]*x[5];
1021}1028}
10221029
=== modified file 'src/core/planetsephems/l1.h'
--- src/core/planetsephems/l1.h 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/l1.h 2017-11-23 14:55:50 +0000
@@ -56,19 +56,22 @@
56#define L1_GANYMEDE 256#define L1_GANYMEDE 2
57#define L1_CALLISTO 357#define L1_CALLISTO 3
5858
59void GetL1Coor(double jd,int body,double *xyz);59void GetL1Coor(double jd,int body,double *xyz, double *xyzdot);
60 /* Return the rectangular coordinates of the given satellite60 /* Return the rectangular coordinates of the given satellite
61 and the given julian date jd expressed in dynamical time (TAI+32.184s).61 and the given julian date jd expressed in dynamical time (TAI+32.184s).
62 The origin of the xyz-coordinates is the center of the planet.62 The origin of the xyz-coordinates is the center of the planet.
63 The reference frame is "dynamical equinox and ecliptic J2000",63 The reference frame is "dynamical equinox and ecliptic J2000",
64 which is the reference frame in VSOP87 and VSOP87A.64 which is the reference frame in VSOP87 and VSOP87A.
6565
66 GZ2017-11: added xyzdot, now last 2 parameters should be 3-vectors of position and speed.
67
66 WARNING! Due to static internal variables, this function is not reentrant and not parallelizable!68 WARNING! Due to static internal variables, this function is not reentrant and not parallelizable!
67 */69 */
6870
69void GetL1OsculatingCoor(const double jd0,const double jd, const int body,double *xyz);71void GetL1OsculatingCoor(const double jd0,const double jd, const int body,double *xyz);
7072
71 /* The oculating orbit of epoch jd0, evaluated at jd, is returned.73 /* The oculating orbit of epoch jd0, evaluated at jd, is returned.
74 GZ2017-11: xyz now is a 6-vector of position and speed.
72 */75 */
7376
7477
7578
=== modified file 'src/core/planetsephems/marssat.c'
--- src/core/planetsephems/marssat.c 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/marssat.c 2017-11-23 14:55:50 +0000
@@ -428,13 +428,16 @@
428428
429static double mars_sat_to_vsop87[9];429static double mars_sat_to_vsop87[9];
430430
431void GetMarsSatCoor(double jd,int body,double *xyz) {431void GetMarsSatCoor(double jd,int body,double *xyz, double *xyzdot) {
432 GetMarsSatOsculatingCoor(jd,jd,body,xyz);432 double xyz6[6];
433 GetMarsSatOsculatingCoor(jd,jd,body,xyz6);
434 xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2];
435 xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5];
433}436}
434437
435void GetMarsSatOsculatingCoor(const double jd0,const double jd,438void GetMarsSatOsculatingCoor(const double jd0,const double jd,
436 const int body,double *xyz) {439 const int body,double *xyz) {
437 double x[3];440 double x[6];
438 if (jd0 != marssat_jd0) {441 if (jd0 != marssat_jd0) {
439 const double t0 = jd0 - 2451545.0 + 6491.5;442 const double t0 = jd0 - 2451545.0 + 6491.5;
440 marssat_jd0 = jd0;443 marssat_jd0 = jd0;
@@ -445,8 +448,7 @@
445 &t_2,marssat_elem_2);448 &t_2,marssat_elem_2);
446 GenerateMarsSatToVSOP87(t0,mars_sat_to_vsop87);449 GenerateMarsSatToVSOP87(t0,mars_sat_to_vsop87);
447 }450 }
448 EllipticToRectangularA(mars_sat_bodies[body].mu,marssat_elem+(body*6),451 EllipticToRectangularA(mars_sat_bodies[body].mu,marssat_elem+(body*6),jd-jd0,x);
449 jd-jd0,x);
450 xyz[0] = mars_sat_to_vsop87[0]*x[0]452 xyz[0] = mars_sat_to_vsop87[0]*x[0]
451 + mars_sat_to_vsop87[1]*x[1]453 + mars_sat_to_vsop87[1]*x[1]
452 + mars_sat_to_vsop87[2]*x[2];454 + mars_sat_to_vsop87[2]*x[2];
@@ -456,6 +458,16 @@
456 xyz[2] = mars_sat_to_vsop87[6]*x[0]458 xyz[2] = mars_sat_to_vsop87[6]*x[0]
457 + mars_sat_to_vsop87[7]*x[1]459 + mars_sat_to_vsop87[7]*x[1]
458 + mars_sat_to_vsop87[8]*x[2];460 + mars_sat_to_vsop87[8]*x[2];
461 // GZ This is a guess, based on the structure of other operations...
462 xyz[3] = mars_sat_to_vsop87[0]*x[3]
463 + mars_sat_to_vsop87[1]*x[4]
464 + mars_sat_to_vsop87[2]*x[5];
465 xyz[4] = mars_sat_to_vsop87[3]*x[3]
466 + mars_sat_to_vsop87[4]*x[4]
467 + mars_sat_to_vsop87[5]*x[5];
468 xyz[5] = mars_sat_to_vsop87[6]*x[3]
469 + mars_sat_to_vsop87[7]*x[4]
470 + mars_sat_to_vsop87[8]*x[5];
459/*471/*
460 printf("%d %18.9lf %15.12lf %15.12lf %15.12lf\n",472 printf("%d %18.9lf %15.12lf %15.12lf %15.12lf\n",
461 body,jd,xyz[0],xyz[1],xyz[2]);473 body,jd,xyz[0],xyz[1],xyz[2]);
462474
=== modified file 'src/core/planetsephems/marssat.h'
--- src/core/planetsephems/marssat.h 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/marssat.h 2017-11-23 14:55:50 +0000
@@ -58,8 +58,8 @@
58#define MARS_SAT_PHOBOS 058#define MARS_SAT_PHOBOS 0
59#define MARS_SAT_DEIMOS 159#define MARS_SAT_DEIMOS 1
6060
61void GetMarsSatCoor(double jd,int body,double *xyz);61void GetMarsSatCoor(double jd, int body, double *xyz, double *xyzdot);
62 /* Return the rectangular coordinates of the given satellite62 /* Return the rectangular coordinates and speed of the given satellite
63 and the given julian date jd expressed in dynamical time (TAI+32.184s).63 and the given julian date jd expressed in dynamical time (TAI+32.184s).
64 The origin of the xyz-coordinates is the center of the planet.64 The origin of the xyz-coordinates is the center of the planet.
65 The reference frame is "dynamical equinox and ecliptic J2000",65 The reference frame is "dynamical equinox and ecliptic J2000",
@@ -68,6 +68,7 @@
6868
69void GetMarsSatOsculatingCoor(const double jd0, const double jd, const int body,double *xyz);69void GetMarsSatOsculatingCoor(const double jd0, const double jd, const int body,double *xyz);
70 /* The oculating orbit of epoch jd0, evatuated at jd, is returned.70 /* The oculating orbit of epoch jd0, evatuated at jd, is returned.
71 * xyz is a 6-vector
71 */72 */
7273
73#ifdef __cplusplus74#ifdef __cplusplus
7475
=== modified file 'src/core/planetsephems/tass17.c'
--- src/core/planetsephems/tass17.c 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/tass17.c 2017-11-23 14:55:50 +0000
@@ -3163,14 +3163,17 @@
3163 for (body=0;body<=7;body++) CalcTass17Elem(t,lon,body,elem+(body*6));3163 for (body=0;body<=7;body++) CalcTass17Elem(t,lon,body,elem+(body*6));
3164}3164}
31653165
3166void GetTass17Coor(double jd,int body,double *xyz)3166void GetTass17Coor(double jd,int body,double *xyz, double *xyzdot)
3167{3167{
3168 GetTass17OsculatingCoor(jd,jd,body,xyz);3168 double xyz6[6];
3169 GetTass17OsculatingCoor(jd,jd,body,xyz6);
3170 xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2];
3171 xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5];
3169}3172}
31703173
3171void GetTass17OsculatingCoor(const double jd0,const double jd, const int body,double *xyz)3174void GetTass17OsculatingCoor(const double jd0,const double jd, const int body,double *xyz)
3172{3175{
3173 double x[3];3176 double x[6];
3174 if (jd0 != tass17_jd0)3177 if (jd0 != tass17_jd0)
3175 {3178 {
3176 const double t0 = jd0 - 2444240.0;3179 const double t0 = jd0 - 2444240.0;
@@ -3192,6 +3195,10 @@
3192 xyz[0] = TASS17toVSOP87[0]*x[0]+TASS17toVSOP87[1]*x[1]+TASS17toVSOP87[2]*x[2];3195 xyz[0] = TASS17toVSOP87[0]*x[0]+TASS17toVSOP87[1]*x[1]+TASS17toVSOP87[2]*x[2];
3193 xyz[1] = TASS17toVSOP87[3]*x[0]+TASS17toVSOP87[4]*x[1]+TASS17toVSOP87[5]*x[2];3196 xyz[1] = TASS17toVSOP87[3]*x[0]+TASS17toVSOP87[4]*x[1]+TASS17toVSOP87[5]*x[2];
3194 xyz[2] = TASS17toVSOP87[6]*x[0]+TASS17toVSOP87[7]*x[1]+TASS17toVSOP87[8]*x[2];3197 xyz[2] = TASS17toVSOP87[6]*x[0]+TASS17toVSOP87[7]*x[1]+TASS17toVSOP87[8]*x[2];
3198 // GZ Updated to a 6-vector including speed...
3199 xyz[3] = TASS17toVSOP87[0]*x[3]+TASS17toVSOP87[1]*x[4]+TASS17toVSOP87[2]*x[5];
3200 xyz[4] = TASS17toVSOP87[3]*x[3]+TASS17toVSOP87[4]*x[4]+TASS17toVSOP87[5]*x[5];
3201 xyz[5] = TASS17toVSOP87[6]*x[3]+TASS17toVSOP87[7]*x[4]+TASS17toVSOP87[8]*x[5];
3195}3202}
31963203
31973204
31983205
=== modified file 'src/core/planetsephems/tass17.h'
--- src/core/planetsephems/tass17.h 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/tass17.h 2017-11-23 14:55:50 +0000
@@ -66,7 +66,9 @@
66#define TASS17_HYPERION 766#define TASS17_HYPERION 7
67#define TASS17_IAPETUS 667#define TASS17_IAPETUS 6
6868
69void GetTass17Coor(double jd,int body,double *xyz);69// xyz and xyzdot are 3-vectors (position&speed)
70void GetTass17Coor(double jd, int body, double *xyz, double *xyzdot);
71// xyz is a 6-vector (position&speed)
70void GetTass17OsculatingCoor(const double jd0,const double jd, const int body,double *xyz);72void GetTass17OsculatingCoor(const double jd0,const double jd, const int body,double *xyz);
7173
72#ifdef __cplusplus74#ifdef __cplusplus
7375
=== modified file 'src/core/planetsephems/vsop87.c'
--- src/core/planetsephems/vsop87.c 2017-08-05 14:14:24 +0000
+++ src/core/planetsephems/vsop87.c 2017-11-23 14:55:50 +0000
@@ -137338,8 +137338,7 @@
137338 GetVsop87OsculatingCoor(jd,jd,body,xyz);137338 GetVsop87OsculatingCoor(jd,jd,body,xyz);
137339}137339}
137340137340
137341void GetVsop87OsculatingCoor(const double jd0,const double jd,137341void GetVsop87OsculatingCoor(const double jd0,const double jd,const int body,double *xyz) {
137342 const int body,double *xyz) {
137343 if (jd0 != vsop87_jd0) {137342 if (jd0 != vsop87_jd0) {
137344 const double t0 = (jd0 - 2451545.0) / 365250.0;137343 const double t0 = (jd0 - 2451545.0) / 365250.0;
137345 vsop87_jd0 = jd0;137344 vsop87_jd0 = jd0;
137346137345
=== modified file 'src/gui/ConfigurationDialog.cpp'
--- src/gui/ConfigurationDialog.cpp 2017-10-29 10:34:00 +0000
+++ src/gui/ConfigurationDialog.cpp 2017-11-23 14:55:50 +0000
@@ -195,11 +195,9 @@
195 // Additional settings for selected object info195 // Additional settings for selected object info
196 connectBoolProperty(ui->checkBoxUMSurfaceBrightness, "NebulaMgr.flagSurfaceBrightnessArcsecUsage");196 connectBoolProperty(ui->checkBoxUMSurfaceBrightness, "NebulaMgr.flagSurfaceBrightnessArcsecUsage");
197 connectBoolProperty(ui->checkBoxUMShortNotationSurfaceBrightness, "NebulaMgr.flagSurfaceBrightnessShortNotationUsage");197 connectBoolProperty(ui->checkBoxUMShortNotationSurfaceBrightness, "NebulaMgr.flagSurfaceBrightnessShortNotationUsage");
198 ui->checkBoxUseFormattingOutput->setChecked(StelApp::getInstance().getFlagUseFormattingOutput());198 connectBoolProperty(ui->checkBoxUseFormattingOutput, "StelApp.flagUseFormattingOutput");
199 connect(ui->checkBoxUseFormattingOutput, SIGNAL(toggled(bool)), this, SLOT(updateSettingFormattingOutput(bool)));199 connectBoolProperty(ui->checkBoxUseCCSDesignations, "StelApp.flagUseCCSDesignation");
200 ui->checkBoxUseCCSDesignations->setChecked(StelApp::getInstance().getFlagUseCCSDesignation());200
201 connect(ui->checkBoxUseCCSDesignations, SIGNAL(toggled(bool)), this, SLOT(updateSettingCCSDesignations(bool)));
202
203 connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setNoSelectedInfo()));201 connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setNoSelectedInfo()));
204 connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(setAllSelectedInfo()));202 connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(setAllSelectedInfo()));
205 connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(setBriefSelectedInfo()));203 connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(setBriefSelectedInfo()));
@@ -223,6 +221,7 @@
223 ui->fixedDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(core->getPresetSkyTime()));221 ui->fixedDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(core->getPresetSkyTime()));
224 connect(ui->fixedDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), core, SLOT(setPresetSkyTime(QDateTime)));222 connect(ui->fixedDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), core, SLOT(setPresetSkyTime(QDateTime)));
225223
224 // TODO: convert to properties
226 ui->enableKeysNavigationCheckBox->setChecked(mvmgr->getFlagEnableMoveKeys() || mvmgr->getFlagEnableZoomKeys());225 ui->enableKeysNavigationCheckBox->setChecked(mvmgr->getFlagEnableMoveKeys() || mvmgr->getFlagEnableZoomKeys());
227 ui->enableMouseNavigationCheckBox->setChecked(mvmgr->getFlagEnableMouseNavigation());226 ui->enableMouseNavigationCheckBox->setChecked(mvmgr->getFlagEnableMouseNavigation());
228 connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvmgr, SLOT(setFlagEnableMoveKeys(bool)));227 connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvmgr, SLOT(setFlagEnableMoveKeys(bool)));
@@ -284,46 +283,31 @@
284 connect(ui->diskViewportCheckbox, SIGNAL(toggled(bool)), this, SLOT(setDiskViewport(bool)));283 connect(ui->diskViewportCheckbox, SIGNAL(toggled(bool)), this, SLOT(setDiskViewport(bool)));
285 connectBoolProperty(ui->autoZoomResetsDirectionCheckbox, "StelMovementMgr.flagAutoZoomOutResetsDirection");284 connectBoolProperty(ui->autoZoomResetsDirectionCheckbox, "StelMovementMgr.flagAutoZoomOutResetsDirection");
286285
287 ui->showFlipButtonsCheckbox->setChecked(gui->getFlagShowFlipButtons());286 connectBoolProperty(ui->showFlipButtonsCheckbox, "StelGui.flagShowFlipButtons");
288 connect(ui->showFlipButtonsCheckbox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowFlipButtons(bool)));287 connectBoolProperty(ui->showNebulaBgButtonCheckbox, "StelGui.flagShowNebulaBackgroundButton");
289288 connectBoolProperty(ui->showToastSurveyButtonCheckbox, "StelGui.flagShowToastSurveyButton");
290 ui->showNebulaBgButtonCheckbox->setChecked(gui->getFlagShowNebulaBackgroundButton());289 connectBoolProperty(ui->showBookmarksButtonCheckBox, "StelGui.flagShowBookmarksButton");
291 connect(ui->showNebulaBgButtonCheckbox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowNebulaBackgroundButton(bool)));290 connectBoolProperty(ui->showICRSGridButtonCheckBox, "StelGui.flagShowICRSGridButton");
292291 connectBoolProperty(ui->showGalacticGridButtonCheckBox, "StelGui.flagShowGalacticGridButton");
293 ui->showToastSurveyButtonCheckbox->setChecked(gui->getFlagShowToastSurveyButton());292 connectBoolProperty(ui->showEclipticGridButtonCheckBox, "StelGui.flagShowEclipticGridButton");
294 connect(ui->showToastSurveyButtonCheckbox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowToastSurveyButton(bool)));293 connectBoolProperty(ui->showConstellationBoundariesButtonCheckBox, "StelGui.flagShowConstellationBoundariesButton");
295294
296 ui->showBookmarksButtonCheckBox->setChecked(gui->getFlagShowBookmarksButton());295 //ui->decimalDegreeCheckBox->setChecked(StelApp::getInstance().getFlagShowDecimalDegrees());
297 connect(ui->showBookmarksButtonCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowBookmarksButton(bool)));296 //connect(ui->decimalDegreeCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowDecimalDegrees(bool)));
298297 // TODO: Make sure to remove this setter function, rather listen to StelApp's signal.
299 ui->showICRSGridButtonCheckBox->setChecked(gui->getFlagShowICRSGridButton());298 connectBoolProperty(ui->decimalDegreeCheckBox, "StelApp.flagShowDecimalDegrees");
300 connect(ui->showICRSGridButtonCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowICRSGridButton(bool)));299
301300 connectBoolProperty(ui->azimuthFromSouthcheckBox, "StelApp.flagUseAzimuthFromSouth");
302 ui->showGalacticGridButtonCheckBox->setChecked(gui->getFlagShowGalacticGridButton());301
303 connect(ui->showGalacticGridButtonCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowGalacticGridButton(bool)));302 //ui->mouseTimeoutCheckbox->setChecked(StelMainView::getInstance().getFlagCursorTimeout());
304303 //ui->mouseTimeoutSpinBox->setValue(StelMainView::getInstance().getCursorTimeout());
305 ui->showEclipticGridButtonCheckBox->setChecked(gui->getFlagShowEclipticGridButton());304 //connect(ui->mouseTimeoutCheckbox, SIGNAL(clicked()), this, SLOT(cursorTimeOutChanged()));
306 connect(ui->showEclipticGridButtonCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowEclipticGridButton(bool)));305 //connect(ui->mouseTimeoutCheckbox, SIGNAL(toggled(bool)), this, SLOT(cursorTimeOutChanged()));
307306 //connect(ui->mouseTimeoutSpinBox, SIGNAL(valueChanged(double)), this, SLOT(cursorTimeOutChanged(double)));
308 ui->showConstellationBoundariesButtonCheckBox->setChecked(gui->getFlagShowConstellationBoundariesButton());307 connectBoolProperty(ui->mouseTimeoutCheckbox, "MainView.flagCursorTimeout");
309 connect(ui->showConstellationBoundariesButtonCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowConstellationBoundariesButton(bool)));308 connectDoubleProperty(ui->mouseTimeoutSpinBox, "MainView.cursorTimeout");
310309 connectBoolProperty(ui->useButtonsBackgroundCheckBox, "MainView.flagUseButtonsBackground");
311 ui->decimalDegreeCheckBox->setChecked(StelApp::getInstance().getFlagShowDecimalDegrees());310 connectBoolProperty(ui->indicationMountModeCheckBox, "StelMovementMgr.flagIndicationMountMode");
312 connect(ui->decimalDegreeCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowDecimalDegrees(bool)));
313 ui->azimuthFromSouthcheckBox->setChecked(StelApp::getInstance().getFlagSouthAzimuthUsage());
314 connect(ui->azimuthFromSouthcheckBox, SIGNAL(toggled(bool)), this, SLOT(updateStartPointForAzimuth(bool)));
315
316 ui->mouseTimeoutCheckbox->setChecked(StelMainView::getInstance().getFlagCursorTimeout());
317 ui->mouseTimeoutSpinBox->setValue(StelMainView::getInstance().getCursorTimeout());
318 connect(ui->mouseTimeoutCheckbox, SIGNAL(clicked()), this, SLOT(cursorTimeOutChanged()));
319 connect(ui->mouseTimeoutCheckbox, SIGNAL(toggled(bool)), this, SLOT(cursorTimeOutChanged()));
320 connect(ui->mouseTimeoutSpinBox, SIGNAL(valueChanged(double)), this, SLOT(cursorTimeOutChanged(double)));
321
322 ui->useButtonsBackgroundCheckBox->setChecked(StelMainView::getInstance().getFlagUseButtonsBackground());
323 connect(ui->useButtonsBackgroundCheckBox, SIGNAL(toggled(bool)), this, SLOT(usageButtonsBackgroundChanged(bool)));
324
325 ui->indicationMountModeCheckBox->setChecked(mvmgr->getFlagIndicationMountMode());
326 connect(ui->indicationMountModeCheckBox, SIGNAL(toggled(bool)), mvmgr, SLOT(setFlagIndicationMountMode(bool)));
327311
328 // General Option Save312 // General Option Save
329 connect(ui->saveViewDirAsDefaultPushButton, SIGNAL(clicked()), this, SLOT(saveCurrentViewDirSettings()));313 connect(ui->saveViewDirAsDefaultPushButton, SIGNAL(clicked()), this, SLOT(saveCurrentViewDirSettings()));
@@ -334,9 +318,7 @@
334 ui->screenshotDirEdit->setText(StelFileMgr::getScreenshotDir());318 ui->screenshotDirEdit->setText(StelFileMgr::getScreenshotDir());
335 connect(ui->screenshotDirEdit, SIGNAL(textChanged(QString)), this, SLOT(selectScreenshotDir(QString)));319 connect(ui->screenshotDirEdit, SIGNAL(textChanged(QString)), this, SLOT(selectScreenshotDir(QString)));
336 connect(ui->screenshotBrowseButton, SIGNAL(clicked()), this, SLOT(browseForScreenshotDir()));320 connect(ui->screenshotBrowseButton, SIGNAL(clicked()), this, SLOT(browseForScreenshotDir()));
337321 connectBoolProperty(ui->invertScreenShotColorsCheckBox, "MainView.flagInvertScreenShotColors");
338 ui->invertScreenShotColorsCheckBox->setChecked(StelMainView::getInstance().getFlagInvertScreenShotColors());
339 connect(ui->invertScreenShotColorsCheckBox, SIGNAL(toggled(bool)), &StelMainView::getInstance(), SLOT(setFlagInvertScreenShotColors(bool)));
340322
341 connectBoolProperty(ui->autoEnableAtmosphereCheckBox, "LandscapeMgr.flagAtmosphereAutoEnabling");323 connectBoolProperty(ui->autoEnableAtmosphereCheckBox, "LandscapeMgr.flagAtmosphereAutoEnabling");
342 connectBoolProperty(ui->autoChangeLandscapesCheckBox, "LandscapeMgr.flagLandscapeAutoSelection");324 connectBoolProperty(ui->autoChangeLandscapesCheckBox, "LandscapeMgr.flagLandscapeAutoSelection");
@@ -519,6 +501,8 @@
519 flags |= StelObject::AltAzi;501 flags |= StelObject::AltAzi;
520 if (ui->checkBoxDistance->isChecked())502 if (ui->checkBoxDistance->isChecked())
521 flags |= StelObject::Distance;503 flags |= StelObject::Distance;
504 if (ui->checkBoxVelocity->isChecked())
505 flags |= StelObject::Velocity;
522 if (ui->checkBoxSize->isChecked())506 if (ui->checkBoxSize->isChecked())
523 flags |= StelObject::Size;507 flags |= StelObject::Size;
524 if (ui->checkBoxExtra->isChecked())508 if (ui->checkBoxExtra->isChecked())
@@ -542,32 +526,32 @@
542}526}
543527
544528
545void ConfigurationDialog::updateStartPointForAzimuth(bool b)529//void ConfigurationDialog::updateStartPointForAzimuth(bool b)
546{530//{
547 StelApp::getInstance().setFlagSouthAzimuthUsage(b);531// StelApp::getInstance().setFlagSouthAzimuthUsage(b);
548}532//}
549533
550void ConfigurationDialog::updateSettingFormattingOutput(bool b)534//void ConfigurationDialog::updateSettingFormattingOutput(bool b)
551{535//{
552 StelApp::getInstance().setFlagUseFormattingOutput(b);536// StelApp::getInstance().setFlagUseFormattingOutput(b);
553}537//}
554538
555void ConfigurationDialog::updateSettingCCSDesignations(bool b)539//void ConfigurationDialog::updateSettingCCSDesignations(bool b)
556{540//{
557 StelApp::getInstance().setFlagUseCCSDesignation(b);541// StelApp::getInstance().setFlagUseCCSDesignation(b);
558}542//}
559543
560void ConfigurationDialog::cursorTimeOutChanged()544//void ConfigurationDialog::cursorTimeOutChanged()
561{545//{
562 StelMainView::getInstance().setFlagCursorTimeout(ui->mouseTimeoutCheckbox->isChecked());546// StelMainView::getInstance().setFlagCursorTimeout(ui->mouseTimeoutCheckbox->isChecked());
563 StelMainView::getInstance().setCursorTimeout(ui->mouseTimeoutSpinBox->value());547// StelMainView::getInstance().setCursorTimeout(ui->mouseTimeoutSpinBox->value());
564}548//}
565549
566void ConfigurationDialog::usageButtonsBackgroundChanged(bool b)550//void ConfigurationDialog::usageButtonsBackgroundChanged(bool b)
567{551//{
568 StelMainView::getInstance().setFlagUseButtonsBackground(b);552// StelMainView::getInstance().setFlagUseButtonsBackground(b);
569 emit StelMainView::getInstance().updateIconsRequested();553// emit StelMainView::getInstance().updateIconsRequested();
570}554//}
571555
572void ConfigurationDialog::browseForScreenshotDir()556void ConfigurationDialog::browseForScreenshotDir()
573{557{
@@ -848,6 +832,8 @@
848 (bool) (flags & StelObject::AltAzi));832 (bool) (flags & StelObject::AltAzi));
849 conf->setValue("flag_show_distance",833 conf->setValue("flag_show_distance",
850 (bool) (flags & StelObject::Distance));834 (bool) (flags & StelObject::Distance));
835 conf->setValue("flag_show_velocity",
836 (bool) (flags & StelObject::Velocity));
851 conf->setValue("flag_show_size",837 conf->setValue("flag_show_size",
852 (bool) (flags & StelObject::Size));838 (bool) (flags & StelObject::Size));
853 conf->setValue("flag_show_extra",839 conf->setValue("flag_show_extra",
@@ -1428,6 +1414,7 @@
1428 ui->checkBoxHourAngle->setChecked(flags & StelObject::HourAngle);1414 ui->checkBoxHourAngle->setChecked(flags & StelObject::HourAngle);
1429 ui->checkBoxAltAz->setChecked(flags & StelObject::AltAzi);1415 ui->checkBoxAltAz->setChecked(flags & StelObject::AltAzi);
1430 ui->checkBoxDistance->setChecked(flags & StelObject::Distance);1416 ui->checkBoxDistance->setChecked(flags & StelObject::Distance);
1417 ui->checkBoxVelocity->setChecked(flags & StelObject::Velocity);
1431 ui->checkBoxSize->setChecked(flags & StelObject::Size);1418 ui->checkBoxSize->setChecked(flags & StelObject::Size);
1432 ui->checkBoxExtra->setChecked(flags & StelObject::Extra);1419 ui->checkBoxExtra->setChecked(flags & StelObject::Extra);
1433 ui->checkBoxGalacticCoordinates->setChecked(flags & StelObject::GalacticCoord);1420 ui->checkBoxGalacticCoordinates->setChecked(flags & StelObject::GalacticCoord);
14341421
=== modified file 'src/gui/ConfigurationDialog.hpp'
--- src/gui/ConfigurationDialog.hpp 2017-07-12 13:57:34 +0000
+++ src/gui/ConfigurationDialog.hpp 2017-11-23 14:55:50 +0000
@@ -90,13 +90,6 @@
90 void showShortcutsWindow();90 void showShortcutsWindow();
91 void setDiskViewport(bool);91 void setDiskViewport(bool);
92 void setSphericMirror(bool);92 void setSphericMirror(bool);
93 void cursorTimeOutChanged();
94 void cursorTimeOutChanged(double) {cursorTimeOutChanged();}
95 void usageButtonsBackgroundChanged(bool b);
96
97 void updateStartPointForAzimuth(bool b);
98 void updateSettingFormattingOutput(bool b);
99 void updateSettingCCSDesignations(bool b);
10093
101 void newStarCatalogData();94 void newStarCatalogData();
102 void downloadStars();95 void downloadStars();
10396
=== modified file 'src/gui/SearchDialog.cpp'
--- src/gui/SearchDialog.cpp 2017-05-22 13:27:14 +0000
+++ src/gui/SearchDialog.cpp 2017-11-23 14:55:50 +0000
@@ -146,6 +146,7 @@
146 useLockPosition = conf->value("search/flag_lock_position", true).toBool();146 useLockPosition = conf->value("search/flag_lock_position", true).toBool();
147 simbadServerUrl = conf->value("search/simbad_server_url", DEF_SIMBAD_URL).toString();147 simbadServerUrl = conf->value("search/simbad_server_url", DEF_SIMBAD_URL).toString();
148 setCurrentCoordinateSystemKey(conf->value("search/coordinate_system", "equatorialJ2000").toString());148 setCurrentCoordinateSystemKey(conf->value("search/coordinate_system", "equatorialJ2000").toString());
149 connect(&StelApp::getInstance(), SIGNAL(flagShowDecimalDegreesChanged(bool)), this, SLOT(populateCoordinateAxis()));
149}150}
150151
151SearchDialog::~SearchDialog()152SearchDialog::~SearchDialog()
@@ -223,7 +224,7 @@
223224
224void SearchDialog::populateCoordinateAxis()225void SearchDialog::populateCoordinateAxis()
225{226{
226 bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDegrees();;227 bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDegrees();
227 bool xnormal = true;228 bool xnormal = true;
228229
229 ui->AxisXSpinBox->setDecimals(2);230 ui->AxisXSpinBox->setDecimals(2);
230231
=== modified file 'src/gui/SkyGui.cpp'
--- src/gui/SkyGui.cpp 2017-05-22 13:27:14 +0000
+++ src/gui/SkyGui.cpp 2017-11-23 14:55:50 +0000
@@ -72,6 +72,8 @@
72 infoTextFilters |= StelObject::AltAzi;72 infoTextFilters |= StelObject::AltAzi;
73 if (conf->value("flag_show_distance", false).toBool())73 if (conf->value("flag_show_distance", false).toBool())
74 infoTextFilters |= StelObject::Distance;74 infoTextFilters |= StelObject::Distance;
75 if (conf->value("flag_show_velocity", false).toBool())
76 infoTextFilters |= StelObject::Velocity;
75 if (conf->value("flag_show_size", false).toBool())77 if (conf->value("flag_show_size", false).toBool())
76 infoTextFilters |= StelObject::Size;78 infoTextFilters |= StelObject::Size;
77 if (conf->value("flag_show_extra", false).toBool())79 if (conf->value("flag_show_extra", false).toBool())
7880
=== modified file 'src/gui/StelGui.cpp'
--- src/gui/StelGui.cpp 2017-06-05 16:15:26 +0000
+++ src/gui/StelGui.cpp 2017-11-23 14:55:50 +0000
@@ -119,6 +119,7 @@
119 #endif119 #endif
120120
121{121{
122 setObjectName("StelGui");
122 // QPixmapCache::setCacheLimit(30000); ?123 // QPixmapCache::setCacheLimit(30000); ?
123}124}
124125
@@ -245,6 +246,8 @@
245 connect(scriptMgr, SIGNAL(scriptRunning()), this, SLOT(scriptStarted()));246 connect(scriptMgr, SIGNAL(scriptRunning()), this, SLOT(scriptStarted()));
246 connect(scriptMgr, SIGNAL(scriptStopped()), this, SLOT(scriptStopped()));247 connect(scriptMgr, SIGNAL(scriptStopped()), this, SLOT(scriptStopped()));
247#endif248#endif
249 // Put StelGui under the StelProperty system (simpler and more consistent GUI)
250 StelApp::getInstance().getStelPropertyManager()->registerObject(this);
248251
249 ///////////////////////////////////////////////////////////////////////////252 ///////////////////////////////////////////////////////////////////////////
250 //// QGraphicsView based GUI253 //// QGraphicsView based GUI
@@ -699,6 +702,7 @@
699 if (initDone) {702 if (initDone) {
700 skyGui->updateBarsPos();703 skyGui->updateBarsPos();
701 }704 }
705 emit flagShowFlipButtonsChanged(b);
702}706}
703707
704// Define whether the button toggling nebulae backround images should be visible708// Define whether the button toggling nebulae backround images should be visible
@@ -720,6 +724,7 @@
720 if (initDone) {724 if (initDone) {
721 skyGui->updateBarsPos();725 skyGui->updateBarsPos();
722 }726 }
727 emit flagShowNebulaBackgroundButtonChanged(b);
723}728}
724729
725// Define whether the button toggling bookmarks should be visible730// Define whether the button toggling bookmarks should be visible
@@ -741,6 +746,7 @@
741 if (initDone) {746 if (initDone) {
742 skyGui->updateBarsPos();747 skyGui->updateBarsPos();
743 }748 }
749 emit flagShowBookmarksButtonChanged(b);
744}750}
745751
746// Define whether the button toggling ICRS grid should be visible752// Define whether the button toggling ICRS grid should be visible
@@ -762,6 +768,7 @@
762 if (initDone) {768 if (initDone) {
763 skyGui->updateBarsPos();769 skyGui->updateBarsPos();
764 }770 }
771 emit flagShowICRSGridButtonChanged(b);
765}772}
766773
767// Define whether the button toggling galactic grid should be visible774// Define whether the button toggling galactic grid should be visible
@@ -783,6 +790,7 @@
783 if (initDone) {790 if (initDone) {
784 skyGui->updateBarsPos();791 skyGui->updateBarsPos();
785 }792 }
793 emit flagShowGalacticGridButtonChanged(b);
786}794}
787795
788// Define whether the button toggling ecliptic grid should be visible796// Define whether the button toggling ecliptic grid should be visible
@@ -825,6 +833,7 @@
825 if (initDone) {833 if (initDone) {
826 skyGui->updateBarsPos();834 skyGui->updateBarsPos();
827 }835 }
836 emit flagShowConstellationBoundariesButtonChanged(b);
828}837}
829838
830// Define whether the button toggling TOAST survey images should be visible839// Define whether the button toggling TOAST survey images should be visible
@@ -843,16 +852,7 @@
843 getButtonBar()->hideButton("actionShow_Toast_Survey");852 getButtonBar()->hideButton("actionShow_Toast_Survey");
844 }853 }
845 flagShowToastSurveyButton = b;854 flagShowToastSurveyButton = b;
846}855 emit flagShowToastSurveyButtonChanged(b);
847
848void StelGui::setFlagShowDecimalDegrees(bool b)
849{
850 StelApp::getInstance().setFlagShowDecimalDegrees(b);
851 if (searchDialog->visible())
852 {
853 // Update format of input fields if Search Dialog is open
854 searchDialog->populateCoordinateAxis();
855 }
856}856}
857857
858void StelGui::setVisible(bool b)858void StelGui::setVisible(bool b)
@@ -997,6 +997,7 @@
997void StelGui::setGuiVisible(bool b)997void StelGui::setGuiVisible(bool b)
998{998{
999 setVisible(b);999 setVisible(b);
1000 emit visibleChanged(b);
1000}1001}
10011002
1002StelAction* StelGui::getAction(const QString& actionName)1003StelAction* StelGui::getAction(const QString& actionName)
10031004
=== modified file 'src/gui/StelGui.hpp'
--- src/gui/StelGui.hpp 2017-05-22 13:27:14 +0000
+++ src/gui/StelGui.hpp 2017-11-23 14:55:50 +0000
@@ -56,6 +56,14 @@
56 Q_PROPERTY(bool visible READ getVisible WRITE setVisible NOTIFY visibleChanged)56 Q_PROPERTY(bool visible READ getVisible WRITE setVisible NOTIFY visibleChanged)
57 Q_PROPERTY(bool autoHideHorizontalButtonBar READ getAutoHideHorizontalButtonBar WRITE setAutoHideHorizontalButtonBar NOTIFY autoHideHorizontalButtonBarChanged)57 Q_PROPERTY(bool autoHideHorizontalButtonBar READ getAutoHideHorizontalButtonBar WRITE setAutoHideHorizontalButtonBar NOTIFY autoHideHorizontalButtonBarChanged)
58 Q_PROPERTY(bool autoHideVerticalButtonBar READ getAutoHideVerticalButtonBar WRITE setAutoHideVerticalButtonBar NOTIFY autoHideVerticalButtonBarChanged)58 Q_PROPERTY(bool autoHideVerticalButtonBar READ getAutoHideVerticalButtonBar WRITE setAutoHideVerticalButtonBar NOTIFY autoHideVerticalButtonBarChanged)
59 Q_PROPERTY(bool flagShowFlipButtons READ getFlagShowFlipButtons WRITE setFlagShowFlipButtons NOTIFY flagShowFlipButtonsChanged)
60 Q_PROPERTY(bool flagShowNebulaBackgroundButton READ getFlagShowNebulaBackgroundButton WRITE setFlagShowNebulaBackgroundButton NOTIFY flagShowNebulaBackgroundButtonChanged)
61 Q_PROPERTY(bool flagShowToastSurveyButton READ getFlagShowToastSurveyButton WRITE setFlagShowToastSurveyButton NOTIFY flagShowToastSurveyButtonChanged)
62 Q_PROPERTY(bool flagShowBookmarksButton READ getFlagShowBookmarksButton WRITE setFlagShowBookmarksButton NOTIFY flagShowBookmarksButtonChanged)
63 Q_PROPERTY(bool flagShowICRSGridButton READ getFlagShowICRSGridButton WRITE setFlagShowICRSGridButton NOTIFY flagShowICRSGridButtonChanged)
64 Q_PROPERTY(bool flagShowGalacticGridButton READ getFlagShowGalacticGridButton WRITE setFlagShowGalacticGridButton NOTIFY flagShowGalacticGridButtonChanged )
65 Q_PROPERTY(bool flagShowEclipticGridButton READ getFlagShowEclipticGridButton WRITE setFlagShowEclipticGridButton NOTIFY flagShowEclipticGridButtonChanged )
66 Q_PROPERTY(bool flagShowConstellationBoundariesButton READ getFlagShowConstellationBoundariesButton WRITE setFlagShowConstellationBoundariesButton NOTIFY flagShowConstellationBoundariesButtonChanged )
5967
60public:68public:
61 friend class ViewDialog;69 friend class ViewDialog;
@@ -85,30 +93,6 @@
85 //! Get the SkyGui instance (useful for adding other interface elements).93 //! Get the SkyGui instance (useful for adding other interface elements).
86 //! It will return a valid object only if called after init().94 //! It will return a valid object only if called after init().
87 class SkyGui* getSkyGui() const;95 class SkyGui* getSkyGui() const;
88
89 //! Get whether the buttons toggling image flip are visible
90 bool getFlagShowFlipButtons() const;
91
92 //! Get whether the button toggling nebulae background is visible
93 bool getFlagShowNebulaBackgroundButton() const;
94
95 //! Get whether the button toggling TOAST survey is visible
96 bool getFlagShowToastSurveyButton() const;
97
98 //! Get whether the button toggling bookmarks is visible
99 bool getFlagShowBookmarksButton() const;
100
101 //! Get whether the button toggling ICRS grid is visible
102 bool getFlagShowICRSGridButton() const;
103
104 //! Get whether the button toggling galactic grid is visible
105 bool getFlagShowGalacticGridButton() const;
106
107 //! Get whether the button toggling ecliptic grid is visible
108 bool getFlagShowEclipticGridButton() const;
109
110 //! Get whether the button toggling constellation boundaries is visible
111 bool getFlagShowConstellationBoundariesButton() const;
11296
113 //! returns true if the gui has completed init process.97 //! returns true if the gui has completed init process.
114 bool initComplete(void) const;98 bool initComplete(void) const;
@@ -134,29 +118,43 @@
134public slots:118public slots:
135 //! Define whether the buttons toggling image flip should be visible119 //! Define whether the buttons toggling image flip should be visible
136 void setFlagShowFlipButtons(bool b);120 void setFlagShowFlipButtons(bool b);
137 121 //! Get whether the buttons toggling image flip are visible
122 bool getFlagShowFlipButtons() const;
123
138 //! Define whether the button toggling nebulae background should be visible124 //! Define whether the button toggling nebulae background should be visible
139 void setFlagShowNebulaBackgroundButton(bool b);125 void setFlagShowNebulaBackgroundButton(bool b);
126 //! Get whether the button toggling nebulae background is visible
127 bool getFlagShowNebulaBackgroundButton() const;
140128
141 //! Define whether the button toggling TOAST survey should be visible129 //! Define whether the button toggling TOAST survey should be visible
142 void setFlagShowToastSurveyButton(bool b);130 void setFlagShowToastSurveyButton(bool b);
131 //! Get whether the button toggling TOAST survey is visible
132 bool getFlagShowToastSurveyButton() const;
143133
144 //! Define whether the button toggling bookmarks should be visible134 //! Define whether the button toggling bookmarks should be visible
145 void setFlagShowBookmarksButton(bool b);135 void setFlagShowBookmarksButton(bool b);
136 //! Get whether the button toggling bookmarks is visible
137 bool getFlagShowBookmarksButton() const;
146138
147 //! Define whether the button toggling ICRS grid should be visible139 //! Define whether the button toggling ICRS grid should be visible
148 void setFlagShowICRSGridButton(bool b);140 void setFlagShowICRSGridButton(bool b);
141 //! Get whether the button toggling ICRS grid is visible
142 bool getFlagShowICRSGridButton() const;
149143
150 //! Define whether the button toggling galactic grid should be visible144 //! Define whether the button toggling galactic grid should be visible
151 void setFlagShowGalacticGridButton(bool b);145 void setFlagShowGalacticGridButton(bool b);
146 //! Get whether the button toggling galactic grid is visible
147 bool getFlagShowGalacticGridButton() const;
152148
153 //! Define whether the button toggling ecliptic grid should be visible149 //! Define whether the button toggling ecliptic grid should be visible
154 void setFlagShowEclipticGridButton(bool b);150 void setFlagShowEclipticGridButton(bool b);
151 //! Get whether the button toggling ecliptic grid is visible
152 bool getFlagShowEclipticGridButton() const;
155153
156 //! Define whether the button toggling constellation boundaries should be visible154 //! Define whether the button toggling constellation boundaries should be visible
157 void setFlagShowConstellationBoundariesButton(bool b);155 void setFlagShowConstellationBoundariesButton(bool b);
158156 //! Get whether the button toggling constellation boundaries is visible
159 void setFlagShowDecimalDegrees(bool b);157 bool getFlagShowConstellationBoundariesButton() const;
160158
161 //! Get the auto-hide status of the horizontal toolbar.159 //! Get the auto-hide status of the horizontal toolbar.
162 bool getAutoHideHorizontalButtonBar() const;160 bool getAutoHideHorizontalButtonBar() const;
@@ -194,6 +192,14 @@
194 void visibleChanged(bool b);192 void visibleChanged(bool b);
195 void autoHideHorizontalButtonBarChanged(bool b);193 void autoHideHorizontalButtonBarChanged(bool b);
196 void autoHideVerticalButtonBarChanged(bool b);194 void autoHideVerticalButtonBarChanged(bool b);
195 void flagShowFlipButtonsChanged(bool b);
196 void flagShowNebulaBackgroundButtonChanged(bool b);
197 void flagShowToastSurveyButtonChanged(bool b);
198 void flagShowBookmarksButtonChanged(bool b);
199 void flagShowICRSGridButtonChanged(bool b);
200 void flagShowGalacticGridButtonChanged(bool b);
201 void flagShowEclipticGridButtonChanged(bool b);
202 void flagShowConstellationBoundariesButtonChanged(bool b);
197203
198private slots:204private slots:
199 void reloadStyle();205 void reloadStyle();
200206
=== modified file 'src/gui/configurationDialog.ui'
--- src/gui/configurationDialog.ui 2017-10-22 18:13:13 +0000
+++ src/gui/configurationDialog.ui 2017-11-23 14:55:50 +0000
@@ -613,10 +613,10 @@
613 </attribute>613 </attribute>
614 </widget>614 </widget>
615 </item>615 </item>
616 <item row="3" column="1">616 <item row="1" column="0">
617 <widget class="QCheckBox" name="checkBoxSupergalacticCoordinates">617 <widget class="QCheckBox" name="checkBoxCatalogNumbers">
618 <property name="text">618 <property name="text">
619 <string>Supergalactic coordinates</string>619 <string>Catalog number(s)</string>
620 </property>620 </property>
621 <attribute name="buttonGroup">621 <attribute name="buttonGroup">
622 <string notr="true">buttonGroupDisplayedFields</string>622 <string notr="true">buttonGroupDisplayedFields</string>
@@ -624,29 +624,6 @@
624 </widget>624 </widget>
625 </item>625 </item>
626 <item row="7" column="0">626 <item row="7" column="0">
627 <widget class="QCheckBox" name="checkBoxType">
628 <property name="toolTip">
629 <string>The type of the object (star, planet, etc.)</string>
630 </property>
631 <property name="text">
632 <string>Type</string>
633 </property>
634 <attribute name="buttonGroup">
635 <string notr="true">buttonGroupDisplayedFields</string>
636 </attribute>
637 </widget>
638 </item>
639 <item row="1" column="1">
640 <widget class="QCheckBox" name="checkBoxAbsoluteMag">
641 <property name="text">
642 <string>Absolute magnitude</string>
643 </property>
644 <attribute name="buttonGroup">
645 <string notr="true">buttonGroupDisplayedFields</string>
646 </attribute>
647 </widget>
648 </item>
649 <item row="5" column="0">
650 <widget class="QCheckBox" name="checkBoxEclipticCoordsOfDate">627 <widget class="QCheckBox" name="checkBoxEclipticCoordsOfDate">
651 <property name="toolTip">628 <property name="toolTip">
652 <string>Ecliptic coordinates, equinox of date (only for Earth)</string>629 <string>Ecliptic coordinates, equinox of date (only for Earth)</string>
@@ -659,56 +636,10 @@
659 </attribute>636 </attribute>
660 </widget>637 </widget>
661 </item>638 </item>
662 <item row="6" column="0">639 <item row="0" column="0">
663 <widget class="QCheckBox" name="checkBoxSize">640 <widget class="QCheckBox" name="checkBoxName">
664 <property name="toolTip">641 <property name="text">
665 <string>Angular or physical size</string>642 <string>Name</string>
666 </property>
667 <property name="text">
668 <string>Size</string>
669 </property>
670 <attribute name="buttonGroup">
671 <string notr="true">buttonGroupDisplayedFields</string>
672 </attribute>
673 </widget>
674 </item>
675 <item row="5" column="1">
676 <widget class="QCheckBox" name="checkBoxAltAz">
677 <property name="toolTip">
678 <string>Horizontal coordinates</string>
679 </property>
680 <property name="text">
681 <string>Azimuth/Altitude</string>
682 </property>
683 <attribute name="buttonGroup">
684 <string notr="true">buttonGroupDisplayedFields</string>
685 </attribute>
686 </widget>
687 </item>
688 <item row="1" column="0">
689 <widget class="QCheckBox" name="checkBoxCatalogNumbers">
690 <property name="text">
691 <string>Catalog number(s)</string>
692 </property>
693 <attribute name="buttonGroup">
694 <string notr="true">buttonGroupDisplayedFields</string>
695 </attribute>
696 </widget>
697 </item>
698 <item row="6" column="1">
699 <widget class="QCheckBox" name="checkBoxDistance">
700 <property name="text">
701 <string>Distance</string>
702 </property>
703 <attribute name="buttonGroup">
704 <string notr="true">buttonGroupDisplayedFields</string>
705 </attribute>
706 </widget>
707 </item>
708 <item row="2" column="1">
709 <widget class="QCheckBox" name="checkBoxGalacticCoordinates">
710 <property name="text">
711 <string>Galactic coordinates</string>
712 </property>643 </property>
713 <attribute name="buttonGroup">644 <attribute name="buttonGroup">
714 <string notr="true">buttonGroupDisplayedFields</string>645 <string notr="true">buttonGroupDisplayedFields</string>
@@ -728,17 +659,7 @@
728 </attribute>659 </attribute>
729 </widget>660 </widget>
730 </item>661 </item>
731 <item row="0" column="0">662 <item row="6" column="0">
732 <widget class="QCheckBox" name="checkBoxName">
733 <property name="text">
734 <string>Name</string>
735 </property>
736 <attribute name="buttonGroup">
737 <string notr="true">buttonGroupDisplayedFields</string>
738 </attribute>
739 </widget>
740 </item>
741 <item row="4" column="0">
742 <widget class="QCheckBox" name="checkBoxEclipticCoordsJ2000">663 <widget class="QCheckBox" name="checkBoxEclipticCoordsJ2000">
743 <property name="toolTip">664 <property name="toolTip">
744 <string>Ecliptic coordinates, equinox J2000.0</string>665 <string>Ecliptic coordinates, equinox J2000.0</string>
@@ -751,7 +672,17 @@
751 </attribute>672 </attribute>
752 </widget>673 </widget>
753 </item>674 </item>
754 <item row="4" column="1">675 <item row="8" column="0">
676 <widget class="QCheckBox" name="checkBoxGalacticCoordinates">
677 <property name="text">
678 <string>Galactic coordinates</string>
679 </property>
680 <attribute name="buttonGroup">
681 <string notr="true">buttonGroupDisplayedFields</string>
682 </attribute>
683 </widget>
684 </item>
685 <item row="4" column="0">
755 <widget class="QCheckBox" name="checkBoxHourAngle">686 <widget class="QCheckBox" name="checkBoxHourAngle">
756 <property name="toolTip">687 <property name="toolTip">
757 <string>Equatorial coordinates, equinox of date</string>688 <string>Equatorial coordinates, equinox of date</string>
@@ -764,7 +695,66 @@
764 </attribute>695 </attribute>
765 </widget>696 </widget>
766 </item>697 </item>
767 <item row="0" column="1">698 <item row="9" column="0">
699 <widget class="QCheckBox" name="checkBoxSupergalacticCoordinates">
700 <property name="text">
701 <string>Supergalactic coordinates</string>
702 </property>
703 <attribute name="buttonGroup">
704 <string notr="true">buttonGroupDisplayedFields</string>
705 </attribute>
706 </widget>
707 </item>
708 <item row="5" column="0">
709 <widget class="QCheckBox" name="checkBoxAltAz">
710 <property name="toolTip">
711 <string>Horizontal coordinates</string>
712 </property>
713 <property name="text">
714 <string>Azimuth/Altitude</string>
715 </property>
716 <attribute name="buttonGroup">
717 <string notr="true">buttonGroupDisplayedFields</string>
718 </attribute>
719 </widget>
720 </item>
721 <item row="4" column="1">
722 <widget class="QCheckBox" name="checkBoxSize">
723 <property name="toolTip">
724 <string>Angular or physical size</string>
725 </property>
726 <property name="text">
727 <string>Size</string>
728 </property>
729 <attribute name="buttonGroup">
730 <string notr="true">buttonGroupDisplayedFields</string>
731 </attribute>
732 </widget>
733 </item>
734 <item row="3" column="1">
735 <widget class="QCheckBox" name="checkBoxType">
736 <property name="toolTip">
737 <string>The type of the object (star, planet, etc.)</string>
738 </property>
739 <property name="text">
740 <string>Type</string>
741 </property>
742 <attribute name="buttonGroup">
743 <string notr="true">buttonGroupDisplayedFields</string>
744 </attribute>
745 </widget>
746 </item>
747 <item row="2" column="1">
748 <widget class="QCheckBox" name="checkBoxAbsoluteMag">
749 <property name="text">
750 <string>Absolute magnitude</string>
751 </property>
752 <attribute name="buttonGroup">
753 <string notr="true">buttonGroupDisplayedFields</string>
754 </attribute>
755 </widget>
756 </item>
757 <item row="1" column="1">
768 <widget class="QCheckBox" name="checkBoxVisualMag">758 <widget class="QCheckBox" name="checkBoxVisualMag">
769 <property name="text">759 <property name="text">
770 <string>Visual magnitude</string>760 <string>Visual magnitude</string>
@@ -774,7 +764,7 @@
774 </attribute>764 </attribute>
775 </widget>765 </widget>
776 </item>766 </item>
777 <item row="8" column="0">767 <item row="0" column="1">
778 <widget class="QCheckBox" name="checkBoxConstellation">768 <widget class="QCheckBox" name="checkBoxConstellation">
779 <property name="toolTip">769 <property name="toolTip">
780 <string>3-letter IAU constellation abbreviation</string>770 <string>3-letter IAU constellation abbreviation</string>
@@ -787,6 +777,33 @@
787 </attribute>777 </attribute>
788 </widget>778 </widget>
789 </item>779 </item>
780 <item row="5" column="1">
781 <widget class="QCheckBox" name="checkBoxVelocity">
782 <property name="text">
783 <string>Velocity</string>
784 </property>
785 </widget>
786 </item>
787 <item row="6" column="1">
788 <widget class="QCheckBox" name="checkBoxDistance">
789 <property name="text">
790 <string>Distance</string>
791 </property>
792 <attribute name="buttonGroup">
793 <string notr="true">buttonGroupDisplayedFields</string>
794 </attribute>
795 </widget>
796 </item>
797 <item row="7" column="1">
798 <widget class="QCheckBox" name="checkBoxSiderealTime">
799 <property name="text">
800 <string>Sidereal time</string>
801 </property>
802 <attribute name="buttonGroup">
803 <string notr="true">buttonGroupDisplayedFields</string>
804 </attribute>
805 </widget>
806 </item>
790 <item row="8" column="1">807 <item row="8" column="1">
791 <widget class="QCheckBox" name="checkBoxExtra">808 <widget class="QCheckBox" name="checkBoxExtra">
792 <property name="toolTip">809 <property name="toolTip">
@@ -800,16 +817,6 @@
800 </attribute>817 </attribute>
801 </widget>818 </widget>
802 </item>819 </item>
803 <item row="7" column="1">
804 <widget class="QCheckBox" name="checkBoxSiderealTime">
805 <property name="text">
806 <string>Sidereal time</string>
807 </property>
808 <attribute name="buttonGroup">
809 <string notr="true">buttonGroupDisplayedFields</string>
810 </attribute>
811 </widget>
812 </item>
813 </layout>820 </layout>
814 </widget>821 </widget>
815 </item>822 </item>
@@ -2102,16 +2109,9 @@
2102 <tabstop>saveSettingsAsDefaultPushButton</tabstop>2109 <tabstop>saveSettingsAsDefaultPushButton</tabstop>
2103 <tabstop>restoreDefaultsButton</tabstop>2110 <tabstop>restoreDefaultsButton</tabstop>
2104 <tabstop>checkBoxName</tabstop>2111 <tabstop>checkBoxName</tabstop>
2105 <tabstop>checkBoxVisualMag</tabstop>
2106 <tabstop>checkBoxCatalogNumbers</tabstop>2112 <tabstop>checkBoxCatalogNumbers</tabstop>
2107 <tabstop>checkBoxAbsoluteMag</tabstop>
2108 <tabstop>checkBoxRaDecJ2000</tabstop>2113 <tabstop>checkBoxRaDecJ2000</tabstop>
2109 <tabstop>checkBoxGalacticCoordinates</tabstop>
2110 <tabstop>checkBoxSupergalacticCoordinates</tabstop>
2111 <tabstop>checkBoxRaDecOfDate</tabstop>2114 <tabstop>checkBoxRaDecOfDate</tabstop>
2112 <tabstop>checkBoxSize</tabstop>
2113 <tabstop>checkBoxDistance</tabstop>
2114 <tabstop>checkBoxType</tabstop>
2115 <tabstop>checkBoxEclipticCoordsJ2000</tabstop>2115 <tabstop>checkBoxEclipticCoordsJ2000</tabstop>
2116 <tabstop>checkBoxEclipticCoordsOfDate</tabstop>2116 <tabstop>checkBoxEclipticCoordsOfDate</tabstop>
2117 <tabstop>enableKeysNavigationCheckBox</tabstop>2117 <tabstop>enableKeysNavigationCheckBox</tabstop>