Hidden fraction of a body (eclipsed by another body), as seen from an observer
[rat_ecl] = CL_gm_eclipseCheck(pos_obs, pos1, pos2, sr1, sr2)
Computes the hidden fraction of a body (eclipsed by another body), as seen from an observer:
- 1.0 : 100% of the first body is eclipsed
- 0.7 : 70% of the first body is eclipsed
- 0.0 : 0% of the first body is eclipsed
The two bodies are assumed spherical
Position of observer (3xN or 3x1)
Position of centre of sphere1 (3xN or 3x1)
Position of centre of sphere2 (3xN or 3x1)
Radius of sphere1 (1x1 or 1xN)
Radius of sphere2 (1x1 or 1xN)
Hidden fraction of body1, as seen from pos_obs (3xN)
CNES - DCT/SB
// Fraction of Sun eclipsed by Earth (from an observer in space): theta = linspace(165*%CL_deg2rad, 175*%CL_deg2rad, 100); pos_obs = 42000.e3 * [ cos(theta) ; sin(theta) ; zeros(theta) ]; pos1 = %CL_au * [ 1 ; 0 ; 0 ]; // Sun sr1 = %CL_radiusSun; pos2 = [0 ; 0 ; 0]; // Earth sr2 = %CL_eqRad; rat_ecl = CL_gm_eclipseCheck(pos_obs, pos1, pos2, sr1, sr2); scf(); plot(theta*%CL_rad2deg, rat_ecl, "o"); | ![]() | ![]() |