Skip to content

KeplerianElements.from_state_vector() error bounds too small and/or non-relative #23

@connorjak

Description

@connorjak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions