pub struct PlanetaryData {
    pub object_id: i32,
    pub parent_id: i32,
    pub mu_km3_s2: f64,
    pub shape: Option<Ellipsoid>,
    pub pole_right_ascension: Option<PhaseAngle<MAX_NUT_PREC_ANGLES>>,
    pub pole_declination: Option<PhaseAngle<MAX_NUT_PREC_ANGLES>>,
    pub prime_meridian: Option<PhaseAngle<MAX_NUT_PREC_ANGLES>>,
    pub long_axis: Option<f64>,
    pub num_nut_prec_angles: u8,
    pub nut_prec_angles: [PhaseAngle<0>; 32],
}
Expand description

ANISE supports two different kinds of orientation data. High precision, with spline based interpolations, and constants right ascension, declination, and prime meridian, typically used for planetary constant data.

§Documentation of rotation angles

Source: https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/pck.html#Models%20for%20the%20Sun,%20Planets,%20and%20some%20Minor%20Bodies%20in%20Text%20PCK%20Kernels The angles RA, DEC, and W are defined as follows:

                                 2
                            RA2*t
RA  =  RA0  +  RA1*t/T  +  ------  + [optional trig polynomials]
                               2
                              T

                                 2
                           DEC2*t
DEC =  DEC0 + DEC1*t/T  +  ------- + [optional trig polynomials]
                               2
                              T

                                2
                            W2*t
W   =  W0   + W1*t/d    +  -----   + [optional trig polynomials]
                              2
                             d

where

d = seconds/day T = seconds/Julian century t = ephemeris time, expressed as seconds past the reference epoch for this body or planetary system

Fields§

§object_id: i32

The NAIF ID of this object

§parent_id: i32

The NAIF ID of the parent orientation, NOT the parent translation

§mu_km3_s2: f64

Gravitational parameter (μ) of this planetary object.

§shape: Option<Ellipsoid>

The shape is always a tri axial ellipsoid

§pole_right_ascension: Option<PhaseAngle<MAX_NUT_PREC_ANGLES>>§pole_declination: Option<PhaseAngle<MAX_NUT_PREC_ANGLES>>§prime_meridian: Option<PhaseAngle<MAX_NUT_PREC_ANGLES>>§long_axis: Option<f64>§num_nut_prec_angles: u8

These are the nutation precession angles as a list of tuples to rebuild them. E.g. For E1 = 125.045 - 0.052992 d, this would be stored as a single entry (125.045, -0.052992).

§nut_prec_angles: [PhaseAngle<0>; 32]

Implementations§

source§

impl PlanetaryData

source

pub fn to_frame(&self, uid: FrameUid) -> Frame

Converts this planetary data into a Frame, unsetting any shape data for non-body-fixed frames (ID < 100).

source

pub fn rotation_to_parent( &self, epoch: Epoch, system: &Self ) -> PhysicsResult<DCM>

Computes the rotation to the parent frame, including its time derivative.

Source: https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/rotation.html#Working%20with%20RA,%20Dec%20and%20Twist

Trait Implementations§

source§

impl Clone for PlanetaryData

source§

fn clone(&self) -> PlanetaryData

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

impl DataSetT for PlanetaryData

source§

const NAME: &'static str = "planetary data"

source§

impl Debug for PlanetaryData

source§

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

Formats the value using the given formatter. Read more
source§

impl<'a> Decode<'a> for PlanetaryData

source§

fn decode<R: Reader<'a>>(decoder: &mut R) -> Result<Self>

Attempt to decode this message using the provided decoder.
source§

fn from_der(bytes: &'a [u8]) -> Result<Self, Error>

Parse Self from the provided DER-encoded byte slice.
source§

impl Default for PlanetaryData

source§

fn default() -> PlanetaryData

Returns the “default value” for a type. Read more
source§

impl Display for PlanetaryData

source§

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

Formats the value using the given formatter. Read more
source§

impl Encode for PlanetaryData

source§

fn encoded_len(&self) -> Result<Length>

Compute the length of this value in bytes when encoded as ASN.1 DER.
source§

fn encode(&self, encoder: &mut impl Writer) -> Result<()>

Encode this value as ASN.1 DER using the provided Writer.
source§

fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>

Encode this value to the provided byte slice, returning a sub-slice containing the encoded message.
source§

fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length, Error>

Encode this message as ASN.1 DER, appending it to the provided byte vector.
source§

fn to_der(&self) -> Result<Vec<u8>, Error>

Encode this type as DER, returning a byte vector.
source§

impl PartialEq for PlanetaryData

source§

fn eq(&self, other: &PlanetaryData) -> 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.
source§

impl Copy for PlanetaryData

source§

impl StructuralPartialEq for PlanetaryData

Auto Trait Implementations§

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> Instrument for T

source§

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

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

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> Same for T

§

type Output = T

Should always be Self
source§

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

source§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.
source§

impl<T> WithSubscriber for T

source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DecodeOwned for T
where T: for<'a> Decode<'a>,

source§

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