danielk333 / pyorb

Python implementation of the definition of Kepler orbits and related transformations, nothing more, nothing less.
https://danielk.developer.irf.se/pyorb/
MIT License
9 stars 1 forks source link

kep <-> equi fixed, with tests #10

Closed togry closed 1 month ago

togry commented 2 months ago

Reverted to the equinoctial elements by Broucke and Cefola (1972) using tan(i/2) rather than sin(i/2), since these seem both more prevalent, and since this was the reference given in the comments in the code. Conversion between keplerian and equinoctial elements implemented, with a couple of tests.

Also added function to check for equivalence for Keplerian elements when degenerated (i and/or e equal to zero), but this functions needs unit tests.

Added a separate module for constants, which will not allow redefinition or deletion of existing constants (but imports to other packages can be overwritten, obviously).

togry commented 2 months ago

Also, moved overall description of elements to module-level docstring, slimming down docstrings for individual routines.

danielk333 commented 1 month ago

Awesome, ill add some code to get this into the class API too, then we should be good to go