$LastChangedDate: 27-Juil-2011 $

# CL_oe_car2kep

Cartesian to keplerian orbital elements

## Calling Sequence

       [kep[,jacob]] = CL_oe_car2kep(pos_car,vel_car[,mu])

## Description

- Converts position and velocity to classical keplerian orbital elements for elliptic (non circular and non equatorial), hyperbolic or parabolic orbit.

  The transformation jacobian is optionally computed.

  See Orbital elements for more details

- Notes:

  - for eccentricites close to 0, ω and M are not defined independently. Only ω + M is.

  - for inclinations close to 0, ω and Ω are not defined independently. Only ω + Ω is.

  - for inclinations and eccentricities close to 0, ω, Ω and M are not defined independently. Only ω + Ω + M is.

  Jacobian transformation is not exact for any of the above cases

## Parameters

pos_car:

  position [X;Y;Z] [m] (3xN)

vel_car:

  velocity [Vx;Vy;Vz] [m/s] (3xN)

mu :

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

kep:

  classical keplerian orbital elements [sma;ecc;inc;pom;raan;anm] [m,rad] (6xN)

jacob:

  (optional) transformation jacobian d(sma,ecc,inc,pom,raan,anm)/d(X,Y,Z,Vx,Vy,Vz) (6x6xN)

## Bibliography

- 1) CNES - MSLIB FORTRAN 90, Volume V (mv_car_kep)

## See also

- CL_oe_kep2car

- CL_oe_car2cir

- CL_oe_car2cirEqua

- CL_co_car2sph

- CL_co_car2ell

## Authors

- CNES - DCT/SB

## Examples

    // Example 1 : elliptical orbit
    pos = [-26655.e3 ; 29881.e3 ; 0];
    vel = [-1125 ; -1122 ; 195];
    [kep,jacob] = CL_oe_car2kep(pos,vel)
    [pos2,vel2,jacob2] = CL_oe_kep2car(kep);
    jacob*jacob2 // = identity
    [pos2-pos ; vel2-vel]

    // Example 2 : hyperbolic orbit
    pos = [0; 6933.e3; 0];
    vel = [0; 0; 12739.];
    [kep,jacob] = CL_oe_car2kep(pos,vel)
    [pos2,vel2,jacob2] = CL_oe_kep2car(kep);
    jacob*jacob2 // = identity
    [pos2-pos ; vel2-vel]