-
-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add parallax effect to stars #4023
base: master
Are you sure you want to change the base?
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
This is an automatically generated QA checklist based on modified files. |
1908f9f
to
10d34e9
Compare
A real world check with Proxima Cen. NASA New Horizon's observation where the parallax computed here match what New Horizon has observed "near" Pluto in Apr 2020 (I emphasize "near" because it has passed Pluto in 2015 so long gone from Pluto in 2020 but it is the closest object I can select in Stellarium). Ref: https://www.nasa.gov/solar-system/nasas-new-horizons-conducts-the-first-interstellar-parallax-experiment/ This is the images NASA took, I have added a few anchors to help you navigate: |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
10d34e9
to
d038b29
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
The placement of the marker ring is off (should be simple to fix), but the result is impressive! |
Stars don't connect to the constellation lines either, perhaps the same reason. EDIT: Nevermind, I was using yesterday's build. |
Awesome feature! When multiplier is 1000 - I think it can be very impressive demo for real planetariums too |
src/core/modules/StarWrapper.hpp
Outdated
double withParallax = core->getUseParallax() * core->getParallaxFactor(); | ||
Vec3d diffPos(0., 0., 0.); | ||
if (withParallax) { | ||
static SolarSystem *ssystem=GETSTELMODULE(SolarSystem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs an
#include "StelModuleMgr.hpp"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/gui/configurationDialog.ui
Outdated
@@ -186,7 +186,7 @@ | |||
<item row="1" column="0"> | |||
<widget class="QStackedWidget" name="configurationStackedWidget"> | |||
<property name="currentIndex"> | |||
<number>0</number> | |||
<number>2</number> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ui file has to be patched manually to remain compatible with Qt5.
You can use this script on the command line. (type changed to txt for github)
RESET_UI_TO_QT5.sh.txt
In addition, this currentIndex should be left at 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gzotti please put your script in util
directory or in stellarium-data
repository
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
This is fabulous. Watching Proxima Cen or Barnard's star with all effects (nutation, aberration, parallax) together with equatorial grid is a somewhat dizzying experience, showing the difficulties in actually measuring position. And greatly funny to see a two-color rendition of Barnard's star, Proxima, Wolf 359 or Groombridge 1830 in DSS - you can date the plates! Yes, at 1000x it reminds me of one special projector in Vienna's old Zeiss Model IV which had a wobbling Sirius to demonstrate parallax, probably at 1000x. Not many bright stars can be said to have notable parallax, though. |
Hmm, standing on another planet/moon and pressing "Return to default location" crashes the program for me. |
Uh, yes, selecting Jupiter and pressing GOTO (Ctrl-G) also crashes. IIRC the same call. |
e6013f6
to
31f8825
Compare
…rash (also caching Aberration)
The crash when pressing "Return to default location" is fixed (at least for me). I did not test much for now but I've quickly added code to cache Vec3D for parallax and aberration (only recompute if JD>1 or on a different planet). |
As discussed in #3982, this PR will add support for modelling parallax effect caused by the difference between the Earth's heliocentric location at the star catalog epoch and the current observer's location. Meaning the parallax effect here should be correctly modelled on different planets/moons too. This PR depends on the work of PR #3992 to be merged first which is work-in-progress, I am opening this PR now to show a work-in-progress preview.
This PR also adds support to update parallax of stars displayed in info string when on different planet/moon.
Fixes # (issue)
Screenshots (if appropriate):
I have added an option to enable/disable Parallax effect, and to exaggerate parallax effect from 1x to 1000x.
To sanity check for now, you can stay on Earth or go to a different planet, enable parallax but disable aberration (so only parallax effect is shown), display ecliptic plane line. Stars near the ecliptic plane should move in 1d motion parallel to the ecliptic plane while stars farthest from the ecliptic plane should move in circular motion. The period of the motion of stars should match the orbital period of the planet. Keeping the same exaggeration factor, stars should have greater motion caused by parallax when you are on an outer planet like Uranus.
Here are video showing the parallax effect:
On earth near ecliptic plane (exaggerate 1000x):
1.mov
On earth near ecliptic pole (exaggerate 1000x):
2.mov
On Uranus near ecliptic plane (exaggerate 1000x):
3.mov
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: