Caltech-IPAC / kete

Kete Solar System Survey tools
https://Caltech-IPAC.github.io/kete
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Orbital element issues for parabolic and hyperbolic orbits #62

Closed dahlend closed 3 months ago

dahlend commented 3 months ago

Fixes #60

This fixes the true anomaly / eccentric anomaly errors.

During fixing this, errors were found in the two body parabolic propagation computation. This computation can be written as a 3rd order polynomial. Finding the roots of this polynomial can be done directly, albeit with some complicated algebra. There was a term missing in this algebra which resulted in the correct answer in some cases (notably the cases which the code was testing for), however it would fail in other cases. This PR fixes this.

During the attempt to fix the above, the newton-raphson algorithm implementation was extensively checked, and some optimizations were applied. 2-body orbit propagation has been sped up for the most general cases by about 2-3x.

dahlend commented 3 months ago

The plot from #60 after this PR:

image