$LastChangedDate: 27-Juil-2011 $

# CL_gm_beta2raan

Beta angle to right ascension of ascending node

## Calling Sequence

       [raan1,raan2] = CL_gm_beta2raan(betaa,inc,alpha_sun,delta_sun)

## Description

- Computes the right ascension of the ascending node (raan) from the beta angle (betaa), the Sun's right ascension (alpha_sun) and declination (delta_sun), and the inclination of the orbit (inc).

  There are 2 solutions (raan1) and (raan2) such that:

  - raan2 = pi - raan1 + 2*alpha_sun

  - raan1 is in the interval [ alpha_sun - pi/2 ; alpha_sun + pi/2] modulo 2*pi

  - raan2 is in the interval [ alpha_sun + pi/2 ; alpha_sun + 3*pi/2] modulo 2*pi

  Beta is the angle between the satellite's orbit plane and the Sun direction:

- Notes:

  Beta is a signed quantity. If it is positive then the Sun direction is less than 90 degrees from the orbit's angular momentum vector (vector perpendicular to the orbit plane and oriented according to right hand rule).

## Parameters

betaa:

  Beta angle [rad] (1xN)

inc:

  Inclination of the orbit [rad] (1xN)

alpha_sun:

  Sun right ascension [rad] (1xN)

delta_sun:

  Sun declination [rad] (1xN)

raan1:

  Right ascension of the ascending node (solution 1) [rad] (1xN)

raan2:

  Right ascension of the ascending node (solution 2) [rad] (1xN)

## See also

- CL_op_locTimeG50

- CL_gm_raan2beta

- CL_mod_moonSunG50

## Authors

- CNES - DCT/SB

## Examples

    // Get alpha_sun and delta_sun
    cjd = 20050;
    [r_sun,rs] = CL_mod_moonSunG50(cjd,'s');
    r_sph = CL_co_car2sph(r_sun);
    alpha_sun = r_sph(1);
    delta_sun = r_sph(2);
    betaa = %pi/4;
    inc = CL_deg2rad(98.7);
    [raan1,raan2] = CL_gm_beta2raan(betaa,inc,alpha_sun,delta_sun)