Repository navigation
Conversation
Member
|
Interesting, I've not tried an orbit with a hyperbolic eccentric anomaly before. I'm busy this month but will plan to look at this in November, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A hyperbolic eccentric anomaly can exceed pi in either direction.
eccentric_anomaly()currently wraps it into [-pi, pi], which can move the recovered perihelion date by years. This affects scalar and array positions.For example, a two-body orbit followed ten years past perihelion:
Before:
-1.90112and3819.499days of perihelion-date error. After:4.382066and0.0days at the displayed precision.Remove the wrapping in both hyperbolic branches. The new regressions parameterize the Cartesian hyperbola independently and check both the anomaly and recovered perihelion, including inbound positions and the +/-pi boundaries.
I also replayed archived JPL elements for 1I/ʻOumuamua and 2I/Borisov against CSPICE conics and an independent scalar Kepler solve. Twenty incorrect cases out of sixty become correct across scalar and batch calls. Rebuilding the orbit from the recovered perihelion and following it thirty more days agrees within 98 metres; all complete position and apparent-observation controls, and the elliptical-element controls, stay identical. This validates two-body processing, not the physical accuracy of a long-term comet ephemeris.
Validation: full Python 3.8 suite and documentation doctests pass. Python 3.12/NumPy 2.5 has the same 41 deprecation-as-error failures on unchanged upstream and this branch; the two new tests pass. The native workload also passes on NumPy 2.2 and 2.5.