pub struct Keplerian { /* private fields */ }Expand description
A set of Keplerian orbital elements.
Implementations§
Source§impl Keplerian
impl Keplerian
Sourcepub fn new(
semi_major_axis: SemiMajorAxis,
eccentricity: Eccentricity,
inclination: Inclination,
longitude_of_ascending_node: LongitudeOfAscendingNode,
argument_of_periapsis: ArgumentOfPeriapsis,
true_anomaly: TrueAnomaly,
) -> Self
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.
Sourcepub fn builder() -> KeplerianBuilder
pub fn builder() -> KeplerianBuilder
Returns a new KeplerianBuilder.
Sourcepub fn semi_major_axis(&self) -> SemiMajorAxis
pub fn semi_major_axis(&self) -> SemiMajorAxis
Returns the semi-major axis.
Sourcepub fn eccentricity(&self) -> Eccentricity
pub fn eccentricity(&self) -> Eccentricity
Returns the eccentricity.
Sourcepub fn inclination(&self) -> Inclination
pub fn inclination(&self) -> Inclination
Returns the inclination.
Sourcepub fn longitude_of_ascending_node(&self) -> LongitudeOfAscendingNode
pub fn longitude_of_ascending_node(&self) -> LongitudeOfAscendingNode
Returns the longitude of ascending node.
Sourcepub fn argument_of_periapsis(&self) -> ArgumentOfPeriapsis
pub fn argument_of_periapsis(&self) -> ArgumentOfPeriapsis
Returns the argument of periapsis.
Sourcepub fn true_anomaly(&self) -> TrueAnomaly
pub fn true_anomaly(&self) -> TrueAnomaly
Returns the true anomaly.
Sourcepub fn semi_parameter(&self) -> Distance
pub fn semi_parameter(&self) -> Distance
Returns the semi-parameter (semi-latus rectum) of the orbit.
Sourcepub fn to_perifocal(&self, grav_param: GravitationalParameter) -> (DVec3, DVec3)
pub fn to_perifocal(&self, grav_param: GravitationalParameter) -> (DVec3, DVec3)
Converts the orbital elements to position and velocity in the perifocal frame.
Sourcepub fn to_cartesian(&self, grav_param: GravitationalParameter) -> Cartesian
pub fn to_cartesian(&self, grav_param: GravitationalParameter) -> Cartesian
Converts the orbital elements to a Cartesian state vector.
Sourcepub fn orbital_period(
&self,
grav_param: GravitationalParameter,
) -> Option<TimeDelta>
pub fn orbital_period( &self, grav_param: GravitationalParameter, ) -> Option<TimeDelta>
Returns the orbital period, or None for non-elliptic orbits.
Sourcepub fn iter_trace(
&self,
grav_param: GravitationalParameter,
n: usize,
) -> impl Iterator<Item = Cartesian>
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.
Trait Implementations§
impl Copy for Keplerian
impl StructuralPartialEq for Keplerian
Auto Trait Implementations§
impl Freeze for Keplerian
impl RefUnwindSafe for Keplerian
impl Send for Keplerian
impl Sync for Keplerian
impl Unpin for Keplerian
impl UnsafeUnpin for Keplerian
impl UnwindSafe for Keplerian
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more