Browse Source
Bug: r_dot_e was incorrectly divided by mu instead of r_mag*e_mag, causing cos_nu values of ~7.5e6 (far outside [-1,1]) which made acos() return NaN. Fix: Calculate cos_nu correctly as r_dot_e/(r_mag*e_mag) and clamp to [-1, 1] to handle floating-point precision errors. This fixes all cartesian <-> orbital elements round-trip conversion tests.main
1 changed files with 7 additions and 3 deletions
Loading…
Reference in new issue