pub struct Orbit<S, T: TimeScale, O: Origin, R: ReferenceFrame> { /* private fields */ }Expand description
An orbital state parameterized by state representation, time scale, origin, and reference frame.
Implementations§
Source§impl<T, O, R> Orbit<Cartesian, T, O, R>
impl<T, O, R> Orbit<Cartesian, T, O, R>
Sourcepub const fn new(
cartesian: Cartesian,
time: Time<T>,
origin: O,
frame: R,
) -> Self
pub const fn new( cartesian: Cartesian, time: Time<T>, origin: O, frame: R, ) -> Self
Constructs a new Cartesian orbit from position/velocity state, epoch, origin, and frame.
Sourcepub fn to_keplerian(&self) -> KeplerianOrbit<T, O, R>
pub fn to_keplerian(&self) -> KeplerianOrbit<T, O, R>
Converts this Cartesian orbit to Keplerian elements.
Sourcepub fn try_to_keplerian(
&self,
) -> Result<KeplerianOrbit<T, O, R>, UndefinedOriginPropertyError>
pub fn try_to_keplerian( &self, ) -> Result<KeplerianOrbit<T, O, R>, UndefinedOriginPropertyError>
Converts this Cartesian orbit to Keplerian elements, returning an error if the gravitational parameter is undefined.
Sourcepub fn try_to_frame<R1, P>(
&self,
frame: R1,
provider: &P,
) -> Result<CartesianOrbit<T, O, R1>, P::Error>
pub fn try_to_frame<R1, P>( &self, frame: R1, provider: &P, ) -> Result<CartesianOrbit<T, O, R1>, P::Error>
Transforms this orbit into a different reference frame using the given rotation provider.
Source§impl<T, O> Orbit<Cartesian, T, O, Iau<O>>
impl<T, O> Orbit<Cartesian, T, O, Iau<O>>
Sourcepub fn to_ground_location(
&self,
) -> Result<GroundLocation<O>, FromBodyFixedError>
pub fn to_ground_location( &self, ) -> Result<GroundLocation<O>, FromBodyFixedError>
Converts this body-fixed Cartesian orbit to a ground location.
Source§impl<T, O> Orbit<Cartesian, T, O, Icrf>
impl<T, O> Orbit<Cartesian, T, O, Icrf>
Sourcepub fn rotation_lvlh(&self) -> DMat3
pub fn rotation_lvlh(&self) -> DMat3
Returns the rotation matrix from ICRF to the Local Vertical Local Horizontal (LVLH) frame.
Source§impl Orbit<Cartesian, DynTimeScale, DynOrigin, DynFrame>
impl Orbit<Cartesian, DynTimeScale, DynOrigin, DynFrame>
Sourcepub fn try_to_origin<E: Ephemeris>(
&self,
target: DynOrigin,
ephemeris: &E,
) -> Result<DynCartesianOrbit, E::Error>
pub fn try_to_origin<E: Ephemeris>( &self, target: DynOrigin, ephemeris: &E, ) -> Result<DynCartesianOrbit, E::Error>
Transforms this dynamic orbit to a different central body origin using an ephemeris.
Sourcepub fn try_to_ground_location(
&self,
) -> Result<DynGroundLocation, StateToDynGroundError>
pub fn try_to_ground_location( &self, ) -> Result<DynGroundLocation, StateToDynGroundError>
Converts this dynamic Cartesian orbit to a ground location.
Sourcepub fn try_rotation_lvlh(&self) -> Result<DMat3, &'static str>
pub fn try_rotation_lvlh(&self) -> Result<DMat3, &'static str>
Returns the LVLH rotation matrix, returning an error if the frame is not ICRF.
Source§impl<T, O, R> Orbit<Keplerian, T, O, R>
impl<T, O, R> Orbit<Keplerian, T, O, R>
Sourcepub const fn new(
keplerian: Keplerian,
time: Time<T>,
origin: O,
frame: R,
) -> Selfwhere
R: QuasiInertial,
pub const fn new(
keplerian: Keplerian,
time: Time<T>,
origin: O,
frame: R,
) -> Selfwhere
R: QuasiInertial,
Constructs a new Keplerian orbit in a quasi-inertial frame.
Sourcepub fn try_from_keplerian(
keplerian: Keplerian,
time: Time<T>,
origin: O,
frame: R,
) -> Result<Self, KeplerianOrbitError>where
R: TryQuasiInertial,
O: TryMeanRadius,
pub fn try_from_keplerian(
keplerian: Keplerian,
time: Time<T>,
origin: O,
frame: R,
) -> Result<Self, KeplerianOrbitError>where
R: TryQuasiInertial,
O: TryMeanRadius,
Constructs a Keplerian orbit with validation of the frame and perigee radius.
Sourcepub fn semi_major_axis(&self) -> Distance
pub fn semi_major_axis(&self) -> Distance
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 the 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 to_cartesian(&self) -> CartesianOrbit<T, O, R>
pub fn to_cartesian(&self) -> CartesianOrbit<T, O, R>
Converts this Keplerian orbit to Cartesian position and velocity.
Sourcepub fn try_to_cartesian(
&self,
) -> Result<CartesianOrbit<T, O, R>, UndefinedOriginPropertyError>
pub fn try_to_cartesian( &self, ) -> Result<CartesianOrbit<T, O, R>, UndefinedOriginPropertyError>
Converts this Keplerian orbit to Cartesian, returning an error if the gravitational parameter is undefined.
Sourcepub fn orbital_period(&self) -> Option<TimeDelta>where
O: TryPointMass,
pub fn orbital_period(&self) -> Option<TimeDelta>where
O: TryPointMass,
Returns the orbital period, or None for non-elliptical orbits or undefined gravitational parameters.
Sourcepub fn trace(&self, n: usize) -> Option<Trajectory<T, O, R>>
pub fn trace(&self, n: usize) -> Option<Trajectory<T, O, R>>
Generates a trajectory by tracing the full orbit with n evenly-spaced samples.
Source§impl<S, T, O, R> Orbit<S, T, O, R>
impl<S, T, O, R> Orbit<S, T, O, R>
Sourcepub const fn from_state(state: S, time: Time<T>, origin: O, frame: R) -> Self
pub const fn from_state(state: S, time: Time<T>, origin: O, frame: R) -> Self
Constructs an orbit from its state, epoch, origin, and reference frame.
Sourcepub fn reference_frame(&self) -> Rwhere
R: Copy,
pub fn reference_frame(&self) -> Rwhere
R: Copy,
Returns the reference frame.
Sourcepub fn try_gravitational_parameter(
&self,
) -> Result<GravitationalParameter, UndefinedOriginPropertyError>where
O: TryPointMass,
pub fn try_gravitational_parameter(
&self,
) -> Result<GravitationalParameter, UndefinedOriginPropertyError>where
O: TryPointMass,
Returns the gravitational parameter of the origin, or an error if undefined.
Sourcepub fn gravitational_parameter(&self) -> GravitationalParameterwhere
O: PointMass,
pub fn gravitational_parameter(&self) -> GravitationalParameterwhere
O: PointMass,
Returns the gravitational parameter of the origin.
Trait Implementations§
Source§impl<S: Clone, T: Clone + TimeScale, O: Clone + Origin, R: Clone + ReferenceFrame> Clone for Orbit<S, T, O, R>
impl<S: Clone, T: Clone + TimeScale, O: Clone + Origin, R: Clone + ReferenceFrame> Clone for Orbit<S, T, O, R>
Source§impl<S: Debug, T: Debug + TimeScale, O: Debug + Origin, R: Debug + ReferenceFrame> Debug for Orbit<S, T, O, R>
impl<S: Debug, T: Debug + TimeScale, O: Debug + Origin, R: Debug + ReferenceFrame> Debug for Orbit<S, T, O, R>
Source§impl<T, O, R> From<Orbit<Cartesian, T, O, R>> for CartesianState
impl<T, O, R> From<Orbit<Cartesian, T, O, R>> for CartesianState
Source§fn from(orbit: CartesianOrbit<T, O, R>) -> Self
fn from(orbit: CartesianOrbit<T, O, R>) -> Self
Source§impl<T, O, R> FromIterator<Orbit<Cartesian, T, O, R>> for Trajectory<T, O, R>
impl<T, O, R> FromIterator<Orbit<Cartesian, T, O, R>> for Trajectory<T, O, R>
Source§fn from_iter<U: IntoIterator<Item = CartesianOrbit<T, O, R>>>(iter: U) -> Self
fn from_iter<U: IntoIterator<Item = CartesianOrbit<T, O, R>>>(iter: U) -> Self
Source§impl<S: PartialEq, T: PartialEq + TimeScale, O: PartialEq + Origin, R: PartialEq + ReferenceFrame> PartialEq for Orbit<S, T, O, R>
impl<S: PartialEq, T: PartialEq + TimeScale, O: PartialEq + Origin, R: PartialEq + ReferenceFrame> PartialEq for Orbit<S, T, O, R>
impl<S: Copy, T: Copy + TimeScale, O: Copy + Origin, R: Copy + ReferenceFrame> Copy for Orbit<S, T, O, R>
impl<S, T: TimeScale, O: Origin, R: ReferenceFrame> StructuralPartialEq for Orbit<S, T, O, R>
Auto Trait Implementations§
impl<S, T, O, R> Freeze for Orbit<S, T, O, R>
impl<S, T, O, R> RefUnwindSafe for Orbit<S, T, O, R>
impl<S, T, O, R> Send for Orbit<S, T, O, R>
impl<S, T, O, R> Sync for Orbit<S, T, O, R>
impl<S, T, O, R> Unpin for Orbit<S, T, O, R>
impl<S, T, O, R> UnsafeUnpin for Orbit<S, T, O, R>
impl<S, T, O, R> UnwindSafe for Orbit<S, T, O, R>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.