pub struct Frame {
pub ephemeris_id: i32,
pub orientation_id: i32,
pub mu_km3_s2: Option<f64>,
pub shape: Option<Ellipsoid>,
}
Expand description
A Frame uniquely defined by its ephemeris center and orientation. Refer to FrameDetail for frames combined with parameters.
Fields§
§ephemeris_id: i32
§orientation_id: i32
§mu_km3_s2: Option<f64>
Gravity parameter of this frame, only defined on celestial frames
shape: Option<Ellipsoid>
Shape of the geoid of this frame, only defined on geodetic frames
Implementations§
§impl Frame
impl Frame
pub const fn new(ephemeris_id: i32, orientation_id: i32) -> Frame
pub const fn new(ephemeris_id: i32, orientation_id: i32) -> Frame
Constructs a new frame given its ephemeris and orientations IDs, without defining anything else (so this is not a valid celestial frame, although the data could be populated later).
pub const fn from_ephem_j2000(ephemeris_id: i32) -> Frame
pub const fn from_orient_ssb(orientation_id: i32) -> Frame
§impl Frame
impl Frame
pub const fn with_ephem(&self, new_ephem_id: i32) -> Frame
pub const fn with_ephem(&self, new_ephem_id: i32) -> Frame
Returns a copy of this Frame whose ephemeris ID is set to the provided ID
pub const fn with_orient(&self, new_orient_id: i32) -> Frame
pub const fn with_orient(&self, new_orient_id: i32) -> Frame
Returns a copy of this Frame whose orientation ID is set to the provided ID
pub const fn is_celestial(&self) -> bool
pub const fn is_celestial(&self) -> bool
Returns whether this is a celestial frame
pub const fn is_geodetic(&self) -> bool
pub const fn is_geodetic(&self) -> bool
Returns whether this is a geodetic frame
pub const fn ephem_origin_id_match(&self, other_id: i32) -> bool
pub const fn ephem_origin_id_match(&self, other_id: i32) -> bool
Returns true if the ephemeris origin is equal to the provided ID
pub const fn orient_origin_id_match(&self, other_id: i32) -> bool
pub const fn orient_origin_id_match(&self, other_id: i32) -> bool
Returns true if the orientation origin is equal to the provided ID
pub const fn ephem_origin_match(&self, other: Frame) -> bool
pub const fn ephem_origin_match(&self, other: Frame) -> bool
Returns true if the ephemeris origin is equal to the provided frame
pub const fn orient_origin_match(&self, other: Frame) -> bool
pub const fn orient_origin_match(&self, other: Frame) -> bool
Returns true if the orientation origin is equal to the provided frame
pub fn mu_km3_s2(&self) -> Result<f64, PhysicsError>
pub fn mu_km3_s2(&self) -> Result<f64, PhysicsError>
Returns the gravitational parameters of this frame, if defined
pub fn with_mu_km3_s2(&self, mu_km3_s2: f64) -> Frame
pub fn with_mu_km3_s2(&self, mu_km3_s2: f64) -> Frame
Returns a copy of this frame with the graviational parameter set to the new value.
pub fn mean_equatorial_radius_km(&self) -> Result<f64, PhysicsError>
pub fn mean_equatorial_radius_km(&self) -> Result<f64, PhysicsError>
Returns the mean equatorial radius in km, if defined
pub fn semi_major_radius_km(&self) -> Result<f64, PhysicsError>
pub fn semi_major_radius_km(&self) -> Result<f64, PhysicsError>
Returns the semi major radius of the tri-axial ellipoid shape of this frame, if defined
pub fn flattening(&self) -> Result<f64, PhysicsError>
pub fn flattening(&self) -> Result<f64, PhysicsError>
Returns the flattening ratio (unitless)
pub fn polar_radius_km(&self) -> Result<f64, PhysicsError>
pub fn polar_radius_km(&self) -> Result<f64, PhysicsError>
Returns the polar radius in km, if defined
Trait Implementations§
§impl<'de> Deserialize<'de> for Frame
impl<'de> Deserialize<'de> for Frame
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Frame, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Frame, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for Frame
impl Serialize for Frame
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
§impl StaticType for Frame
impl StaticType for Frame
§fn static_type() -> SimpleType
fn static_type() -> SimpleType
impl Copy for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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> FromDhall for Twhere
T: DeserializeOwned,
impl<T> FromDhall for Twhere
T: DeserializeOwned,
fn from_dhall(v: &Value) -> Result<T, Error>
§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.