KeplerianElements
Defined in: kepler.rs:82
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.
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.
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)