Skip to content

Sensors

Defined in: tick_input.rs:118

pub struct Sensors\<F: [Eci](../../../../arika/api/traits/eci/) = [arika::frame::SimpleEci](../../../../arika/api/type-aliases/simpleeci/)\> {
pub magnetometers: Vec<MagneticFieldBody>,
pub gyroscopes: Vec<AngularVelocityBody>,
pub star_trackers: Vec<AttitudeBodyToInertial<F>>,
pub sun_sensors: Vec<SunSensorOutput>,
}

Sensor readings evaluated at the current tick instant.

Each field is a Vec — empty means no sensor of that type is configured. Index order is stable (config definition order) and does not change during a simulation run.

F is the inertial frame the state was propagated in, carried by the attitude readings (AttitudeBodyToInertial), whose components depend on it. The body-frame readings are unaffected to the precision that matters — the gyro’s ω is the rate relative to F, but two inertial frames differ only by their relative rotation rate (~8e-12 rad/s for SimpleEciGcrs). F defaults to SimpleEci(arika::frame::SimpleEci), which is what TickInput accepts: a bundle evaluated in another frame cannot be handed to a plugin, because the v0 plugin contract is defined in simple-ECI.

magnetometers: [Vec<MagneticFieldBody>](https://doc.rust-lang.org/std/vec/struct.Vec.html)

Magnetometer readings. Pre-evaluated once per tick.


gyroscopes: [Vec<AngularVelocityBody>](https://doc.rust-lang.org/std/vec/struct.Vec.html)

Gyroscope readings.


star_trackers: [Vec<AttitudeBodyToInertial<F>>](https://doc.rust-lang.org/std/vec/struct.Vec.html)

Star tracker readings, expressed against F.


sun_sensors: [Vec<SunSensorOutput>](https://doc.rust-lang.org/std/vec/struct.Vec.html)

Sun sensor outputs.


fn empty() -> Self

Construct an empty set of readings (no sensors configured).

The only constructor: there is no Default impl. derive(Default) would demand F: Default, and a frame marker has no default — “the default frame” is exactly the implicit choice this frame tagging exists to prevent — while a hand-written one would just be a second name for empty().