Skip to main content

DynamicFrame

Enum DynamicFrame 

pub enum DynamicFrame {
    EarthMeanOfDate {
        precession: EarthPrecessionModel,
    },
    EarthTrueOfDate {
        precession: EarthPrecessionModel,
        nutation: EarthNutationModel,
    },
    EarthTrueEquatorMeanEquinox {
        precession: EarthPrecessionModel,
        nutation: EarthNutationModel,
    },
    BodyMeanOfDate {
        source_id: i32,
    },
    BodyTrueOfDate {
        source_id: i32,
    },
}
Expand description

Dynamic frames in ANISE are encoded as a packed integer within the frame’s orientation ID.

§Encoding format

The identifier is a 32-bit signed integer packed as four bytes:

  0xA0 FF AA BB

Where:

  • 0xA0: ANISE dynamic frame prefix.
  • FF: Frame family identifier (e.g., Earth Mean of Date, Body True of Date).
  • AA: Primary payload (e.g., precession model for Earth frames, or the high byte of a source ID).
  • BB: Secondary payload (e.g., nutation model for Earth frames, or the low byte of a source ID).

§Frame families

  0xA0 E0 AA 00   Earth Mean Equator, Mean Equinox of Date (MOD)
  0xA0 E1 AA BB   Earth True Equator, True Equinox of Date (TOD)
  0xA0 E2 AA BB   Earth True Equator, Mean Equinox of Date (TEME)

  0xA0 B0 SS SS   Body Mean of Date
  0xA0 B1 SS SS   Body True of Date

The E* families are Earth-specific models. The B* families are generic celestial-body pole models.

§Earth payload

For Earth frames, AA encodes the precession / bias-precession model:

  0x00   IAU 1976 / FK5 precession
  0x01   IAU 2000 precession-bias model
  0x03   IAU 2006 precession-bias model

(Note: 0x02 is intentionally reserved and unused).

For Earth TOD and TEME frames, BB encodes the nutation model:

  0x00   IAU 1980 nutation
  0x01   IAU 2000A nutation
  0x02   IAU 2000B nutation
  0x03   IAU 2006 / 2000A-compatible nutation

For Earth MOD frames, BB is reserved and must strictly be 0x00.

Earth MOD uses the selected precession model only. Earth TOD composes the selected precession and nutation models. Earth TEME first builds the corresponding true-equator/true-equinox frame, then rotates about the true Z-axis by the equation of the equinoxes to replace the true equinox with the mean equinox.

For Earth TEME, the equation of the equinoxes model is strictly derived from the selected nutation model:

  IAU1980  -> EQEQ94
  IAU2000A -> EE00A
  IAU2000B -> EE00B
  IAU2006A  -> EE06A

This aligns with the SOFA/SOFARS sidereal-time identity: apparent sidereal time = mean sidereal time + equation of the equinoxes.

§Body payload

For generic body frames, AA BB is interpreted as a single unsigned 16-bit source orientation ID:

  source_id = u16::from_be_bytes([AA, BB])

While the public enum stores this as an i32 for seamless integration with ANISE and NAIF ID routing, the compact bitmask fundamentally restricts the payload. The source ID MUST be strictly positive and fall within the 0..=65535 range.

This perfectly accommodates standard celestial-body orientation IDs (e.g., 301 for the Moon, or 31001 for a lunar ME-style frame). It cannot represent negative spacecraft IDs or deeply nested user-defined SPICE frames. Warning: Out-of-range body source IDs will fail silently via bitwise truncation. Callers must treat the u16 bound as a strict mathematical contract.

Body TOD and MOD frames use the source orientation model solely to establish the body’s pole direction. The source prime meridian (twist) angle is explicitly ignored.

  • Body True of Date uses the full source pole model, inclusive of periodic trigonometric terms.
  • Body Mean of Date uses the mean source pole model, zeroing out periodic trigonometric terms in the pole right ascension and declination.

For body TOD/MOD, the dynamic frame axes evaluate as follows via the same Euler rotations code at the PCK-defined IAU frames:

  Z = source pole direction
  X = normalize(parent_Z × Z)
  Y = Z × X

If parent_Z × Z evaluates as singular (i.e., the pole aligns with the inertial Z-axis), the fallback perfectly mirrors the Ansys STK specification:

  Y = normalize(Z × parent_X)
  X = Y × Z

§Interaction with Frame fields

  • Frame::frozen_epoch: If set, evaluates the dynamic models (precession, nutation, pole right ascension/declination) at the specified epoch rather than the integration time, freezing the frame inertially.
  • Frame::force_inertial: If true, the time derivative of the resulting Direction Cosine Matrix (DCM) is explicitly zeroed out. The built-in Earth MOD/TOD constants are defined as inertial in the ANISE constants.

Variants§

§

EarthMeanOfDate

Earth Mean Equator, Mean Equinox of Date.

Also known as Earth Mean of Date or MEME.

Fields

§

EarthTrueOfDate

Earth True Equator, True Equinox of Date.

Also known as Earth True of Date or TETE.

Fields

§

EarthTrueEquatorMeanEquinox

The True Equator Mean Equinox (TEME) frame shares its True Equator (Z-axis) with the TOD frame, but backs out the nutation in right ascension to align the X-axis with the Mean Equinox.

The Equation of the Equinoxes (EqE) SOFA model is determined by the nutation model: IAU1980 -> eqeq94; IAU2000A -> ee00a; IAU2000B -> ee00b; IAU2006A -> ee06a.

The sign convention follows the sidereal-time identity used by SOFARS: apparent sidereal time is mean sidereal time plus the equation of the equinoxes.

Fields

§

BodyMeanOfDate

Generic body Mean of Date frame.

The Z axis is the mean source pole. Periodic trigonometric terms in the source pole right ascension and declination are ignored. The source prime meridian angle is ignored.

Fields

§source_id: i32
§

BodyTrueOfDate

Generic body True of Date frame.

The Z axis is the full source pole, including periodic trigonometric terms. The source prime meridian angle is ignored.

Fields

§source_id: i32

Implementations§

§

impl DynamicFrame

pub fn family(&self) -> &str

Trait Implementations§

§

impl Clone for DynamicFrame

§

fn clone(&self) -> DynamicFrame

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
§

impl Debug for DynamicFrame

§

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

Formats the value using the given formatter. Read more
§

impl Display for DynamicFrame

§

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

Formats the value using the given formatter. Read more
§

impl PartialEq for DynamicFrame

§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

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

impl TryFrom<u32> for DynamicFrame

§

type Error = OrientationError

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

fn try_from( orientation_u32: u32, ) -> Result<DynamicFrame, <DynamicFrame as TryFrom<u32>>::Error>

Performs the conversion.
§

impl Copy for DynamicFrame

§

impl Eq for DynamicFrame

§

impl StructuralPartialEq for DynamicFrame

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

Source§

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> ToOwned for T
where T: Clone,

Source§

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§

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>,

Source§

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>,

Source§

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> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

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