Characteristic eclipse quantities
[val1, val2, ...] = CL_gm_eclipseCheck(pos_obs, pos1, [[, pos2, sr1, sr2, res]])
Computes quantities that characterize the eclipse conditions: ratio of solid angle that is eclipsed, or characteristic angles defining umbra or penumbra.
- Eclipse ratio ("eclrat"):
It is the hidden solid angle fraction of a body (body1) eclipsed by the second body (body2), as seen from the observer.
- ratio = 1.0 : 100% of body1 is eclipsed (umbra),
- ratio = 0.7 : 70% of body1 is eclipsed (penumbra),
- ratio = 0.0 : 0% of body1 is eclipsed.

- Eclipse angles ("angu","angp","angc"):
Characteristic angles (positive or negative) that define the type of event:
- angu: umbra
- angp: penumbra
- angc: umbra or penumbra, the eclipse region being defined by a cylinder of radius that of the occulting body (i.e. body2). The radius of body1 is not used in this case.
All the angles are:
- continuous quantities (of the input data),
- positive if the eclipse condition is met and negative otherwise.
Notes:
1) The bodies are assumed spherical. The spheres should have positive radii, and should not intersect.
2) An error occurs if the distance to one body center is less than the radius of that body. In some cases (if the radius difference is very small), the error can be avoided by applying the following workaround:
If r < R * (1 + eps) then replace R by r / (1+eps)
(with r: distance to body center, R: body radius, eps: margin)
Position of observer [m] (3xN or 3x1)
Position of body1 (= potentially eclipsed body) [m] (3xN or 3x1)
(optional) Position of body2 (= occulting body) [m]. Default is [0;0;0] (3xN or 3x1)
(optional) Radius of body1 (sphere) [m]. Default is %CL_body.Sun.eqRad (1x1 or 1xN)
(optional) Radius of body2 (sphere) [m]. Default is %CL_eqRad (1x1 or 1xN)
(string, optional) Names of computed quantities: "eclrat", "angu", "angp", "angc". Default is "eclrat" (1xP)
Computed quantities [rad or -] (1xN)
CNES - DCT/SB
// Eclipse of the Sun by Earth from an observer in space: theta = linspace(2.88, 3.05, 1000); pos_sat = 42164.e3 * [cos(theta); sin(theta); zeros(theta)]; au = CL_dataGet("au"); pos_sun = au * [1; 0; 0]; // Sun eclrat = CL_gm_eclipseCheck(pos_sat, pos_sun); angp = CL_gm_eclipseCheck(pos_sat, pos_sun, res="angp"); angu = CL_gm_eclipseCheck(pos_sat, pos_sun, res="angu"); // Plot the results scf(); plot(theta*180/%pi, eclrat, "k"); plot(theta*180/%pi, angp, "r"); plot(theta*180/%pi, angu+1, "b"); CL_g_legend(gca(), ["eclrat", "angp", "angu + 1"]); | ![]() | ![]() |