<< CL_co_car2ell Coordinates and frames CL_co_ell2car >>

CelestLab >> Coordinates and frames > CL_co_car2sph

CL_co_car2sph

Cartesian coordinates to spherical coordinates

Calling Sequence

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

Description

Parameters

pos_car :

[X;Y;Z] Position vector in cartesian coordinates [m] (3xN)

vel_car :

(optional, needed for vel_sph and jacob computation) [Vx;Vy;Vz] Velocity vector in cartesian coordinates [m/s] (3xN)

pos_sph :

[lon;lat;r] Position vector in spherical coordinates [rad,m](3xN)

vel_sph :

(optional) [d(lon)/dt;d(lat)/dt;d(r)/dt] Derivatives of spherical coordinates [rad/s,m/s] (3xN)

jacob :

(optional) Transformation jacobian (6x6xN)

Authors

Bibliography

See also

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);
<< CL_co_car2ell Coordinates and frames CL_co_ell2car >>