-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
Orbit epoch #2027
Orbit epoch #2027
Conversation
- better use half orbital period for minor planets. - Emit warning in InfoString if time outside orbit_good.
does that default to sth meaningful? Do we need it at all?stellarium/guide/app_ssystem_ini.tex Lines 363 to 368 in 7c21f77
This comment was generated by todo based on a
|
Hello @gzotti! Thank you for this enhancement. |
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 |
Please update Please move "note" line to the end of list. |
I would still leave "comet_orbit" for compatibility with earlier versions. In 0.21+ we need no explicit orbit_func at all, but understand kepler_orbit and comet_orbit. But I often run earlier versions for comparison. The NOTE in infostring is just below the coordinates. Do you mean I should move that to the end of the infostring? |
But I said about default file, which will be used in newly installation only. Existed
Yes, at end of the infosting - this line will be more visible here. |
Yes, we need it to some moons and probably to some asteroids/comets |
It's an oldish comment. We could just use one revolution as default for closed orbits. I think in previous years this and orbit_good was sometimes mixed up a bit. Probably we should use this to plot comet orbit around perihelion, and report orbit_good around epoch? Or still plot orbit with this value around epoch as well? These are things to still think over a bit. |
It’s all not for this PR |
- it is better to keep hat for a while (while 0.*?) for better interoperability while running older versions.
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.
Thank you very much!
Don't merge yet. I may want to check a few more things. |
OK, please do it yourself |
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 There exists 1P/Halley (2061)
- does it fit the current algorithm? 2061 is more than 3 years (approx 1000 days) in the future. It has orbit_good = 20000
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 have a look at axd1967@984084d
- I really would avoid
1000
but put this in a constant 0
and-1
beg to be cast in enums. but i somehow have a feeling that0
could lead to bugs
(you can fetch that branch to make work easier)
The element set has an epoch of 1994. 20.000 days is definitely uselessly much for assume anything accurate, but it might be good enough for plotting an orbit. I am just adding a distinction about whether the orbital data is "good enough for plotting an orbit" (defaults to 1/2 sidereal period or orbit_good) or "good enough to be sufficient for setting a telescope". The latter has higher requirements and uses the smaller of (epoch+/-orbit_good) and (epoch+/-1 year) to suggest updating elements after 1 year. |
consider somehow coding these two requirements more explicitly? I proposed two enums to get rid of the magic |
- Either assumed accurate or good enough for orbit plotting
This pull request introduces 1 alert when merging 48d05ca into cf52aa7 - view on LGTM.com new alerts:
|
The changes is good for me. |
Add state vector equations from Heafner to create orbits from position+velocity,stellarium/src/core/modules/Orbit.hpp Lines 65 to 70 in 34b682f
This comment was generated by todo based on a
|
This pull request introduces 1 alert when merging 34b682f into cf52aa7 - view on LGTM.com new alerts:
|
(According to my understanding this is a false positive. All cases in the switch are handled, and whatever is not handled by some orbit object returns false. ) |
one day Murphy will knock on that door... a switch should almost always include a default, even if never used. it's part of defensive programming. and it's cheap to add a default case; just add a warning (that should never appear; so how about as |
Do you know the clang in-editor warning that all switch cases have been fulfilled so there is no need for a default clause? Else, show me the logical error in the current code. Which code path does not return anything? |
I never wrote that the current situation is wrong ;-) |
You did it 2 hours ago |
Hello @gzotti! Please check the fresh version (development snapshot) of Stellarium: |
- addition to #2027 - also add a ref element
Description
This finally adds the epoch information to the KeplerOrbit object.
For some time now we have avoided showing objects (minor bodies) when their orbital elements were outdated.
However, it was always assumed that the orbital elements' epoch was equal to perihelion date, which is not necessarily the case.
This lead to unclear situations like wrong cut-away dates for asteroids with several years' orbital period.
Orbital elements should in fact be updated regularly. I also added a warning in the InfoString when date is outside the "good" range. It may be discussed if the orbit_good evaluation or Planet::hasValidPositionalData() should be extended to allow differentiation between elements "good enough to show closed orbit" (years) and "good enough to find in telescope" (months).
Fixes #2000 (issue)
Screenshots (if appropriate):
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: