pub struct OrbitDual {
pub x: OHyperdual<f64, U7>,
pub y: OHyperdual<f64, U7>,
pub z: OHyperdual<f64, U7>,
pub vx: OHyperdual<f64, U7>,
pub vy: OHyperdual<f64, U7>,
pub vz: OHyperdual<f64, U7>,
pub dt: Epoch,
pub frame: Frame,
}
Expand description
Orbit defines an orbital state
Unless noted otherwise, algorithms are from GMAT 2016a StateConversionUtil.cpp. Regardless of the constructor used, this struct stores all the state information in Cartesian coordinates as these are always non singular. Note: although not yet supported, this struct may change once True of Date or other nutation frames are added to the toolkit.
Fields§
§x: OHyperdual<f64, U7>
in km
y: OHyperdual<f64, U7>
in km
z: OHyperdual<f64, U7>
in km
vx: OHyperdual<f64, U7>
in km/s
vy: OHyperdual<f64, U7>
in km/s
vz: OHyperdual<f64, U7>
in km/s
dt: Epoch
§frame: Frame
Frame contains everything we need to compute state information
Implementations§
Source§impl OrbitDual
impl OrbitDual
pub fn partial_for( &self, param: StateParameter, ) -> Result<OrbitPartial, AstroError>
Sourcepub fn rmag_km(&self) -> OrbitPartial
pub fn rmag_km(&self) -> OrbitPartial
Returns the magnitude of the radius vector in km
Sourcepub fn vmag_km_s(&self) -> OrbitPartial
pub fn vmag_km_s(&self) -> OrbitPartial
Returns the magnitude of the velocity vector in km/s
Sourcepub fn hx(&self) -> OrbitPartial
pub fn hx(&self) -> OrbitPartial
Returns the orbital momentum value on the X axis
Sourcepub fn hy(&self) -> OrbitPartial
pub fn hy(&self) -> OrbitPartial
Returns the orbital momentum value on the Y axis
Sourcepub fn hz(&self) -> OrbitPartial
pub fn hz(&self) -> OrbitPartial
Returns the orbital momentum value on the Z axis
Sourcepub fn hmag(&self) -> OrbitPartial
pub fn hmag(&self) -> OrbitPartial
Returns the norm of the orbital momentum
Sourcepub fn energy_km2_s2(&self) -> PhysicsResult<OrbitPartial>
pub fn energy_km2_s2(&self) -> PhysicsResult<OrbitPartial>
Returns the specific mechanical energy
Sourcepub fn sma_km(&self) -> PhysicsResult<OrbitPartial>
pub fn sma_km(&self) -> PhysicsResult<OrbitPartial>
Returns the semi-major axis in km
Sourcepub fn ecc(&self) -> PhysicsResult<OrbitPartial>
pub fn ecc(&self) -> PhysicsResult<OrbitPartial>
Returns the eccentricity (no unit)
Sourcepub fn inc_deg(&self) -> OrbitPartial
pub fn inc_deg(&self) -> OrbitPartial
Returns the inclination in degrees
Sourcepub fn aop_deg(&self) -> PhysicsResult<OrbitPartial>
pub fn aop_deg(&self) -> PhysicsResult<OrbitPartial>
Returns the argument of periapsis in degrees
Sourcepub fn raan_deg(&self) -> OrbitPartial
pub fn raan_deg(&self) -> OrbitPartial
Returns the right ascension of ther ascending node in degrees
Sourcepub fn ta_deg(&self) -> PhysicsResult<OrbitPartial>
pub fn ta_deg(&self) -> PhysicsResult<OrbitPartial>
Returns the true anomaly in degrees between 0 and 360.0
Sourcepub fn tlong_deg(&self) -> PhysicsResult<OrbitPartial>
pub fn tlong_deg(&self) -> PhysicsResult<OrbitPartial>
Returns the true longitude in degrees
Sourcepub fn aol_deg(&self) -> PhysicsResult<OrbitPartial>
pub fn aol_deg(&self) -> PhysicsResult<OrbitPartial>
Returns the argument of latitude in degrees
NOTE: If the orbit is near circular, the AoL will be computed from the true longitude instead of relying on the ill-defined true anomaly.
Sourcepub fn periapsis_km(&self) -> PhysicsResult<OrbitPartial>
pub fn periapsis_km(&self) -> PhysicsResult<OrbitPartial>
Returns the radius of periapsis (or perigee around Earth), in kilometers.
Sourcepub fn apoapsis_km(&self) -> PhysicsResult<OrbitPartial>
pub fn apoapsis_km(&self) -> PhysicsResult<OrbitPartial>
Returns the radius of apoapsis (or apogee around Earth), in kilometers.
Sourcepub fn ea_deg(&self) -> PhysicsResult<OrbitPartial>
pub fn ea_deg(&self) -> PhysicsResult<OrbitPartial>
Returns the eccentric anomaly in degrees
This is a conversion from GMAT’s StateConversionUtil::TrueToEccentricAnomaly
Sourcepub fn fpa_deg(&self) -> PhysicsResult<OrbitPartial>
pub fn fpa_deg(&self) -> PhysicsResult<OrbitPartial>
Returns the flight path angle in degrees
Sourcepub fn ma_deg(&self) -> PhysicsResult<OrbitPartial>
pub fn ma_deg(&self) -> PhysicsResult<OrbitPartial>
Returns the mean anomaly in degrees
Sourcepub fn semi_parameter_km(&self) -> PhysicsResult<OrbitPartial>
pub fn semi_parameter_km(&self) -> PhysicsResult<OrbitPartial>
Returns the semi parameter (or semilatus rectum)
Sourcepub fn longitude_deg(&self) -> OrbitPartial
pub fn longitude_deg(&self) -> OrbitPartial
Returns the geodetic longitude (λ) in degrees. Value is between 0 and 360 degrees.
Although the reference is not Vallado, the math from Vallado proves to be equivalent. Reference: G. Xu and Y. Xu, “GPS”, DOI 10.1007/978-3-662-50367-6_2, 2016
Sourcepub fn latitude_deg(&self) -> PhysicsResult<OrbitPartial>
pub fn latitude_deg(&self) -> PhysicsResult<OrbitPartial>
Returns the geodetic latitude (φ) in degrees. Value is between -180 and +180 degrees.
Reference: Vallado, 4th Ed., Algorithm 12 page 172.
Sourcepub fn height_km(&self) -> PhysicsResult<OrbitPartial>
pub fn height_km(&self) -> PhysicsResult<OrbitPartial>
Returns the geodetic height in km.
Reference: Vallado, 4th Ed., Algorithm 12 page 172.
Sourcepub fn right_ascension_deg(&self) -> OrbitPartial
pub fn right_ascension_deg(&self) -> OrbitPartial
Returns the right ascension of this orbit in degrees
Sourcepub fn declination_deg(&self) -> OrbitPartial
pub fn declination_deg(&self) -> OrbitPartial
Returns the declination of this orbit in degrees
Sourcepub fn semi_minor_axis_km(&self) -> PhysicsResult<OrbitPartial>
pub fn semi_minor_axis_km(&self) -> PhysicsResult<OrbitPartial>
Returns the semi minor axis in km, includes code for a hyperbolic orbit
Sourcepub fn velocity_declination(&self) -> OrbitPartial
pub fn velocity_declination(&self) -> OrbitPartial
Returns the velocity declination of this orbit in degrees
Sourcepub fn c3(&self) -> PhysicsResult<OrbitPartial>
pub fn c3(&self) -> PhysicsResult<OrbitPartial>
Returns the $C_3$ of this orbit
Sourcepub fn hyperbolic_anomaly_deg(&self) -> Result<OrbitPartial, AstroError>
pub fn hyperbolic_anomaly_deg(&self) -> Result<OrbitPartial, AstroError>
Returns the hyperbolic anomaly in degrees between 0 and 360.0
Trait Implementations§
Source§impl TimeTagged for OrbitDual
impl TimeTagged for OrbitDual
impl Copy for OrbitDual
Auto Trait Implementations§
impl Freeze for OrbitDual
impl RefUnwindSafe for OrbitDual
impl Send for OrbitDual
impl Sync for OrbitDual
impl Unpin for OrbitDual
impl UnwindSafe for OrbitDual
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.