Struct nyx_space::md::prelude::Frame

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

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

pub fn from_name(center: &str, ref_frame: &str) -> Result<Frame, AlmanacError>

Attempts to create a new frame from its center and reference frame name. This function is compatible with the CCSDS OEM names.

§

impl 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

Returns a copy of this Frame whose orientation ID is set to the provided ID

pub const fn is_celestial(&self) -> bool

Returns whether this is a celestial frame

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

Returns true if the ephemeris origin is equal to the provided ID

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

Returns true if the ephemeris origin is equal to the provided frame

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>

Returns the gravitational parameters of this frame, if defined

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>

Returns the mean equatorial radius in km, if defined

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>

Returns the flattening ratio (unitless)

pub fn polar_radius_km(&self) -> Result<f64, PhysicsError>

Returns the polar radius in km, if defined

Trait Implementations§

§

impl Clone for Frame

§

fn clone(&self) -> Frame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Frame

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Frame

§

fn deserialize<__D>( __deserializer: __D ) -> Result<Frame, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for Frame

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<&Frame> for FrameUid

§

fn from(frame: &Frame) -> FrameUid

Converts to this type from the input type.
§

impl From<&FrameUid> for Frame

§

fn from(uid: &FrameUid) -> Frame

Converts to this type from the input type.
§

impl From<Frame> for FrameUid

§

fn from(frame: Frame) -> FrameUid

Converts to this type from the input type.
§

impl From<FrameUid> for Frame

§

fn from(uid: FrameUid) -> Frame

Converts to this type from the input type.
§

impl LowerExp for Frame

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Only prints the ephemeris name

§

impl LowerHex for Frame

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Only prints the UID

§

impl Octal for Frame

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Only prints the orientation name

§

impl PartialEq for Frame

§

fn eq(&self, other: &Frame) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Serialize for Frame

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl StaticType for Frame

§

fn static_type() -> SimpleType

Return the Dhall type that represents this type. Read more
§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromDhall for T

source§

fn from_dhall(v: &Value) -> Result<T, Error>

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToDhall for T
where T: Serialize,

source§

fn to_dhall(&self, ty: Option<&SimpleType>) -> Result<Value, Error>

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,