Name

CL_co_sph2car — Spherical to cartesien coordinates

Calling Sequence

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

Description

  • Given a position vector in spherical (or geocentric if used with earth) coordinatespos_sph (long,lat,D), the vector in cartesian coordinates pos_car (x,y,z) is computed . Velocity in cartesian coordinates and jacobian are also optionally computed if velocity in spherical coordinates is given.
  • 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/2007

Parameters

pos_sph :

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

vel_geoc:

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

pos_car:

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

vel_car:

(optional) velocities in cartesien coordinates [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_geoc_car)

See also

CL_co_car2sph, CL_co_car2ell, CL_co_ell2car

Examples

// Example 1
pos_sph = [0,0,%CL_eqRad;%pi/2,%pi/2,%CL_eqRad]';
pos_car = CL_co_sph2car(pos_sph);

// Example 2 :
pos_sph = [0.090715;5.362077;6377951.7];
vel_sph = [1.8332e-5;2.2060e-4;-181.488];
[pos_car,vel_car,jacob1] = CL_co_sph2car(pos_sph,vel_sph);