SunSensor
このコンテンツはまだ日本語訳がありません。
Defined in: sun_sensor.rs:29
pub struct SunSensorSun sensor that measures the sun direction in the body frame.
Computes the satellite→Sun unit vector and rotates it into the body frame via the attitude quaternion:
d_eci = normalize(sun_pos_eci - sc_pos_eci)d_body = noise(R_bi · d_eci)When eclipse support is enabled (shadow_body_radius is set),
the sensor also computes the illumination fraction. During total
eclipse (illumination = 0), direction is None.
Methods
Section titled “Methods”fn new() -> Self
Create an ideal sun sensor (no noise, no eclipse).
for_earth()
Section titled “for_earth()”fn for_earth() -> Self
Create a sun sensor for Earth orbit with conical shadow model.
with_noise()
Section titled “with_noise()”fn with_noise(self, noise: impl NoiseModel + ‘static) -> Self
Add a noise model. Multiple calls chain in order.
with_shadow_body()
Section titled “with_shadow_body()”fn with_shadow_body(self, radius: f64) -> Self
Set the shadow body radius for eclipse computation.
with_shadow_model()
Section titled “with_shadow_model()”fn with_shadow_model(self, model: ShadowModel) -> Self
Set the shadow model.
measure()
Section titled “measure()”fn measure(&mut self, state: &SpacecraftState, epoch: &Epoch) -> SunSensorOutput
Measure the sun direction in the body frame (fine sun sensor).
Returns SunSensorOutput::Fine with:
direction: Some(...)when the sun is visible (illumination > 0)direction: Nonewhen in total eclipse (illumination = 0)illuminationin [0, 1]: actual eclipse-aware illumination fraction