orbital
orbital copied to clipboard
elements_from_state_vector returns bad result
from numpy import array
from orbital import elements_from_state_vector
r = array([-7.28535000e+07 8.92198056e-09 0.00000000e+00])
v = array([-1.84818933e+00 2.18661193e+03 0.00000000e+00])
mu = 1811405020000000.0
print(elements_from_state_vector(r, v, mu))
prints
OrbitalElements(a=40301757.83775852, e=0.8077004603395054, i=3.141592653589793, raan=nan, arg_pe=nan, f=3.1413914189703034)
raan and arg_pe are nan.
I believe this is a duplicate of #18 (it's a retrograde non-inclined orbit). I posted a detailed analysis there.