KeplerianElements
このコンテンツはまだ日本語訳がありません。
Defined in: kepler.rs:207
pub struct KeplerianElements { pub semi_major_axis: f64, pub eccentricity: f64, pub inclination: f64, pub raan: f64, pub argument_of_periapsis: f64, pub true_anomaly: f64,}Classical Keplerian orbital elements.
Degenerate geometries
Section titled “Degenerate geometries”Two of the six angles are undefined when the orbit is circular and/or
equatorial. KeplerianElements::from_state_vector resolves this with the
classical singular conventions (Vallado, Fundamentals of Astrodynamics and
Applications, §2.4), which fold the undefined angle into the next
well-defined one so that the state is still fully recoverable by
KeplerianElements::to_state_vector:
| geometry | raan | argument_of_periapsis | true_anomaly |
|---|---|---|---|
| general | Ω | ω | ν |
circular inclined (e ≈ 0) | Ω | 0 | argument of latitude u = ω + ν |
eccentric equatorial (i ≈ 0 or π) | 0 | true longitude of periapsis ϖ = Ω + ω | ν |
| circular equatorial | 0 | 0 | true longitude λ = Ω + ω + ν |
For the retrograde equatorial cases (i ≈ π) the stored angle is the
negated in-plane longitude, because to_state_vector maps i = π, Ω = 0
onto a clockwise sweep of the x-y plane. That keeps the round trip exact for
both i ≈ 0 and i ≈ π.
Fields
Section titled “Fields”semi_major_axis
Section titled “semi_major_axis”semi_major_axis: f64
Semi-major axis [km]
eccentricity
Section titled “eccentricity”eccentricity: f64
Eccentricity (dimensionless)
inclination
Section titled “inclination”inclination: f64
Inclination [rad]
raan: f64
Right ascension of ascending node (RAAN) [rad]
argument_of_periapsis
Section titled “argument_of_periapsis”argument_of_periapsis: f64
Argument of periapsis [rad]
true_anomaly
Section titled “true_anomaly”true_anomaly: f64
True anomaly [rad]
Methods
Section titled “Methods”from_state_vector()
Section titled “from_state_vector()”fn from_state_vector(pos: &Vector3<f64>, vel: &Vector3<f64>, mu: f64) -> Self
Convert a Cartesian state vector (position, velocity) to Keplerian elements.
Degenerate geometries (circular and/or equatorial) follow the singular
conventions documented on KeplerianElements.
Arguments
Section titled “Arguments”pos- Position vector [km]vel- Velocity vector [km/s]mu- Gravitational parameter [km^3/s^2]
to_state_vector()
Section titled “to_state_vector()”fn to_state_vector(&self, mu: f64) -> (Vector3<f64>, Vector3<f64>)
Convert Keplerian elements to a Cartesian state vector (position, velocity).
Returns
Section titled “Returns”A tuple of (position [km], velocity [km/s])
from_mean_anomaly()
Section titled “from_mean_anomaly()”fn from_mean_anomaly(semi_major_axis: f64, eccentricity: f64, inclination: f64, raan: f64, argument_of_periapsis: f64, mean_anomaly: f64) -> Self
Create Keplerian elements from mean anomaly (converting to true anomaly internally).
This is useful when working with TLE data which provides mean anomaly.
period()
Section titled “period()”fn period(&self, mu: f64) -> f64
Orbital period [s]: T = 2π√(a³/μ)
energy()
Section titled “energy()”fn energy(&self, mu: f64) -> f64
Specific orbital energy [km²/s²]: ε = -μ/(2a)