Struct sgp4::Orbit

source ·
pub struct Orbit {
    pub inclination: f64,
    pub right_ascension: f64,
    pub eccentricity: f64,
    pub argument_of_perigee: f64,
    pub mean_anomaly: f64,
    pub mean_motion: f64,
}
Expand description

The Brouwer orbital elements

Fields§

§inclination: f64

Angle between the equator and the orbit plane in rad

§right_ascension: f64

Angle between vernal equinox and the point where the orbit crosses the equatorial plane in rad

§eccentricity: f64

Shape of the orbit

§argument_of_perigee: f64

Angle between the ascending node and the orbit’s point of closest approach to the earth in rad

§mean_anomaly: f64

Angle of the satellite location measured from perigee in rad

§mean_motion: f64

Mean number of orbits per day in rad.min⁻¹

Implementations§

source§

impl Orbit

source

pub fn from_kozai_elements( geopotential: &Geopotential, inclination: f64, right_ascension: f64, eccentricity: f64, argument_of_perigee: f64, mean_anomaly: f64, kozai_mean_motion: f64 ) -> Result<Self, KozaiElementsError>

Creates a new Brouwer orbit representation from Kozai elements

If the Kozai orbital elements are obtained from a TLE or OMM, the convenience function sgp4::Constants::from_elements can be used instead of manually mapping the Elements fields to the Constants::new parameters.

Arguments
  • geopotential - The model of Earth gravity to use in the conversion
  • inclination - Angle between the equator and the orbit plane in rad
  • right_ascension - Angle between vernal equinox and the point where the orbit crosses the equatorial plane in rad
  • eccentricity - The shape of the orbit
  • argument_of_perigee - Angle between the ascending node and the orbit’s point of closest approach to the earth in rad
  • mean_anomaly - Angle of the satellite location measured from perigee in rad
  • kozai_mean_motion - Mean orbital angular velocity in rad.min⁻¹ (Kozai convention)
Example
let elements = sgp4::Elements::from_tle(
    Some("ISS (ZARYA)".to_owned()),
    "1 25544U 98067A   20194.88612269 -.00002218  00000-0 -31515-4 0  9992".as_bytes(),
    "2 25544  51.6461 221.2784 0001413  89.1723 280.4612 15.49507896236008".as_bytes(),
)?;
let orbit_0 = sgp4::Orbit::from_kozai_elements(
    &sgp4::WGS84,
    elements.inclination * (core::f64::consts::PI / 180.0),
    elements.right_ascension * (core::f64::consts::PI / 180.0),
    elements.eccentricity,
    elements.argument_of_perigee * (core::f64::consts::PI / 180.0),
    elements.mean_anomaly * (core::f64::consts::PI / 180.0),
    elements.mean_motion * (core::f64::consts::PI / 720.0),
)?;

Trait Implementations§

source§

impl Clone for Orbit

source§

fn clone(&self) -> Orbit

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Orbit

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Orbit

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Orbit

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for Orbit

§

impl Send for Orbit

§

impl Sync for Orbit

§

impl Unpin for Orbit

§

impl UnwindSafe for Orbit

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,