Struct Orbit

Source
pub struct Orbit {
    pub eccentricity: f32,
    pub semi_major_axis: f32,
    pub inclination: f32,
    pub longitude_of_ascending_node: f32,
    pub argument_of_periapsis: f32,
}

Fields§

§eccentricity: f32§semi_major_axis: f32§inclination: f32§longitude_of_ascending_node: f32§argument_of_periapsis: f32

Implementations§

Source§

impl Orbit

Source

pub fn state_vectors_to_orbit( state_vectors: StateVectors, central_body_mass: f32, ) -> Self

Source

pub fn standard_gravitational_parameter(mass: f32) -> f32

https://en.wikipedia.org/wiki/Standard_gravitational_parameter

Source

pub fn period(&self, mass: f32) -> f32

https://en.wikipedia.org/wiki/Orbital_period

Source

pub fn mean_motion(&self, mass: f32) -> f32

https://en.wikipedia.org/wiki/Mean_motion

Source

pub fn mean_anomaly(&self, mass: f32, time: f32) -> f32

https://en.wikipedia.org/wiki/Mean_anomaly

Source

pub fn estimate_eccentric_anomaly( &self, mass: f32, time: f32, tolerance: f32, ) -> f32

https://en.wikipedia.org/wiki/Eccentric_anomaly

Eccentric Anomaly (EA) is given by the equation: M = EA - e*sin(EA) where M is the mean anomaly e is the eccentricity

To estimate the Eccentric Anomaly we use Newton’s method https://en.wikipedia.org/wiki/Newton%27s_method

Source

pub fn state_vectors_at_epoch( &self, mass: f32, time: f32, tolerance: f32, ) -> StateVectors

Auto Trait Implementations§

§

impl Freeze for Orbit

§

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 T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.