Skip to content

SunDirectionBody

Defined in: tick_input.rs:177

pub struct SunDirectionBody

Sun direction in the body frame (unit vector, satellite→Sun).

The unit length is the type’s invariant: SunDirectionBody::new normalizes what it is given, so a sensor that adds noise to a direction does not have to remember to normalize afterwards.

fn new(v: [Vec3<Body>](../../../../arika/api/structs/vec3/)) -> Option<Self>

Normalize v into a sun direction, or None when v has no direction: any non-finite component, or a length of zero.

Noise can produce both — a model that cancels the vector, or one that returns NaN. None says the direction is unmeasurable, the same answer the sensor gives in total eclipse; the two are told apart by illumination, which is 0 only in eclipse.


fn inner(&self) -> &[Vec3<Body>](../../../../arika/api/structs/vec3/)


fn into_inner(self) -> [Vec3<Body>](../../../../arika/api/structs/vec3/)