orbital
orbital copied to clipboard
KeplerianElements.from_state_vector() error bounds too small and/or non-relative
For Low Earth Orbit inputs of
r = np.array([-6478150,0,1200000])
v = np.array([0.0,-7844.111438052,0.0])
The checked calculation in from_state_vector()
uses these comparisons:
abs(out.v - v)
# 0.000113, 9.1e-13, 2.1e-5
abs(out.r - r)
# 1.9e-9, 0.0982, 1.164e-9
With a hardcoded tolerance of 1e-4. The position y element exceeds that here.
This could be resolved by using relative error instead of absolute.
#21, #18, and #17 seem related.