<< CL_gm_eclipse Geometry and events CL_gm_eclipseCir >>

CelestLab >> Geometry and events > CL_gm_eclipseCheck

CL_gm_eclipseCheck

Hidden fraction of a body (eclipsed by another body), as seen from an observer

Calling Sequence

rat_ecl = CL_gm_eclipseCheck(pos_obs, pos1, pos2, sr1, sr2)

Description

Parameters

pos_obs:

Position of observer (3xN or 3x1)

pos1:

Position of centre of sphere1 (3xN or 3x1)

pos2:

Position of centre of sphere2 (3xN or 3x1)

sr1:

Radius of sphere1 (1x1 or 1xN)

sr2:

Radius of sphere2 (1x1 or 1xN)

rat_ecl:

Hidden fraction of body1, as seen from pos_obs (3xN)

Authors

See also

Examples

// Fraction of Sun eclipsed by Earth (from an observer in space):
radiusSun = CL_dataGet("body.Sun.eqRad");
radiusEarth = CL_dataGet("body.Earth.eqRad");
au = CL_dataGet("au");

theta = linspace(2.88, 3.05, 100);
pos_obs = 42000.e3 * [cos(theta); sin(theta); zeros(theta)];
pos1 = au * [1; 0; 0]; // Sun
sr1 = radiusSun;
pos2 = [0; 0; 0]; // Earth
sr2 = radiusEarth;
rat_ecl = CL_gm_eclipseCheck(pos_obs, pos1, pos2, sr1, sr2);
scf();
plot(theta*180/%pi, rat_ecl, "o");

Report an issue
<< CL_gm_eclipse Geometry and events CL_gm_eclipseCir >>