<< CL_co_ell2car Coordinates and frames CL_dat_cal2cjd >>

CelestLab >> Coordinates and frames > CL_co_sph2car

CL_co_sph2car

Spherical coordinates to cartesian coordinates

Calling Sequence

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

Description

Parameters

pos_sph :

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

vel_sph :

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

pos_car:

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

vel_car:

(optional) [Vx,Vy,Vz] Velocity vector in cartesian coordinates [m/s] (3xN)

jacob:

(optional) Transformation jacobian (6x6xN)

Authors

Bibliography

See also

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