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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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.