$LastChangedDate: 27-Juil-2011 $

# CL_fr_ter2topoN

Terrestrial frame to topocentric North frame vector transformation

## Calling Sequence

       [pos_topoN,vel_topoN,jacob] = CL_fr_ter2topoN(ori [, pos_ter, vel_ter, er, obl])

## Description

- Converts position and (optionally) velocity vectors from the terrestrial ("Earth fixed") reference frame to the topocentric North ("Earth fixed") frame.

  The jacobian of the transformation is optionally computed.

- Notes:

  - The jacobian of the transformation only depends on the origin of the topocentric frame. It can then be computed even if the position and velocity vectors are omitted (in this case they are given the value [], and the corresponding output values are also set to []).

  - The origin of the topocentric North frame is not the center of the planet, but the location defined by orig.

  - This function can be used for another planet than the Earth.

- See Local Frames for more details on the definition of local frames.

## Parameters

orig:

  [lon;lat;alt] Topocentric frame origin in elliptical (geodetic) coordinates [rad;rad;m] (3x1 or 3xN)

pos_ter:

  (optional) [X;Y;Z] Position vector relative to terrestrial frame [m] (3x1 or 3xN)

vel_ter:

  (optional) [Vx;Vy;Vz] Velocity vector relative to terrestrial frame [m/s] (3x1 or 3xN)

er:

  (optional) Planet equatorial radius (default is %CL_eqRad) [m]

obl:

  (optional) Planet oblateness (default is %CL_obla)

pos_topoN:

  [X;Y;Z] Position vector relative to topocentric North frame [m] (3xN)

vel_topoN:

  (optional) [Vx;Vy;Vz] Velocity vector relative to topocentric North frame [m/s] (3xN)

jacob:

  (optional) Transformation jacobian d(x,y,z,vx,vy,vz)_topoN/d(x,y,z,vx,vy,vz)_ter (6x6xN)

## Authors

- CNES - DCT/SB

## Bibliography

- 1) CNES - MSLIB FORTRAN 90, Volume T (mt_topo_N_ref)

## See also

- CL_fr_topoNMat

- CL_fr_topoN2ter

## Examples

    orig = [%pi/4;%pi/3;100];

    // Compute only jacobian :
    [pos,vel,jacob] = CL_fr_ter2topoN(orig)

    // Compute position and velocity :
    pos_ter = [ 3500.e3; 2500.e3; 5800.e3 ];
    vel_ter = [ 1.e3; 2.e3; 6.e3 ];
    [pos,vel] = CL_fr_ter2topoN(orig,pos_ter,vel_ter)

    // Compute position only (2 position vectors) :
    [pos] = CL_fr_ter2topoN(orig,[pos_ter, pos_ter])

    // Compute 2 positions (corresponding to 2 origins) :
    [pos] = CL_fr_ter2topoN([orig,orig],[pos_ter, pos_ter])