pub struct PlanetShape {
pub name: &'static str,
pub mu: f64,
pub r_eq: f64,
pub r_pol: f64,
pub flat_coeff: f64,
}Expand description
Planetary shape parameters (reference ellipsoid).
Mirrors JEOD’s Planet struct from planet.hh. The mu field stores the
geodetic standard gravitational parameter (e.g., WGS84 for Earth). Gravity
models carry their own mu in GravitySource which may differ slightly.
Fields§
§name: &'static strPlanet name.
mu: f64Gravitational parameter (m^3/s^2).
r_eq: f64Mean equatorial radius (m).
r_pol: f64Mean polar radius (m).
flat_coeff: f64Flattening coefficient: f = (r_eq - r_pol) / r_eq.
Implementations§
Source§impl PlanetShape
impl PlanetShape
Sourcepub fn e_ellipsoid(&self) -> f64
pub fn e_ellipsoid(&self) -> f64
Ellipsoid eccentricity: e = sqrt(2f - f^2).
Sourcepub fn e_ellip_sq(&self) -> f64
pub fn e_ellip_sq(&self) -> f64
Square of ellipsoid eccentricity.
Sourcepub fn mu_typed(&self) -> GravParam<SelfPlanet>
pub fn mu_typed(&self) -> GravParam<SelfPlanet>
Gravitational parameter as a typed
GravParam<astrodyn_quantities::frame::SelfPlanet> (m³/s²).
Returns the planet-erased
(astrodyn_quantities::frame::SelfPlanet) form because
PlanetShape is the dynamic per-planet record carried by the
runner — the planet identity is determined by which entity
holds the shape, not by the static type. Mission code that
knows the planet at compile time can either reach for the
curated mu_*() constants in astrodyn::recipes::constants
(which return planet-pinned GravParam<P> values) or relabel
at the call site via mu_typed().relabel::<P>().
Sourcepub fn r_eq_typed(
&self,
) -> Quantity<dyn Dimension<Kind = dyn Kind, T = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, Th = Z0, M = Z0, J = Z0, I = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, electric_current = ampere, amount_of_substance = mole, mass = kilogram, luminous_intensity = candela, length = meter>, f64>
pub fn r_eq_typed( &self, ) -> Quantity<dyn Dimension<Kind = dyn Kind, T = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, Th = Z0, M = Z0, J = Z0, I = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, electric_current = ampere, amount_of_substance = mole, mass = kilogram, luminous_intensity = candela, length = meter>, f64>
Equatorial radius as a typed uom::si::f64::Length (meters).
Additive typed accessor introduced by Phase 1 of the type-system
refactor (issue #101). Wraps the existing r_eq f64 field; the
underlying field is unchanged.
Sourcepub fn r_pol_typed(
&self,
) -> Quantity<dyn Dimension<Kind = dyn Kind, T = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, Th = Z0, M = Z0, J = Z0, I = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, electric_current = ampere, amount_of_substance = mole, mass = kilogram, luminous_intensity = candela, length = meter>, f64>
pub fn r_pol_typed( &self, ) -> Quantity<dyn Dimension<Kind = dyn Kind, T = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, Th = Z0, M = Z0, J = Z0, I = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, electric_current = ampere, amount_of_substance = mole, mass = kilogram, luminous_intensity = candela, length = meter>, f64>
Polar radius as a typed uom::si::f64::Length (meters).
Additive typed accessor introduced by Phase 1 of the type-system
refactor (issue #101). Wraps the existing r_pol f64 field; the
underlying field is unchanged.
Trait Implementations§
Source§impl Clone for PlanetShape
impl Clone for PlanetShape
Source§fn clone(&self) -> PlanetShape
fn clone(&self) -> PlanetShape
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlanetShape
impl Debug for PlanetShape
impl Copy for PlanetShape
Auto Trait Implementations§
impl Freeze for PlanetShape
impl RefUnwindSafe for PlanetShape
impl Send for PlanetShape
impl Sync for PlanetShape
impl Unpin for PlanetShape
impl UnsafeUnpin for PlanetShape
impl UnwindSafe for PlanetShape
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<T> Pointable for T
impl<T> Pointable for T
Source§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.