ADCS.satellite_hardware.sensors.sunsensor_earthshine module

class ADCS.satellite_hardware.sensors.sunsensor_earthshine.SunSensorWithEarthshine(axis, efficiency, sample_time=0.1, bias=None, noise=None, estimate_bias=False, scale_factor=1.0, misalignment=None, *, albedo=0.3, earth_radius=6378.1363)[source]

Bases: SunSensor

Coarse Sun sensor that also sees sunlight reflected off the Earth.

A cosine-law Sun sensor cannot tell direct sunlight from earthshine. When the sensor faces the sunlit side of the Earth it reads an extra current, which is a real and attitude-dependent error source for coarse sensors in low Earth orbit. This subclass adds that term to the base SunSensor, which is otherwise unchanged (field of view, efficiency, bias, noise, eclipse handling and estimator interface are all inherited).

The Earth is treated as a Lambertian reflector seen through its sub-satellite point, with a uniform albedo \(a\). With the nadir direction in the body frame \(\hat{\mathbf{n}} = -\mathbf{r}/|\mathbf{r}|\), the Sun direction from the Earth’s centre \(\hat{\mathbf{s}}_\oplus\), the Earth radius \(R_\oplus\) and the sensor axis \(\mathbf{a}\), the earthshine reading is

\[y_\oplus = \eta \, a \left(\frac{R_\oplus}{|\mathbf{r}|}\right)^2 \max(-\hat{\mathbf{n}}\cdot\hat{\mathbf{s}}_\oplus,\,0)\, \max(\mathbf{a}\cdot\hat{\mathbf{n}},\,0),\]

and the full clean reading is the base Sun term plus \(y_\oplus\). The first factor is the fraction of solar irradiance reflected, the second the solid-angle fall-off with altitude, the third the solar elevation at the sub-satellite point (zero over the night side), and the last the cosine law of the sensor itself. For a 500 km orbit and \(a = 0.3\) the term peaks near a quarter of the direct-Sun reading, which is the size of the effect seen in flight.

What this model leaves out: the integration over the visible disc (the illuminated part is not a point at nadir), the latitude and cloud dependence of the albedo, and the sunlit crescent that is still visible from inside the umbra. In eclipse the reading keeps the base class’s NaN sentinel, so the sensor is masked exactly as before.

Only the nadir direction depends on attitude; the solar elevation and the altitude factor are scalars built from body-frame vectors that rotate together. The Jacobian therefore adds one term, through \(\partial\hat{\mathbf{n}}/\partial\mathbf{q}\), to the base Jacobian.

To study earthshine as an unmodelled error, give the truth satellite this sensor and the estimator’s satellite a plain SunSensor with the same axis and efficiency. With albedo=0 the two are identical.

Parameters:
  • axis (ndarray) – As for SunSensor. The scale factor and misalignment describe the device as built, so they apply to the earthshine term as well as the direct-Sun term: earthshine is seen along the misaligned sensing_axis and scaled by scale_factor.

  • efficiency (float) – As for SunSensor. The scale factor and misalignment describe the device as built, so they apply to the earthshine term as well as the direct-Sun term: earthshine is seen along the misaligned sensing_axis and scaled by scale_factor.

  • sample_time (float) – As for SunSensor. The scale factor and misalignment describe the device as built, so they apply to the earthshine term as well as the direct-Sun term: earthshine is seen along the misaligned sensing_axis and scaled by scale_factor.

  • bias (Bias | None) – As for SunSensor. The scale factor and misalignment describe the device as built, so they apply to the earthshine term as well as the direct-Sun term: earthshine is seen along the misaligned sensing_axis and scaled by scale_factor.

  • noise (Noise | None) – As for SunSensor. The scale factor and misalignment describe the device as built, so they apply to the earthshine term as well as the direct-Sun term: earthshine is seen along the misaligned sensing_axis and scaled by scale_factor.

  • estimate_bias (bool) – As for SunSensor. The scale factor and misalignment describe the device as built, so they apply to the earthshine term as well as the direct-Sun term: earthshine is seen along the misaligned sensing_axis and scaled by scale_factor.

  • scale_factor (float) – As for SunSensor. The scale factor and misalignment describe the device as built, so they apply to the earthshine term as well as the direct-Sun term: earthshine is seen along the misaligned sensing_axis and scaled by scale_factor.

  • misalignment (ndarray | None) – As for SunSensor. The scale factor and misalignment describe the device as built, so they apply to the earthshine term as well as the direct-Sun term: earthshine is seen along the misaligned sensing_axis and scaled by scale_factor.

  • albedo (float) – Bond albedo \(a\) of the Earth, dimensionless. 0.3 is the usual global mean.

  • earth_radius (float) – Earth radius \(R_\oplus\) in km, defaulting to R_e.

basestate_jac(x, os)[source]

Base Jacobian plus \(\partial y_\oplus/\partial\mathbf{q}\) through the nadir direction.

Parameters:
Return type:

ndarray

clean_reading(x, os)[source]

Base Sun reading plus the earthshine term; NaN in eclipse as for the base class.

Parameters:
Return type:

ndarray

earthshine_reading(x, os)[source]

The earthshine term \(y_\oplus\) alone, ignoring eclipse.

Parameters:
Return type:

float