Expand description
State-vector to classical orbital element conversions.
Authoritative implementations of the standard two-body conversions between an inertial Cartesian state (ECI position and velocity) and the classical Keplerian elements; language bindings are thin marshaling layers over these functions.
rv2coe- position/velocity to classical elements (Algorithm 9, Vallado 2022, pp. 113-116).coe2rv- classical elements to position/velocity (Algorithm 10, Vallado 2022, pp. 118-120).
§Angle conventions
All angles in ClassicalElements are radians, normalized to [0, 2*pi)
except inclination which lies in [0, pi]. The right ascension of the
ascending node, argument of perigee, and true anomaly follow the Vallado
reference conventions, including the canonical auxiliary outputs that resolve
the degenerate elements of circular and equatorial orbits:
- argument of latitude (
u = argp + nu) for circular inclined orbits, where the argument of perigee is undefined; - longitude of perigee (
lonper) for elliptical equatorial orbits, where the node is undefined; - true longitude (
truelon) for circular equatorial orbits, where both the node and the argument of perigee are undefined.
The auxiliary outputs that do not apply to a given orbit are returned as
f64::NAN. coe2rv reads back whichever auxiliary angle the orbit type
requires, so a ClassicalElements produced by rv2coe round-trips
through coe2rv regardless of orbit type.
Structs§
- Classical
Elements - Classical (Keplerian) orbital elements in the Vallado convention.
Enums§
- Elements
Error - Error returned by the classical-element conversions.
- Orbit
Type - Geometric classification of a two-body orbit, which determines which of the classical elements are defined and which auxiliary angle resolves the degenerate ones.