$LastChangedDate: 27-Juil-2011 $

# CL_gm_betaEclipse

Eclipse interval for circular or elliptical orbits.

## Calling Sequence

       [half_span, mid_pos] = CL_gm_betaEclipse(sma,betaa [,ecc,argsp] [,er])

## Description

- Computes quantities that characterize the portion of the orbit path where the Sun is eclipsed by the planet as seen from the satellite.

  The shadow region is a cylinder whose axis is the (fixed) Sun direction and whose radius is that of the planet (assumed spherical).

  The computed quantities are:

  - half_span: eclipse interval half-length (in true anomaly)

  - mid_pos: anomaly of mid-eclipse, measured from the projection of the Sun direction onto the orbit plane.

  The true anomalies that correspond to the beginning and end of eclipse (resp. tan_beg and tan_end) can then be computed by:

  tan_beg = mid_pos - argsp - half_span

  tan_end = mid_pos - argsp + half_span

  where argsp is the angle between the projection of the Sun direction onto the orbit plane and the direction of the periapsis.

  If the Sun is not eclipsed, half_span is set to 0, and mid_pos to %pi (arbitrarily).

- Notes:

  - The trajectory of the satellite is an ellipse (no perturbations assumed).

  - If the orbit is circular (ecc = 0), the value of argsp has no impact on the results.

## Parameters

sma:

  Semi major axis [m] (1xN or 1x1)

betaa:

  Sun beta angle (can be positive or negative) [rad] (1xN or 1x1)

ecc:

  (optional) Eccentricity. Default value is 0. (1xN or 1x1)

argsp:

  (optional) Angle between the Sun direction and the periapsis in the orbit plane. Same sign convention as for the argument of periapsis. Default value is 0. (1xN or 1x1)

er:

  (optional) Planet radius (default is %CL_eqRad) [m] (1xN or 1x1)

half_span:

  Eclipse interval half-length (in true anomaly) [rad] (1xN)

mid_pos:

  Angle from the Sun direction in the orbit plane defining the middle of the eclipse interval [rad] (1xN)

## See also

- CL_gm_eclipse

- CL_gm_raan2beta

## Authors

- CNES - DCT/SB

## Examples

    // Example 1
    betaa = CL_deg2rad([10,20]);
    sma = 7.e6;
    CL_gm_betaEclipse(sma,betaa)
    CL_gm_betaEclipse(sma,betaa,0) // same

    // Example 2
    cjd = 20050;
    sun = CL_mod_moonSunG50(cjd,'s');
    sun_sph = CL_co_car2sph(sun);
    alpha_sun = sun_sph(1);
    delta_sun = sun_sph(2);
    raan = %pi/4;
    inc = CL_deg2rad(98.7);
    betaa = CL_gm_raan2beta(inc,raan,alpha_sun,delta_sun)
    sma = 10000.e3;
    ecc = [0, 0.01];
    argsp = 0;
    [half_span,mid_pos] = CL_gm_betaEclipse(sma,betaa,ecc,argsp)