Name

CL_co_car2sph — Cartesien to spherical coordinates

Calling Sequence

   [pos_sph[,vel_geoc[,jacob]]] = CL_co_car2sph(pos_car[,vel_car])
   
   

Description

  • Given a vector in cartesien coordinates (pos_car) , it returns the vector in spherical coordinates (geocentric if planet is earth) ( pos_sph ).

    Velocity geocentric coordinates and jacobien are optionnaly computed (velocity in cartesien coordinates needed).

  • Warning : pos_sph contains longitude, spherical latitude, and distance to center (whereas in elliptical coordinates it is longitude, elliptical latitude and elliptical altitude.

  • Last update : 14/2/2008

Parameters

pos_car :

[X;Y;Z] positions in cartesien coordinates [m] (3xN)

vel_car :

(optional, needed for vel_geoc and jacob computation) [VX;VY;VZ] velocities in cartesien coordinates [m/s] (3xN)

pos_sph :

[LON;LAT;D] positions in spherical (or geocentric) coordinates [rad],[m](3xN)

vel_geoc :

(optional) [LON;LAT;D] velocities in spherical (or geocentric) coordinates [rad/s],[m/s] (3xN)

jacob :

(optional) transformation jacobian (6x6xN)

Authors

CNES - DCT/SB

Bibliography

1 Mecanique Spatiale, Cnes - Cepadues Editions, Tome I, section 3.2.3 (Les reperes de l'espace et du temps, Relations entre les coordonnées)

2 CNES - MSLIB FORTRAN 90, Volume T (mt_car_geoc)

See also

CL_co_sph2car, CL_oe_car2cir, CL_oe_car2cirEqua, CL_co_car2ell, CL_oe_car2kep

Examples

// Example 1
pos_car = [3842403.1 ;-5057704.6 ; 577780.5];
[pos_sph] = CL_co_car2sph(pos_car);

// Example 2
vel_car = [1000;1000;100];
[pos_sph,vel_sph,jacob] = CL_co_car2sph(pos_car,vel_car);