Skip to main content

Keplerian

Struct Keplerian 

Source
pub struct Keplerian { /* private fields */ }
Expand description

A set of Keplerian orbital elements.

Implementations§

Source§

impl Keplerian

Source

pub fn new( semi_major_axis: SemiMajorAxis, eccentricity: Eccentricity, inclination: Inclination, longitude_of_ascending_node: LongitudeOfAscendingNode, argument_of_periapsis: ArgumentOfPeriapsis, true_anomaly: TrueAnomaly, ) -> Self

Creates a new set of Keplerian elements from pre-validated components.

Source

pub fn builder() -> KeplerianBuilder

Returns a new KeplerianBuilder.

Source

pub fn semi_major_axis(&self) -> SemiMajorAxis

Returns the semi-major axis.

Source

pub fn eccentricity(&self) -> Eccentricity

Returns the eccentricity.

Source

pub fn inclination(&self) -> Inclination

Returns the inclination.

Source

pub fn longitude_of_ascending_node(&self) -> LongitudeOfAscendingNode

Returns the longitude of ascending node.

Source

pub fn argument_of_periapsis(&self) -> ArgumentOfPeriapsis

Returns the argument of periapsis.

Source

pub fn true_anomaly(&self) -> TrueAnomaly

Returns the true anomaly.

Source

pub fn semi_parameter(&self) -> Distance

Returns the semi-parameter (semi-latus rectum) of the orbit.

Source

pub fn to_perifocal(&self, grav_param: GravitationalParameter) -> (DVec3, DVec3)

Converts the orbital elements to position and velocity in the perifocal frame.

Source

pub fn to_cartesian(&self, grav_param: GravitationalParameter) -> Cartesian

Converts the orbital elements to a Cartesian state vector.

Source

pub fn orbital_period( &self, grav_param: GravitationalParameter, ) -> Option<TimeDelta>

Returns the orbital period, or None for non-elliptic orbits.

Source

pub fn iter_trace( &self, grav_param: GravitationalParameter, n: usize, ) -> impl Iterator<Item = Cartesian>

Returns an iterator over n Cartesian positions equally spaced around the orbit.

Source

pub fn trace( &self, grav_param: GravitationalParameter, n: usize, ) -> Option<Vec<Cartesian>>

Returns n Cartesian positions equally spaced around the orbit, or None for non-elliptic orbits.

Trait Implementations§

Source§

impl ApproxEq for Keplerian

Source§

fn approx_eq(&self, rhs: &Self, atol: f64, rtol: f64) -> ApproxEqResults

Compares self with rhs for approximate equality. Read more
Source§

impl Clone for Keplerian

Source§

fn clone(&self) -> Keplerian

Returns a duplicate 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 Keplerian

Source§

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

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

impl PartialEq for Keplerian

Source§

fn eq(&self, other: &Keplerian) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Keplerian

Source§

impl StructuralPartialEq for Keplerian

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

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 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.