$LastChangedDate: 27-Juil-2011 $

# CL_op_ssoJ2

Semi major axis, eccentricity or inclination for a sun synchronous orbit (J2)

## Calling Sequence

       [output] = CL_op_ssoJ2(type_output,par1,par2[,er[,mu[,j2[,rotr_pla_sun]]]])
       [sma] = CL_op_ssoJ2('a',ecc,inc[,er[,mu[,j2[,rotr_pla_sun]]]])
       [ecc] = CL_op_ssoJ2('e',sma,inc[,er[,mu[,j2[,rotr_pla_sun]]]])
       [inc] = CL_op_ssoJ2('i',sma,ecc[,er[,mu[,j2[,rotr_pla_sun]]]])

## Description

- Computes orbital parameters (semi major axis, eccentricity or inclination) ensuring sun-synchronicity so that the orbit's ascending node precession rate is equal to the Sun apparent rotation rate rotr_pla_sun.(See equation (1))

  - If type_output='a', par1 is eccentricity, par2 is inclination and semi major axis is computed (output).

  - If type_output='e', par1 is semi major axis, par2 is inclination and eccentricity is computed (output).

  - If type_output='i', par1 is semi major axis, par2 is eccentricity and inclination is computed (output)

Note: %nan is returned when sun-synchronicity is not possible

## Parameters

type_output:

  String defining the parameter to be computed (output). It can be 'a' for semi major axis, 'e' for eccentricity or 'i' for inclination

par1:

  Semi major axis if type_output is 'e' or 'i' ; eccentricity if type_output is 'a' [m] (1xN or 1x1)

par2:

  Inclination if type_output is 'a' or 'e' ; eccentricity if type_output is 'i' [rad] (1xN or 1x1)

er:

  (optional) Equatorial radius [m] (default is %CL_eqRad)

mu:

  (optional) Gravitational constant [m^3/s^2] (default value is %CL_mu)

j2:

  (optional) Second zonal harmonic term (default is %CL_j2)

rotr_pla_sun :

  (optional) Mean apparent rotation rate of the Sun around the planet (default is %CL_rotrEarthSun) (1 x 1)

output:

  Semi major axis [m] if type_output is 'a' ; eccentricity if type_output is 'e' ; inclination [rad] if type_output is 'i' (1xN). Output value is %nan if no valid result exists.

## Authors

- CNES - DCT/SB

## Examples

    // Compute inclination for sun-synchronicity
    sma = 7078.e3;
    ecc = 0.01;
    inc = CL_op_ssoJ2 ('i', sma, ecc)

    // Compute eccentricity for sun-synchronicity
    sma = 7078.e3;
    inc = CL_deg2rad(98.15);
    ecc = CL_op_ssoJ2 ('e', sma, inc)

    // Compute semi major axis for sun-synchronicity
    ecc = 0.01;
    inc = CL_deg2rad(97);
    sma = CL_op_ssoJ2 ('a', ecc, inc)