pub struct Tle { /* private fields */ }Expand description
Two-Line Element Set (TLE) data structure.
A TLE is a standardized format for describing the orbit of an Earth-orbiting object. TLEs are used with the SGP4/SDP4 propagators to predict satellite positions at future times.
Implementations§
Source§impl Tle
impl Tle
Sourcepub fn parse_3le(_name: &str, line1: &str, line2: &str) -> TleResult<Self>
pub fn parse_3le(_name: &str, line1: &str, line2: &str) -> TleResult<Self>
Parse a TLE from three lines (name + two TLE lines).
§Arguments
name- Satellite name (ignored)line1- First line of the TLEline2- Second line of the TLE
Sourcepub fn catalog_number(&self) -> &str
pub fn catalog_number(&self) -> &str
Get the NORAD catalog number.
Sourcepub fn classification(&self) -> char
pub fn classification(&self) -> char
Get the security classification.
Sourcepub fn international_designator(&self) -> &str
pub fn international_designator(&self) -> &str
Get the international designator.
Sourcepub fn mean_motion_dot(&self) -> f64
pub fn mean_motion_dot(&self) -> f64
Get the first derivative of mean motion (rev/day²).
Sourcepub fn mean_motion_double_dot(&self) -> f64
pub fn mean_motion_double_dot(&self) -> f64
Get the second derivative of mean motion (rev/day³).
Sourcepub fn ephemeris_type(&self) -> u8
pub fn ephemeris_type(&self) -> u8
Get the ephemeris type.
Sourcepub fn element_set_number(&self) -> u32
pub fn element_set_number(&self) -> u32
Get the element set number.
Sourcepub fn inclination_deg(&self) -> f64
pub fn inclination_deg(&self) -> f64
Get the orbital inclination in degrees.
Sourcepub fn eccentricity(&self) -> f64
pub fn eccentricity(&self) -> f64
Get the orbital eccentricity.
Sourcepub fn arg_perigee_deg(&self) -> f64
pub fn arg_perigee_deg(&self) -> f64
Get the argument of perigee in degrees.
Sourcepub fn mean_anomaly_deg(&self) -> f64
pub fn mean_anomaly_deg(&self) -> f64
Get the mean anomaly at epoch in degrees.
Sourcepub fn mean_motion(&self) -> f64
pub fn mean_motion(&self) -> f64
Get the mean motion in revolutions per day.
Sourcepub fn rev_number(&self) -> u32
pub fn rev_number(&self) -> u32
Get the revolution number at epoch.
Sourcepub fn period_minutes(&self) -> f64
pub fn period_minutes(&self) -> f64
Get the orbital period in minutes.
Sourcepub fn period_seconds(&self) -> f64
pub fn period_seconds(&self) -> f64
Get the orbital period in seconds.
Sourcepub fn propagate_minutes(&self, minutes: f64) -> TleResult<TEMEState>
pub fn propagate_minutes(&self, minutes: f64) -> TleResult<TEMEState>
Propagate the TLE by a number of minutes from the TLE epoch.
§Arguments
minutes- Minutes since TLE epoch (can be negative)
Sourcepub fn get_rv_at_time(
&self,
epoch: &DateTime<Utc>,
) -> TleResult<((f64, f64, f64), (f64, f64, f64))>
pub fn get_rv_at_time( &self, epoch: &DateTime<Utc>, ) -> TleResult<((f64, f64, f64), (f64, f64, f64))>
Get position and velocity at a specific epoch.
Returns ((x, y, z), (vx, vy, vz)) in km and km/s.
Sourcepub fn minutes_since_epoch(&self, target: &DateTime<Utc>) -> f64
pub fn minutes_since_epoch(&self, target: &DateTime<Utc>) -> f64
Calculate minutes since TLE epoch.
Sourcepub fn accuracy_warning(&self, epoch: &DateTime<Utc>) -> u8
pub fn accuracy_warning(&self, epoch: &DateTime<Utc>) -> u8
Check if propagation to a given epoch is likely to be accurate.
TLEs are typically valid for a few days before/after their epoch. This function returns a warning level based on the time difference.
§Returns
0- Within ±1 day (good accuracy)1- Within ±3 days (acceptable)2- Within ±7 days (degraded)3- Beyond ±7 days (poor accuracy)