$LastChangedDate: 27-Juil-2011 $

# CL_fr_topoNMat

Terrestrial frame to topocentric North frame transformation matrix

## Calling Sequence

       [M] = CL_fr_topoNMat(orig)

## Description

- Computes the frame transformation matrix M from the terrestrial reference frame to the local topocentric North frame.

  By convention, multiplying M by coordinates relative to the terrestrial frame yields coordinates relative to the topocentric North frame.

- Notes:

  - 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] (3xN)

M :

  Terrestrial to topocentric North frame transformation matrix (3x3xN)

## Bibliography

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

## See also

- CL_fr_topoN2ter

- CL_fr_ter2topoN

## Authors

- CNES - DCT/SB

## Examples

    // Conversion from pos_ter to pos_topoN :
    orig = [CL_deg2rad(40) ; CL_deg2rad(10) ; 0];
    pos_orig = CL_co_ell2car(orig);
    pos_ter = [ 1000.e3 ; 6578.e3 ; 2000.e3 ];
    M = CL_fr_topoNMat(orig);
    pos_topoN = M * (pos_ter - pos_orig)
    // same obtained by:
    pos_topoN = CL_fr_ter2topoN(orig,pos_ter)

    // Conversion from pos_topoN to pos_ter :
    orig = [CL_deg2rad(40) ; CL_deg2rad(10) ; 0];
    pos_orig = CL_co_ell2car(orig);
    pos_topoN = [ 0. ; 0. ; 1000.e3 ];
    M = CL_fr_topoNMat(orig);
    pos_ter = M' * pos_topoN + pos_orig
    // same obtained by:
    pos_ter = CL_fr_topoN2ter(orig,pos_topoN)