Merge lp:~stellarium/stellarium/gz_planetSpeed into lp:stellarium
- gz_planetSpeed
- Merge into trunk
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 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stellarium | Pending | ||
Review via email: mp+333965@code.launchpad.net |
Commit message
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&
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
1 | === modified file 'src/StelMainView.cpp' | |||
2 | --- src/StelMainView.cpp 2017-10-10 09:47:54 +0000 | |||
3 | +++ src/StelMainView.cpp 2017-11-23 14:55:50 +0000 | |||
4 | @@ -350,12 +350,10 @@ | |||
5 | 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...) |
6 | 351 | painter->beginNativePainting(); | 351 | painter->beginNativePainting(); |
7 | 352 | 352 | ||
9 | 353 | //fix for bug 1628072 caused by QTBUG-56798 | 353 | //fix for bug LP:1628072 caused by QTBUG-56798 |
10 | 354 | #ifndef QT_NO_DEBUG | 354 | #ifndef QT_NO_DEBUG |
11 | 355 | StelOpenGL::clearGLErrors(); | 355 | StelOpenGL::clearGLErrors(); |
12 | 356 | #endif | 356 | #endif |
13 | 357 | |||
14 | 358 | |||
15 | 359 | QOpenGLFunctions* gl = QOpenGLContext::currentContext()->functions(); | 357 | QOpenGLFunctions* gl = QOpenGLContext::currentContext()->functions(); |
16 | 360 | 358 | ||
17 | 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) |
18 | @@ -368,6 +366,7 @@ | |||
19 | 368 | app.draw(); | 366 | app.draw(); |
20 | 369 | painter->endNativePainting(); | 367 | painter->endNativePainting(); |
21 | 370 | 368 | ||
22 | 369 | mainView->handleMouseCursorTimeout(now); | ||
23 | 371 | mainView->drawEnded(); | 370 | mainView->drawEnded(); |
24 | 372 | } | 371 | } |
25 | 373 | 372 | ||
26 | @@ -397,6 +396,10 @@ | |||
27 | 397 | 396 | ||
28 | 398 | void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE | 397 | void mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE |
29 | 399 | { | 398 | { |
30 | 399 | // GZ TODO: Where to place the mouse cursor wake-up? | ||
31 | 400 | qDebug() << "StelRootItem::mouseMoveEvent()"; | ||
32 | 401 | if (QGuiApplication::overrideCursor()!=0) | ||
33 | 402 | QGuiApplication::restoreOverrideCursor(); | ||
34 | 400 | QMouseEvent ev = convertMouseEvent(event); | 403 | QMouseEvent ev = convertMouseEvent(event); |
35 | 401 | QPointF pos = ev.pos(); | 404 | QPointF pos = ev.pos(); |
36 | 402 | event->setAccepted(StelApp::getInstance().handleMove(pos.x(), pos.y(), ev.buttons())); | 405 | event->setAccepted(StelApp::getInstance().handleMove(pos.x(), pos.y(), ev.buttons())); |
37 | @@ -574,7 +577,7 @@ | |||
38 | 574 | 577 | ||
39 | 575 | setWindowIcon(QIcon(":/mainWindow/icon.bmp")); | 578 | setWindowIcon(QIcon(":/mainWindow/icon.bmp")); |
40 | 576 | initTitleI18n(); | 579 | initTitleI18n(); |
42 | 577 | setObjectName("Mainview"); | 580 | setObjectName("MainView"); |
43 | 578 | 581 | ||
44 | 579 | setViewportUpdateMode(QGraphicsView::NoViewportUpdate); | 582 | setViewportUpdateMode(QGraphicsView::NoViewportUpdate); |
45 | 580 | setFrameShape(QFrame::NoFrame); | 583 | setFrameShape(QFrame::NoFrame); |
46 | @@ -639,6 +642,8 @@ | |||
47 | 639 | glWidget->makeCurrent(); | 642 | glWidget->makeCurrent(); |
48 | 640 | glWidget->initializeGL(); | 643 | glWidget->initializeGL(); |
49 | 641 | #endif | 644 | #endif |
50 | 645 | // We cannot use global mousetracking. Only if mouse is hidden! | ||
51 | 646 | //setMouseTracking(true); | ||
52 | 642 | } | 647 | } |
53 | 643 | 648 | ||
54 | 644 | void StelMainView::resizeEvent(QResizeEvent* event) | 649 | void StelMainView::resizeEvent(QResizeEvent* event) |
55 | @@ -654,6 +659,18 @@ | |||
56 | 654 | QGraphicsView::resizeEvent(event); | 659 | QGraphicsView::resizeEvent(event); |
57 | 655 | } | 660 | } |
58 | 656 | 661 | ||
59 | 662 | // GZ: This should do something to make the cursor visible again when the mouse is moved. | ||
60 | 663 | // However, any implementation of this method seems to gobble all mouse moves. | ||
61 | 664 | //void StelMainView::mouseMoveEvent(QMouseEvent *event) | ||
62 | 665 | //{ | ||
63 | 666 | //// //Q_UNUSED(event) | ||
64 | 667 | ////// thereWasAnEvent(); | ||
65 | 668 | // event->ignore(); | ||
66 | 669 | //// if (QGuiApplication::overrideCursor()!=0) | ||
67 | 670 | //// QGuiApplication::restoreOverrideCursor(); | ||
68 | 671 | //} | ||
69 | 672 | |||
70 | 673 | |||
71 | 657 | void StelMainView::focusSky() { | 674 | void StelMainView::focusSky() { |
72 | 658 | //scene()->setActiveWindow(0); | 675 | //scene()->setActiveWindow(0); |
73 | 659 | rootItem->setFocus(); | 676 | rootItem->setFocus(); |
74 | @@ -1277,6 +1294,28 @@ | |||
75 | 1277 | } | 1294 | } |
76 | 1278 | } | 1295 | } |
77 | 1279 | 1296 | ||
78 | 1297 | void StelMainView::handleMouseCursorTimeout(const double now) | ||
79 | 1298 | { | ||
80 | 1299 | // GZ restore mouse cursor stuff from pre-0.15.2. | ||
81 | 1300 | // Manage cursor timeout | ||
82 | 1301 | if (cursorTimeout>0.f && (now-lastEventTimeSec>cursorTimeout) && flagCursorTimeout) | ||
83 | 1302 | { | ||
84 | 1303 | if (QGuiApplication::overrideCursor()==0) | ||
85 | 1304 | { | ||
86 | 1305 | QGuiApplication::setOverrideCursor(Qt::BlankCursor); | ||
87 | 1306 | setMouseTracking(true); | ||
88 | 1307 | } | ||
89 | 1308 | } | ||
90 | 1309 | else | ||
91 | 1310 | { | ||
92 | 1311 | if (QGuiApplication::overrideCursor()!=0) | ||
93 | 1312 | { | ||
94 | 1313 | QGuiApplication::restoreOverrideCursor(); | ||
95 | 1314 | setMouseTracking(false); | ||
96 | 1315 | } | ||
97 | 1316 | } | ||
98 | 1317 | } | ||
99 | 1318 | |||
100 | 1280 | void StelMainView::minFPSUpdate() | 1319 | void StelMainView::minFPSUpdate() |
101 | 1281 | { | 1320 | { |
102 | 1282 | if(!updateQueued) | 1321 | if(!updateQueued) |
103 | 1283 | 1322 | ||
104 | === modified file 'src/StelMainView.hpp' | |||
105 | --- src/StelMainView.hpp 2017-05-18 11:28:23 +0000 | |||
106 | +++ src/StelMainView.hpp 2017-11-23 14:55:50 +0000 | |||
107 | @@ -47,7 +47,13 @@ | |||
108 | 47 | friend class StelGraphicsScene; | 47 | friend class StelGraphicsScene; |
109 | 48 | friend class NightModeGraphicsEffect; | 48 | friend class NightModeGraphicsEffect; |
110 | 49 | Q_OBJECT | 49 | Q_OBJECT |
112 | 50 | Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen NOTIFY fullScreenChanged) | 50 | Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen NOTIFY fullScreenChanged) |
113 | 51 | Q_PROPERTY(bool flagInvertScreenShotColors READ getFlagInvertScreenShotColors WRITE setFlagInvertScreenShotColors NOTIFY flagInvertScreenShotColorsChanged) | ||
114 | 52 | Q_PROPERTY(bool flagOverwriteScreenshots READ getFlagOverwriteScreenShots WRITE setFlagOverwriteScreenShots NOTIFY flagOverwriteScreenshotsChanged) | ||
115 | 53 | Q_PROPERTY(bool flagUseButtonsBackground READ getFlagUseButtonsBackground WRITE setFlagUseButtonsBackground NOTIFY flagUseButtonsBackgroundChanged) | ||
116 | 54 | Q_PROPERTY(bool flagCursorTimeout READ getFlagCursorTimeout WRITE setFlagCursorTimeout NOTIFY flagCursorTimeoutChanged) | ||
117 | 55 | Q_PROPERTY(double cursorTimeout READ getCursorTimeout WRITE setCursorTimeout NOTIFY cursorTimeoutChanged) | ||
118 | 56 | |||
119 | 51 | 57 | ||
120 | 52 | public: | 58 | public: |
121 | 53 | //! Contains some basic info about the OpenGL context used | 59 | //! Contains some basic info about the OpenGL context used |
122 | @@ -117,21 +123,21 @@ | |||
123 | 117 | //! Get whether colors are inverted when saving screenshot | 123 | //! Get whether colors are inverted when saving screenshot |
124 | 118 | bool getFlagInvertScreenShotColors() const {return flagInvertScreenShotColors;} | 124 | bool getFlagInvertScreenShotColors() const {return flagInvertScreenShotColors;} |
125 | 119 | //! Set whether colors should be inverted when saving screenshot | 125 | //! Set whether colors should be inverted when saving screenshot |
127 | 120 | void setFlagInvertScreenShotColors(bool b) {flagInvertScreenShotColors=b;} | 126 | void setFlagInvertScreenShotColors(bool b) {flagInvertScreenShotColors=b; emit flagInvertScreenShotColorsChanged(b);} |
128 | 121 | 127 | ||
129 | 122 | //! Get whether existing files are overwritten when saving screenshot | 128 | //! Get whether existing files are overwritten when saving screenshot |
130 | 123 | bool getFlagOverwriteScreenShots() const {return flagOverwriteScreenshots;} | 129 | bool getFlagOverwriteScreenShots() const {return flagOverwriteScreenshots;} |
131 | 124 | //! Set whether existing files are overwritten when saving screenshot | 130 | //! Set whether existing files are overwritten when saving screenshot |
133 | 125 | void setFlagOverwriteScreenShots(bool b) {flagOverwriteScreenshots=b;} | 131 | void setFlagOverwriteScreenShots(bool b) {flagOverwriteScreenshots=b; emit flagOverwriteScreenshotsChanged(b);} |
134 | 126 | 132 | ||
135 | 127 | //! Get the state of the mouse cursor timeout flag | 133 | //! Get the state of the mouse cursor timeout flag |
136 | 128 | bool getFlagCursorTimeout() {return flagCursorTimeout;} | 134 | bool getFlagCursorTimeout() {return flagCursorTimeout;} |
137 | 129 | //! Get the mouse cursor timeout in seconds | 135 | //! Get the mouse cursor timeout in seconds |
139 | 130 | float getCursorTimeout() const {return cursorTimeout;} | 136 | double getCursorTimeout() const {return cursorTimeout;} |
140 | 131 | //! Get the state of the mouse cursor timeout flag | 137 | //! Get the state of the mouse cursor timeout flag |
142 | 132 | void setFlagCursorTimeout(bool b) {flagCursorTimeout=b;} | 138 | void setFlagCursorTimeout(bool b) {flagCursorTimeout=b; emit flagCursorTimeoutChanged(b);} |
143 | 133 | //! Set the mouse cursor timeout in seconds | 139 | //! Set the mouse cursor timeout in seconds |
145 | 134 | void setCursorTimeout(float t) {cursorTimeout=t;} | 140 | void setCursorTimeout(double t) {cursorTimeout=t; emit cursorTimeoutChanged(t);} |
146 | 135 | 141 | ||
147 | 136 | //! Set the minimum frames per second. Usually this minimum will be switched to after there are no | 142 | //! Set the minimum frames per second. Usually this minimum will be switched to after there are no |
148 | 137 | //! user events for some seconds to save power. However, if can be useful to set this to a high | 143 | //! user events for some seconds to save power. However, if can be useful to set this to a high |
149 | @@ -157,7 +163,7 @@ | |||
150 | 157 | bool needsMaxFPS() const; | 163 | bool needsMaxFPS() const; |
151 | 158 | 164 | ||
152 | 159 | //! Set the state of the flag of usage background for GUI buttons | 165 | //! Set the state of the flag of usage background for GUI buttons |
154 | 160 | void setFlagUseButtonsBackground(bool b) { flagUseButtonsBackground=b; } | 166 | void setFlagUseButtonsBackground(bool b) { flagUseButtonsBackground=b; emit flagUseButtonsBackgroundChanged(b); } |
155 | 161 | //! Get the state of the flag of usage background for GUI buttons | 167 | //! Get the state of the flag of usage background for GUI buttons |
156 | 162 | bool getFlagUseButtonsBackground() { return flagUseButtonsBackground; } | 168 | bool getFlagUseButtonsBackground() { return flagUseButtonsBackground; } |
157 | 163 | 169 | ||
158 | @@ -170,6 +176,8 @@ | |||
159 | 170 | //! Handle window resized events, and change the size of the underlying | 176 | //! Handle window resized events, and change the size of the underlying |
160 | 171 | //! QGraphicsScene to be the same | 177 | //! QGraphicsScene to be the same |
161 | 172 | virtual void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE; | 178 | virtual void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE; |
162 | 179 | // //! Wake up mouse cursor (if it was hidden) | ||
163 | 180 | // virtual void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; | ||
164 | 173 | signals: | 181 | signals: |
165 | 174 | //! emitted when saveScreenShot is requested with saveScreenShot(). | 182 | //! emitted when saveScreenShot is requested with saveScreenShot(). |
166 | 175 | //! doScreenshot() does the actual work (it has to do it in the main | 183 | //! doScreenshot() does the actual work (it has to do it in the main |
167 | @@ -184,6 +192,11 @@ | |||
168 | 184 | void reloadShadersRequested(); | 192 | void reloadShadersRequested(); |
169 | 185 | 193 | ||
170 | 186 | void updateIconsRequested(); | 194 | void updateIconsRequested(); |
171 | 195 | void flagInvertScreenShotColorsChanged(bool b); | ||
172 | 196 | void flagOverwriteScreenshotsChanged(bool b); | ||
173 | 197 | void flagUseButtonsBackgroundChanged(bool b); | ||
174 | 198 | void flagCursorTimeoutChanged(bool b); | ||
175 | 199 | void cursorTimeoutChanged(double t); | ||
176 | 187 | 200 | ||
177 | 188 | private slots: | 201 | private slots: |
178 | 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. |
179 | @@ -200,6 +213,8 @@ | |||
180 | 200 | private: | 213 | private: |
181 | 201 | //! The graphics scene notifies us when a draw finished, so that we can queue the next one | 214 | //! The graphics scene notifies us when a draw finished, so that we can queue the next one |
182 | 202 | void drawEnded(); | 215 | void drawEnded(); |
183 | 216 | //! hide mouse cursor after some time if configured. | ||
184 | 217 | void handleMouseCursorTimeout(const double now); | ||
185 | 203 | //! Returns the desired OpenGL format settings, | 218 | //! Returns the desired OpenGL format settings, |
186 | 204 | //! on desktop this corresponds to a GL 2.1 context, | 219 | //! on desktop this corresponds to a GL 2.1 context, |
187 | 205 | //! with 32bit RGBA buffer and 24/8 depth/stencil buffer | 220 | //! with 32bit RGBA buffer and 24/8 depth/stencil buffer |
188 | @@ -237,8 +252,8 @@ | |||
189 | 237 | QString screenShotPrefix; | 252 | QString screenShotPrefix; |
190 | 238 | QString screenShotDir; | 253 | QString screenShotDir; |
191 | 239 | 254 | ||
194 | 240 | // Number of second before the mouse cursor disappears | 255 | // Number of seconds before the mouse cursor disappears |
195 | 241 | float cursorTimeout; | 256 | double cursorTimeout; |
196 | 242 | bool flagCursorTimeout; | 257 | bool flagCursorTimeout; |
197 | 243 | 258 | ||
198 | 244 | bool flagUseButtonsBackground; | 259 | bool flagUseButtonsBackground; |
199 | 245 | 260 | ||
200 | === modified file 'src/core/StelApp.cpp' | |||
201 | --- src/core/StelApp.cpp 2017-11-16 15:27:36 +0000 | |||
202 | +++ src/core/StelApp.cpp 2017-11-23 14:55:50 +0000 | |||
203 | @@ -439,6 +439,10 @@ | |||
204 | 439 | planetLocationMgr = new StelLocationMgr(); | 439 | planetLocationMgr = new StelLocationMgr(); |
205 | 440 | actionMgr = new StelActionMgr(); | 440 | actionMgr = new StelActionMgr(); |
206 | 441 | 441 | ||
207 | 442 | // register non-modules for StelProperty tracking | ||
208 | 443 | propMgr->registerObject(this); | ||
209 | 444 | propMgr->registerObject(mainWin); | ||
210 | 445 | |||
211 | 442 | // Stel Object Data Base manager | 446 | // Stel Object Data Base manager |
212 | 443 | stelObjectMgr = new StelObjectMgr(); | 447 | stelObjectMgr = new StelObjectMgr(); |
213 | 444 | stelObjectMgr->init(); | 448 | stelObjectMgr->init(); |
214 | @@ -878,17 +882,29 @@ | |||
215 | 878 | 882 | ||
216 | 879 | void StelApp::setFlagShowDecimalDegrees(bool b) | 883 | void StelApp::setFlagShowDecimalDegrees(bool b) |
217 | 880 | { | 884 | { |
219 | 881 | flagShowDecimalDegrees = b; | 885 | if (flagShowDecimalDegrees!=b) |
220 | 886 | { | ||
221 | 887 | flagShowDecimalDegrees = b; | ||
222 | 888 | emit flagShowDecimalDegreesChanged(b); | ||
223 | 889 | } | ||
224 | 882 | } | 890 | } |
225 | 883 | 891 | ||
226 | 884 | void StelApp::setFlagUseFormattingOutput(bool b) | 892 | void StelApp::setFlagUseFormattingOutput(bool b) |
227 | 885 | { | 893 | { |
229 | 886 | flagUseFormattingOutput = b; | 894 | if (flagUseFormattingOutput!=b) |
230 | 895 | { | ||
231 | 896 | flagUseFormattingOutput = b; | ||
232 | 897 | emit flagUseFormattingOutputChanged(b); | ||
233 | 898 | } | ||
234 | 887 | } | 899 | } |
235 | 888 | 900 | ||
236 | 889 | void StelApp::setFlagUseCCSDesignation(bool b) | 901 | void StelApp::setFlagUseCCSDesignation(bool b) |
237 | 890 | { | 902 | { |
239 | 891 | flagUseCCSDesignation = b; | 903 | if (flagUseCCSDesignation!=b) |
240 | 904 | { | ||
241 | 905 | flagUseCCSDesignation = b; | ||
242 | 906 | emit flagUseCCSDesignationChanged(b); | ||
243 | 907 | } | ||
244 | 892 | } | 908 | } |
245 | 893 | 909 | ||
246 | 894 | // Update translations and font for sky everywhere in the program | 910 | // Update translations and font for sky everywhere in the program |
247 | 895 | 911 | ||
248 | === modified file 'src/core/StelApp.hpp' | |||
249 | --- src/core/StelApp.hpp 2017-10-23 05:06:42 +0000 | |||
250 | +++ src/core/StelApp.hpp 2017-11-23 14:55:50 +0000 | |||
251 | @@ -69,6 +69,10 @@ | |||
252 | 69 | { | 69 | { |
253 | 70 | Q_OBJECT | 70 | Q_OBJECT |
254 | 71 | Q_PROPERTY(bool nightMode READ getVisionModeNight WRITE setVisionModeNight NOTIFY visionNightModeChanged) | 71 | Q_PROPERTY(bool nightMode READ getVisionModeNight WRITE setVisionModeNight NOTIFY visionNightModeChanged) |
255 | 72 | Q_PROPERTY(bool flagShowDecimalDegrees READ getFlagShowDecimalDegrees WRITE setFlagShowDecimalDegrees NOTIFY flagShowDecimalDegreesChanged) | ||
256 | 73 | Q_PROPERTY(bool flagUseAzimuthFromSouth READ getFlagSouthAzimuthUsage WRITE setFlagSouthAzimuthUsage NOTIFY flagUseAzimuthFromSouthChanged) | ||
257 | 74 | Q_PROPERTY(bool flagUseCCSDesignation READ getFlagUseCCSDesignation WRITE setFlagUseCCSDesignation NOTIFY flagUseCCSDesignationChanged) | ||
258 | 75 | Q_PROPERTY(bool flagUseFormattingOutput READ getFlagUseFormattingOutput WRITE setFlagUseFormattingOutput NOTIFY flagUseFormattingOutputChanged) | ||
259 | 72 | 76 | ||
260 | 73 | public: | 77 | public: |
261 | 74 | friend class StelAppGraphicsWidget; | 78 | friend class StelAppGraphicsWidget; |
262 | @@ -237,7 +241,7 @@ | |||
263 | 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) |
264 | 238 | bool getFlagSouthAzimuthUsage() const { return flagUseAzimuthFromSouth; } | 242 | bool getFlagSouthAzimuthUsage() const { return flagUseAzimuthFromSouth; } |
265 | 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) |
267 | 240 | void setFlagSouthAzimuthUsage(bool use) { flagUseAzimuthFromSouth=use; } | 244 | void setFlagSouthAzimuthUsage(bool use) { flagUseAzimuthFromSouth=use; emit flagUseAzimuthFromSouthChanged(use);} |
268 | 241 | 245 | ||
269 | 242 | //! Set flag for using of formatting output for coordinates | 246 | //! Set flag for using of formatting output for coordinates |
270 | 243 | void setFlagUseFormattingOutput(bool b); | 247 | void setFlagUseFormattingOutput(bool b); |
271 | @@ -278,6 +282,10 @@ | |||
272 | 278 | void quit(); | 282 | void quit(); |
273 | 279 | signals: | 283 | signals: |
274 | 280 | void visionNightModeChanged(bool); | 284 | void visionNightModeChanged(bool); |
275 | 285 | void flagShowDecimalDegreesChanged(bool); | ||
276 | 286 | void flagUseAzimuthFromSouthChanged(bool); | ||
277 | 287 | void flagUseCCSDesignationChanged(bool); | ||
278 | 288 | void flagUseFormattingOutputChanged(bool); | ||
279 | 281 | void colorSchemeChanged(const QString&); | 289 | void colorSchemeChanged(const QString&); |
280 | 282 | void languageChanged(); | 290 | void languageChanged(); |
281 | 283 | 291 | ||
282 | 284 | 292 | ||
283 | === modified file 'src/core/StelMovementMgr.hpp' | |||
284 | --- src/core/StelMovementMgr.hpp 2017-11-17 00:14:42 +0000 | |||
285 | +++ src/core/StelMovementMgr.hpp 2017-11-23 14:55:50 +0000 | |||
286 | @@ -41,6 +41,10 @@ | |||
287 | 41 | READ getFlagTracking | 41 | READ getFlagTracking |
288 | 42 | WRITE setFlagTracking | 42 | WRITE setFlagTracking |
289 | 43 | NOTIFY flagTrackingChanged) | 43 | NOTIFY flagTrackingChanged) |
290 | 44 | Q_PROPERTY(bool flagIndicationMountMode | ||
291 | 45 | READ getFlagIndicationMountMode | ||
292 | 46 | WRITE setFlagIndicationMountMode | ||
293 | 47 | NOTIFY flagIndicationMountModeChanged) | ||
294 | 44 | 48 | ||
295 | 45 | //The targets of viewport offset animation | 49 | //The targets of viewport offset animation |
296 | 46 | Q_PROPERTY(float viewportHorizontalOffsetTarget | 50 | Q_PROPERTY(float viewportHorizontalOffsetTarget |
297 | @@ -182,7 +186,7 @@ | |||
298 | 182 | //! Get the state of flag for indication of mount mode | 186 | //! Get the state of flag for indication of mount mode |
299 | 183 | bool getFlagIndicationMountMode() const {return flagIndicationMountMode;} | 187 | bool getFlagIndicationMountMode() const {return flagIndicationMountMode;} |
300 | 184 | //! Set the state of flag for indication of mount mode | 188 | //! Set the state of flag for indication of mount mode |
302 | 185 | void setFlagIndicationMountMode(bool b) { flagIndicationMountMode=b; } | 189 | void setFlagIndicationMountMode(bool b) { flagIndicationMountMode=b; emit flagIndicationMountModeChanged(b); } |
303 | 186 | 190 | ||
304 | 187 | //! Move the view to a specified J2000 position. | 191 | //! Move the view to a specified J2000 position. |
305 | 188 | //! @param aim The position to move to expressed as a vector. | 192 | //! @param aim The position to move to expressed as a vector. |
306 | @@ -309,6 +313,7 @@ | |||
307 | 309 | //! Emitted when the tracking property changes | 313 | //! Emitted when the tracking property changes |
308 | 310 | void flagTrackingChanged(bool b); | 314 | void flagTrackingChanged(bool b); |
309 | 311 | void equatorialMountChanged(bool b); | 315 | void equatorialMountChanged(bool b); |
310 | 316 | void flagIndicationMountModeChanged(bool b); | ||
311 | 312 | 317 | ||
312 | 313 | void flagAutoZoomOutResetsDirectionChanged(bool b); | 318 | void flagAutoZoomOutResetsDirectionChanged(bool b); |
313 | 314 | 319 | ||
314 | 315 | 320 | ||
315 | === modified file 'src/core/StelObject.hpp' | |||
316 | --- src/core/StelObject.hpp 2017-07-10 12:38:17 +0000 | |||
317 | +++ src/core/StelObject.hpp 2017-11-23 14:55:50 +0000 | |||
318 | @@ -54,18 +54,19 @@ | |||
319 | 54 | AltAzi = 0x00000020, //!< The position (Altitude/Azimuth) | 54 | AltAzi = 0x00000020, //!< The position (Altitude/Azimuth) |
320 | 55 | Distance = 0x00000040, //!< Info about an object's distance | 55 | Distance = 0x00000040, //!< Info about an object's distance |
321 | 56 | Size = 0x00000080, //!< Info about an object's size | 56 | Size = 0x00000080, //!< Info about an object's size |
334 | 57 | Extra = 0x00000100, //!< Derived class-specific extra fields | 57 | Velocity = 0x00000100, //!< Info about object's velocity |
335 | 58 | HourAngle = 0x00000200, //!< The hour angle + DE (of date) | 58 | Extra = 0x00000200, //!< Derived class-specific extra fields |
336 | 59 | AbsoluteMagnitude = 0x00000400, //!< The absolute magnitude | 59 | HourAngle = 0x00000400, //!< The hour angle + DE (of date) |
337 | 60 | GalacticCoord = 0x00000800, //!< The galactic position | 60 | AbsoluteMagnitude = 0x00000800, //!< The absolute magnitude |
338 | 61 | SupergalacticCoord = 0x00001000, //!< The supergalactic position | 61 | GalacticCoord = 0x00001000, //!< The galactic position |
339 | 62 | ObjectType = 0x00002000, //!< The type of the object (star, planet, etc.) | 62 | SupergalacticCoord = 0x00002000, //!< The supergalactic position |
340 | 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.) |
341 | 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)] |
342 | 65 | IAUConstellation = 0x00010000, //!< Three-letter constellation code (And, Boo, Cas, ...) | 65 | EclipticCoordOfDate = 0x00010000, //!< The ecliptic position (of date) |
343 | 66 | SiderealTime = 0x00020000, //!< Mean and Apparent Sidereal Time | 66 | IAUConstellation = 0x00020000, //!< Three-letter constellation code (And, Boo, Cas, ...) |
344 | 67 | NoFont = 0x00040000, | 67 | SiderealTime = 0x00040000, //!< Mean and Apparent Sidereal Time |
345 | 68 | PlainText = 0x00080000, //!< Strip HTML tags from output | 68 | NoFont = 0x00080000, |
346 | 69 | PlainText = 0x00100000, //!< Strip HTML tags from output | ||
347 | 69 | // TODO GZ | 70 | // TODO GZ |
348 | 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] |
349 | 71 | // RaDecOfDatePlanetocentric = 0x00040000 //!< The planetocentric equatorial position (of date) | 72 | // RaDecOfDatePlanetocentric = 0x00040000 //!< The planetocentric equatorial position (of date) |
350 | @@ -75,7 +76,7 @@ | |||
351 | 75 | Q_DECLARE_FLAGS(InfoStringGroup, InfoStringGroupFlags) | 76 | Q_DECLARE_FLAGS(InfoStringGroup, InfoStringGroupFlags) |
352 | 76 | 77 | ||
353 | 77 | //! A pre-defined set of specifiers for the getInfoString flags argument to getInfoString | 78 | //! A pre-defined set of specifiers for the getInfoString flags argument to getInfoString |
355 | 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| |
356 | 79 | AbsoluteMagnitude|GalacticCoord|SupergalacticCoord|ObjectType|EclipticCoordJ2000| | 80 | AbsoluteMagnitude|GalacticCoord|SupergalacticCoord|ObjectType|EclipticCoordJ2000| |
357 | 80 | EclipticCoordOfDate|IAUConstellation|SiderealTime); | 81 | EclipticCoordOfDate|IAUConstellation|SiderealTime); |
358 | 81 | //! A pre-defined set of specifiers for the getInfoString flags argument to getInfoString | 82 | //! A pre-defined set of specifiers for the getInfoString flags argument to getInfoString |
359 | 82 | 83 | ||
360 | === modified file 'src/core/modules/Comet.cpp' | |||
361 | --- src/core/modules/Comet.cpp 2017-11-16 15:27:36 +0000 | |||
362 | +++ src/core/modules/Comet.cpp 2017-11-23 14:55:50 +0000 | |||
363 | @@ -187,6 +187,7 @@ | |||
364 | 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>"; |
365 | 188 | } | 188 | } |
366 | 189 | 189 | ||
367 | 190 | |||
368 | 190 | oss << getCommonInfoString(core, flags); | 191 | oss << getCommonInfoString(core, flags); |
369 | 191 | 192 | ||
370 | 192 | // TRANSLATORS: Unit of measure for distance - kilometers | 193 | // TRANSLATORS: Unit of measure for distance - kilometers |
371 | @@ -231,6 +232,18 @@ | |||
372 | 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 />"; |
373 | 232 | } | 233 | } |
374 | 233 | 234 | ||
375 | 235 | if (flags&Velocity) | ||
376 | 236 | { | ||
377 | 237 | QString kms = qc_("km/s", "speed"); | ||
378 | 238 | |||
379 | 239 | Vec3d orbitalVel=getEclipticVelocity(); | ||
380 | 240 | double orbVel=orbitalVel.length(); | ||
381 | 241 | if (orbVel>0.) | ||
382 | 242 | { // AU/d * km/AU /24 | ||
383 | 243 | oss << QString("%1: %2 %3").arg(q_("Velocity")).arg(orbVel* AU/86400., 0, 'f', 3).arg(kms) << "<br />"; | ||
384 | 244 | } | ||
385 | 245 | } | ||
386 | 246 | |||
387 | 234 | if (flags&Extra) | 247 | if (flags&Extra) |
388 | 235 | { | 248 | { |
389 | 236 | // If semi-major axis not zero then calculate and display orbital period for comet in days | 249 | // If semi-major axis not zero then calculate and display orbital period for comet in days |
390 | @@ -241,10 +254,10 @@ | |||
391 | 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 />"; |
392 | 242 | } | 255 | } |
393 | 243 | 256 | ||
398 | 244 | // TRANSLATORS: Unit of measure for speed - kilometers per second | 257 | // // TRANSLATORS: Unit of measure for speed - kilometers per second |
399 | 245 | QString kms = qc_("km/s", "speed"); | 258 | // QString kms = qc_("km/s", "speed"); |
400 | 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. |
401 | 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 />"; |
402 | 248 | 261 | ||
403 | 249 | const Vec3d& observerHelioPos = core->getObserverHeliocentricEclipticPos(); | 262 | const Vec3d& observerHelioPos = core->getObserverHeliocentricEclipticPos(); |
404 | 250 | const double elongation = getElongation(observerHelioPos); | 263 | const double elongation = getElongation(observerHelioPos); |
405 | @@ -353,11 +366,6 @@ | |||
406 | 353 | { | 366 | { |
407 | 354 | lastJDEtail=dateJDE; | 367 | lastJDEtail=dateJDE; |
408 | 355 | 368 | ||
409 | 356 | // The CometOrbit is in fact available in userDataPtr! | ||
410 | 357 | CometOrbit* orbit=(CometOrbit*)orbitPtr; | ||
411 | 358 | Q_ASSERT(orbit); | ||
412 | 359 | if (!orbit->objectDateValid(dateJDE)) return; // out of useful date range. This should allow having hundreds of comet elements. | ||
413 | 360 | |||
414 | 361 | if (orbit->getUpdateTails()){ | 369 | if (orbit->getUpdateTails()){ |
415 | 362 | // Compute lengths and orientations from orbit object, but only if required. | 370 | // Compute lengths and orientations from orbit object, but only if required. |
416 | 363 | tailFactors=getComaDiameterAndTailLengthAU(); | 371 | tailFactors=getComaDiameterAndTailLengthAU(); |
417 | @@ -434,7 +442,8 @@ | |||
418 | 434 | float gasMagFactor=qMin(0.9f*aLum, 0.7f); | 442 | float gasMagFactor=qMin(0.9f*aLum, 0.7f); |
419 | 435 | float dustMagFactor=qMin(dustTailBrightnessFactor*aLum, 0.7f); | 443 | float dustMagFactor=qMin(dustTailBrightnessFactor*aLum, 0.7f); |
420 | 436 | 444 | ||
422 | 437 | Vec3f gasColor(0.15f*gasMagFactor,0.35f*gasMagFactor,0.6f*gasMagFactor); // Orig color 0.15/0.15/0.6 | 445 | // TODO: Maybe make gas color distance dependent? (various typical ingredients outgas at different temperatures...) |
423 | 446 | Vec3f gasColor(0.15f*gasMagFactor,0.35f*gasMagFactor,0.6f*gasMagFactor); // Orig color 0.15/0.15/0.6. | ||
424 | 438 | Vec3f dustColor(dustMagFactor, dustMagFactor,0.6f*dustMagFactor); | 447 | Vec3f dustColor(dustMagFactor, dustMagFactor,0.6f*dustMagFactor); |
425 | 439 | 448 | ||
426 | 440 | if (withAtmosphere) | 449 | if (withAtmosphere) |
427 | 441 | 450 | ||
428 | === modified file 'src/core/modules/MinorPlanet.cpp' | |||
429 | --- src/core/modules/MinorPlanet.cpp 2017-11-16 15:27:36 +0000 | |||
430 | +++ src/core/modules/MinorPlanet.cpp 2017-11-23 14:55:50 +0000 | |||
431 | @@ -302,6 +302,23 @@ | |||
432 | 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 />"; |
433 | 303 | } | 303 | } |
434 | 304 | 304 | ||
435 | 305 | if (flags&Velocity) | ||
436 | 306 | { | ||
437 | 307 | // TRANSLATORS: Unit of measure for speed - kilometers per second | ||
438 | 308 | QString kms = qc_("km/s", "speed"); | ||
439 | 309 | |||
440 | 310 | Vec3d orbitalVel=getEclipticVelocity(); | ||
441 | 311 | double orbVel=orbitalVel.length(); | ||
442 | 312 | if (orbVel>0.) | ||
443 | 313 | { // AU/d * km/AU /24 | ||
444 | 314 | double orbVelKms=orbVel* AU/86400.; | ||
445 | 315 | oss << QString("%1: %2 %3").arg(q_("Orbital Velocity")).arg(orbVelKms, 0, 'f', 3).arg(kms) << "<br />"; | ||
446 | 316 | double helioVel=getHeliocentricEclipticVelocity().length(); // just in case we have asteroid moons! | ||
447 | 317 | if (helioVel!=orbVel) | ||
448 | 318 | oss << QString("%1: %2 %3").arg(q_("Heliocentric velocity")).arg(helioVel* AU/86400., 0, 'f', 3).arg(kms) << "<br />"; | ||
449 | 319 | } | ||
450 | 320 | } | ||
451 | 321 | |||
452 | 305 | double angularSize = 2.*getAngularSize(core)*M_PI/180.; | 322 | double angularSize = 2.*getAngularSize(core)*M_PI/180.; |
453 | 306 | if (flags&Size && angularSize>=4.8e-7) | 323 | if (flags&Size && angularSize>=4.8e-7) |
454 | 307 | { | 324 | { |
455 | 308 | 325 | ||
456 | === modified file 'src/core/modules/Orbit.cpp' | |||
457 | --- src/core/modules/Orbit.cpp 2017-03-12 21:25:07 +0000 | |||
458 | +++ src/core/modules/Orbit.cpp 2017-11-23 14:55:50 +0000 | |||
459 | @@ -251,6 +251,7 @@ | |||
460 | 251 | 251 | ||
461 | 252 | void CometOrbit::positionAtTimevInVSOP87Coordinates(double JDE, double *v, bool updateVelocityVector) | 252 | void CometOrbit::positionAtTimevInVSOP87Coordinates(double JDE, double *v, bool updateVelocityVector) |
462 | 253 | { | 253 | { |
463 | 254 | Q_UNUSED(updateVelocityVector); | ||
464 | 254 | JDE -= t0; | 255 | JDE -= t0; |
465 | 255 | double rCosNu,rSinNu; | 256 | double rCosNu,rSinNu; |
466 | 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. |
467 | @@ -261,16 +262,17 @@ | |||
468 | 261 | } | 262 | } |
469 | 262 | else InitPar(q,n,JDE,rCosNu,rSinNu); | 263 | else InitPar(q,n,JDE,rCosNu,rSinNu); |
470 | 263 | double p0,p1,p2, s0, s1, s2; | 264 | double p0,p1,p2, s0, s1, s2; |
472 | 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); |
473 | 266 | Init3D(i,Om,w,rCosNu,rSinNu,p0,p1,p2, s0, s1, s2, true, e, q); | ||
474 | 265 | v[0] = rotateToVsop87[0]*p0 + rotateToVsop87[1]*p1 + rotateToVsop87[2]*p2; | 267 | v[0] = rotateToVsop87[0]*p0 + rotateToVsop87[1]*p1 + rotateToVsop87[2]*p2; |
475 | 266 | v[1] = rotateToVsop87[3]*p0 + rotateToVsop87[4]*p1 + rotateToVsop87[5]*p2; | 268 | v[1] = rotateToVsop87[3]*p0 + rotateToVsop87[4]*p1 + rotateToVsop87[5]*p2; |
476 | 267 | v[2] = rotateToVsop87[6]*p0 + rotateToVsop87[7]*p1 + rotateToVsop87[8]*p2; | 269 | v[2] = rotateToVsop87[6]*p0 + rotateToVsop87[7]*p1 + rotateToVsop87[8]*p2; |
477 | 268 | 270 | ||
480 | 269 | if (updateVelocityVector) | 271 | //if (updateVelocityVector) |
481 | 270 | { | 272 | //{ |
482 | 271 | rdot.set(s0, s1, s2); | 273 | rdot.set(s0, s1, s2); |
483 | 272 | updateTails=true; | 274 | updateTails=true; |
485 | 273 | } | 275 | //} |
486 | 274 | } | 276 | } |
487 | 275 | 277 | ||
488 | 276 | 278 | ||
489 | @@ -459,6 +461,7 @@ | |||
490 | 459 | } | 461 | } |
491 | 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! |
492 | 461 | { | 463 | { |
493 | 464 | Q_ASSERT(0); // We should never come here! | ||
494 | 462 | double a = pericenterDistance / (1.0 - eccentricity); | 465 | double a = pericenterDistance / (1.0 - eccentricity); |
495 | 463 | x = -a * (eccentricity - cosh(E)); | 466 | x = -a * (eccentricity - cosh(E)); |
496 | 464 | z = -a * std::sqrt(eccentricity * eccentricity - 1) * -sinh(E); | 467 | z = -a * std::sqrt(eccentricity * eccentricity - 1) * -sinh(E); |
497 | @@ -466,6 +469,7 @@ | |||
498 | 466 | else | 469 | else |
499 | 467 | { | 470 | { |
500 | 468 | // TODO: Handle parabolic orbits | 471 | // TODO: Handle parabolic orbits |
501 | 472 | Q_ASSERT(0); // We should never come here! | ||
502 | 469 | x = 0.0; | 473 | x = 0.0; |
503 | 470 | z = 0.0; | 474 | z = 0.0; |
504 | 471 | } | 475 | } |
505 | @@ -487,22 +491,6 @@ | |||
506 | 487 | return positionAtE(E); | 491 | return positionAtE(E); |
507 | 488 | } | 492 | } |
508 | 489 | 493 | ||
509 | 490 | //void EllipticalOrbit::positionAtTime(double JDE, double * X, double * Y, double * Z) const | ||
510 | 491 | //{ | ||
511 | 492 | // Vec3d pos = positionAtTime(JDE); | ||
512 | 493 | // *X=pos[2]; | ||
513 | 494 | // *Y=pos[0]; | ||
514 | 495 | // *Z=pos[1]; | ||
515 | 496 | //} | ||
516 | 497 | |||
517 | 498 | //void EllipticalOrbit::positionAtTimev(double JDE, double* v) | ||
518 | 499 | //{ | ||
519 | 500 | // Vec3d pos = positionAtTime(JDE); | ||
520 | 501 | // v[0]=pos[2]; | ||
521 | 502 | // v[1]=pos[0]; | ||
522 | 503 | // v[2]=pos[1]; | ||
523 | 504 | //} | ||
524 | 505 | |||
525 | 506 | void EllipticalOrbit::positionAtTimevInVSOP87Coordinates(const double JDE, double* v) const | 494 | void EllipticalOrbit::positionAtTimevInVSOP87Coordinates(const double JDE, double* v) const |
526 | 507 | { | 495 | { |
527 | 508 | Vec3d pos = positionAtTime(JDE); | 496 | Vec3d pos = positionAtTime(JDE); |
528 | @@ -516,21 +504,23 @@ | |||
529 | 516 | return period; | 504 | return period; |
530 | 517 | } | 505 | } |
531 | 518 | 506 | ||
533 | 519 | 507 | /* Found undocumented and unused in pre-0.17. | |
534 | 508 | // return apocenter distance | ||
535 | 520 | double EllipticalOrbit::getBoundingRadius() const | 509 | double EllipticalOrbit::getBoundingRadius() const |
536 | 521 | { | 510 | { |
537 | 522 | // TODO: watch out for unbounded parabolic and hyperbolic orbits | 511 | // TODO: watch out for unbounded parabolic and hyperbolic orbits |
538 | 523 | return pericenterDistance * ((1.0 + eccentricity) / (1.0 - eccentricity)); | 512 | return pericenterDistance * ((1.0 + eccentricity) / (1.0 - eccentricity)); |
539 | 524 | } | 513 | } |
542 | 525 | 514 | */ | |
543 | 526 | 515 | /* | |
544 | 516 | * Found undocumented and unused pre-0.17. | ||
545 | 527 | void EllipticalOrbit::sample(double, double, int nSamples, OrbitSampleProc& proc) const | 517 | void EllipticalOrbit::sample(double, double, int nSamples, OrbitSampleProc& proc) const |
546 | 528 | { | 518 | { |
547 | 529 | double dE = 2. * M_PI / (double) nSamples; | 519 | double dE = 2. * M_PI / (double) nSamples; |
548 | 530 | for (int i = 0; i < nSamples; i++) | 520 | for (int i = 0; i < nSamples; i++) |
549 | 531 | proc.sample(positionAtE(dE * i)); | 521 | proc.sample(positionAtE(dE * i)); |
550 | 532 | } | 522 | } |
552 | 533 | 523 | */ | |
553 | 534 | /* | 524 | /* |
554 | 535 | * Stuff found unused and deactivated pre-0.15 | 525 | * Stuff found unused and deactivated pre-0.15 |
555 | 536 | Vec3d CachingOrbit::positionAtTime(double JDE) const | 526 | Vec3d CachingOrbit::positionAtTime(double JDE) const |
556 | 537 | 527 | ||
557 | === modified file 'src/core/modules/Orbit.hpp' | |||
558 | --- src/core/modules/Orbit.hpp 2017-03-12 21:25:07 +0000 | |||
559 | +++ src/core/modules/Orbit.hpp 2017-11-23 14:55:50 +0000 | |||
560 | @@ -56,8 +56,8 @@ | |||
561 | 56 | // Original one | 56 | // Original one |
562 | 57 | Vec3d positionAtTime(const double JDE) const; | 57 | Vec3d positionAtTime(const double JDE) const; |
563 | 58 | double getPeriod() const; | 58 | double getPeriod() const; |
566 | 59 | double getBoundingRadius() const; | 59 | // double getBoundingRadius() const; // Return apoapsis distance. UNUSED! |
567 | 60 | virtual void sample(double, double, int, OrbitSampleProc&) const; | 60 | // virtual void sample(double, double, int, OrbitSampleProc&) const; //UNDOCUMENTED & UNUSED |
568 | 61 | 61 | ||
569 | 62 | private: | 62 | private: |
570 | 63 | //! returns eccentric anomaly E for Mean anomaly M | 63 | //! returns eccentric anomaly E for Mean anomaly M |
571 | @@ -98,6 +98,7 @@ | |||
572 | 98 | void setUpdateTails(const bool update){ updateTails=update; } | 98 | void setUpdateTails(const bool update){ updateTails=update; } |
573 | 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) |
574 | 100 | Vec3d getVelocity() const { return rdot; } | 100 | Vec3d getVelocity() const { return rdot; } |
575 | 101 | void getVelocity(double *vel) const { vel[0]=rdot[0]; vel[1]=rdot[1]; vel[2]=rdot[2];} | ||
576 | 101 | double getSemimajorAxis() const { return (e==1. ? 0. : q / (1.-e)); } | 102 | double getSemimajorAxis() const { return (e==1. ? 0. : q / (1.-e)); } |
577 | 102 | double getEccentricity() const { return e; } | 103 | double getEccentricity() const { return e; } |
578 | 103 | bool objectDateValid(const double JDE) const { return (fabs(t0-JDE)<orbitGood); } | 104 | bool objectDateValid(const double JDE) const { return (fabs(t0-JDE)<orbitGood); } |
579 | 104 | 105 | ||
580 | === modified file 'src/core/modules/Planet.cpp' | |||
581 | --- src/core/modules/Planet.cpp 2017-11-16 15:27:36 +0000 | |||
582 | +++ src/core/modules/Planet.cpp 2017-11-23 14:55:50 +0000 | |||
583 | @@ -197,6 +197,7 @@ | |||
584 | 197 | radius(radius), | 197 | radius(radius), |
585 | 198 | oneMinusOblateness(1.0-oblateness), | 198 | oneMinusOblateness(1.0-oblateness), |
586 | 199 | eclipticPos(0.,0.,0.), | 199 | eclipticPos(0.,0.,0.), |
587 | 200 | eclipticVelocity(0.,0.,0.), | ||
588 | 200 | haloColor(halocolor), | 201 | haloColor(halocolor), |
589 | 201 | absoluteMagnitude(-99.0f), | 202 | absoluteMagnitude(-99.0f), |
590 | 202 | albedo(albedo), | 203 | albedo(albedo), |
591 | @@ -487,6 +488,26 @@ | |||
592 | 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 />"; |
593 | 488 | } | 489 | } |
594 | 489 | 490 | ||
595 | 491 | if (flags&Velocity) | ||
596 | 492 | { | ||
597 | 493 | // TRANSLATORS: Unit of measure for speed - kilometers per second | ||
598 | 494 | QString kms = qc_("km/s", "speed"); | ||
599 | 495 | |||
600 | 496 | Vec3d orbitalVel=getEclipticVelocity(); | ||
601 | 497 | double orbVel=orbitalVel.length(); | ||
602 | 498 | if (orbVel>0.) | ||
603 | 499 | { // AU/d * km/AU /24 | ||
604 | 500 | double orbVelKms=orbVel* AU/86400.; | ||
605 | 501 | if (englishName=="moon") | ||
606 | 502 | orbVelKms=orbVel; | ||
607 | 503 | oss << QString("%1: %2 %3").arg(q_("Orbital Velocity")).arg(orbVelKms, 0, 'f', 3).arg(kms) << "<br />"; | ||
608 | 504 | double helioVel=getHeliocentricEclipticVelocity().length(); | ||
609 | 505 | if (helioVel!=orbVel) | ||
610 | 506 | oss << QString("%1: %2 %3").arg(q_("Heliocentric Velocity")).arg(helioVel* AU/86400., 0, 'f', 3).arg(kms) << "<br />"; | ||
611 | 507 | } | ||
612 | 508 | } | ||
613 | 509 | |||
614 | 510 | |||
615 | 490 | double angularSize = 2.*getAngularSize(core)*M_PI/180.; | 511 | double angularSize = 2.*getAngularSize(core)*M_PI/180.; |
616 | 491 | if (flags&Size && angularSize>=4.8e-7) | 512 | if (flags&Size && angularSize>=4.8e-7) |
617 | 492 | { | 513 | { |
618 | @@ -649,6 +670,9 @@ | |||
619 | 649 | map.insert("elongation-deg", StelUtils::radToDecDegStr(elongation)); | 670 | map.insert("elongation-deg", StelUtils::radToDecDegStr(elongation)); |
620 | 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. |
621 | 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? |
622 | 673 | map.insert("velocity", getEclipticVelocity().toString()); | ||
623 | 674 | map.insert("heliocentric-velocity", getHeliocentricEclipticVelocity().toString()); | ||
624 | 675 | |||
625 | 652 | } | 676 | } |
626 | 653 | 677 | ||
627 | 654 | return map; | 678 | return map; |
628 | @@ -738,7 +762,7 @@ | |||
629 | 738 | { | 762 | { |
630 | 739 | if (fabs(lastJDE-dateJDE)>deltaJDE) | 763 | if (fabs(lastJDE-dateJDE)>deltaJDE) |
631 | 740 | { | 764 | { |
633 | 741 | coordFunc(dateJDE, eclipticPos, orbitPtr); | 765 | coordFunc(dateJDE, eclipticPos, eclipticVelocity, orbitPtr); |
634 | 742 | lastJDE = dateJDE; | 766 | lastJDE = dateJDE; |
635 | 743 | } | 767 | } |
636 | 744 | } | 768 | } |
637 | @@ -851,11 +875,11 @@ | |||
638 | 851 | computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date); | 875 | computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date); |
639 | 852 | if (osculatingFunc) | 876 | if (osculatingFunc) |
640 | 853 | { | 877 | { |
642 | 854 | (*osculatingFunc)(dateJDE,calc_date,eclipticPos); | 878 | (*osculatingFunc)(dateJDE,calc_date,eclipticPos, eclipticVelocity); |
643 | 855 | } | 879 | } |
644 | 856 | else | 880 | else |
645 | 857 | { | 881 | { |
647 | 858 | coordFunc(calc_date, eclipticPos, orbitPtr); | 882 | coordFunc(calc_date, eclipticPos, eclipticVelocity, orbitPtr); |
648 | 859 | } | 883 | } |
649 | 860 | orbitP[d] = eclipticPos; | 884 | orbitP[d] = eclipticPos; |
650 | 861 | orbit[d] = getHeliocentricEclipticPos(); | 885 | orbit[d] = getHeliocentricEclipticPos(); |
651 | @@ -881,11 +905,11 @@ | |||
652 | 881 | 905 | ||
653 | 882 | computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date); | 906 | computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date); |
654 | 883 | if (osculatingFunc) { | 907 | if (osculatingFunc) { |
656 | 884 | (*osculatingFunc)(dateJDE,calc_date,eclipticPos); | 908 | (*osculatingFunc)(dateJDE,calc_date,eclipticPos, eclipticVelocity); |
657 | 885 | } | 909 | } |
658 | 886 | else | 910 | else |
659 | 887 | { | 911 | { |
661 | 888 | coordFunc(calc_date, eclipticPos, orbitPtr); | 912 | coordFunc(calc_date, eclipticPos, eclipticVelocity, orbitPtr); |
662 | 889 | } | 913 | } |
663 | 890 | orbitP[d] = eclipticPos; | 914 | orbitP[d] = eclipticPos; |
664 | 891 | orbit[d] = getHeliocentricEclipticPos(); | 915 | orbit[d] = getHeliocentricEclipticPos(); |
665 | @@ -910,11 +934,11 @@ | |||
666 | 910 | computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date); | 934 | computeTransMatrix(calc_date-core->computeDeltaT(calc_date)/86400.0, calc_date); |
667 | 911 | if (osculatingFunc) | 935 | if (osculatingFunc) |
668 | 912 | { | 936 | { |
670 | 913 | (*osculatingFunc)(dateJDE,calc_date,eclipticPos); | 937 | (*osculatingFunc)(dateJDE,calc_date,eclipticPos, eclipticVelocity); |
671 | 914 | } | 938 | } |
672 | 915 | else | 939 | else |
673 | 916 | { | 940 | { |
675 | 917 | coordFunc(calc_date, eclipticPos, orbitPtr); | 941 | coordFunc(calc_date, eclipticPos, eclipticVelocity, orbitPtr); |
676 | 918 | } | 942 | } |
677 | 919 | orbitP[d] = eclipticPos; | 943 | orbitP[d] = eclipticPos; |
678 | 920 | orbit[d] = getHeliocentricEclipticPos(); | 944 | orbit[d] = getHeliocentricEclipticPos(); |
679 | @@ -926,7 +950,7 @@ | |||
680 | 926 | 950 | ||
681 | 927 | 951 | ||
682 | 928 | // calculate actual Planet position | 952 | // calculate actual Planet position |
684 | 929 | coordFunc(dateJDE, eclipticPos, orbitPtr); | 953 | coordFunc(dateJDE, eclipticPos, eclipticVelocity, orbitPtr); |
685 | 930 | 954 | ||
686 | 931 | lastJDE = dateJDE; | 955 | lastJDE = dateJDE; |
687 | 932 | 956 | ||
688 | @@ -934,7 +958,7 @@ | |||
689 | 934 | else if (fabs(lastJDE-dateJDE)>deltaJDE) | 958 | else if (fabs(lastJDE-dateJDE)>deltaJDE) |
690 | 935 | { | 959 | { |
691 | 936 | // calculate actual Planet position | 960 | // calculate actual Planet position |
693 | 937 | coordFunc(dateJDE, eclipticPos, orbitPtr); | 961 | coordFunc(dateJDE, eclipticPos, eclipticVelocity, orbitPtr); |
694 | 938 | if (orbitFader.getInterstate()>0.000001) | 962 | if (orbitFader.getInterstate()>0.000001) |
695 | 939 | for( int d=0; d<ORBIT_SEGMENTS; d++ ) | 963 | for( int d=0; d<ORBIT_SEGMENTS; d++ ) |
696 | 940 | orbit[d]=getHeliocentricPos(orbitP[d]); | 964 | orbit[d]=getHeliocentricPos(orbitP[d]); |
697 | @@ -1132,6 +1156,23 @@ | |||
698 | 1132 | } | 1156 | } |
699 | 1133 | } | 1157 | } |
700 | 1134 | } | 1158 | } |
701 | 1159 | // Return heliocentric velocity of planet. | ||
702 | 1160 | Vec3d Planet::getHeliocentricEclipticVelocity() const | ||
703 | 1161 | { | ||
704 | 1162 | // Note: using shared copies is too slow here. So we use direct access | ||
705 | 1163 | // instead. | ||
706 | 1164 | Vec3d vel = eclipticVelocity; | ||
707 | 1165 | const Planet* pp = parent.data(); | ||
708 | 1166 | if (pp) | ||
709 | 1167 | { | ||
710 | 1168 | while (pp->parent.data()) | ||
711 | 1169 | { | ||
712 | 1170 | vel += pp->eclipticVelocity; | ||
713 | 1171 | pp = pp->parent.data(); | ||
714 | 1172 | } | ||
715 | 1173 | } | ||
716 | 1174 | return vel; | ||
717 | 1175 | } | ||
718 | 1135 | 1176 | ||
719 | 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) |
720 | 1137 | // This is called by SolarSystem::draw() | 1178 | // This is called by SolarSystem::draw() |
721 | 1138 | 1179 | ||
722 | === modified file 'src/core/modules/Planet.hpp' | |||
723 | --- src/core/modules/Planet.hpp 2017-10-28 04:59:28 +0000 | |||
724 | +++ src/core/modules/Planet.hpp 2017-11-23 14:55:50 +0000 | |||
725 | @@ -31,10 +31,11 @@ | |||
726 | 31 | #include <QString> | 31 | #include <QString> |
727 | 32 | 32 | ||
728 | 33 | // The callback type for the external position computation function | 33 | // The callback type for the external position computation function |
729 | 34 | // arguments are JDE, position[3], velocity[3]. | ||
730 | 34 | // The last variable is the userData pointer. | 35 | // The last variable is the userData pointer. |
732 | 35 | typedef void (*posFuncType)(double, double*, void*); | 36 | typedef void (*posFuncType)(double, double*, double*, void*); |
733 | 36 | 37 | ||
735 | 37 | typedef void (OsculatingFunctType)(double jde0,double jde,double xyz[3]); | 38 | typedef void (OsculatingFunctType)(double jde0,double jde,double xyz[3], double xyzdot[3]); |
736 | 38 | 39 | ||
737 | 39 | // epoch J2000: 12 UT on 1 Jan 2000 | 40 | // epoch J2000: 12 UT on 1 Jan 2000 |
738 | 40 | #define J2000 2451545.0 | 41 | #define J2000 2451545.0 |
739 | @@ -289,21 +290,27 @@ | |||
740 | 289 | //! Get the Planet position in the parent Planet ecliptic coordinate in AU | 290 | //! Get the Planet position in the parent Planet ecliptic coordinate in AU |
741 | 290 | Vec3d getEclipticPos() const; | 291 | Vec3d getEclipticPos() const; |
742 | 291 | 292 | ||
744 | 292 | // Return the heliocentric ecliptical position | 293 | //! Return the heliocentric ecliptical position |
745 | 293 | Vec3d getHeliocentricEclipticPos() const {return getHeliocentricPos(eclipticPos);} | 294 | Vec3d getHeliocentricEclipticPos() const {return getHeliocentricPos(eclipticPos);} |
746 | 294 | 295 | ||
748 | 295 | // Return the heliocentric transformation for local coordinate | 296 | //! Return the heliocentric transformation for local coordinate |
749 | 296 | Vec3d getHeliocentricPos(Vec3d) const; | 297 | Vec3d getHeliocentricPos(Vec3d) const; |
750 | 297 | void setHeliocentricEclipticPos(const Vec3d &pos); | 298 | void setHeliocentricEclipticPos(const Vec3d &pos); |
751 | 298 | 299 | ||
753 | 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 |
754 | 301 | Vec3d getEclipticVelocity() const {return eclipticVelocity;} | ||
755 | 302 | |||
756 | 303 | //! Get the planet's heliocentric velocity in the solar system in ecliptical coordinates in AU/d. Required for aberration! | ||
757 | 304 | Vec3d getHeliocentricEclipticVelocity() const; | ||
758 | 305 | |||
759 | 306 | //! Compute the distance to the given position in heliocentric coordinates (in AU) | ||
760 | 300 | double computeDistance(const Vec3d& obsHelioPos); | 307 | double computeDistance(const Vec3d& obsHelioPos); |
761 | 301 | double getDistance(void) const {return distance;} | 308 | double getDistance(void) const {return distance;} |
762 | 302 | 309 | ||
763 | 303 | void setRings(Ring* r) {rings = r;} | 310 | void setRings(Ring* r) {rings = r;} |
764 | 304 | 311 | ||
765 | 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; } } |
767 | 306 | float getSphereScale() { return sphereScale; } | 313 | float getSphereScale() const { return sphereScale; } |
768 | 307 | 314 | ||
769 | 308 | const QSharedPointer<Planet> getParent(void) const {return parent;} | 315 | const QSharedPointer<Planet> getParent(void) const {return parent;} |
770 | 309 | 316 | ||
771 | @@ -321,11 +328,11 @@ | |||
772 | 321 | 328 | ||
773 | 322 | bool flagNativeName; | 329 | bool flagNativeName; |
774 | 323 | void setFlagNativeName(bool b) { flagNativeName = b; } | 330 | void setFlagNativeName(bool b) { flagNativeName = b; } |
776 | 324 | bool getFlagNativeName(void) { return flagNativeName; } | 331 | bool getFlagNativeName(void) const { return flagNativeName; } |
777 | 325 | 332 | ||
778 | 326 | bool flagTranslatedName; | 333 | bool flagTranslatedName; |
779 | 327 | void setFlagTranslatedName(bool b) { flagTranslatedName = b; } | 334 | void setFlagTranslatedName(bool b) { flagTranslatedName = b; } |
781 | 328 | bool getFlagTranslatedName(void) { return flagTranslatedName; } | 335 | bool getFlagTranslatedName(void) const { return flagTranslatedName; } |
782 | 329 | 336 | ||
783 | 330 | /////////////////////////////////////////////////////////////////////////// | 337 | /////////////////////////////////////////////////////////////////////////// |
784 | 331 | // DEPRECATED | 338 | // DEPRECATED |
785 | @@ -457,7 +464,6 @@ | |||
786 | 457 | StelOBJ* obj; | 464 | StelOBJ* obj; |
787 | 458 | //! The opengl array, created by loadObjModel() but filled later in main thread | 465 | //! The opengl array, created by loadObjModel() but filled later in main thread |
788 | 459 | StelOpenGLArray* arr; | 466 | StelOpenGLArray* arr; |
789 | 460 | |||
790 | 461 | }; | 467 | }; |
791 | 462 | 468 | ||
792 | 463 | static StelTextureSP texEarthShadow; // for lunar eclipses | 469 | static StelTextureSP texEarthShadow; // for lunar eclipses |
793 | @@ -499,10 +505,13 @@ | |||
794 | 499 | RotationElements re; // Rotation param | 505 | RotationElements re; // Rotation param |
795 | 500 | double radius; // Planet radius in AU | 506 | double radius; // Planet radius in AU |
796 | 501 | double oneMinusOblateness; // (polar radius)/(equatorial radius) | 507 | double oneMinusOblateness; // (polar radius)/(equatorial radius) |
799 | 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. |
800 | 503 | // centered on the parent Planet | 509 | // To get heliocentric coordinates, use getHeliocentricEclipticPos() |
801 | 510 | Vec3d eclipticVelocity; // Speed in AU/d in the rectangular ecliptic coordinate system (J2000) around the parent body. | ||
802 | 511 | // NEW FEATURE in late 2017. For now, this may be 0/0/0 when we are not yet able to compute it. | ||
803 | 512 | // to get velocity, preferrably read getEclipticVelocity() and getHeliocentricEclipticVelocity() | ||
804 | 513 | // The "State Vector" [Heafner 1999] can be formed from (JDE, eclipticPos, eclipticVelocity) | ||
805 | 504 | Vec3d screenPos; // Used to store temporarily the 2D position on screen | 514 | Vec3d screenPos; // Used to store temporarily the 2D position on screen |
806 | 505 | // Vec3d previousScreenPos; // The position of this planet in the previous frame. 0.16pre: DEAD CODE! | ||
807 | 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. |
808 | 507 | 516 | ||
809 | 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. |
810 | 509 | 518 | ||
811 | === modified file 'src/core/modules/SolarSystem.cpp' | |||
812 | --- src/core/modules/SolarSystem.cpp 2017-10-21 12:47:45 +0000 | |||
813 | +++ src/core/modules/SolarSystem.cpp 2017-11-23 14:55:50 +0000 | |||
814 | @@ -394,13 +394,16 @@ | |||
815 | 394 | } | 394 | } |
816 | 395 | } | 395 | } |
817 | 396 | 396 | ||
819 | 397 | void ellipticalOrbitPosFunc(double jd,double xyz[3], void* userDataPtr) | 397 | void ellipticalOrbitPosFunc(double jd,double xyz[3], double xyzdot[3], void* orbitPtr) |
820 | 398 | { | 398 | { |
822 | 399 | static_cast<EllipticalOrbit*>(userDataPtr)->positionAtTimevInVSOP87Coordinates(jd, xyz); | 399 | static_cast<EllipticalOrbit*>(orbitPtr)->positionAtTimevInVSOP87Coordinates(jd, xyz); |
823 | 400 | // TODO: Implement a way to retrieve velocities. | ||
824 | 401 | xyzdot[0]=xyzdot[1]=xyzdot[2]=0.0; | ||
825 | 400 | } | 402 | } |
827 | 401 | void cometOrbitPosFunc(double jd,double xyz[3], void* userDataPtr) | 403 | void cometOrbitPosFunc(double jd,double xyz[3], double xyzdot[3], void* orbitPtr) |
828 | 402 | { | 404 | { |
830 | 403 | static_cast<CometOrbit*>(userDataPtr)->positionAtTimevInVSOP87Coordinates(jd, xyz); | 405 | static_cast<CometOrbit*>(orbitPtr)->positionAtTimevInVSOP87Coordinates(jd, xyz, true); |
831 | 406 | static_cast<CometOrbit*>(orbitPtr)->getVelocity(xyzdot); | ||
832 | 404 | } | 407 | } |
833 | 405 | 408 | ||
834 | 406 | // Init and load the solar system data (2 files) | 409 | // Init and load the solar system data (2 files) |
835 | @@ -638,9 +641,8 @@ | |||
836 | 638 | if (pericenterDistance <= 0.0) { | 641 | if (pericenterDistance <= 0.0) { |
837 | 639 | semi_major_axis = pd.value(secname+"/orbit_SemiMajorAxis",-1e100).toDouble(); | 642 | semi_major_axis = pd.value(secname+"/orbit_SemiMajorAxis",-1e100).toDouble(); |
838 | 640 | if (semi_major_axis <= -1e100) { | 643 | if (semi_major_axis <= -1e100) { |
840 | 641 | qDebug() << "ERROR: " << englishName | 644 | qDebug() << "ERROR loading " << englishName |
841 | 642 | << ": you must provide orbit_PericenterDistance or orbit_SemiMajorAxis"; | 645 | << ": you must provide orbit_PericenterDistance or orbit_SemiMajorAxis"; |
842 | 643 | //abort(); | ||
843 | 644 | continue; | 646 | continue; |
844 | 645 | } else { | 647 | } else { |
845 | 646 | semi_major_axis /= AU; | 648 | semi_major_axis /= AU; |
846 | @@ -692,12 +694,8 @@ | |||
847 | 692 | } | 694 | } |
848 | 693 | 695 | ||
849 | 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: |
856 | 695 | const double parentRotObliquity = parent->getParent() | 697 | const double parentRotObliquity = parent->getParent() ? parent->getRotObliquity(2451545.0) : 0.0; |
857 | 696 | ? parent->getRotObliquity(2451545.0) | 698 | const double parent_rot_asc_node = parent->getParent() ? parent->getRotAscendingNode() : 0.0; |
852 | 697 | : 0.0; | ||
853 | 698 | const double parent_rot_asc_node = parent->getParent() | ||
854 | 699 | ? parent->getRotAscendingNode() | ||
855 | 700 | : 0.0; | ||
858 | 701 | double parent_rot_j2000_longitude = 0.0; | 699 | double parent_rot_j2000_longitude = 0.0; |
859 | 702 | if (parent->getParent()) { | 700 | if (parent->getParent()) { |
860 | 703 | const double c_obl = cos(parentRotObliquity); | 701 | const double c_obl = cos(parentRotObliquity); |
861 | @@ -714,16 +712,16 @@ | |||
862 | 714 | } | 712 | } |
863 | 715 | 713 | ||
864 | 716 | // Create an elliptical orbit | 714 | // Create an elliptical orbit |
875 | 717 | EllipticalOrbit *orb = new EllipticalOrbit(pericenterDistance, | 715 | EllipticalOrbit *orb = new EllipticalOrbit(pericenterDistance, // [AU] |
876 | 718 | eccentricity, | 716 | eccentricity, // 0..>1, but practically only 0..1 |
877 | 719 | inclination, | 717 | inclination, // [radians] |
878 | 720 | ascending_node, | 718 | ascending_node, // [radians] |
879 | 721 | arg_of_pericenter, | 719 | arg_of_pericenter, // [radians] |
880 | 722 | mean_anomaly, | 720 | mean_anomaly, // [radians] |
881 | 723 | period, | 721 | period, // [days] |
882 | 724 | epoch, | 722 | epoch, // [JDE] |
883 | 725 | parentRotObliquity, | 723 | parentRotObliquity, // [radians] |
884 | 726 | parent_rot_asc_node, | 724 | parent_rot_asc_node, // [radians] |
885 | 727 | parent_rot_j2000_longitude); | 725 | parent_rot_j2000_longitude); |
886 | 728 | orbits.push_back(orb); | 726 | orbits.push_back(orb); |
887 | 729 | 727 | ||
888 | 730 | 728 | ||
889 | === modified file 'src/core/planetsephems/EphemWrapper.cpp' | |||
890 | --- src/core/planetsephems/EphemWrapper.cpp 2017-03-17 20:17:25 +0000 | |||
891 | +++ src/core/planetsephems/EphemWrapper.cpp 2017-11-23 14:55:50 +0000 | |||
892 | @@ -95,9 +95,10 @@ | |||
893 | 95 | } | 95 | } |
894 | 96 | 96 | ||
895 | 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. |
897 | 98 | void get_planet_helio_coordsv(const double jd, double xyz[3], const int planet_id) | 98 | void get_planet_helio_coordsv(const double jd, double xyz[3], double xyzdot[3], const int planet_id) |
898 | 99 | { | 99 | { |
899 | 100 | bool deOk=false; | 100 | bool deOk=false; |
900 | 101 | double xyz6[6]; | ||
901 | 101 | if(!std::isfinite(jd)) | 102 | if(!std::isfinite(jd)) |
902 | 102 | { | 103 | { |
903 | 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; |
904 | @@ -106,23 +107,27 @@ | |||
905 | 106 | 107 | ||
906 | 107 | if(use_de430(jd)) | 108 | if(use_de430(jd)) |
907 | 108 | { | 109 | { |
909 | 109 | deOk=GetDe430Coor(jd, planet_id + 1, xyz); | 110 | deOk=GetDe430Coor(jd, planet_id + 1, xyz6); |
910 | 110 | } | 111 | } |
911 | 111 | else if(use_de431(jd)) | 112 | else if(use_de431(jd)) |
912 | 112 | { | 113 | { |
914 | 113 | deOk=GetDe431Coor(jd, planet_id + 1, xyz); | 114 | deOk=GetDe431Coor(jd, planet_id + 1, xyz6); |
915 | 114 | } | 115 | } |
916 | 115 | if (!deOk) //VSOP87 as fallback | 116 | if (!deOk) //VSOP87 as fallback |
917 | 116 | { | 117 | { |
919 | 117 | GetVsop87Coor(jd, planet_id, xyz); | 118 | GetVsop87Coor(jd, planet_id, xyz6); |
920 | 118 | } | 119 | } |
921 | 120 | xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2]; | ||
922 | 121 | xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5]; | ||
923 | 122 | |||
924 | 119 | } | 123 | } |
925 | 120 | 124 | ||
926 | 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). |
927 | 122 | // For ephemerides like DE4xx, JDE0 is irrelevant. | 126 | // For ephemerides like DE4xx, JDE0 is irrelevant. |
929 | 123 | void get_planet_helio_osculating_coordsv(double jd0, double jd, double xyz[3], int planet_id) | 127 | void get_planet_helio_osculating_coordsv(double jd0, double jd, double xyz[3], double xyzdot[3], int planet_id) |
930 | 124 | { | 128 | { |
931 | 125 | bool deOk=false; | 129 | bool deOk=false; |
932 | 130 | double xyz6[6]; | ||
933 | 126 | if(!(std::isfinite(jd) && std::isfinite(jd0))) | 131 | if(!(std::isfinite(jd) && std::isfinite(jd0))) |
934 | 127 | { | 132 | { |
935 | 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; |
936 | @@ -131,16 +136,18 @@ | |||
937 | 131 | 136 | ||
938 | 132 | if(use_de430(jd)) | 137 | if(use_de430(jd)) |
939 | 133 | { | 138 | { |
941 | 134 | deOk=GetDe430Coor(jd, planet_id + 1, xyz); | 139 | deOk=GetDe430Coor(jd, planet_id + 1, xyz6); |
942 | 135 | } | 140 | } |
943 | 136 | else if(use_de431(jd)) | 141 | else if(use_de431(jd)) |
944 | 137 | { | 142 | { |
946 | 138 | deOk=GetDe431Coor(jd, planet_id + 1, xyz); | 143 | deOk=GetDe431Coor(jd, planet_id + 1, xyz6); |
947 | 139 | } | 144 | } |
948 | 140 | if (!deOk) //VSOP87 as fallback | 145 | if (!deOk) //VSOP87 as fallback |
949 | 141 | { | 146 | { |
951 | 142 | GetVsop87OsculatingCoor(jd0, jd, planet_id, xyz); | 147 | GetVsop87OsculatingCoor(jd0, jd, planet_id, xyz6); |
952 | 143 | } | 148 | } |
953 | 149 | xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2]; | ||
954 | 150 | xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5]; | ||
955 | 144 | } | 151 | } |
956 | 145 | 152 | ||
957 | 146 | /* Chapter 31 Pg 206-207 Equ 31.1 31.2, 31.3 using VSOP 87 | 153 | /* Chapter 31 Pg 206-207 Equ 31.1 31.2, 31.3 using VSOP 87 |
958 | @@ -148,10 +155,11 @@ | |||
959 | 148 | * for given Julian Day. Values are in AU. | 155 | * for given Julian Day. Values are in AU. |
960 | 149 | * params : Julian day, rect coords */ | 156 | * params : Julian day, rect coords */ |
961 | 150 | 157 | ||
963 | 151 | void get_pluto_helio_coordsv(double jd,double xyz[3], void* unused) | 158 | void get_pluto_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused) |
964 | 152 | { | 159 | { |
965 | 153 | Q_UNUSED(unused); | 160 | Q_UNUSED(unused); |
966 | 154 | bool deOk=false; | 161 | bool deOk=false; |
967 | 162 | double xyz6[6]; | ||
968 | 155 | if(!std::isfinite(jd)) | 163 | if(!std::isfinite(jd)) |
969 | 156 | { | 164 | { |
970 | 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; |
971 | @@ -160,41 +168,50 @@ | |||
972 | 160 | 168 | ||
973 | 161 | if(use_de430(jd)) | 169 | if(use_de430(jd)) |
974 | 162 | { | 170 | { |
976 | 163 | deOk=GetDe430Coor(jd, EPHEM_JPL_PLUTO_ID, xyz); | 171 | deOk=GetDe430Coor(jd, EPHEM_JPL_PLUTO_ID, xyz6); |
977 | 164 | } | 172 | } |
978 | 165 | else if(use_de431(jd)) | 173 | else if(use_de431(jd)) |
979 | 166 | { | 174 | { |
983 | 167 | deOk=GetDe431Coor(jd, EPHEM_JPL_PLUTO_ID, xyz); | 175 | deOk=GetDe431Coor(jd, EPHEM_JPL_PLUTO_ID, xyz6); |
984 | 168 | } | 176 | } |
985 | 169 | if (!deOk) // fallback to previous solution | 177 | |
986 | 178 | if (deOk) | ||
987 | 179 | { | ||
988 | 180 | xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2]; | ||
989 | 181 | xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5]; | ||
990 | 182 | } | ||
991 | 183 | else // fallback to previous solution | ||
992 | 170 | { | 184 | { |
993 | 171 | get_pluto_helio_coords(jd, &xyz[0], &xyz[1], &xyz[2]); | 185 | get_pluto_helio_coords(jd, &xyz[0], &xyz[1], &xyz[2]); |
994 | 186 | xyzdot[0]=xyzdot[1]=xyzdot[2]=0.0; // TODO: Some meaningful way to get speed? | ||
995 | 172 | } | 187 | } |
996 | 173 | } | 188 | } |
997 | 174 | 189 | ||
998 | 175 | /* Return 0 for the sun */ | 190 | /* Return 0 for the sun */ |
1000 | 176 | void get_sun_helio_coordsv(double jd,double xyz[3], void* unused) | 191 | void get_sun_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused) |
1001 | 177 | { | 192 | { |
1002 | 178 | Q_UNUSED(jd); | 193 | Q_UNUSED(jd); |
1003 | 179 | Q_UNUSED(unused); | 194 | Q_UNUSED(unused); |
1019 | 180 | xyz[0]=0.; xyz[1]=0.; xyz[2]=0.; | 195 | xyz[0] =0.; xyz[1] =0.; xyz[2] =0.; |
1020 | 181 | } | 196 | xyzdot[0]=0.; xyzdot[1]=0.; xyzdot[2]=0.; |
1021 | 182 | 197 | } | |
1022 | 183 | void get_mercury_helio_coordsv(double jd,double xyz[3], void* unused) | 198 | |
1023 | 184 | { | 199 | void get_mercury_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused) |
1024 | 185 | Q_UNUSED(unused); | 200 | { |
1025 | 186 | get_planet_helio_coordsv(jd, xyz, EPHEM_MERCURY_ID); | 201 | Q_UNUSED(unused); |
1026 | 187 | } | 202 | get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_MERCURY_ID); |
1027 | 188 | void get_venus_helio_coordsv(double jd,double xyz[3], void* unused) | 203 | } |
1028 | 189 | { | 204 | void get_venus_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused) |
1029 | 190 | Q_UNUSED(unused); | 205 | { |
1030 | 191 | get_planet_helio_coordsv(jd, xyz, EPHEM_VENUS_ID); | 206 | Q_UNUSED(unused); |
1031 | 192 | } | 207 | get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_VENUS_ID); |
1032 | 193 | 208 | } | |
1033 | 194 | void get_earth_helio_coordsv(const double jd,double xyz[3], void* unused) | 209 | |
1034 | 210 | void get_earth_helio_coordsv(const double jd,double xyz[3], double xyzdot[3], void* unused) | ||
1035 | 195 | { | 211 | { |
1036 | 196 | Q_UNUSED(unused); | 212 | Q_UNUSED(unused); |
1037 | 197 | bool deOk=false; | 213 | bool deOk=false; |
1038 | 214 | double xyz6[6]; | ||
1039 | 198 | if(!std::isfinite(jd)) | 215 | if(!std::isfinite(jd)) |
1040 | 199 | { | 216 | { |
1041 | 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; |
1042 | @@ -203,94 +220,97 @@ | |||
1043 | 203 | 220 | ||
1044 | 204 | if(use_de430(jd)) | 221 | if(use_de430(jd)) |
1045 | 205 | { | 222 | { |
1047 | 206 | deOk=GetDe430Coor(jd, EPHEM_JPL_EARTH_ID, xyz); | 223 | deOk=GetDe430Coor(jd, EPHEM_JPL_EARTH_ID, xyz6); |
1048 | 207 | } | 224 | } |
1049 | 208 | else if(use_de431(jd)) | 225 | else if(use_de431(jd)) |
1050 | 209 | { | 226 | { |
1052 | 210 | deOk=GetDe431Coor(jd, EPHEM_JPL_EARTH_ID, xyz); | 227 | deOk=GetDe431Coor(jd, EPHEM_JPL_EARTH_ID, xyz6); |
1053 | 211 | } | 228 | } |
1054 | 212 | if (!deOk) //VSOP87 as fallback | 229 | if (!deOk) //VSOP87 as fallback |
1055 | 213 | { | 230 | { |
1056 | 214 | double moon[3]; | 231 | double moon[3]; |
1058 | 215 | GetVsop87Coor(jd,EPHEM_EMB_ID,xyz); | 232 | GetVsop87Coor(jd,EPHEM_EMB_ID,xyz6); |
1059 | 216 | GetElp82bCoor(jd,moon); | 233 | GetElp82bCoor(jd,moon); |
1060 | 217 | /* Earth != EMB: | 234 | /* Earth != EMB: |
1061 | 218 | 0.0121505677733761 = mu_m/(1+mu_m), | 235 | 0.0121505677733761 = mu_m/(1+mu_m), |
1062 | 219 | mu_m = mass(moon)/mass(earth) = 0.01230002 */ | 236 | mu_m = mass(moon)/mass(earth) = 0.01230002 */ |
1066 | 220 | xyz[0] -= 0.0121505677733761 * moon[0]; | 237 | xyz6[0] -= 0.0121505677733761 * moon[0]; |
1067 | 221 | xyz[1] -= 0.0121505677733761 * moon[1]; | 238 | xyz6[1] -= 0.0121505677733761 * moon[1]; |
1068 | 222 | xyz[2] -= 0.0121505677733761 * moon[2]; | 239 | xyz6[2] -= 0.0121505677733761 * moon[2]; |
1069 | 240 | // TODO: HOW TO FIX EARTH SPEED? | ||
1070 | 223 | } | 241 | } |
1141 | 224 | } | 242 | xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2]; |
1142 | 225 | 243 | xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5]; | |
1143 | 226 | void get_mars_helio_coordsv(double jd,double xyz[3], void* unused) | 244 | } |
1144 | 227 | { | 245 | |
1145 | 228 | Q_UNUSED(unused); | 246 | void get_mars_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused) |
1146 | 229 | get_planet_helio_coordsv(jd, xyz, EPHEM_MARS_ID); | 247 | { |
1147 | 230 | } | 248 | Q_UNUSED(unused); |
1148 | 231 | 249 | get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_MARS_ID); | |
1149 | 232 | void get_jupiter_helio_coordsv(double jd,double xyz[3], void* unused) | 250 | } |
1150 | 233 | { | 251 | |
1151 | 234 | Q_UNUSED(unused); | 252 | void get_jupiter_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused) |
1152 | 235 | get_planet_helio_coordsv(jd, xyz, EPHEM_JUPITER_ID); | 253 | { |
1153 | 236 | } | 254 | Q_UNUSED(unused); |
1154 | 237 | 255 | get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_JUPITER_ID); | |
1155 | 238 | void get_saturn_helio_coordsv(double jd,double xyz[3], void* unused) | 256 | } |
1156 | 239 | { | 257 | |
1157 | 240 | Q_UNUSED(unused); | 258 | void get_saturn_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused) |
1158 | 241 | get_planet_helio_coordsv(jd, xyz, EPHEM_SATURN_ID); | 259 | { |
1159 | 242 | } | 260 | Q_UNUSED(unused); |
1160 | 243 | 261 | get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_SATURN_ID); | |
1161 | 244 | void get_uranus_helio_coordsv(double jd,double xyz[3], void* unused) | 262 | } |
1162 | 245 | { | 263 | |
1163 | 246 | Q_UNUSED(unused); | 264 | void get_uranus_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused) |
1164 | 247 | get_planet_helio_coordsv(jd, xyz, EPHEM_URANUS_ID); | 265 | { |
1165 | 248 | } | 266 | Q_UNUSED(unused); |
1166 | 249 | 267 | get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_URANUS_ID); | |
1167 | 250 | void get_neptune_helio_coordsv(double jd,double xyz[3], void* unused) | 268 | } |
1168 | 251 | { | 269 | |
1169 | 252 | Q_UNUSED(unused); | 270 | void get_neptune_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void* unused) |
1170 | 253 | get_planet_helio_coordsv(jd, xyz, EPHEM_NEPTUNE_ID); | 271 | { |
1171 | 254 | } | 272 | Q_UNUSED(unused); |
1172 | 255 | 273 | get_planet_helio_coordsv(jd, xyz, xyzdot, EPHEM_NEPTUNE_ID); | |
1173 | 256 | void get_mercury_helio_osculating_coords(double jd0,double jd,double xyz[3]) | 274 | } |
1174 | 257 | { | 275 | |
1175 | 258 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_MERCURY_ID); | 276 | void get_mercury_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]) |
1176 | 259 | } | 277 | { |
1177 | 260 | 278 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_MERCURY_ID); | |
1178 | 261 | void get_venus_helio_osculating_coords(double jd0,double jd,double xyz[3]) | 279 | } |
1179 | 262 | { | 280 | |
1180 | 263 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_VENUS_ID); | 281 | void get_venus_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]) |
1181 | 264 | } | 282 | { |
1182 | 265 | 283 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_VENUS_ID); | |
1183 | 266 | void get_earth_helio_osculating_coords(double jd0,double jd,double xyz[3]) | 284 | } |
1184 | 267 | { | 285 | |
1185 | 268 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_EMB_ID); | 286 | void get_earth_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]) |
1186 | 269 | } | 287 | { |
1187 | 270 | 288 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_EMB_ID); | |
1188 | 271 | void get_mars_helio_osculating_coords(double jd0,double jd,double xyz[3]) | 289 | } |
1189 | 272 | { | 290 | |
1190 | 273 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_MARS_ID); | 291 | void get_mars_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]) |
1191 | 274 | } | 292 | { |
1192 | 275 | 293 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_MARS_ID); | |
1193 | 276 | void get_jupiter_helio_osculating_coords(double jd0,double jd,double xyz[3]) | 294 | } |
1194 | 277 | { | 295 | |
1195 | 278 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_JUPITER_ID); | 296 | void get_jupiter_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]) |
1196 | 279 | } | 297 | { |
1197 | 280 | 298 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_JUPITER_ID); | |
1198 | 281 | void get_saturn_helio_osculating_coords(double jd0,double jd,double xyz[3]) | 299 | } |
1199 | 282 | { | 300 | |
1200 | 283 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_SATURN_ID); | 301 | void get_saturn_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]) |
1201 | 284 | } | 302 | { |
1202 | 285 | 303 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_SATURN_ID); | |
1203 | 286 | void get_uranus_helio_osculating_coords(double jd0,double jd,double xyz[3]) | 304 | } |
1204 | 287 | { | 305 | |
1205 | 288 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_URANUS_ID); | 306 | void get_uranus_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]) |
1206 | 289 | } | 307 | { |
1207 | 290 | 308 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_URANUS_ID); | |
1208 | 291 | void get_neptune_helio_osculating_coords(double jd0,double jd,double xyz[3]) | 309 | } |
1209 | 292 | { | 310 | |
1210 | 293 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, EPHEM_NEPTUNE_ID); | 311 | void get_neptune_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]) |
1211 | 312 | { | ||
1212 | 313 | get_planet_helio_osculating_coordsv(jd0, jd, xyz, xyzdot, EPHEM_NEPTUNE_ID); | ||
1213 | 294 | } | 314 | } |
1214 | 295 | 315 | ||
1215 | 296 | /* Calculate the rectangular geocentric lunar coordinates to the inertial mean | 316 | /* Calculate the rectangular geocentric lunar coordinates to the inertial mean |
1216 | @@ -300,129 +320,139 @@ | |||
1217 | 300 | * Michelle Chapront-Touze and Jean Chapront of the Bureau des Longitudes, | 320 | * Michelle Chapront-Touze and Jean Chapront of the Bureau des Longitudes, |
1218 | 301 | * Paris. ELP 2000-82B theory | 321 | * Paris. ELP 2000-82B theory |
1219 | 302 | * param jd Julian day, rect pos */ | 322 | * param jd Julian day, rect pos */ |
1221 | 303 | void get_lunar_parent_coordsv(double jde,double xyz[3], void* unused) | 323 | void get_lunar_parent_coordsv(double jde, double xyz[3], double xyzdot[3], void* unused) |
1222 | 304 | { | 324 | { |
1223 | 305 | Q_UNUSED(unused); | 325 | Q_UNUSED(unused); |
1224 | 326 | double xyz6[6]; | ||
1225 | 306 | bool deOk=false; | 327 | bool deOk=false; |
1226 | 307 | if(use_de430(jde)) | 328 | if(use_de430(jde)) |
1228 | 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); |
1229 | 309 | else if(use_de431(jde)) | 330 | else if(use_de431(jde)) |
1232 | 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); |
1233 | 311 | if (!deOk) // fallback... | 332 | |
1234 | 333 | if (deOk) | ||
1235 | 334 | { | ||
1236 | 335 | xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2]; | ||
1237 | 336 | xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5]; | ||
1238 | 337 | } | ||
1239 | 338 | else | ||
1240 | 339 | { // fallback to DE-less solution. | ||
1241 | 312 | GetElp82bCoor(jde,xyz); | 340 | GetElp82bCoor(jde,xyz); |
1356 | 313 | } | 341 | xyzdot[0]=xyzdot[1]=xyzdot[3]=0.0; // TODO: Some meaningful way to get speed? |
1357 | 314 | 342 | } | |
1358 | 315 | void get_phobos_parent_coordsv(double jd,double xyz[3], void* unused) | 343 | } |
1359 | 316 | { | 344 | |
1360 | 317 | Q_UNUSED(unused); | 345 | void get_phobos_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1361 | 318 | GetMarsSatCoor(jd,MARS_SAT_PHOBOS,xyz); | 346 | { |
1362 | 319 | } | 347 | Q_UNUSED(unused); |
1363 | 320 | 348 | GetMarsSatCoor(jd, MARS_SAT_PHOBOS, xyz, xyzdot); | |
1364 | 321 | void get_deimos_parent_coordsv(double jd,double xyz[3], void* unused) | 349 | } |
1365 | 322 | { | 350 | |
1366 | 323 | Q_UNUSED(unused); | 351 | void get_deimos_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1367 | 324 | GetMarsSatCoor(jd,MARS_SAT_DEIMOS,xyz); | 352 | { |
1368 | 325 | } | 353 | Q_UNUSED(unused); |
1369 | 326 | 354 | GetMarsSatCoor(jd, MARS_SAT_DEIMOS, xyz, xyzdot); | |
1370 | 327 | void get_io_parent_coordsv(double jd,double xyz[3], void* unused) | 355 | } |
1371 | 328 | { | 356 | |
1372 | 329 | Q_UNUSED(unused); | 357 | void get_io_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1373 | 330 | GetL1Coor(jd,L1_IO,xyz); | 358 | { |
1374 | 331 | } | 359 | Q_UNUSED(unused); |
1375 | 332 | 360 | GetL1Coor(jd, L1_IO, xyz, xyzdot); | |
1376 | 333 | void get_europa_parent_coordsv(double jd,double xyz[3], void* unused) | 361 | } |
1377 | 334 | { | 362 | |
1378 | 335 | Q_UNUSED(unused); | 363 | void get_europa_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1379 | 336 | GetL1Coor(jd,L1_EUROPA,xyz); | 364 | { |
1380 | 337 | } | 365 | Q_UNUSED(unused); |
1381 | 338 | 366 | GetL1Coor(jd, L1_EUROPA, xyz, xyzdot); | |
1382 | 339 | void get_ganymede_parent_coordsv(double jd,double xyz[3], void* unused) | 367 | } |
1383 | 340 | { | 368 | |
1384 | 341 | Q_UNUSED(unused); | 369 | void get_ganymede_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1385 | 342 | GetL1Coor(jd,L1_GANYMEDE,xyz); | 370 | { |
1386 | 343 | } | 371 | Q_UNUSED(unused); |
1387 | 344 | 372 | GetL1Coor(jd, L1_GANYMEDE, xyz, xyzdot); | |
1388 | 345 | void get_callisto_parent_coordsv(double jd,double xyz[3], void* unused) | 373 | } |
1389 | 346 | { | 374 | |
1390 | 347 | Q_UNUSED(unused); | 375 | void get_callisto_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1391 | 348 | GetL1Coor(jd,L1_CALLISTO,xyz); | 376 | { |
1392 | 349 | } | 377 | Q_UNUSED(unused); |
1393 | 350 | 378 | GetL1Coor(jd, L1_CALLISTO, xyz, xyzdot); | |
1394 | 351 | void get_mimas_parent_coordsv(double jd,double xyz[3], void* unused) | 379 | } |
1395 | 352 | { | 380 | |
1396 | 353 | Q_UNUSED(unused); | 381 | void get_mimas_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1397 | 354 | GetTass17Coor(jd,TASS17_MIMAS,xyz); | 382 | { |
1398 | 355 | } | 383 | Q_UNUSED(unused); |
1399 | 356 | 384 | GetTass17Coor(jd, TASS17_MIMAS, xyz, xyzdot); | |
1400 | 357 | void get_enceladus_parent_coordsv(double jd,double xyz[3], void* unused) | 385 | } |
1401 | 358 | { | 386 | |
1402 | 359 | Q_UNUSED(unused); | 387 | void get_enceladus_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1403 | 360 | GetTass17Coor(jd,TASS17_ENCELADUS,xyz); | 388 | { |
1404 | 361 | } | 389 | Q_UNUSED(unused); |
1405 | 362 | 390 | GetTass17Coor(jd, TASS17_ENCELADUS, xyz, xyzdot); | |
1406 | 363 | void get_tethys_parent_coordsv(double jd,double xyz[3], void* unused) | 391 | } |
1407 | 364 | { | 392 | |
1408 | 365 | Q_UNUSED(unused); | 393 | void get_tethys_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1409 | 366 | GetTass17Coor(jd,TASS17_TETHYS,xyz); | 394 | { |
1410 | 367 | } | 395 | Q_UNUSED(unused); |
1411 | 368 | 396 | GetTass17Coor(jd, TASS17_TETHYS, xyz, xyzdot); | |
1412 | 369 | void get_dione_parent_coordsv(double jd,double xyz[3], void* unused) | 397 | } |
1413 | 370 | { | 398 | |
1414 | 371 | Q_UNUSED(unused); | 399 | void get_dione_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1415 | 372 | GetTass17Coor(jd,TASS17_DIONE,xyz); | 400 | { |
1416 | 373 | } | 401 | Q_UNUSED(unused); |
1417 | 374 | 402 | GetTass17Coor(jd, TASS17_DIONE, xyz, xyzdot); | |
1418 | 375 | void get_rhea_parent_coordsv(double jd,double xyz[3], void* unused) | 403 | } |
1419 | 376 | { | 404 | |
1420 | 377 | Q_UNUSED(unused); | 405 | void get_rhea_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1421 | 378 | GetTass17Coor(jd,TASS17_RHEA,xyz); | 406 | { |
1422 | 379 | } | 407 | Q_UNUSED(unused); |
1423 | 380 | 408 | GetTass17Coor(jd, TASS17_RHEA, xyz, xyzdot); | |
1424 | 381 | void get_titan_parent_coordsv(double jd,double xyz[3], void* unused) | 409 | } |
1425 | 382 | { | 410 | |
1426 | 383 | Q_UNUSED(unused); | 411 | void get_titan_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1427 | 384 | GetTass17Coor(jd,TASS17_TITAN,xyz); | 412 | { |
1428 | 385 | } | 413 | Q_UNUSED(unused); |
1429 | 386 | 414 | GetTass17Coor(jd, TASS17_TITAN, xyz, xyzdot); | |
1430 | 387 | void get_hyperion_parent_coordsv(double jd,double xyz[3], void* unused) | 415 | } |
1431 | 388 | { | 416 | |
1432 | 389 | Q_UNUSED(unused); | 417 | void get_hyperion_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1433 | 390 | GetTass17Coor(jd,TASS17_HYPERION,xyz); | 418 | { |
1434 | 391 | } | 419 | Q_UNUSED(unused); |
1435 | 392 | 420 | GetTass17Coor(jd, TASS17_HYPERION, xyz, xyzdot); | |
1436 | 393 | void get_iapetus_parent_coordsv(double jd,double xyz[3], void* unused) | 421 | } |
1437 | 394 | { | 422 | |
1438 | 395 | Q_UNUSED(unused); | 423 | void get_iapetus_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1439 | 396 | GetTass17Coor(jd,TASS17_IAPETUS,xyz); | 424 | { |
1440 | 397 | } | 425 | Q_UNUSED(unused); |
1441 | 398 | 426 | GetTass17Coor(jd, TASS17_IAPETUS, xyz, xyzdot); | |
1442 | 399 | void get_miranda_parent_coordsv(double jd,double xyz[3], void* unused) | 427 | } |
1443 | 400 | { | 428 | |
1444 | 401 | Q_UNUSED(unused); | 429 | void get_miranda_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1445 | 402 | GetGust86Coor(jd,GUST86_MIRANDA,xyz); | 430 | { |
1446 | 403 | } | 431 | Q_UNUSED(unused); |
1447 | 404 | 432 | GetGust86Coor(jd, GUST86_MIRANDA, xyz, xyzdot); | |
1448 | 405 | void get_ariel_parent_coordsv(double jd,double xyz[3], void* unused) | 433 | } |
1449 | 406 | { | 434 | |
1450 | 407 | Q_UNUSED(unused); | 435 | void get_ariel_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1451 | 408 | GetGust86Coor(jd,GUST86_ARIEL,xyz); | 436 | { |
1452 | 409 | } | 437 | Q_UNUSED(unused); |
1453 | 410 | 438 | GetGust86Coor(jd, GUST86_ARIEL, xyz, xyzdot); | |
1454 | 411 | void get_umbriel_parent_coordsv(double jd,double xyz[3], void* unused) | 439 | } |
1455 | 412 | { | 440 | |
1456 | 413 | Q_UNUSED(unused); | 441 | void get_umbriel_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1457 | 414 | GetGust86Coor(jd,GUST86_UMBRIEL,xyz); | 442 | { |
1458 | 415 | } | 443 | Q_UNUSED(unused); |
1459 | 416 | 444 | GetGust86Coor(jd, GUST86_UMBRIEL, xyz, xyzdot); | |
1460 | 417 | void get_titania_parent_coordsv(double jd,double xyz[3], void* unused) | 445 | } |
1461 | 418 | { | 446 | |
1462 | 419 | Q_UNUSED(unused); | 447 | void get_titania_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1463 | 420 | GetGust86Coor(jd,GUST86_TITANIA,xyz); | 448 | { |
1464 | 421 | } | 449 | Q_UNUSED(unused); |
1465 | 422 | 450 | GetGust86Coor(jd, GUST86_TITANIA, xyz, xyzdot); | |
1466 | 423 | void get_oberon_parent_coordsv(double jd,double xyz[3], void* unused) | 451 | } |
1467 | 424 | { | 452 | |
1468 | 425 | Q_UNUSED(unused); | 453 | void get_oberon_parent_coordsv(double jd, double xyz[3], double xyzdot[3], void* unused) |
1469 | 426 | GetGust86Coor(jd,GUST86_OBERON,xyz); | 454 | { |
1470 | 455 | Q_UNUSED(unused); | ||
1471 | 456 | GetGust86Coor(jd, GUST86_OBERON, xyz, xyzdot); | ||
1472 | 427 | } | 457 | } |
1473 | 428 | 458 | ||
1474 | 429 | 459 | ||
1475 | === modified file 'src/core/planetsephems/EphemWrapper.hpp' | |||
1476 | --- src/core/planetsephems/EphemWrapper.hpp 2017-05-28 00:31:46 +0000 | |||
1477 | +++ src/core/planetsephems/EphemWrapper.hpp 2017-11-23 14:55:50 +0000 | |||
1478 | @@ -26,7 +26,7 @@ | |||
1479 | 26 | * - DE431 | 26 | * - DE431 |
1480 | 27 | * | 27 | * |
1481 | 28 | * Extending the old stellplanet-class, this updated version now | 28 | * Extending the old stellplanet-class, this updated version now |
1483 | 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. |
1484 | 30 | */ | 30 | */ |
1485 | 31 | 31 | ||
1486 | 32 | #ifndef _EPHEMWRAPPER_HPP_ | 32 | #ifndef _EPHEMWRAPPER_HPP_ |
1487 | @@ -44,51 +44,51 @@ | |||
1488 | 44 | }; | 44 | }; |
1489 | 45 | 45 | ||
1490 | 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. |
1536 | 47 | void get_sun_helio_coordsv(double jd,double xyz[3], void*); | 47 | void get_sun_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1537 | 48 | void get_mercury_helio_coordsv(double jd,double xyz[3], void*); | 48 | void get_mercury_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1538 | 49 | void get_venus_helio_coordsv(double jd,double xyz[3], void*); | 49 | void get_venus_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1539 | 50 | void get_earth_helio_coordsv(double jd,double xyz[3], void*); | 50 | void get_earth_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1540 | 51 | void get_mars_helio_coordsv(double jd,double xyz[3], void*); | 51 | void get_mars_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1541 | 52 | void get_jupiter_helio_coordsv(double jd,double xyz[3], void*); | 52 | void get_jupiter_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1542 | 53 | void get_saturn_helio_coordsv(double jd,double xyz[3], void*); | 53 | void get_saturn_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1543 | 54 | void get_uranus_helio_coordsv(double jd,double xyz[3], void*); | 54 | void get_uranus_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1544 | 55 | void get_neptune_helio_coordsv(double jd,double xyz[3], void*); | 55 | void get_neptune_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1545 | 56 | void get_pluto_helio_coordsv(double jd,double xyz[3], void*); | 56 | void get_pluto_helio_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1546 | 57 | 57 | ||
1547 | 58 | void get_mercury_helio_osculating_coords(double jd0,double jd,double xyz[3]); | 58 | void get_mercury_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]); |
1548 | 59 | void get_venus_helio_osculating_coords(double jd0,double jd,double xyz[3]); | 59 | void get_venus_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]); |
1549 | 60 | void get_earth_helio_osculating_coords(double jd0,double jd,double xyz[3]); | 60 | void get_earth_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]); |
1550 | 61 | void get_mars_helio_osculating_coords(double jd0,double jd,double xyz[3]); | 61 | void get_mars_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]); |
1551 | 62 | void get_jupiter_helio_osculating_coords(double jd0,double jd,double xyz[3]); | 62 | void get_jupiter_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]); |
1552 | 63 | void get_saturn_helio_osculating_coords(double jd0,double jd,double xyz[3]); | 63 | void get_saturn_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]); |
1553 | 64 | void get_uranus_helio_osculating_coords(double jd0,double jd,double xyz[3]); | 64 | void get_uranus_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]); |
1554 | 65 | void get_neptune_helio_osculating_coords(double jd0,double jd,double xyz[3]); | 65 | void get_neptune_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]); |
1555 | 66 | void get_pluto_helio_osculating_coords(double jd0,double jd,double xyz[3]); | 66 | void get_pluto_helio_osculating_coords(double jd0,double jd,double xyz[3], double xyzdot[3]); |
1556 | 67 | 67 | ||
1557 | 68 | void get_lunar_parent_coordsv(double jde, double xyz[3], void*); | 68 | void get_lunar_parent_coordsv(double jde, double xyz[3], double xyzdot[3], void*); |
1558 | 69 | 69 | ||
1559 | 70 | void get_phobos_parent_coordsv(double jd,double xyz[3], void*); | 70 | void get_phobos_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1560 | 71 | void get_deimos_parent_coordsv(double jd,double xyz[3], void*); | 71 | void get_deimos_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1561 | 72 | 72 | ||
1562 | 73 | void get_io_parent_coordsv(double jd,double xyz[3], void*); | 73 | void get_io_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1563 | 74 | void get_europa_parent_coordsv(double jd,double xyz[3], void*); | 74 | void get_europa_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1564 | 75 | void get_ganymede_parent_coordsv(double jd,double xyz[3], void*); | 75 | void get_ganymede_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1565 | 76 | void get_callisto_parent_coordsv(double jd,double xyz[3], void*); | 76 | void get_callisto_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1566 | 77 | 77 | ||
1567 | 78 | void get_mimas_parent_coordsv(double jd,double xyz[3], void*); | 78 | void get_mimas_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1568 | 79 | void get_enceladus_parent_coordsv(double jd,double xyz[3], void*); | 79 | void get_enceladus_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1569 | 80 | void get_tethys_parent_coordsv(double jd,double xyz[3], void*); | 80 | void get_tethys_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1570 | 81 | void get_dione_parent_coordsv(double jd,double xyz[3], void*); | 81 | void get_dione_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1571 | 82 | void get_rhea_parent_coordsv(double jd,double xyz[3], void*); | 82 | void get_rhea_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1572 | 83 | void get_titan_parent_coordsv(double jd,double xyz[3], void*); | 83 | void get_titan_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1573 | 84 | void get_hyperion_parent_coordsv(double jd,double xyz[3], void*); | 84 | void get_hyperion_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1574 | 85 | void get_iapetus_parent_coordsv(double jd,double xyz[3], void*); | 85 | void get_iapetus_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1575 | 86 | 86 | ||
1576 | 87 | void get_miranda_parent_coordsv(double jd,double xyz[3], void*); | 87 | void get_miranda_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1577 | 88 | void get_ariel_parent_coordsv(double jd,double xyz[3], void*); | 88 | void get_ariel_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1578 | 89 | void get_umbriel_parent_coordsv(double jd,double xyz[3], void*); | 89 | void get_umbriel_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1579 | 90 | void get_titania_parent_coordsv(double jd,double xyz[3], void*); | 90 | void get_titania_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1580 | 91 | void get_oberon_parent_coordsv(double jd,double xyz[3], void*); | 91 | void get_oberon_parent_coordsv(double jd,double xyz[3], double xyzdot[3], void*); |
1581 | 92 | 92 | ||
1582 | 93 | #endif // _EPHEMWRAPPER_HPP_ | 93 | #endif // _EPHEMWRAPPER_HPP_ |
1583 | 94 | 94 | ||
1584 | 95 | 95 | ||
1585 | === modified file 'src/core/planetsephems/de430.cpp' | |||
1586 | --- src/core/planetsephems/de430.cpp 2016-08-18 13:45:26 +0000 | |||
1587 | +++ src/core/planetsephems/de430.cpp 2017-11-23 14:55:50 +0000 | |||
1588 | @@ -36,8 +36,10 @@ | |||
1589 | 36 | 36 | ||
1590 | 37 | static void * ephem; | 37 | static void * ephem; |
1591 | 38 | 38 | ||
1594 | 39 | static Vec3d tempECL = Vec3d(0,0,0); | 39 | static Vec3d tempECLpos = Vec3d(0,0,0); |
1595 | 40 | static Vec3d tempICRF = Vec3d(0,0,0); | 40 | static Vec3d tempECLspd = Vec3d(0,0,0); |
1596 | 41 | static Vec3d tempICRFpos = Vec3d(0,0,0); | ||
1597 | 42 | static Vec3d tempICRFspd = Vec3d(0,0,0); | ||
1598 | 41 | static char nams[JPL_MAX_N_CONSTANTS][6]; | 43 | static char nams[JPL_MAX_N_CONSTANTS][6]; |
1599 | 42 | static double vals[JPL_MAX_N_CONSTANTS]; | 44 | static double vals[JPL_MAX_N_CONSTANTS]; |
1600 | 43 | static double tempXYZ[6]; | 45 | static double tempXYZ[6]; |
1601 | @@ -79,7 +81,7 @@ | |||
1602 | 79 | if(initDone) | 81 | if(initDone) |
1603 | 80 | { | 82 | { |
1604 | 81 | // This may return some error code! | 83 | // This may return some error code! |
1606 | 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); |
1607 | 83 | 85 | ||
1608 | 84 | switch (jplresult) | 86 | switch (jplresult) |
1609 | 85 | { | 87 | { |
1610 | @@ -111,18 +113,25 @@ | |||
1611 | 111 | break; | 113 | break; |
1612 | 112 | } | 114 | } |
1613 | 113 | 115 | ||
1615 | 114 | jpl_pleph(ephem, jde, planet_id, centralBody_id, tempXYZ, 0); | 116 | // Why do we duplicate this? |
1616 | 117 | // jpl_pleph(ephem, jde, planet_id, centralBody_id, tempXYZ, 0); | ||
1617 | 115 | 118 | ||
1619 | 116 | tempICRF = Vec3d(tempXYZ[0], tempXYZ[1], tempXYZ[2]); | 119 | tempICRFpos = Vec3d(tempXYZ[0], tempXYZ[1], tempXYZ[2]); |
1620 | 120 | tempICRFspd = Vec3d(tempXYZ[3], tempXYZ[4], tempXYZ[5]); | ||
1621 | 117 | #ifdef UNIT_TEST | 121 | #ifdef UNIT_TEST |
1623 | 118 | tempECL = matJ2000ToVsop87 * tempICRF; | 122 | tempECLpos = matJ2000ToVsop87 * tempICRFpos; |
1624 | 123 | tempECLspd = matJ2000ToVsop87 * tempICRFspd; | ||
1625 | 119 | #else | 124 | #else |
1627 | 120 | tempECL = StelCore::matJ2000ToVsop87 * tempICRF; | 125 | tempECLpos = StelCore::matJ2000ToVsop87 * tempICRFpos; |
1628 | 126 | tempECLspd = StelCore::matJ2000ToVsop87 * tempICRFspd; | ||
1629 | 121 | #endif | 127 | #endif |
1630 | 122 | 128 | ||
1634 | 123 | xyz[0] = tempECL[0]; | 129 | xyz[0] = tempECLpos[0]; |
1635 | 124 | xyz[1] = tempECL[1]; | 130 | xyz[1] = tempECLpos[1]; |
1636 | 125 | xyz[2] = tempECL[2]; | 131 | xyz[2] = tempECLpos[2]; |
1637 | 132 | xyz[3] = tempECLspd[0]; | ||
1638 | 133 | xyz[4] = tempECLspd[1]; | ||
1639 | 134 | xyz[5] = tempECLspd[2]; | ||
1640 | 126 | return true; | 135 | return true; |
1641 | 127 | } | 136 | } |
1642 | 128 | return false; | 137 | return false; |
1643 | 129 | 138 | ||
1644 | === modified file 'src/core/planetsephems/de431.cpp' | |||
1645 | --- src/core/planetsephems/de431.cpp 2016-08-18 13:45:26 +0000 | |||
1646 | +++ src/core/planetsephems/de431.cpp 2017-11-23 14:55:50 +0000 | |||
1647 | @@ -37,8 +37,10 @@ | |||
1648 | 37 | 37 | ||
1649 | 38 | static void * ephem; | 38 | static void * ephem; |
1650 | 39 | 39 | ||
1653 | 40 | static Vec3d tempECL = Vec3d(0,0,0); | 40 | static Vec3d tempECLpos = Vec3d(0,0,0); |
1654 | 41 | static Vec3d tempICRF = Vec3d(0,0,0); | 41 | static Vec3d tempECLspd = Vec3d(0,0,0); |
1655 | 42 | static Vec3d tempICRFpos = Vec3d(0,0,0); | ||
1656 | 43 | static Vec3d tempICRFspd = Vec3d(0,0,0); | ||
1657 | 42 | static char nams[JPL_MAX_N_CONSTANTS][6]; | 44 | static char nams[JPL_MAX_N_CONSTANTS][6]; |
1658 | 43 | static double vals[JPL_MAX_N_CONSTANTS]; | 45 | static double vals[JPL_MAX_N_CONSTANTS]; |
1659 | 44 | static double tempXYZ[6]; | 46 | static double tempXYZ[6]; |
1660 | @@ -80,7 +82,7 @@ | |||
1661 | 80 | if(initDone) | 82 | if(initDone) |
1662 | 81 | { | 83 | { |
1663 | 82 | // This may return some error code! | 84 | // This may return some error code! |
1665 | 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); |
1666 | 84 | 86 | ||
1667 | 85 | switch (jplresult) | 87 | switch (jplresult) |
1668 | 86 | { | 88 | { |
1669 | @@ -112,16 +114,22 @@ | |||
1670 | 112 | break; | 114 | break; |
1671 | 113 | } | 115 | } |
1672 | 114 | 116 | ||
1674 | 115 | tempICRF = Vec3d(tempXYZ[0], tempXYZ[1], tempXYZ[2]); | 117 | tempICRFpos = Vec3d(tempXYZ[0], tempXYZ[1], tempXYZ[2]); |
1675 | 118 | tempICRFspd = Vec3d(tempXYZ[3], tempXYZ[4], tempXYZ[5]); | ||
1676 | 116 | #ifdef UNIT_TEST | 119 | #ifdef UNIT_TEST |
1678 | 117 | tempECL = matJ2000ToVsop87 * tempICRF; | 120 | tempECLpos = matJ2000ToVsop87 * tempICRFpos; |
1679 | 121 | tempECLspd = matJ2000ToVsop87 * tempICRFspd; | ||
1680 | 118 | #else | 122 | #else |
1682 | 119 | tempECL = StelCore::matJ2000ToVsop87 * tempICRF; | 123 | tempECLpos = StelCore::matJ2000ToVsop87 * tempICRFpos; |
1683 | 124 | tempECLspd = StelCore::matJ2000ToVsop87 * tempICRFspd; | ||
1684 | 120 | #endif | 125 | #endif |
1685 | 121 | 126 | ||
1689 | 122 | xyz[0] = tempECL[0]; | 127 | xyz[0] = tempECLpos[0]; |
1690 | 123 | xyz[1] = tempECL[1]; | 128 | xyz[1] = tempECLpos[1]; |
1691 | 124 | xyz[2] = tempECL[2]; | 129 | xyz[2] = tempECLpos[2]; |
1692 | 130 | xyz[3] = tempECLspd[0]; | ||
1693 | 131 | xyz[4] = tempECLspd[1]; | ||
1694 | 132 | xyz[5] = tempECLspd[2]; | ||
1695 | 125 | return true; | 133 | return true; |
1696 | 126 | } | 134 | } |
1697 | 127 | return false; | 135 | return false; |
1698 | 128 | 136 | ||
1699 | === modified file 'src/core/planetsephems/elliptic_to_rectangular.c' | |||
1700 | --- src/core/planetsephems/elliptic_to_rectangular.c 2017-08-05 14:14:24 +0000 | |||
1701 | +++ src/core/planetsephems/elliptic_to_rectangular.c 2017-11-23 14:55:50 +0000 | |||
1702 | @@ -116,7 +116,7 @@ | |||
1703 | 116 | xyz[1] = x1 * rdg + y1 * rtq; | 116 | xyz[1] = x1 * rdg + y1 * rtq; |
1704 | 117 | xyz[2] = (-x1 * elem[5] + y1 * elem[4]) * dwho; | 117 | xyz[2] = (-x1 * elem[5] + y1 * elem[4]) * dwho; |
1705 | 118 | 118 | ||
1707 | 119 | /* | 119 | // /* GZ 2017-11: Re-enable these lines, they seem to be velocity! |
1708 | 120 | const double rsam1 = -elem[2]*cLe - elem[3]*sLe; | 120 | const double rsam1 = -elem[2]*cLe - elem[3]*sLe; |
1709 | 121 | const double h = a*n / (1.0 + rsam1); | 121 | const double h = a*n / (1.0 + rsam1); |
1710 | 122 | const double vx1 = h * (-sLe - psi*rsam1*elem[3]); | 122 | const double vx1 = h * (-sLe - psi*rsam1*elem[3]); |
1711 | @@ -125,7 +125,7 @@ | |||
1712 | 125 | xyz[3] = vx1 * rtp + vy1 * rdg; | 125 | xyz[3] = vx1 * rtp + vy1 * rdg; |
1713 | 126 | xyz[4] = vx1 * rdg + vy1 * rtq; | 126 | xyz[4] = vx1 * rdg + vy1 * rtq; |
1714 | 127 | xyz[5] = (-vx1 * elem[5] + vy1 * elem[4]) * dwho; | 127 | xyz[5] = (-vx1 * elem[5] + vy1 * elem[4]) * dwho; |
1716 | 128 | */ | 128 | // */ |
1717 | 129 | } | 129 | } |
1718 | 130 | } | 130 | } |
1719 | 131 | 131 | ||
1720 | 132 | 132 | ||
1721 | === modified file 'src/core/planetsephems/elliptic_to_rectangular.h' | |||
1722 | --- src/core/planetsephems/elliptic_to_rectangular.h 2017-08-05 14:14:24 +0000 | |||
1723 | +++ src/core/planetsephems/elliptic_to_rectangular.h 2017-11-23 14:55:50 +0000 | |||
1724 | @@ -65,6 +65,11 @@ | |||
1725 | 65 | e = excentricity | 65 | e = excentricity |
1726 | 66 | 66 | ||
1727 | 67 | Units are suspected to be: Julian days, AU, rad | 67 | Units are suspected to be: Julian days, AU, rad |
1728 | 68 | |||
1729 | 69 | Results: | ||
1730 | 70 | xyz[0,1,2]=Position [AU] | ||
1731 | 71 | xyz[3,4,5]=Velocity [AU/d] | ||
1732 | 72 | |||
1733 | 68 | */ | 73 | */ |
1734 | 69 | 74 | ||
1735 | 70 | void EllipticToRectangularN(double mu,const double elem[6],double dt, | 75 | void EllipticToRectangularN(double mu,const double elem[6],double dt, |
1736 | 71 | 76 | ||
1737 | === modified file 'src/core/planetsephems/gust86.c' | |||
1738 | --- src/core/planetsephems/gust86.c 2017-08-05 14:14:24 +0000 | |||
1739 | +++ src/core/planetsephems/gust86.c 2017-11-23 14:55:50 +0000 | |||
1740 | @@ -438,13 +438,16 @@ | |||
1741 | 438 | static double gust86_jd0 = -1e100; | 438 | static double gust86_jd0 = -1e100; |
1742 | 439 | static double gust86_elem[GUST86_DIM]; | 439 | static double gust86_elem[GUST86_DIM]; |
1743 | 440 | 440 | ||
1746 | 441 | void GetGust86Coor(const double jd,const int body,double *xyz) { | 441 | void GetGust86Coor(const double jd, const int body, double *xyz, double *xyzdot) { |
1747 | 442 | GetGust86OsculatingCoor(jd,jd,body,xyz); | 442 | double xyz6[6]; |
1748 | 443 | GetGust86OsculatingCoor(jd,jd,body,xyz6); | ||
1749 | 444 | xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2]; | ||
1750 | 445 | xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5]; | ||
1751 | 443 | } | 446 | } |
1752 | 444 | 447 | ||
1753 | 445 | void GetGust86OsculatingCoor(const double jd0,const double jd, | 448 | void GetGust86OsculatingCoor(const double jd0,const double jd, |
1754 | 446 | const int body,double *xyz) { | 449 | const int body,double *xyz) { |
1756 | 447 | double x[3]; | 450 | double x[6]; |
1757 | 448 | if (jd0 != gust86_jd0) { | 451 | if (jd0 != gust86_jd0) { |
1758 | 449 | const double t0 = jd0 - 2444239.5; | 452 | const double t0 = jd0 - 2444239.5; |
1759 | 450 | gust86_jd0 = jd0; | 453 | gust86_jd0 = jd0; |
1760 | @@ -465,4 +468,8 @@ | |||
1761 | 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]; |
1762 | 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]; |
1763 | 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]; |
1764 | 471 | // GZ Updated to a 6-vector | ||
1765 | 472 | xyz[3] = GUST86toVsop87[0]*x[3]+GUST86toVsop87[1]*x[4]+GUST86toVsop87[2]*x[5]; | ||
1766 | 473 | xyz[4] = GUST86toVsop87[3]*x[3]+GUST86toVsop87[4]*x[4]+GUST86toVsop87[5]*x[5]; | ||
1767 | 474 | xyz[5] = GUST86toVsop87[6]*x[3]+GUST86toVsop87[7]*x[4]+GUST86toVsop87[8]*x[5]; | ||
1768 | 468 | } | 475 | } |
1769 | 469 | 476 | ||
1770 | === modified file 'src/core/planetsephems/gust86.h' | |||
1771 | --- src/core/planetsephems/gust86.h 2017-08-05 14:14:24 +0000 | |||
1772 | +++ src/core/planetsephems/gust86.h 2017-11-23 14:55:50 +0000 | |||
1773 | @@ -60,7 +60,7 @@ | |||
1774 | 60 | #define GUST86_TITANIA 3 | 60 | #define GUST86_TITANIA 3 |
1775 | 61 | #define GUST86_OBERON 4 | 61 | #define GUST86_OBERON 4 |
1776 | 62 | 62 | ||
1778 | 63 | void GetGust86Coor(const double jd, const int body, double *xyz); | 63 | void GetGust86Coor(const double jd, const int body, double *xyz, double *xyzdot); |
1779 | 64 | /* Return the rectangular coordinates of the given satellite | 64 | /* Return the rectangular coordinates of the given satellite |
1780 | 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). |
1781 | 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. |
1782 | @@ -91,6 +91,7 @@ | |||
1783 | 91 | 91 | ||
1784 | 92 | void GetGust86OsculatingCoor(const double jd0, const double jd, const int body, double *xyz); | 92 | void GetGust86OsculatingCoor(const double jd0, const double jd, const int body, double *xyz); |
1785 | 93 | /* The oculating orbit of epoch jd0, evaluated at jd, is returned. | 93 | /* The oculating orbit of epoch jd0, evaluated at jd, is returned. |
1786 | 94 | * xyz is a 6-vector (position&speed) | ||
1787 | 94 | */ | 95 | */ |
1788 | 95 | 96 | ||
1789 | 96 | #ifdef __cplusplus | 97 | #ifdef __cplusplus |
1790 | 97 | 98 | ||
1791 | === modified file 'src/core/planetsephems/l1.c' | |||
1792 | --- src/core/planetsephems/l1.c 2017-08-05 14:14:24 +0000 | |||
1793 | +++ src/core/planetsephems/l1.c 2017-11-23 14:55:50 +0000 | |||
1794 | @@ -997,13 +997,16 @@ | |||
1795 | 997 | CalcL1Elem(t,ugly_static_parameter_body,elem); | 997 | CalcL1Elem(t,ugly_static_parameter_body,elem); |
1796 | 998 | } | 998 | } |
1797 | 999 | 999 | ||
1800 | 1000 | void GetL1Coor(double jd,int body,double *xyz) { | 1000 | void GetL1Coor(double jd, int body, double *xyz, double *xyzdot) { |
1801 | 1001 | GetL1OsculatingCoor(jd,jd,body,xyz); | 1001 | double xyz6[6]; |
1802 | 1002 | GetL1OsculatingCoor(jd,jd,body,xyz6); | ||
1803 | 1003 | xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2]; | ||
1804 | 1004 | xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5]; | ||
1805 | 1002 | } | 1005 | } |
1806 | 1003 | 1006 | ||
1807 | 1004 | void GetL1OsculatingCoor(const double jd0,const double jd, | 1007 | void GetL1OsculatingCoor(const double jd0,const double jd, |
1808 | 1005 | const int body,double *xyz) { | 1008 | const int body,double *xyz) { |
1810 | 1006 | double x[3]; | 1009 | double x[6]; |
1811 | 1007 | if (jd0 != l1_jd0[body]) { | 1010 | if (jd0 != l1_jd0[body]) { |
1812 | 1008 | const double t0 = jd0 - 2433282.5; | 1011 | const double t0 = jd0 - 2433282.5; |
1813 | 1009 | l1_jd0[body] = jd0; | 1012 | l1_jd0[body] = jd0; |
1814 | @@ -1018,4 +1021,8 @@ | |||
1815 | 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]; |
1816 | 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]; |
1817 | 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]; |
1818 | 1024 | // GZ Pure guesswork. I hope these make sense... | ||
1819 | 1025 | xyz[3] = L1toVsop87[0]*x[3]+L1toVsop87[1]*x[4]+L1toVsop87[2]*x[5]; | ||
1820 | 1026 | xyz[4] = L1toVsop87[3]*x[3]+L1toVsop87[4]*x[4]+L1toVsop87[5]*x[5]; | ||
1821 | 1027 | xyz[5] = L1toVsop87[6]*x[3]+L1toVsop87[7]*x[4]+L1toVsop87[8]*x[5]; | ||
1822 | 1021 | } | 1028 | } |
1823 | 1022 | 1029 | ||
1824 | === modified file 'src/core/planetsephems/l1.h' | |||
1825 | --- src/core/planetsephems/l1.h 2017-08-05 14:14:24 +0000 | |||
1826 | +++ src/core/planetsephems/l1.h 2017-11-23 14:55:50 +0000 | |||
1827 | @@ -56,19 +56,22 @@ | |||
1828 | 56 | #define L1_GANYMEDE 2 | 56 | #define L1_GANYMEDE 2 |
1829 | 57 | #define L1_CALLISTO 3 | 57 | #define L1_CALLISTO 3 |
1830 | 58 | 58 | ||
1832 | 59 | void GetL1Coor(double jd,int body,double *xyz); | 59 | void GetL1Coor(double jd,int body,double *xyz, double *xyzdot); |
1833 | 60 | /* Return the rectangular coordinates of the given satellite | 60 | /* Return the rectangular coordinates of the given satellite |
1834 | 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). |
1835 | 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. |
1836 | 63 | The reference frame is "dynamical equinox and ecliptic J2000", | 63 | The reference frame is "dynamical equinox and ecliptic J2000", |
1837 | 64 | which is the reference frame in VSOP87 and VSOP87A. | 64 | which is the reference frame in VSOP87 and VSOP87A. |
1838 | 65 | 65 | ||
1839 | 66 | GZ2017-11: added xyzdot, now last 2 parameters should be 3-vectors of position and speed. | ||
1840 | 67 | |||
1841 | 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! |
1842 | 67 | */ | 69 | */ |
1843 | 68 | 70 | ||
1844 | 69 | void GetL1OsculatingCoor(const double jd0,const double jd, const int body,double *xyz); | 71 | void GetL1OsculatingCoor(const double jd0,const double jd, const int body,double *xyz); |
1845 | 70 | 72 | ||
1846 | 71 | /* The oculating orbit of epoch jd0, evaluated at jd, is returned. | 73 | /* The oculating orbit of epoch jd0, evaluated at jd, is returned. |
1847 | 74 | GZ2017-11: xyz now is a 6-vector of position and speed. | ||
1848 | 72 | */ | 75 | */ |
1849 | 73 | 76 | ||
1850 | 74 | 77 | ||
1851 | 75 | 78 | ||
1852 | === modified file 'src/core/planetsephems/marssat.c' | |||
1853 | --- src/core/planetsephems/marssat.c 2017-08-05 14:14:24 +0000 | |||
1854 | +++ src/core/planetsephems/marssat.c 2017-11-23 14:55:50 +0000 | |||
1855 | @@ -428,13 +428,16 @@ | |||
1856 | 428 | 428 | ||
1857 | 429 | static double mars_sat_to_vsop87[9]; | 429 | static double mars_sat_to_vsop87[9]; |
1858 | 430 | 430 | ||
1861 | 431 | void GetMarsSatCoor(double jd,int body,double *xyz) { | 431 | void GetMarsSatCoor(double jd,int body,double *xyz, double *xyzdot) { |
1862 | 432 | GetMarsSatOsculatingCoor(jd,jd,body,xyz); | 432 | double xyz6[6]; |
1863 | 433 | GetMarsSatOsculatingCoor(jd,jd,body,xyz6); | ||
1864 | 434 | xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2]; | ||
1865 | 435 | xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5]; | ||
1866 | 433 | } | 436 | } |
1867 | 434 | 437 | ||
1868 | 435 | void GetMarsSatOsculatingCoor(const double jd0,const double jd, | 438 | void GetMarsSatOsculatingCoor(const double jd0,const double jd, |
1869 | 436 | const int body,double *xyz) { | 439 | const int body,double *xyz) { |
1871 | 437 | double x[3]; | 440 | double x[6]; |
1872 | 438 | if (jd0 != marssat_jd0) { | 441 | if (jd0 != marssat_jd0) { |
1873 | 439 | const double t0 = jd0 - 2451545.0 + 6491.5; | 442 | const double t0 = jd0 - 2451545.0 + 6491.5; |
1874 | 440 | marssat_jd0 = jd0; | 443 | marssat_jd0 = jd0; |
1875 | @@ -445,8 +448,7 @@ | |||
1876 | 445 | &t_2,marssat_elem_2); | 448 | &t_2,marssat_elem_2); |
1877 | 446 | GenerateMarsSatToVSOP87(t0,mars_sat_to_vsop87); | 449 | GenerateMarsSatToVSOP87(t0,mars_sat_to_vsop87); |
1878 | 447 | } | 450 | } |
1881 | 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); |
1880 | 449 | jd-jd0,x); | ||
1882 | 450 | xyz[0] = mars_sat_to_vsop87[0]*x[0] | 452 | xyz[0] = mars_sat_to_vsop87[0]*x[0] |
1883 | 451 | + mars_sat_to_vsop87[1]*x[1] | 453 | + mars_sat_to_vsop87[1]*x[1] |
1884 | 452 | + mars_sat_to_vsop87[2]*x[2]; | 454 | + mars_sat_to_vsop87[2]*x[2]; |
1885 | @@ -456,6 +458,16 @@ | |||
1886 | 456 | xyz[2] = mars_sat_to_vsop87[6]*x[0] | 458 | xyz[2] = mars_sat_to_vsop87[6]*x[0] |
1887 | 457 | + mars_sat_to_vsop87[7]*x[1] | 459 | + mars_sat_to_vsop87[7]*x[1] |
1888 | 458 | + mars_sat_to_vsop87[8]*x[2]; | 460 | + mars_sat_to_vsop87[8]*x[2]; |
1889 | 461 | // GZ This is a guess, based on the structure of other operations... | ||
1890 | 462 | xyz[3] = mars_sat_to_vsop87[0]*x[3] | ||
1891 | 463 | + mars_sat_to_vsop87[1]*x[4] | ||
1892 | 464 | + mars_sat_to_vsop87[2]*x[5]; | ||
1893 | 465 | xyz[4] = mars_sat_to_vsop87[3]*x[3] | ||
1894 | 466 | + mars_sat_to_vsop87[4]*x[4] | ||
1895 | 467 | + mars_sat_to_vsop87[5]*x[5]; | ||
1896 | 468 | xyz[5] = mars_sat_to_vsop87[6]*x[3] | ||
1897 | 469 | + mars_sat_to_vsop87[7]*x[4] | ||
1898 | 470 | + mars_sat_to_vsop87[8]*x[5]; | ||
1899 | 459 | /* | 471 | /* |
1900 | 460 | printf("%d %18.9lf %15.12lf %15.12lf %15.12lf\n", | 472 | printf("%d %18.9lf %15.12lf %15.12lf %15.12lf\n", |
1901 | 461 | body,jd,xyz[0],xyz[1],xyz[2]); | 473 | body,jd,xyz[0],xyz[1],xyz[2]); |
1902 | 462 | 474 | ||
1903 | === modified file 'src/core/planetsephems/marssat.h' | |||
1904 | --- src/core/planetsephems/marssat.h 2017-08-05 14:14:24 +0000 | |||
1905 | +++ src/core/planetsephems/marssat.h 2017-11-23 14:55:50 +0000 | |||
1906 | @@ -58,8 +58,8 @@ | |||
1907 | 58 | #define MARS_SAT_PHOBOS 0 | 58 | #define MARS_SAT_PHOBOS 0 |
1908 | 59 | #define MARS_SAT_DEIMOS 1 | 59 | #define MARS_SAT_DEIMOS 1 |
1909 | 60 | 60 | ||
1912 | 61 | void GetMarsSatCoor(double jd,int body,double *xyz); | 61 | void GetMarsSatCoor(double jd, int body, double *xyz, double *xyzdot); |
1913 | 62 | /* Return the rectangular coordinates of the given satellite | 62 | /* Return the rectangular coordinates and speed of the given satellite |
1914 | 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). |
1915 | 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. |
1916 | 65 | The reference frame is "dynamical equinox and ecliptic J2000", | 65 | The reference frame is "dynamical equinox and ecliptic J2000", |
1917 | @@ -68,6 +68,7 @@ | |||
1918 | 68 | 68 | ||
1919 | 69 | void GetMarsSatOsculatingCoor(const double jd0, const double jd, const int body,double *xyz); | 69 | void GetMarsSatOsculatingCoor(const double jd0, const double jd, const int body,double *xyz); |
1920 | 70 | /* The oculating orbit of epoch jd0, evatuated at jd, is returned. | 70 | /* The oculating orbit of epoch jd0, evatuated at jd, is returned. |
1921 | 71 | * xyz is a 6-vector | ||
1922 | 71 | */ | 72 | */ |
1923 | 72 | 73 | ||
1924 | 73 | #ifdef __cplusplus | 74 | #ifdef __cplusplus |
1925 | 74 | 75 | ||
1926 | === modified file 'src/core/planetsephems/tass17.c' | |||
1927 | --- src/core/planetsephems/tass17.c 2017-08-05 14:14:24 +0000 | |||
1928 | +++ src/core/planetsephems/tass17.c 2017-11-23 14:55:50 +0000 | |||
1929 | @@ -3163,14 +3163,17 @@ | |||
1930 | 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)); |
1931 | 3164 | } | 3164 | } |
1932 | 3165 | 3165 | ||
1934 | 3166 | void GetTass17Coor(double jd,int body,double *xyz) | 3166 | void GetTass17Coor(double jd,int body,double *xyz, double *xyzdot) |
1935 | 3167 | { | 3167 | { |
1937 | 3168 | GetTass17OsculatingCoor(jd,jd,body,xyz); | 3168 | double xyz6[6]; |
1938 | 3169 | GetTass17OsculatingCoor(jd,jd,body,xyz6); | ||
1939 | 3170 | xyz[0] =xyz6[0]; xyz[1] =xyz6[1]; xyz[2] =xyz6[2]; | ||
1940 | 3171 | xyzdot[0]=xyz6[3]; xyzdot[1]=xyz6[4]; xyzdot[2]=xyz6[5]; | ||
1941 | 3169 | } | 3172 | } |
1942 | 3170 | 3173 | ||
1943 | 3171 | void GetTass17OsculatingCoor(const double jd0,const double jd, const int body,double *xyz) | 3174 | void GetTass17OsculatingCoor(const double jd0,const double jd, const int body,double *xyz) |
1944 | 3172 | { | 3175 | { |
1946 | 3173 | double x[3]; | 3176 | double x[6]; |
1947 | 3174 | if (jd0 != tass17_jd0) | 3177 | if (jd0 != tass17_jd0) |
1948 | 3175 | { | 3178 | { |
1949 | 3176 | const double t0 = jd0 - 2444240.0; | 3179 | const double t0 = jd0 - 2444240.0; |
1950 | @@ -3192,6 +3195,10 @@ | |||
1951 | 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]; |
1952 | 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]; |
1953 | 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]; |
1954 | 3198 | // GZ Updated to a 6-vector including speed... | ||
1955 | 3199 | xyz[3] = TASS17toVSOP87[0]*x[3]+TASS17toVSOP87[1]*x[4]+TASS17toVSOP87[2]*x[5]; | ||
1956 | 3200 | xyz[4] = TASS17toVSOP87[3]*x[3]+TASS17toVSOP87[4]*x[4]+TASS17toVSOP87[5]*x[5]; | ||
1957 | 3201 | xyz[5] = TASS17toVSOP87[6]*x[3]+TASS17toVSOP87[7]*x[4]+TASS17toVSOP87[8]*x[5]; | ||
1958 | 3195 | } | 3202 | } |
1959 | 3196 | 3203 | ||
1960 | 3197 | 3204 | ||
1961 | 3198 | 3205 | ||
1962 | === modified file 'src/core/planetsephems/tass17.h' | |||
1963 | --- src/core/planetsephems/tass17.h 2017-08-05 14:14:24 +0000 | |||
1964 | +++ src/core/planetsephems/tass17.h 2017-11-23 14:55:50 +0000 | |||
1965 | @@ -66,7 +66,9 @@ | |||
1966 | 66 | #define TASS17_HYPERION 7 | 66 | #define TASS17_HYPERION 7 |
1967 | 67 | #define TASS17_IAPETUS 6 | 67 | #define TASS17_IAPETUS 6 |
1968 | 68 | 68 | ||
1970 | 69 | void GetTass17Coor(double jd,int body,double *xyz); | 69 | // xyz and xyzdot are 3-vectors (position&speed) |
1971 | 70 | void GetTass17Coor(double jd, int body, double *xyz, double *xyzdot); | ||
1972 | 71 | // xyz is a 6-vector (position&speed) | ||
1973 | 70 | void GetTass17OsculatingCoor(const double jd0,const double jd, const int body,double *xyz); | 72 | void GetTass17OsculatingCoor(const double jd0,const double jd, const int body,double *xyz); |
1974 | 71 | 73 | ||
1975 | 72 | #ifdef __cplusplus | 74 | #ifdef __cplusplus |
1976 | 73 | 75 | ||
1977 | === modified file 'src/core/planetsephems/vsop87.c' | |||
1978 | --- src/core/planetsephems/vsop87.c 2017-08-05 14:14:24 +0000 | |||
1979 | +++ src/core/planetsephems/vsop87.c 2017-11-23 14:55:50 +0000 | |||
1980 | @@ -137338,8 +137338,7 @@ | |||
1981 | 137338 | GetVsop87OsculatingCoor(jd,jd,body,xyz); | 137338 | GetVsop87OsculatingCoor(jd,jd,body,xyz); |
1982 | 137339 | } | 137339 | } |
1983 | 137340 | 137340 | ||
1986 | 137341 | void GetVsop87OsculatingCoor(const double jd0,const double jd, | 137341 | void GetVsop87OsculatingCoor(const double jd0,const double jd,const int body,double *xyz) { |
1985 | 137342 | const int body,double *xyz) { | ||
1987 | 137343 | if (jd0 != vsop87_jd0) { | 137342 | if (jd0 != vsop87_jd0) { |
1988 | 137344 | const double t0 = (jd0 - 2451545.0) / 365250.0; | 137343 | const double t0 = (jd0 - 2451545.0) / 365250.0; |
1989 | 137345 | vsop87_jd0 = jd0; | 137344 | vsop87_jd0 = jd0; |
1990 | 137346 | 137345 | ||
1991 | === modified file 'src/gui/ConfigurationDialog.cpp' | |||
1992 | --- src/gui/ConfigurationDialog.cpp 2017-10-29 10:34:00 +0000 | |||
1993 | +++ src/gui/ConfigurationDialog.cpp 2017-11-23 14:55:50 +0000 | |||
1994 | @@ -195,11 +195,9 @@ | |||
1995 | 195 | // Additional settings for selected object info | 195 | // Additional settings for selected object info |
1996 | 196 | connectBoolProperty(ui->checkBoxUMSurfaceBrightness, "NebulaMgr.flagSurfaceBrightnessArcsecUsage"); | 196 | connectBoolProperty(ui->checkBoxUMSurfaceBrightness, "NebulaMgr.flagSurfaceBrightnessArcsecUsage"); |
1997 | 197 | connectBoolProperty(ui->checkBoxUMShortNotationSurfaceBrightness, "NebulaMgr.flagSurfaceBrightnessShortNotationUsage"); | 197 | connectBoolProperty(ui->checkBoxUMShortNotationSurfaceBrightness, "NebulaMgr.flagSurfaceBrightnessShortNotationUsage"); |
2003 | 198 | ui->checkBoxUseFormattingOutput->setChecked(StelApp::getInstance().getFlagUseFormattingOutput()); | 198 | connectBoolProperty(ui->checkBoxUseFormattingOutput, "StelApp.flagUseFormattingOutput"); |
2004 | 199 | connect(ui->checkBoxUseFormattingOutput, SIGNAL(toggled(bool)), this, SLOT(updateSettingFormattingOutput(bool))); | 199 | connectBoolProperty(ui->checkBoxUseCCSDesignations, "StelApp.flagUseCCSDesignation"); |
2005 | 200 | ui->checkBoxUseCCSDesignations->setChecked(StelApp::getInstance().getFlagUseCCSDesignation()); | 200 | |
2001 | 201 | connect(ui->checkBoxUseCCSDesignations, SIGNAL(toggled(bool)), this, SLOT(updateSettingCCSDesignations(bool))); | ||
2002 | 202 | |||
2006 | 203 | connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setNoSelectedInfo())); | 201 | connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setNoSelectedInfo())); |
2007 | 204 | connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(setAllSelectedInfo())); | 202 | connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(setAllSelectedInfo())); |
2008 | 205 | connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(setBriefSelectedInfo())); | 203 | connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(setBriefSelectedInfo())); |
2009 | @@ -223,6 +221,7 @@ | |||
2010 | 223 | ui->fixedDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(core->getPresetSkyTime())); | 221 | ui->fixedDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(core->getPresetSkyTime())); |
2011 | 224 | connect(ui->fixedDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), core, SLOT(setPresetSkyTime(QDateTime))); | 222 | connect(ui->fixedDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), core, SLOT(setPresetSkyTime(QDateTime))); |
2012 | 225 | 223 | ||
2013 | 224 | // TODO: convert to properties | ||
2014 | 226 | ui->enableKeysNavigationCheckBox->setChecked(mvmgr->getFlagEnableMoveKeys() || mvmgr->getFlagEnableZoomKeys()); | 225 | ui->enableKeysNavigationCheckBox->setChecked(mvmgr->getFlagEnableMoveKeys() || mvmgr->getFlagEnableZoomKeys()); |
2015 | 227 | ui->enableMouseNavigationCheckBox->setChecked(mvmgr->getFlagEnableMouseNavigation()); | 226 | ui->enableMouseNavigationCheckBox->setChecked(mvmgr->getFlagEnableMouseNavigation()); |
2016 | 228 | connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvmgr, SLOT(setFlagEnableMoveKeys(bool))); | 227 | connect(ui->enableKeysNavigationCheckBox, SIGNAL(toggled(bool)), mvmgr, SLOT(setFlagEnableMoveKeys(bool))); |
2017 | @@ -284,46 +283,31 @@ | |||
2018 | 284 | connect(ui->diskViewportCheckbox, SIGNAL(toggled(bool)), this, SLOT(setDiskViewport(bool))); | 283 | connect(ui->diskViewportCheckbox, SIGNAL(toggled(bool)), this, SLOT(setDiskViewport(bool))); |
2019 | 285 | connectBoolProperty(ui->autoZoomResetsDirectionCheckbox, "StelMovementMgr.flagAutoZoomOutResetsDirection"); | 284 | connectBoolProperty(ui->autoZoomResetsDirectionCheckbox, "StelMovementMgr.flagAutoZoomOutResetsDirection"); |
2020 | 286 | 285 | ||
2061 | 287 | ui->showFlipButtonsCheckbox->setChecked(gui->getFlagShowFlipButtons()); | 286 | connectBoolProperty(ui->showFlipButtonsCheckbox, "StelGui.flagShowFlipButtons"); |
2062 | 288 | connect(ui->showFlipButtonsCheckbox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowFlipButtons(bool))); | 287 | connectBoolProperty(ui->showNebulaBgButtonCheckbox, "StelGui.flagShowNebulaBackgroundButton"); |
2063 | 289 | 288 | connectBoolProperty(ui->showToastSurveyButtonCheckbox, "StelGui.flagShowToastSurveyButton"); | |
2064 | 290 | ui->showNebulaBgButtonCheckbox->setChecked(gui->getFlagShowNebulaBackgroundButton()); | 289 | connectBoolProperty(ui->showBookmarksButtonCheckBox, "StelGui.flagShowBookmarksButton"); |
2065 | 291 | connect(ui->showNebulaBgButtonCheckbox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowNebulaBackgroundButton(bool))); | 290 | connectBoolProperty(ui->showICRSGridButtonCheckBox, "StelGui.flagShowICRSGridButton"); |
2066 | 292 | 291 | connectBoolProperty(ui->showGalacticGridButtonCheckBox, "StelGui.flagShowGalacticGridButton"); | |
2067 | 293 | ui->showToastSurveyButtonCheckbox->setChecked(gui->getFlagShowToastSurveyButton()); | 292 | connectBoolProperty(ui->showEclipticGridButtonCheckBox, "StelGui.flagShowEclipticGridButton"); |
2068 | 294 | connect(ui->showToastSurveyButtonCheckbox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowToastSurveyButton(bool))); | 293 | connectBoolProperty(ui->showConstellationBoundariesButtonCheckBox, "StelGui.flagShowConstellationBoundariesButton"); |
2069 | 295 | 294 | ||
2070 | 296 | ui->showBookmarksButtonCheckBox->setChecked(gui->getFlagShowBookmarksButton()); | 295 | //ui->decimalDegreeCheckBox->setChecked(StelApp::getInstance().getFlagShowDecimalDegrees()); |
2071 | 297 | connect(ui->showBookmarksButtonCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowBookmarksButton(bool))); | 296 | //connect(ui->decimalDegreeCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowDecimalDegrees(bool))); |
2072 | 298 | 297 | // TODO: Make sure to remove this setter function, rather listen to StelApp's signal. | |
2073 | 299 | ui->showICRSGridButtonCheckBox->setChecked(gui->getFlagShowICRSGridButton()); | 298 | connectBoolProperty(ui->decimalDegreeCheckBox, "StelApp.flagShowDecimalDegrees"); |
2074 | 300 | connect(ui->showICRSGridButtonCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowICRSGridButton(bool))); | 299 | |
2075 | 301 | 300 | connectBoolProperty(ui->azimuthFromSouthcheckBox, "StelApp.flagUseAzimuthFromSouth"); | |
2076 | 302 | ui->showGalacticGridButtonCheckBox->setChecked(gui->getFlagShowGalacticGridButton()); | 301 | |
2077 | 303 | connect(ui->showGalacticGridButtonCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowGalacticGridButton(bool))); | 302 | //ui->mouseTimeoutCheckbox->setChecked(StelMainView::getInstance().getFlagCursorTimeout()); |
2078 | 304 | 303 | //ui->mouseTimeoutSpinBox->setValue(StelMainView::getInstance().getCursorTimeout()); | |
2079 | 305 | ui->showEclipticGridButtonCheckBox->setChecked(gui->getFlagShowEclipticGridButton()); | 304 | //connect(ui->mouseTimeoutCheckbox, SIGNAL(clicked()), this, SLOT(cursorTimeOutChanged())); |
2080 | 306 | connect(ui->showEclipticGridButtonCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowEclipticGridButton(bool))); | 305 | //connect(ui->mouseTimeoutCheckbox, SIGNAL(toggled(bool)), this, SLOT(cursorTimeOutChanged())); |
2081 | 307 | 306 | //connect(ui->mouseTimeoutSpinBox, SIGNAL(valueChanged(double)), this, SLOT(cursorTimeOutChanged(double))); | |
2082 | 308 | ui->showConstellationBoundariesButtonCheckBox->setChecked(gui->getFlagShowConstellationBoundariesButton()); | 307 | connectBoolProperty(ui->mouseTimeoutCheckbox, "MainView.flagCursorTimeout"); |
2083 | 309 | connect(ui->showConstellationBoundariesButtonCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowConstellationBoundariesButton(bool))); | 308 | connectDoubleProperty(ui->mouseTimeoutSpinBox, "MainView.cursorTimeout"); |
2084 | 310 | 309 | connectBoolProperty(ui->useButtonsBackgroundCheckBox, "MainView.flagUseButtonsBackground"); | |
2085 | 311 | ui->decimalDegreeCheckBox->setChecked(StelApp::getInstance().getFlagShowDecimalDegrees()); | 310 | connectBoolProperty(ui->indicationMountModeCheckBox, "StelMovementMgr.flagIndicationMountMode"); |
2046 | 312 | connect(ui->decimalDegreeCheckBox, SIGNAL(toggled(bool)), gui, SLOT(setFlagShowDecimalDegrees(bool))); | ||
2047 | 313 | ui->azimuthFromSouthcheckBox->setChecked(StelApp::getInstance().getFlagSouthAzimuthUsage()); | ||
2048 | 314 | connect(ui->azimuthFromSouthcheckBox, SIGNAL(toggled(bool)), this, SLOT(updateStartPointForAzimuth(bool))); | ||
2049 | 315 | |||
2050 | 316 | ui->mouseTimeoutCheckbox->setChecked(StelMainView::getInstance().getFlagCursorTimeout()); | ||
2051 | 317 | ui->mouseTimeoutSpinBox->setValue(StelMainView::getInstance().getCursorTimeout()); | ||
2052 | 318 | connect(ui->mouseTimeoutCheckbox, SIGNAL(clicked()), this, SLOT(cursorTimeOutChanged())); | ||
2053 | 319 | connect(ui->mouseTimeoutCheckbox, SIGNAL(toggled(bool)), this, SLOT(cursorTimeOutChanged())); | ||
2054 | 320 | connect(ui->mouseTimeoutSpinBox, SIGNAL(valueChanged(double)), this, SLOT(cursorTimeOutChanged(double))); | ||
2055 | 321 | |||
2056 | 322 | ui->useButtonsBackgroundCheckBox->setChecked(StelMainView::getInstance().getFlagUseButtonsBackground()); | ||
2057 | 323 | connect(ui->useButtonsBackgroundCheckBox, SIGNAL(toggled(bool)), this, SLOT(usageButtonsBackgroundChanged(bool))); | ||
2058 | 324 | |||
2059 | 325 | ui->indicationMountModeCheckBox->setChecked(mvmgr->getFlagIndicationMountMode()); | ||
2060 | 326 | connect(ui->indicationMountModeCheckBox, SIGNAL(toggled(bool)), mvmgr, SLOT(setFlagIndicationMountMode(bool))); | ||
2086 | 327 | 311 | ||
2087 | 328 | // General Option Save | 312 | // General Option Save |
2088 | 329 | connect(ui->saveViewDirAsDefaultPushButton, SIGNAL(clicked()), this, SLOT(saveCurrentViewDirSettings())); | 313 | connect(ui->saveViewDirAsDefaultPushButton, SIGNAL(clicked()), this, SLOT(saveCurrentViewDirSettings())); |
2089 | @@ -334,9 +318,7 @@ | |||
2090 | 334 | ui->screenshotDirEdit->setText(StelFileMgr::getScreenshotDir()); | 318 | ui->screenshotDirEdit->setText(StelFileMgr::getScreenshotDir()); |
2091 | 335 | connect(ui->screenshotDirEdit, SIGNAL(textChanged(QString)), this, SLOT(selectScreenshotDir(QString))); | 319 | connect(ui->screenshotDirEdit, SIGNAL(textChanged(QString)), this, SLOT(selectScreenshotDir(QString))); |
2092 | 336 | connect(ui->screenshotBrowseButton, SIGNAL(clicked()), this, SLOT(browseForScreenshotDir())); | 320 | connect(ui->screenshotBrowseButton, SIGNAL(clicked()), this, SLOT(browseForScreenshotDir())); |
2096 | 337 | 321 | connectBoolProperty(ui->invertScreenShotColorsCheckBox, "MainView.flagInvertScreenShotColors"); | |
2094 | 338 | ui->invertScreenShotColorsCheckBox->setChecked(StelMainView::getInstance().getFlagInvertScreenShotColors()); | ||
2095 | 339 | connect(ui->invertScreenShotColorsCheckBox, SIGNAL(toggled(bool)), &StelMainView::getInstance(), SLOT(setFlagInvertScreenShotColors(bool))); | ||
2097 | 340 | 322 | ||
2098 | 341 | connectBoolProperty(ui->autoEnableAtmosphereCheckBox, "LandscapeMgr.flagAtmosphereAutoEnabling"); | 323 | connectBoolProperty(ui->autoEnableAtmosphereCheckBox, "LandscapeMgr.flagAtmosphereAutoEnabling"); |
2099 | 342 | connectBoolProperty(ui->autoChangeLandscapesCheckBox, "LandscapeMgr.flagLandscapeAutoSelection"); | 324 | connectBoolProperty(ui->autoChangeLandscapesCheckBox, "LandscapeMgr.flagLandscapeAutoSelection"); |
2100 | @@ -519,6 +501,8 @@ | |||
2101 | 519 | flags |= StelObject::AltAzi; | 501 | flags |= StelObject::AltAzi; |
2102 | 520 | if (ui->checkBoxDistance->isChecked()) | 502 | if (ui->checkBoxDistance->isChecked()) |
2103 | 521 | flags |= StelObject::Distance; | 503 | flags |= StelObject::Distance; |
2104 | 504 | if (ui->checkBoxVelocity->isChecked()) | ||
2105 | 505 | flags |= StelObject::Velocity; | ||
2106 | 522 | if (ui->checkBoxSize->isChecked()) | 506 | if (ui->checkBoxSize->isChecked()) |
2107 | 523 | flags |= StelObject::Size; | 507 | flags |= StelObject::Size; |
2108 | 524 | if (ui->checkBoxExtra->isChecked()) | 508 | if (ui->checkBoxExtra->isChecked()) |
2109 | @@ -542,32 +526,32 @@ | |||
2110 | 542 | } | 526 | } |
2111 | 543 | 527 | ||
2112 | 544 | 528 | ||
2139 | 545 | void ConfigurationDialog::updateStartPointForAzimuth(bool b) | 529 | //void ConfigurationDialog::updateStartPointForAzimuth(bool b) |
2140 | 546 | { | 530 | //{ |
2141 | 547 | StelApp::getInstance().setFlagSouthAzimuthUsage(b); | 531 | // StelApp::getInstance().setFlagSouthAzimuthUsage(b); |
2142 | 548 | } | 532 | //} |
2143 | 549 | 533 | ||
2144 | 550 | void ConfigurationDialog::updateSettingFormattingOutput(bool b) | 534 | //void ConfigurationDialog::updateSettingFormattingOutput(bool b) |
2145 | 551 | { | 535 | //{ |
2146 | 552 | StelApp::getInstance().setFlagUseFormattingOutput(b); | 536 | // StelApp::getInstance().setFlagUseFormattingOutput(b); |
2147 | 553 | } | 537 | //} |
2148 | 554 | 538 | ||
2149 | 555 | void ConfigurationDialog::updateSettingCCSDesignations(bool b) | 539 | //void ConfigurationDialog::updateSettingCCSDesignations(bool b) |
2150 | 556 | { | 540 | //{ |
2151 | 557 | StelApp::getInstance().setFlagUseCCSDesignation(b); | 541 | // StelApp::getInstance().setFlagUseCCSDesignation(b); |
2152 | 558 | } | 542 | //} |
2153 | 559 | 543 | ||
2154 | 560 | void ConfigurationDialog::cursorTimeOutChanged() | 544 | //void ConfigurationDialog::cursorTimeOutChanged() |
2155 | 561 | { | 545 | //{ |
2156 | 562 | StelMainView::getInstance().setFlagCursorTimeout(ui->mouseTimeoutCheckbox->isChecked()); | 546 | // StelMainView::getInstance().setFlagCursorTimeout(ui->mouseTimeoutCheckbox->isChecked()); |
2157 | 563 | StelMainView::getInstance().setCursorTimeout(ui->mouseTimeoutSpinBox->value()); | 547 | // StelMainView::getInstance().setCursorTimeout(ui->mouseTimeoutSpinBox->value()); |
2158 | 564 | } | 548 | //} |
2159 | 565 | 549 | ||
2160 | 566 | void ConfigurationDialog::usageButtonsBackgroundChanged(bool b) | 550 | //void ConfigurationDialog::usageButtonsBackgroundChanged(bool b) |
2161 | 567 | { | 551 | //{ |
2162 | 568 | StelMainView::getInstance().setFlagUseButtonsBackground(b); | 552 | // StelMainView::getInstance().setFlagUseButtonsBackground(b); |
2163 | 569 | emit StelMainView::getInstance().updateIconsRequested(); | 553 | // emit StelMainView::getInstance().updateIconsRequested(); |
2164 | 570 | } | 554 | //} |
2165 | 571 | 555 | ||
2166 | 572 | void ConfigurationDialog::browseForScreenshotDir() | 556 | void ConfigurationDialog::browseForScreenshotDir() |
2167 | 573 | { | 557 | { |
2168 | @@ -848,6 +832,8 @@ | |||
2169 | 848 | (bool) (flags & StelObject::AltAzi)); | 832 | (bool) (flags & StelObject::AltAzi)); |
2170 | 849 | conf->setValue("flag_show_distance", | 833 | conf->setValue("flag_show_distance", |
2171 | 850 | (bool) (flags & StelObject::Distance)); | 834 | (bool) (flags & StelObject::Distance)); |
2172 | 835 | conf->setValue("flag_show_velocity", | ||
2173 | 836 | (bool) (flags & StelObject::Velocity)); | ||
2174 | 851 | conf->setValue("flag_show_size", | 837 | conf->setValue("flag_show_size", |
2175 | 852 | (bool) (flags & StelObject::Size)); | 838 | (bool) (flags & StelObject::Size)); |
2176 | 853 | conf->setValue("flag_show_extra", | 839 | conf->setValue("flag_show_extra", |
2177 | @@ -1428,6 +1414,7 @@ | |||
2178 | 1428 | ui->checkBoxHourAngle->setChecked(flags & StelObject::HourAngle); | 1414 | ui->checkBoxHourAngle->setChecked(flags & StelObject::HourAngle); |
2179 | 1429 | ui->checkBoxAltAz->setChecked(flags & StelObject::AltAzi); | 1415 | ui->checkBoxAltAz->setChecked(flags & StelObject::AltAzi); |
2180 | 1430 | ui->checkBoxDistance->setChecked(flags & StelObject::Distance); | 1416 | ui->checkBoxDistance->setChecked(flags & StelObject::Distance); |
2181 | 1417 | ui->checkBoxVelocity->setChecked(flags & StelObject::Velocity); | ||
2182 | 1431 | ui->checkBoxSize->setChecked(flags & StelObject::Size); | 1418 | ui->checkBoxSize->setChecked(flags & StelObject::Size); |
2183 | 1432 | ui->checkBoxExtra->setChecked(flags & StelObject::Extra); | 1419 | ui->checkBoxExtra->setChecked(flags & StelObject::Extra); |
2184 | 1433 | ui->checkBoxGalacticCoordinates->setChecked(flags & StelObject::GalacticCoord); | 1420 | ui->checkBoxGalacticCoordinates->setChecked(flags & StelObject::GalacticCoord); |
2185 | 1434 | 1421 | ||
2186 | === modified file 'src/gui/ConfigurationDialog.hpp' | |||
2187 | --- src/gui/ConfigurationDialog.hpp 2017-07-12 13:57:34 +0000 | |||
2188 | +++ src/gui/ConfigurationDialog.hpp 2017-11-23 14:55:50 +0000 | |||
2189 | @@ -90,13 +90,6 @@ | |||
2190 | 90 | void showShortcutsWindow(); | 90 | void showShortcutsWindow(); |
2191 | 91 | void setDiskViewport(bool); | 91 | void setDiskViewport(bool); |
2192 | 92 | void setSphericMirror(bool); | 92 | void setSphericMirror(bool); |
2193 | 93 | void cursorTimeOutChanged(); | ||
2194 | 94 | void cursorTimeOutChanged(double) {cursorTimeOutChanged();} | ||
2195 | 95 | void usageButtonsBackgroundChanged(bool b); | ||
2196 | 96 | |||
2197 | 97 | void updateStartPointForAzimuth(bool b); | ||
2198 | 98 | void updateSettingFormattingOutput(bool b); | ||
2199 | 99 | void updateSettingCCSDesignations(bool b); | ||
2200 | 100 | 93 | ||
2201 | 101 | void newStarCatalogData(); | 94 | void newStarCatalogData(); |
2202 | 102 | void downloadStars(); | 95 | void downloadStars(); |
2203 | 103 | 96 | ||
2204 | === modified file 'src/gui/SearchDialog.cpp' | |||
2205 | --- src/gui/SearchDialog.cpp 2017-05-22 13:27:14 +0000 | |||
2206 | +++ src/gui/SearchDialog.cpp 2017-11-23 14:55:50 +0000 | |||
2207 | @@ -146,6 +146,7 @@ | |||
2208 | 146 | useLockPosition = conf->value("search/flag_lock_position", true).toBool(); | 146 | useLockPosition = conf->value("search/flag_lock_position", true).toBool(); |
2209 | 147 | simbadServerUrl = conf->value("search/simbad_server_url", DEF_SIMBAD_URL).toString(); | 147 | simbadServerUrl = conf->value("search/simbad_server_url", DEF_SIMBAD_URL).toString(); |
2210 | 148 | setCurrentCoordinateSystemKey(conf->value("search/coordinate_system", "equatorialJ2000").toString()); | 148 | setCurrentCoordinateSystemKey(conf->value("search/coordinate_system", "equatorialJ2000").toString()); |
2211 | 149 | connect(&StelApp::getInstance(), SIGNAL(flagShowDecimalDegreesChanged(bool)), this, SLOT(populateCoordinateAxis())); | ||
2212 | 149 | } | 150 | } |
2213 | 150 | 151 | ||
2214 | 151 | SearchDialog::~SearchDialog() | 152 | SearchDialog::~SearchDialog() |
2215 | @@ -223,7 +224,7 @@ | |||
2216 | 223 | 224 | ||
2217 | 224 | void SearchDialog::populateCoordinateAxis() | 225 | void SearchDialog::populateCoordinateAxis() |
2218 | 225 | { | 226 | { |
2220 | 226 | bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDegrees();; | 227 | bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDegrees(); |
2221 | 227 | bool xnormal = true; | 228 | bool xnormal = true; |
2222 | 228 | 229 | ||
2223 | 229 | ui->AxisXSpinBox->setDecimals(2); | 230 | ui->AxisXSpinBox->setDecimals(2); |
2224 | 230 | 231 | ||
2225 | === modified file 'src/gui/SkyGui.cpp' | |||
2226 | --- src/gui/SkyGui.cpp 2017-05-22 13:27:14 +0000 | |||
2227 | +++ src/gui/SkyGui.cpp 2017-11-23 14:55:50 +0000 | |||
2228 | @@ -72,6 +72,8 @@ | |||
2229 | 72 | infoTextFilters |= StelObject::AltAzi; | 72 | infoTextFilters |= StelObject::AltAzi; |
2230 | 73 | if (conf->value("flag_show_distance", false).toBool()) | 73 | if (conf->value("flag_show_distance", false).toBool()) |
2231 | 74 | infoTextFilters |= StelObject::Distance; | 74 | infoTextFilters |= StelObject::Distance; |
2232 | 75 | if (conf->value("flag_show_velocity", false).toBool()) | ||
2233 | 76 | infoTextFilters |= StelObject::Velocity; | ||
2234 | 75 | if (conf->value("flag_show_size", false).toBool()) | 77 | if (conf->value("flag_show_size", false).toBool()) |
2235 | 76 | infoTextFilters |= StelObject::Size; | 78 | infoTextFilters |= StelObject::Size; |
2236 | 77 | if (conf->value("flag_show_extra", false).toBool()) | 79 | if (conf->value("flag_show_extra", false).toBool()) |
2237 | 78 | 80 | ||
2238 | === modified file 'src/gui/StelGui.cpp' | |||
2239 | --- src/gui/StelGui.cpp 2017-06-05 16:15:26 +0000 | |||
2240 | +++ src/gui/StelGui.cpp 2017-11-23 14:55:50 +0000 | |||
2241 | @@ -119,6 +119,7 @@ | |||
2242 | 119 | #endif | 119 | #endif |
2243 | 120 | 120 | ||
2244 | 121 | { | 121 | { |
2245 | 122 | setObjectName("StelGui"); | ||
2246 | 122 | // QPixmapCache::setCacheLimit(30000); ? | 123 | // QPixmapCache::setCacheLimit(30000); ? |
2247 | 123 | } | 124 | } |
2248 | 124 | 125 | ||
2249 | @@ -245,6 +246,8 @@ | |||
2250 | 245 | connect(scriptMgr, SIGNAL(scriptRunning()), this, SLOT(scriptStarted())); | 246 | connect(scriptMgr, SIGNAL(scriptRunning()), this, SLOT(scriptStarted())); |
2251 | 246 | connect(scriptMgr, SIGNAL(scriptStopped()), this, SLOT(scriptStopped())); | 247 | connect(scriptMgr, SIGNAL(scriptStopped()), this, SLOT(scriptStopped())); |
2252 | 247 | #endif | 248 | #endif |
2253 | 249 | // Put StelGui under the StelProperty system (simpler and more consistent GUI) | ||
2254 | 250 | StelApp::getInstance().getStelPropertyManager()->registerObject(this); | ||
2255 | 248 | 251 | ||
2256 | 249 | /////////////////////////////////////////////////////////////////////////// | 252 | /////////////////////////////////////////////////////////////////////////// |
2257 | 250 | //// QGraphicsView based GUI | 253 | //// QGraphicsView based GUI |
2258 | @@ -699,6 +702,7 @@ | |||
2259 | 699 | if (initDone) { | 702 | if (initDone) { |
2260 | 700 | skyGui->updateBarsPos(); | 703 | skyGui->updateBarsPos(); |
2261 | 701 | } | 704 | } |
2262 | 705 | emit flagShowFlipButtonsChanged(b); | ||
2263 | 702 | } | 706 | } |
2264 | 703 | 707 | ||
2265 | 704 | // Define whether the button toggling nebulae backround images should be visible | 708 | // Define whether the button toggling nebulae backround images should be visible |
2266 | @@ -720,6 +724,7 @@ | |||
2267 | 720 | if (initDone) { | 724 | if (initDone) { |
2268 | 721 | skyGui->updateBarsPos(); | 725 | skyGui->updateBarsPos(); |
2269 | 722 | } | 726 | } |
2270 | 727 | emit flagShowNebulaBackgroundButtonChanged(b); | ||
2271 | 723 | } | 728 | } |
2272 | 724 | 729 | ||
2273 | 725 | // Define whether the button toggling bookmarks should be visible | 730 | // Define whether the button toggling bookmarks should be visible |
2274 | @@ -741,6 +746,7 @@ | |||
2275 | 741 | if (initDone) { | 746 | if (initDone) { |
2276 | 742 | skyGui->updateBarsPos(); | 747 | skyGui->updateBarsPos(); |
2277 | 743 | } | 748 | } |
2278 | 749 | emit flagShowBookmarksButtonChanged(b); | ||
2279 | 744 | } | 750 | } |
2280 | 745 | 751 | ||
2281 | 746 | // Define whether the button toggling ICRS grid should be visible | 752 | // Define whether the button toggling ICRS grid should be visible |
2282 | @@ -762,6 +768,7 @@ | |||
2283 | 762 | if (initDone) { | 768 | if (initDone) { |
2284 | 763 | skyGui->updateBarsPos(); | 769 | skyGui->updateBarsPos(); |
2285 | 764 | } | 770 | } |
2286 | 771 | emit flagShowICRSGridButtonChanged(b); | ||
2287 | 765 | } | 772 | } |
2288 | 766 | 773 | ||
2289 | 767 | // Define whether the button toggling galactic grid should be visible | 774 | // Define whether the button toggling galactic grid should be visible |
2290 | @@ -783,6 +790,7 @@ | |||
2291 | 783 | if (initDone) { | 790 | if (initDone) { |
2292 | 784 | skyGui->updateBarsPos(); | 791 | skyGui->updateBarsPos(); |
2293 | 785 | } | 792 | } |
2294 | 793 | emit flagShowGalacticGridButtonChanged(b); | ||
2295 | 786 | } | 794 | } |
2296 | 787 | 795 | ||
2297 | 788 | // Define whether the button toggling ecliptic grid should be visible | 796 | // Define whether the button toggling ecliptic grid should be visible |
2298 | @@ -825,6 +833,7 @@ | |||
2299 | 825 | if (initDone) { | 833 | if (initDone) { |
2300 | 826 | skyGui->updateBarsPos(); | 834 | skyGui->updateBarsPos(); |
2301 | 827 | } | 835 | } |
2302 | 836 | emit flagShowConstellationBoundariesButtonChanged(b); | ||
2303 | 828 | } | 837 | } |
2304 | 829 | 838 | ||
2305 | 830 | // Define whether the button toggling TOAST survey images should be visible | 839 | // Define whether the button toggling TOAST survey images should be visible |
2306 | @@ -843,16 +852,7 @@ | |||
2307 | 843 | getButtonBar()->hideButton("actionShow_Toast_Survey"); | 852 | getButtonBar()->hideButton("actionShow_Toast_Survey"); |
2308 | 844 | } | 853 | } |
2309 | 845 | flagShowToastSurveyButton = b; | 854 | flagShowToastSurveyButton = b; |
2320 | 846 | } | 855 | emit flagShowToastSurveyButtonChanged(b); |
2311 | 847 | |||
2312 | 848 | void StelGui::setFlagShowDecimalDegrees(bool b) | ||
2313 | 849 | { | ||
2314 | 850 | StelApp::getInstance().setFlagShowDecimalDegrees(b); | ||
2315 | 851 | if (searchDialog->visible()) | ||
2316 | 852 | { | ||
2317 | 853 | // Update format of input fields if Search Dialog is open | ||
2318 | 854 | searchDialog->populateCoordinateAxis(); | ||
2319 | 855 | } | ||
2321 | 856 | } | 856 | } |
2322 | 857 | 857 | ||
2323 | 858 | void StelGui::setVisible(bool b) | 858 | void StelGui::setVisible(bool b) |
2324 | @@ -997,6 +997,7 @@ | |||
2325 | 997 | void StelGui::setGuiVisible(bool b) | 997 | void StelGui::setGuiVisible(bool b) |
2326 | 998 | { | 998 | { |
2327 | 999 | setVisible(b); | 999 | setVisible(b); |
2328 | 1000 | emit visibleChanged(b); | ||
2329 | 1000 | } | 1001 | } |
2330 | 1001 | 1002 | ||
2331 | 1002 | StelAction* StelGui::getAction(const QString& actionName) | 1003 | StelAction* StelGui::getAction(const QString& actionName) |
2332 | 1003 | 1004 | ||
2333 | === modified file 'src/gui/StelGui.hpp' | |||
2334 | --- src/gui/StelGui.hpp 2017-05-22 13:27:14 +0000 | |||
2335 | +++ src/gui/StelGui.hpp 2017-11-23 14:55:50 +0000 | |||
2336 | @@ -56,6 +56,14 @@ | |||
2337 | 56 | Q_PROPERTY(bool visible READ getVisible WRITE setVisible NOTIFY visibleChanged) | 56 | Q_PROPERTY(bool visible READ getVisible WRITE setVisible NOTIFY visibleChanged) |
2338 | 57 | Q_PROPERTY(bool autoHideHorizontalButtonBar READ getAutoHideHorizontalButtonBar WRITE setAutoHideHorizontalButtonBar NOTIFY autoHideHorizontalButtonBarChanged) | 57 | Q_PROPERTY(bool autoHideHorizontalButtonBar READ getAutoHideHorizontalButtonBar WRITE setAutoHideHorizontalButtonBar NOTIFY autoHideHorizontalButtonBarChanged) |
2339 | 58 | Q_PROPERTY(bool autoHideVerticalButtonBar READ getAutoHideVerticalButtonBar WRITE setAutoHideVerticalButtonBar NOTIFY autoHideVerticalButtonBarChanged) | 58 | Q_PROPERTY(bool autoHideVerticalButtonBar READ getAutoHideVerticalButtonBar WRITE setAutoHideVerticalButtonBar NOTIFY autoHideVerticalButtonBarChanged) |
2340 | 59 | Q_PROPERTY(bool flagShowFlipButtons READ getFlagShowFlipButtons WRITE setFlagShowFlipButtons NOTIFY flagShowFlipButtonsChanged) | ||
2341 | 60 | Q_PROPERTY(bool flagShowNebulaBackgroundButton READ getFlagShowNebulaBackgroundButton WRITE setFlagShowNebulaBackgroundButton NOTIFY flagShowNebulaBackgroundButtonChanged) | ||
2342 | 61 | Q_PROPERTY(bool flagShowToastSurveyButton READ getFlagShowToastSurveyButton WRITE setFlagShowToastSurveyButton NOTIFY flagShowToastSurveyButtonChanged) | ||
2343 | 62 | Q_PROPERTY(bool flagShowBookmarksButton READ getFlagShowBookmarksButton WRITE setFlagShowBookmarksButton NOTIFY flagShowBookmarksButtonChanged) | ||
2344 | 63 | Q_PROPERTY(bool flagShowICRSGridButton READ getFlagShowICRSGridButton WRITE setFlagShowICRSGridButton NOTIFY flagShowICRSGridButtonChanged) | ||
2345 | 64 | Q_PROPERTY(bool flagShowGalacticGridButton READ getFlagShowGalacticGridButton WRITE setFlagShowGalacticGridButton NOTIFY flagShowGalacticGridButtonChanged ) | ||
2346 | 65 | Q_PROPERTY(bool flagShowEclipticGridButton READ getFlagShowEclipticGridButton WRITE setFlagShowEclipticGridButton NOTIFY flagShowEclipticGridButtonChanged ) | ||
2347 | 66 | Q_PROPERTY(bool flagShowConstellationBoundariesButton READ getFlagShowConstellationBoundariesButton WRITE setFlagShowConstellationBoundariesButton NOTIFY flagShowConstellationBoundariesButtonChanged ) | ||
2348 | 59 | 67 | ||
2349 | 60 | public: | 68 | public: |
2350 | 61 | friend class ViewDialog; | 69 | friend class ViewDialog; |
2351 | @@ -85,30 +93,6 @@ | |||
2352 | 85 | //! Get the SkyGui instance (useful for adding other interface elements). | 93 | //! Get the SkyGui instance (useful for adding other interface elements). |
2353 | 86 | //! It will return a valid object only if called after init(). | 94 | //! It will return a valid object only if called after init(). |
2354 | 87 | class SkyGui* getSkyGui() const; | 95 | class SkyGui* getSkyGui() const; |
2355 | 88 | |||
2356 | 89 | //! Get whether the buttons toggling image flip are visible | ||
2357 | 90 | bool getFlagShowFlipButtons() const; | ||
2358 | 91 | |||
2359 | 92 | //! Get whether the button toggling nebulae background is visible | ||
2360 | 93 | bool getFlagShowNebulaBackgroundButton() const; | ||
2361 | 94 | |||
2362 | 95 | //! Get whether the button toggling TOAST survey is visible | ||
2363 | 96 | bool getFlagShowToastSurveyButton() const; | ||
2364 | 97 | |||
2365 | 98 | //! Get whether the button toggling bookmarks is visible | ||
2366 | 99 | bool getFlagShowBookmarksButton() const; | ||
2367 | 100 | |||
2368 | 101 | //! Get whether the button toggling ICRS grid is visible | ||
2369 | 102 | bool getFlagShowICRSGridButton() const; | ||
2370 | 103 | |||
2371 | 104 | //! Get whether the button toggling galactic grid is visible | ||
2372 | 105 | bool getFlagShowGalacticGridButton() const; | ||
2373 | 106 | |||
2374 | 107 | //! Get whether the button toggling ecliptic grid is visible | ||
2375 | 108 | bool getFlagShowEclipticGridButton() const; | ||
2376 | 109 | |||
2377 | 110 | //! Get whether the button toggling constellation boundaries is visible | ||
2378 | 111 | bool getFlagShowConstellationBoundariesButton() const; | ||
2379 | 112 | 96 | ||
2380 | 113 | //! returns true if the gui has completed init process. | 97 | //! returns true if the gui has completed init process. |
2381 | 114 | bool initComplete(void) const; | 98 | bool initComplete(void) const; |
2382 | @@ -134,29 +118,43 @@ | |||
2383 | 134 | public slots: | 118 | public slots: |
2384 | 135 | //! Define whether the buttons toggling image flip should be visible | 119 | //! Define whether the buttons toggling image flip should be visible |
2385 | 136 | void setFlagShowFlipButtons(bool b); | 120 | void setFlagShowFlipButtons(bool b); |
2387 | 137 | 121 | //! Get whether the buttons toggling image flip are visible | |
2388 | 122 | bool getFlagShowFlipButtons() const; | ||
2389 | 123 | |||
2390 | 138 | //! Define whether the button toggling nebulae background should be visible | 124 | //! Define whether the button toggling nebulae background should be visible |
2391 | 139 | void setFlagShowNebulaBackgroundButton(bool b); | 125 | void setFlagShowNebulaBackgroundButton(bool b); |
2392 | 126 | //! Get whether the button toggling nebulae background is visible | ||
2393 | 127 | bool getFlagShowNebulaBackgroundButton() const; | ||
2394 | 140 | 128 | ||
2395 | 141 | //! Define whether the button toggling TOAST survey should be visible | 129 | //! Define whether the button toggling TOAST survey should be visible |
2396 | 142 | void setFlagShowToastSurveyButton(bool b); | 130 | void setFlagShowToastSurveyButton(bool b); |
2397 | 131 | //! Get whether the button toggling TOAST survey is visible | ||
2398 | 132 | bool getFlagShowToastSurveyButton() const; | ||
2399 | 143 | 133 | ||
2400 | 144 | //! Define whether the button toggling bookmarks should be visible | 134 | //! Define whether the button toggling bookmarks should be visible |
2401 | 145 | void setFlagShowBookmarksButton(bool b); | 135 | void setFlagShowBookmarksButton(bool b); |
2402 | 136 | //! Get whether the button toggling bookmarks is visible | ||
2403 | 137 | bool getFlagShowBookmarksButton() const; | ||
2404 | 146 | 138 | ||
2405 | 147 | //! Define whether the button toggling ICRS grid should be visible | 139 | //! Define whether the button toggling ICRS grid should be visible |
2406 | 148 | void setFlagShowICRSGridButton(bool b); | 140 | void setFlagShowICRSGridButton(bool b); |
2407 | 141 | //! Get whether the button toggling ICRS grid is visible | ||
2408 | 142 | bool getFlagShowICRSGridButton() const; | ||
2409 | 149 | 143 | ||
2410 | 150 | //! Define whether the button toggling galactic grid should be visible | 144 | //! Define whether the button toggling galactic grid should be visible |
2411 | 151 | void setFlagShowGalacticGridButton(bool b); | 145 | void setFlagShowGalacticGridButton(bool b); |
2412 | 146 | //! Get whether the button toggling galactic grid is visible | ||
2413 | 147 | bool getFlagShowGalacticGridButton() const; | ||
2414 | 152 | 148 | ||
2415 | 153 | //! Define whether the button toggling ecliptic grid should be visible | 149 | //! Define whether the button toggling ecliptic grid should be visible |
2416 | 154 | void setFlagShowEclipticGridButton(bool b); | 150 | void setFlagShowEclipticGridButton(bool b); |
2417 | 151 | //! Get whether the button toggling ecliptic grid is visible | ||
2418 | 152 | bool getFlagShowEclipticGridButton() const; | ||
2419 | 155 | 153 | ||
2420 | 156 | //! Define whether the button toggling constellation boundaries should be visible | 154 | //! Define whether the button toggling constellation boundaries should be visible |
2421 | 157 | void setFlagShowConstellationBoundariesButton(bool b); | 155 | void setFlagShowConstellationBoundariesButton(bool b); |
2424 | 158 | 156 | //! Get whether the button toggling constellation boundaries is visible | |
2425 | 159 | void setFlagShowDecimalDegrees(bool b); | 157 | bool getFlagShowConstellationBoundariesButton() const; |
2426 | 160 | 158 | ||
2427 | 161 | //! Get the auto-hide status of the horizontal toolbar. | 159 | //! Get the auto-hide status of the horizontal toolbar. |
2428 | 162 | bool getAutoHideHorizontalButtonBar() const; | 160 | bool getAutoHideHorizontalButtonBar() const; |
2429 | @@ -194,6 +192,14 @@ | |||
2430 | 194 | void visibleChanged(bool b); | 192 | void visibleChanged(bool b); |
2431 | 195 | void autoHideHorizontalButtonBarChanged(bool b); | 193 | void autoHideHorizontalButtonBarChanged(bool b); |
2432 | 196 | void autoHideVerticalButtonBarChanged(bool b); | 194 | void autoHideVerticalButtonBarChanged(bool b); |
2433 | 195 | void flagShowFlipButtonsChanged(bool b); | ||
2434 | 196 | void flagShowNebulaBackgroundButtonChanged(bool b); | ||
2435 | 197 | void flagShowToastSurveyButtonChanged(bool b); | ||
2436 | 198 | void flagShowBookmarksButtonChanged(bool b); | ||
2437 | 199 | void flagShowICRSGridButtonChanged(bool b); | ||
2438 | 200 | void flagShowGalacticGridButtonChanged(bool b); | ||
2439 | 201 | void flagShowEclipticGridButtonChanged(bool b); | ||
2440 | 202 | void flagShowConstellationBoundariesButtonChanged(bool b); | ||
2441 | 197 | 203 | ||
2442 | 198 | private slots: | 204 | private slots: |
2443 | 199 | void reloadStyle(); | 205 | void reloadStyle(); |
2444 | 200 | 206 | ||
2445 | === modified file 'src/gui/configurationDialog.ui' | |||
2446 | --- src/gui/configurationDialog.ui 2017-10-22 18:13:13 +0000 | |||
2447 | +++ src/gui/configurationDialog.ui 2017-11-23 14:55:50 +0000 | |||
2448 | @@ -613,10 +613,10 @@ | |||
2449 | 613 | </attribute> | 613 | </attribute> |
2450 | 614 | </widget> | 614 | </widget> |
2451 | 615 | </item> | 615 | </item> |
2454 | 616 | <item row="3" column="1"> | 616 | <item row="1" column="0"> |
2455 | 617 | <widget class="QCheckBox" name="checkBoxSupergalacticCoordinates"> | 617 | <widget class="QCheckBox" name="checkBoxCatalogNumbers"> |
2456 | 618 | <property name="text"> | 618 | <property name="text"> |
2458 | 619 | <string>Supergalactic coordinates</string> | 619 | <string>Catalog number(s)</string> |
2459 | 620 | </property> | 620 | </property> |
2460 | 621 | <attribute name="buttonGroup"> | 621 | <attribute name="buttonGroup"> |
2461 | 622 | <string notr="true">buttonGroupDisplayedFields</string> | 622 | <string notr="true">buttonGroupDisplayedFields</string> |
2462 | @@ -624,29 +624,6 @@ | |||
2463 | 624 | </widget> | 624 | </widget> |
2464 | 625 | </item> | 625 | </item> |
2465 | 626 | <item row="7" column="0"> | 626 | <item row="7" column="0"> |
2466 | 627 | <widget class="QCheckBox" name="checkBoxType"> | ||
2467 | 628 | <property name="toolTip"> | ||
2468 | 629 | <string>The type of the object (star, planet, etc.)</string> | ||
2469 | 630 | </property> | ||
2470 | 631 | <property name="text"> | ||
2471 | 632 | <string>Type</string> | ||
2472 | 633 | </property> | ||
2473 | 634 | <attribute name="buttonGroup"> | ||
2474 | 635 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2475 | 636 | </attribute> | ||
2476 | 637 | </widget> | ||
2477 | 638 | </item> | ||
2478 | 639 | <item row="1" column="1"> | ||
2479 | 640 | <widget class="QCheckBox" name="checkBoxAbsoluteMag"> | ||
2480 | 641 | <property name="text"> | ||
2481 | 642 | <string>Absolute magnitude</string> | ||
2482 | 643 | </property> | ||
2483 | 644 | <attribute name="buttonGroup"> | ||
2484 | 645 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2485 | 646 | </attribute> | ||
2486 | 647 | </widget> | ||
2487 | 648 | </item> | ||
2488 | 649 | <item row="5" column="0"> | ||
2489 | 650 | <widget class="QCheckBox" name="checkBoxEclipticCoordsOfDate"> | 627 | <widget class="QCheckBox" name="checkBoxEclipticCoordsOfDate"> |
2490 | 651 | <property name="toolTip"> | 628 | <property name="toolTip"> |
2491 | 652 | <string>Ecliptic coordinates, equinox of date (only for Earth)</string> | 629 | <string>Ecliptic coordinates, equinox of date (only for Earth)</string> |
2492 | @@ -659,56 +636,10 @@ | |||
2493 | 659 | </attribute> | 636 | </attribute> |
2494 | 660 | </widget> | 637 | </widget> |
2495 | 661 | </item> | 638 | </item> |
2546 | 662 | <item row="6" column="0"> | 639 | <item row="0" column="0"> |
2547 | 663 | <widget class="QCheckBox" name="checkBoxSize"> | 640 | <widget class="QCheckBox" name="checkBoxName"> |
2548 | 664 | <property name="toolTip"> | 641 | <property name="text"> |
2549 | 665 | <string>Angular or physical size</string> | 642 | <string>Name</string> |
2500 | 666 | </property> | ||
2501 | 667 | <property name="text"> | ||
2502 | 668 | <string>Size</string> | ||
2503 | 669 | </property> | ||
2504 | 670 | <attribute name="buttonGroup"> | ||
2505 | 671 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2506 | 672 | </attribute> | ||
2507 | 673 | </widget> | ||
2508 | 674 | </item> | ||
2509 | 675 | <item row="5" column="1"> | ||
2510 | 676 | <widget class="QCheckBox" name="checkBoxAltAz"> | ||
2511 | 677 | <property name="toolTip"> | ||
2512 | 678 | <string>Horizontal coordinates</string> | ||
2513 | 679 | </property> | ||
2514 | 680 | <property name="text"> | ||
2515 | 681 | <string>Azimuth/Altitude</string> | ||
2516 | 682 | </property> | ||
2517 | 683 | <attribute name="buttonGroup"> | ||
2518 | 684 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2519 | 685 | </attribute> | ||
2520 | 686 | </widget> | ||
2521 | 687 | </item> | ||
2522 | 688 | <item row="1" column="0"> | ||
2523 | 689 | <widget class="QCheckBox" name="checkBoxCatalogNumbers"> | ||
2524 | 690 | <property name="text"> | ||
2525 | 691 | <string>Catalog number(s)</string> | ||
2526 | 692 | </property> | ||
2527 | 693 | <attribute name="buttonGroup"> | ||
2528 | 694 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2529 | 695 | </attribute> | ||
2530 | 696 | </widget> | ||
2531 | 697 | </item> | ||
2532 | 698 | <item row="6" column="1"> | ||
2533 | 699 | <widget class="QCheckBox" name="checkBoxDistance"> | ||
2534 | 700 | <property name="text"> | ||
2535 | 701 | <string>Distance</string> | ||
2536 | 702 | </property> | ||
2537 | 703 | <attribute name="buttonGroup"> | ||
2538 | 704 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2539 | 705 | </attribute> | ||
2540 | 706 | </widget> | ||
2541 | 707 | </item> | ||
2542 | 708 | <item row="2" column="1"> | ||
2543 | 709 | <widget class="QCheckBox" name="checkBoxGalacticCoordinates"> | ||
2544 | 710 | <property name="text"> | ||
2545 | 711 | <string>Galactic coordinates</string> | ||
2550 | 712 | </property> | 643 | </property> |
2551 | 713 | <attribute name="buttonGroup"> | 644 | <attribute name="buttonGroup"> |
2552 | 714 | <string notr="true">buttonGroupDisplayedFields</string> | 645 | <string notr="true">buttonGroupDisplayedFields</string> |
2553 | @@ -728,17 +659,7 @@ | |||
2554 | 728 | </attribute> | 659 | </attribute> |
2555 | 729 | </widget> | 660 | </widget> |
2556 | 730 | </item> | 661 | </item> |
2568 | 731 | <item row="0" column="0"> | 662 | <item row="6" column="0"> |
2558 | 732 | <widget class="QCheckBox" name="checkBoxName"> | ||
2559 | 733 | <property name="text"> | ||
2560 | 734 | <string>Name</string> | ||
2561 | 735 | </property> | ||
2562 | 736 | <attribute name="buttonGroup"> | ||
2563 | 737 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2564 | 738 | </attribute> | ||
2565 | 739 | </widget> | ||
2566 | 740 | </item> | ||
2567 | 741 | <item row="4" column="0"> | ||
2569 | 742 | <widget class="QCheckBox" name="checkBoxEclipticCoordsJ2000"> | 663 | <widget class="QCheckBox" name="checkBoxEclipticCoordsJ2000"> |
2570 | 743 | <property name="toolTip"> | 664 | <property name="toolTip"> |
2571 | 744 | <string>Ecliptic coordinates, equinox J2000.0</string> | 665 | <string>Ecliptic coordinates, equinox J2000.0</string> |
2572 | @@ -751,7 +672,17 @@ | |||
2573 | 751 | </attribute> | 672 | </attribute> |
2574 | 752 | </widget> | 673 | </widget> |
2575 | 753 | </item> | 674 | </item> |
2577 | 754 | <item row="4" column="1"> | 675 | <item row="8" column="0"> |
2578 | 676 | <widget class="QCheckBox" name="checkBoxGalacticCoordinates"> | ||
2579 | 677 | <property name="text"> | ||
2580 | 678 | <string>Galactic coordinates</string> | ||
2581 | 679 | </property> | ||
2582 | 680 | <attribute name="buttonGroup"> | ||
2583 | 681 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2584 | 682 | </attribute> | ||
2585 | 683 | </widget> | ||
2586 | 684 | </item> | ||
2587 | 685 | <item row="4" column="0"> | ||
2588 | 755 | <widget class="QCheckBox" name="checkBoxHourAngle"> | 686 | <widget class="QCheckBox" name="checkBoxHourAngle"> |
2589 | 756 | <property name="toolTip"> | 687 | <property name="toolTip"> |
2590 | 757 | <string>Equatorial coordinates, equinox of date</string> | 688 | <string>Equatorial coordinates, equinox of date</string> |
2591 | @@ -764,7 +695,66 @@ | |||
2592 | 764 | </attribute> | 695 | </attribute> |
2593 | 765 | </widget> | 696 | </widget> |
2594 | 766 | </item> | 697 | </item> |
2596 | 767 | <item row="0" column="1"> | 698 | <item row="9" column="0"> |
2597 | 699 | <widget class="QCheckBox" name="checkBoxSupergalacticCoordinates"> | ||
2598 | 700 | <property name="text"> | ||
2599 | 701 | <string>Supergalactic coordinates</string> | ||
2600 | 702 | </property> | ||
2601 | 703 | <attribute name="buttonGroup"> | ||
2602 | 704 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2603 | 705 | </attribute> | ||
2604 | 706 | </widget> | ||
2605 | 707 | </item> | ||
2606 | 708 | <item row="5" column="0"> | ||
2607 | 709 | <widget class="QCheckBox" name="checkBoxAltAz"> | ||
2608 | 710 | <property name="toolTip"> | ||
2609 | 711 | <string>Horizontal coordinates</string> | ||
2610 | 712 | </property> | ||
2611 | 713 | <property name="text"> | ||
2612 | 714 | <string>Azimuth/Altitude</string> | ||
2613 | 715 | </property> | ||
2614 | 716 | <attribute name="buttonGroup"> | ||
2615 | 717 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2616 | 718 | </attribute> | ||
2617 | 719 | </widget> | ||
2618 | 720 | </item> | ||
2619 | 721 | <item row="4" column="1"> | ||
2620 | 722 | <widget class="QCheckBox" name="checkBoxSize"> | ||
2621 | 723 | <property name="toolTip"> | ||
2622 | 724 | <string>Angular or physical size</string> | ||
2623 | 725 | </property> | ||
2624 | 726 | <property name="text"> | ||
2625 | 727 | <string>Size</string> | ||
2626 | 728 | </property> | ||
2627 | 729 | <attribute name="buttonGroup"> | ||
2628 | 730 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2629 | 731 | </attribute> | ||
2630 | 732 | </widget> | ||
2631 | 733 | </item> | ||
2632 | 734 | <item row="3" column="1"> | ||
2633 | 735 | <widget class="QCheckBox" name="checkBoxType"> | ||
2634 | 736 | <property name="toolTip"> | ||
2635 | 737 | <string>The type of the object (star, planet, etc.)</string> | ||
2636 | 738 | </property> | ||
2637 | 739 | <property name="text"> | ||
2638 | 740 | <string>Type</string> | ||
2639 | 741 | </property> | ||
2640 | 742 | <attribute name="buttonGroup"> | ||
2641 | 743 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2642 | 744 | </attribute> | ||
2643 | 745 | </widget> | ||
2644 | 746 | </item> | ||
2645 | 747 | <item row="2" column="1"> | ||
2646 | 748 | <widget class="QCheckBox" name="checkBoxAbsoluteMag"> | ||
2647 | 749 | <property name="text"> | ||
2648 | 750 | <string>Absolute magnitude</string> | ||
2649 | 751 | </property> | ||
2650 | 752 | <attribute name="buttonGroup"> | ||
2651 | 753 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2652 | 754 | </attribute> | ||
2653 | 755 | </widget> | ||
2654 | 756 | </item> | ||
2655 | 757 | <item row="1" column="1"> | ||
2656 | 768 | <widget class="QCheckBox" name="checkBoxVisualMag"> | 758 | <widget class="QCheckBox" name="checkBoxVisualMag"> |
2657 | 769 | <property name="text"> | 759 | <property name="text"> |
2658 | 770 | <string>Visual magnitude</string> | 760 | <string>Visual magnitude</string> |
2659 | @@ -774,7 +764,7 @@ | |||
2660 | 774 | </attribute> | 764 | </attribute> |
2661 | 775 | </widget> | 765 | </widget> |
2662 | 776 | </item> | 766 | </item> |
2664 | 777 | <item row="8" column="0"> | 767 | <item row="0" column="1"> |
2665 | 778 | <widget class="QCheckBox" name="checkBoxConstellation"> | 768 | <widget class="QCheckBox" name="checkBoxConstellation"> |
2666 | 779 | <property name="toolTip"> | 769 | <property name="toolTip"> |
2667 | 780 | <string>3-letter IAU constellation abbreviation</string> | 770 | <string>3-letter IAU constellation abbreviation</string> |
2668 | @@ -787,6 +777,33 @@ | |||
2669 | 787 | </attribute> | 777 | </attribute> |
2670 | 788 | </widget> | 778 | </widget> |
2671 | 789 | </item> | 779 | </item> |
2672 | 780 | <item row="5" column="1"> | ||
2673 | 781 | <widget class="QCheckBox" name="checkBoxVelocity"> | ||
2674 | 782 | <property name="text"> | ||
2675 | 783 | <string>Velocity</string> | ||
2676 | 784 | </property> | ||
2677 | 785 | </widget> | ||
2678 | 786 | </item> | ||
2679 | 787 | <item row="6" column="1"> | ||
2680 | 788 | <widget class="QCheckBox" name="checkBoxDistance"> | ||
2681 | 789 | <property name="text"> | ||
2682 | 790 | <string>Distance</string> | ||
2683 | 791 | </property> | ||
2684 | 792 | <attribute name="buttonGroup"> | ||
2685 | 793 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2686 | 794 | </attribute> | ||
2687 | 795 | </widget> | ||
2688 | 796 | </item> | ||
2689 | 797 | <item row="7" column="1"> | ||
2690 | 798 | <widget class="QCheckBox" name="checkBoxSiderealTime"> | ||
2691 | 799 | <property name="text"> | ||
2692 | 800 | <string>Sidereal time</string> | ||
2693 | 801 | </property> | ||
2694 | 802 | <attribute name="buttonGroup"> | ||
2695 | 803 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2696 | 804 | </attribute> | ||
2697 | 805 | </widget> | ||
2698 | 806 | </item> | ||
2699 | 790 | <item row="8" column="1"> | 807 | <item row="8" column="1"> |
2700 | 791 | <widget class="QCheckBox" name="checkBoxExtra"> | 808 | <widget class="QCheckBox" name="checkBoxExtra"> |
2701 | 792 | <property name="toolTip"> | 809 | <property name="toolTip"> |
2702 | @@ -800,16 +817,6 @@ | |||
2703 | 800 | </attribute> | 817 | </attribute> |
2704 | 801 | </widget> | 818 | </widget> |
2705 | 802 | </item> | 819 | </item> |
2706 | 803 | <item row="7" column="1"> | ||
2707 | 804 | <widget class="QCheckBox" name="checkBoxSiderealTime"> | ||
2708 | 805 | <property name="text"> | ||
2709 | 806 | <string>Sidereal time</string> | ||
2710 | 807 | </property> | ||
2711 | 808 | <attribute name="buttonGroup"> | ||
2712 | 809 | <string notr="true">buttonGroupDisplayedFields</string> | ||
2713 | 810 | </attribute> | ||
2714 | 811 | </widget> | ||
2715 | 812 | </item> | ||
2716 | 813 | </layout> | 820 | </layout> |
2717 | 814 | </widget> | 821 | </widget> |
2718 | 815 | </item> | 822 | </item> |
2719 | @@ -2102,16 +2109,9 @@ | |||
2720 | 2102 | <tabstop>saveSettingsAsDefaultPushButton</tabstop> | 2109 | <tabstop>saveSettingsAsDefaultPushButton</tabstop> |
2721 | 2103 | <tabstop>restoreDefaultsButton</tabstop> | 2110 | <tabstop>restoreDefaultsButton</tabstop> |
2722 | 2104 | <tabstop>checkBoxName</tabstop> | 2111 | <tabstop>checkBoxName</tabstop> |
2723 | 2105 | <tabstop>checkBoxVisualMag</tabstop> | ||
2724 | 2106 | <tabstop>checkBoxCatalogNumbers</tabstop> | 2112 | <tabstop>checkBoxCatalogNumbers</tabstop> |
2725 | 2107 | <tabstop>checkBoxAbsoluteMag</tabstop> | ||
2726 | 2108 | <tabstop>checkBoxRaDecJ2000</tabstop> | 2113 | <tabstop>checkBoxRaDecJ2000</tabstop> |
2727 | 2109 | <tabstop>checkBoxGalacticCoordinates</tabstop> | ||
2728 | 2110 | <tabstop>checkBoxSupergalacticCoordinates</tabstop> | ||
2729 | 2111 | <tabstop>checkBoxRaDecOfDate</tabstop> | 2114 | <tabstop>checkBoxRaDecOfDate</tabstop> |
2730 | 2112 | <tabstop>checkBoxSize</tabstop> | ||
2731 | 2113 | <tabstop>checkBoxDistance</tabstop> | ||
2732 | 2114 | <tabstop>checkBoxType</tabstop> | ||
2733 | 2115 | <tabstop>checkBoxEclipticCoordsJ2000</tabstop> | 2115 | <tabstop>checkBoxEclipticCoordsJ2000</tabstop> |
2734 | 2116 | <tabstop>checkBoxEclipticCoordsOfDate</tabstop> | 2116 | <tabstop>checkBoxEclipticCoordsOfDate</tabstop> |
2735 | 2117 | <tabstop>enableKeysNavigationCheckBox</tabstop> | 2117 | <tabstop>enableKeysNavigationCheckBox</tabstop> |
This merge proposal was moved to github: /github. com/Stellarium/ stellarium/ pull/13
https:/
and merged at: /github. com/Stellarium/ stellarium/ commit/ c93f263720d1b58 04fd6f6da1abdb8 c586b0d298
https:/
Thanks Georg :)