galactics / beyond

Flight Dynamic Library
MIT License
49 stars 8 forks source link

Allow for hyperbolic keplerian form #27

Closed galactics closed 4 years ago

galactics commented 5 years ago

At the moment, certain conversion from cartesian to keplerian forms only work for elliptical orbits. It should be changed in order to have no particular preconception of the orbit shape. For example: the computation of the semi-parameter p in Form._cartesian_to_keplerian() does not work for hyperbolic cases.

Other transformation should be also checked for this kind of behaviour

galactics commented 5 years ago

In fact, the Form._cartesian_to_keplerian() method is correct when a is negative, which is the case when dealing with hyperbolic orbits, thanks to the formula a = -center.µ / (2 * K), as the energy K is negative when elliptic, and positive when hyperbolic. So this specific case is not problematic, as long as we consider a negative semi major axis to be correct. I've seen both in the literature.

galactics commented 4 years ago

commit 48cab0c147c4c84ccd213b3d81710fb77ebf445e seems to tackle most of the problems for hyperbolic form. Closing for now