Stellarium / stellarium

Stellarium is a free GPL software which renders realistic skies in real time with OpenGL. It is available for Linux/Unix, Windows and macOS. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
https://stellarium.org
GNU General Public License v2.0
7.57k stars 818 forks source link

Sidereal and tropical years on other planets? #2114

Open Atque opened 2 years ago

Atque commented 2 years ago

Maybe this is just me not getting the concept, but I think Stellarium counts sidereal and tropical years incorrectly when viewing from other planets.

I have created shortcuts for adding and subtracting sidereal and tropical years. I'm not sure about the tropical year, because some sources say it only applies to Earth, but the sidereal year does not. When viewing from Jupiter, a sidereal year would be about 11.8 years, but Stellarium claims it is only just short of 5 years. Am I missing something?

alex-w commented 2 years ago

Tropical year and mean tropical year are applicable and compute for Earth only. Of course we may decline application tropical year and mean tropical year on non-terrestial locations, but I think the current state maybe good for didactic purposes.

P.S. At least we compute tropical year for Earth only

gzotti commented 2 years ago

@Atque What is your definition of sidereal year? Where do you see the 5 years for Jupiter? Probably these data are hard to get when the planet's precession is not well known. I think for other planets the anomalistic year (orbital period, perihelion-perihelion) is most relevant.

Atque commented 2 years ago

@gzotti I tried setting a shortcut for adding/subtracting 1 sidereal year, and it jumps about 5 years into the future or past.

Anomalistic year does not seem to work either. It does not show Mars having a 687 (earth)day year.

gzotti commented 2 years ago

This should be fixed then.

alex-w commented 2 years ago

Anomalistic year is computed for Earth only: https://github.com/Stellarium/stellarium/blob/master/src/core/StelCore.cpp#L1570

alex-w commented 2 years ago

Sidereal year should be correct: https://github.com/Stellarium/stellarium/blob/master/src/core/StelCore.cpp#L1513 but what exactly the method getSiderealPeriod() returns need to checked.

alex-w commented 2 years ago

Probably all add*Years(double n) methods should be revised for non-terrestial locations.

Atque commented 2 years ago

@alex-w I think sidereal year is also wrong, because (correct me if I'm wrong) the Sun would move only very slightly between sidereal years, but on Mars, it moves up to 10 degrees.

gzotti commented 2 years ago

It seems all current methods have been designed only with earth in mind. This should either be fixed in the action descriptions ("Add 1 anomalistic earth year" etc), or fixed in code to mean "... of current planet". The latter would be better. It's IMHO no big problem to not have tropical years on the other planets. Until last year their orientation was frozen in space, and the WGCCRE descriptions don't include definitions of the seasons (and even less how to compute...), so you will currently have to observe from areocenter to identify summer solstice on Mars.

Atque commented 2 years ago

@gzotti I think we've discussed this earlier, but wouldn't it be fairly easy to find the times when the Sun is at highest declination and 0 declination even from other planets? In that case, we find the solstices and equinoxes (and may even put markings on them).

gzotti commented 2 years ago

It would be better to really know how to define a planet ecliptic and find longitudes n*90 [n=0...3]. If I remember correctly we found that the "current" ecliptic (orbital plane) could be found from the motion vector, but not its zero point. When these were solved, we might be able to use ecliptical grids on the other planets as well. But it's not a hot topic for me atm. We accept geometrical elaborations in celestial mechanics (compatible with WGCCRE models) and working code in pull requests on that!

alex-w commented 2 years ago

Method getSiderealPeriod() return 4331.87000 days for duration of sidereal year of Jupiter. Here I found sidereal orbit period 4332.589 days for Jupiter. Checking rotation by stars is passed on Jupiter.

Atque commented 2 years ago

@alex-w Is this after your fix https://github.com/Stellarium/stellarium/commit/30ce741f8118b7ff5561e20bfc0735cc2e432b5c?

alex-w commented 2 years ago

Yes, but this is cosmetic fix - he doesn't touch maths.

gzotti commented 2 years ago

In principle the VSOP algorithms also provide osculating elements. From semimajor axis you can derive (anomalistic) period. For the DE solutions, the state vector (position, velocity) can be converted to osculating elements (not yet implemented), which include again semimajor axis. Probably it should however be more clearly defined whether "mean sidereal period" means "viewed from earth" (something the Babylonians have already noted) or "viewed from the planet center". I cannot say how <5 years would describe Jupiter, though.