Skip to content

AttitudeBodyToInertial

Defined in: tick_input.rs:63

pub struct AttitudeBodyToInertial\<F: [Eci](../../../../arika/api/traits/eci/) = [arika::frame::SimpleEci](../../../../arika/api/type-aliases/simpleeci/)\>

Attitude: the rotation from the body frame to the inertial frame F.

The frame is part of the type. A quaternion’s components depend on the frame it is expressed against — the same physical attitude has different components in SimpleEci and in Gcrs (the two differ by precession/nutation, ~0.1° at the pole by 2024) — so an untagged Vector4 cannot say what it means. F defaults to SimpleEci(arika::frame::SimpleEci), the frame the plugin path propagates in.

fn new(rotation: [Rotation<Body, F>](../../../../arika/api/structs/rotation/)) -> Self

Wrap a body→F rotation as an attitude reading in F.


fn inner(&self) -> &[Rotation<Body, F>](../../../../arika/api/structs/rotation/)

Borrow the inner rotation.


fn into_inner(self) -> [Rotation<Body, F>](../../../../arika/api/structs/rotation/)

Consume and return the inner rotation.


fn to_wit_v0_simple_eci_quat(&self) -> (f64, f64, f64, f64)

Drop the frame tag for the v0 plugin WIT boundary: the components (w, x, y, z) of the body→simple-ECI quaternion, Hamilton convention.

The v0 attitude-body-to-inertial record in orts/wit/v0/orts.wit carries four bare floats whose frame is defined by the contract to be simple-ECI. This is the named crossing for that boundary, and it exists only for SimpleEci: shipping a Gcrs attitude to a guest is a compile error rather than silent nonsense. Widening the contract means a new WIT version that names the frame in the payload.

inner() still hands out the rotation in any frame — the guarantee is that the boundary operation names its frame, not that the components are unreachable.