ADCS.helpers.animations.godot.shadow module¶
- ADCS.helpers.animations.godot.shadow.shadow_factor(r_sat, r_sun, R_occ=6378.1363, R_sun=695700.0)[source]¶
Fraction of the solar disk visible from the spacecraft (conical shadow model).
Implements the conical umbra/penumbra model of Montenbruck & Gill, Satellite Orbits (2000), Sec. 3.4.2, treating the Sun and the occulting body as spheres. From the spacecraft, the apparent solar radius \(a\), the apparent radius of the occulting body \(b\) and their apparent centre separation \(c\) are
\[a = \arcsin\frac{R_\odot}{\lVert \mathbf{r}_\odot - \mathbf{r} \rVert},\quad b = \arcsin\frac{R_\oplus}{\lVert \mathbf{r} \rVert},\quad c = \arccos\frac{-\mathbf{r}\cdot(\mathbf{r}_\odot - \mathbf{r})} {\lVert \mathbf{r} \rVert\,\lVert \mathbf{r}_\odot - \mathbf{r} \rVert}.\]The returned factor \(\nu\) is
1for \(c \ge a + b\) (full sunlight),0for \(c \le b - a\) (umbra),\(1 - b^2/a^2\) for \(c \le a - b\) (annular, occulter inside the disk),
\(1 - A/(\pi a^2)\) otherwise (penumbra), with the overlap area
\[x = \frac{c^2 + a^2 - b^2}{2c},\quad y = \sqrt{a^2 - x^2},\quad A = a^2 \arccos\frac{x}{a} + b^2 \arccos\frac{c - x}{b} - c\,y.\]This is the value the 3-D viewer applies to sunlight, so that rendered eclipses match what the simulation computed.
- Parameters:
r_sat (numpy.ndarray) – Spacecraft position relative to the occulting body’s centre, shape
(3,)or(N, 3), in km.r_sun (numpy.ndarray) – Sun position relative to the occulting body’s centre, in km:
(3,)or(N, 3). One position is paired with every row of the other input.R_occ (float) – Radius of the occulting body in km. Defaults to Earth’s equatorial radius.
R_sun (float) – Solar radius in km.
- Returns:
Visible solar-disk fraction in
[0, 1]: a float when both inputs are(3,), otherwise an array of shape(N,).- Return type:
float | numpy.ndarray