pub enum Frame {
ITRF,
TIRS,
CIRS,
GCRF,
TEME,
EME2000,
ICRF,
LVLH,
RTN,
NTW,
}Expand description
Reference frame identifier.
Used throughout satkit to tag vectors with the coordinate system in which they are expressed. For Earth-centred inertial and Earth-fixed frames the definitions follow the IERS conventions; for spacecraft-local orbital frames see the individual variant docs.
Variants§
ITRF
International Terrestrial Reference Frame
TIRS
Terrestrial Intermediate Reference System
CIRS
Celestial Intermediate Reference System
GCRF
Geocentric Celestial Reference Frame
TEME
True Equator Mean Equinox
EME2000
Earth Mean Equator 2000
ICRF
International Celestial Reference Frame
LVLH
Local Vertical Local Horizontal
- z axis = -r (nadir)
- y axis = -h (opposite angular momentum, h = r × v)
- x axis completes the right-handed system (approximately velocity direction for circular orbits)
RTN
Radial / Tangential / Normal — CCSDS OEM/OMM/ODM convention.
Also known as RSW (Vallado’s Fundamentals of Astrodynamics)
or RIC (Radial / In-track / Cross-track, older NASA usage and
Clohessy-Wiltshire literature). The three names refer to the
same axes; different communities use different letters. Compile-
time aliases Frame::RSW and Frame::RIC are available so
user code can spell the frame whichever way matches the source
it’s transcribing from — all three resolve to the same enum
variant.
- R (radial): unit vector along position, outward from Earth centre
- T (tangential / in-track): perpendicular to R in the orbit
plane, in the prograde direction. Not parallel to the
velocity vector unless the flight-path angle is zero (circular
orbit, or perigee/apogee of an eccentric orbit). For eccentric
orbits at non-apsidal true anomaly, use
Frame::NTWif you want an axis parallel to velocity. - N (normal / cross-track): along the angular momentum direction h = r × v, completing the right-handed system
This frame is the standard choice for CCSDS OEM / OMM / ODM
orbit data messages (which label it RTN), for relative
motion formulations (Hill / Clohessy-Wiltshire equations, often
written in RIC), and for radial/normal burn components whose
physical meaning is tied to the position vector. satkit’s
state-vector uncertainty API accepts RTN as one of several
frames — see
SatState::set_pos_uncertainty.
NTW
Velocity-aligned orbital frame (Vallado §3.3).
- N (normal-to-velocity, in-plane): T̂ × Ŵ. For a circular orbit this is the outward radial direction; for an eccentric orbit it leans away from the radial by the flight-path angle.
- T (tangent): v̂, the unit velocity vector
- W (cross-track, out of plane): (r × v) / |r × v|, same as RIC’s C axis
This is the natural frame for thrust-along-velocity maneuvers:
a pure +T delta-v of magnitude Δv adds exactly Δv to |v| and
changes orbital energy by v · Δv. For eccentric orbits at non-apsidal
true anomalies, NTW and RIC differ by the flight-path angle, so the
choice matters. Use NTW when planning prograde/retrograde burns,
Hohmann transfers, or anything else where “along velocity” is the
physically meaningful direction. Use Frame::RTN when you want
“perpendicular to position” semantics or when interoperating with
CCSDS OEM / OMM covariance messages (which use this frame under
the RTN name).
Implementations§
Source§impl Frame
impl Frame
Sourcepub const RSW: Self = Self::RTN
pub const RSW: Self = Self::RTN
Compile-time alias for Frame::RTN — Vallado’s name for the same
Radial / S=(W×R) / W=(R×V) orbital frame. Provided so code
transcribing formulas from Vallado’s Fundamentals of Astrodynamics
can use the source’s variable names verbatim. Semantically identical
to Frame::RTN; Display always renders as RTN.
Sourcepub const RIC: Self = Self::RTN
pub const RIC: Self = Self::RTN
Compile-time alias for Frame::RTN — the older NASA /
Clohessy-Wiltshire literature name for the same axes (Radial /
In-track / Cross-track). Provided for backward compatibility with
code that was written against the previous canonical name in
earlier satkit versions, and for readers of papers that use
“RIC” rather than “RTN”. Semantically identical to Frame::RTN;
Display always renders as RTN.