Index Page sxform_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       void sxform_c ( ConstSpiceChar  * from,
                       ConstSpiceChar  * to,
                       SpiceDouble       et,
                       SpiceDouble       xform[6][6] )
#### Abstract
       Return the state transformation matrix from one frame to
       another at a specified epoch.
#### Required_Reading
       FRAMES
#### Keywords
       FRAMES
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       from       I   Name of the frame to transform from.
       to         I   Name of the frame to transform to.
       et         I   Epoch of the state transformation matrix.
       xform      O   A state transformation matrix.
#### Detailed_Input
       from        is the name of a reference frame in which a state is
                   known.

       to          is the name of a reference frame in which it is desired
                   to represent the state.

       et          is the epoch in ephemeris seconds past the epoch of
                   J2000 (TDB) at which the state transformation matrix
                   should be evaluated.
#### Detailed_Output
       xform       is the matrix that transforms states from the reference
                   frame `from' to the frame `to' at epoch `et'. If (x, y,
                   z, dx, dy, dz) is a state relative to the frame `from'
                   then the vector ( x', y', z', dx', dy', dz' ) is the
                   same state relative to the frame `to' at epoch `et'.
                   Here the vector ( x', y', z', dx', dy', dz' ) is defined
                   by the equation:

                      -   -       -          -     -  -
                     | x'  |     |            |   | x  |
                     | y'  |     |            |   | y  |
                     | z'  |  =  |   xform    |   | z  |
                     | dx' |     |            |   | dx |
                     | dy' |     |            |   | dy |
                     | dz' |     |            |   | dz |
                      -   -       -          -     -  -
#### Parameters
       None.
#### Exceptions
       1) If sufficient information has not been supplied via loaded
          SPICE kernels to compute the transformation between the
          two frames, the error will be diagnosed by a routine
          in the call tree of this routine.

       2) If either frame `from' or `to' is not recognized the error
          SPICE(UNKNOWNFRAME) will be signaled.
#### Files
       None.
#### Particulars
       This routine provides the user level interface for computing
       state transformations from one reference frame to another.

       Note that the reference frames may be inertial or non-inertial.
       However, the user must take care that sufficient SPICE kernel
       information is loaded to provide a complete state transformation
       path from the `from' frame to the `to' frame.
#### Examples
       Suppose that you have geodetic coordinates of a station on
       the surface of the earth and that you need the inertial
       (J2000) state of this station.  The following code fragment
       illustrates how to transform the position of the station to
       a J2000 state.

          #include "SpiceUsr.h"
              .
              .
              .
          bodvcd_c ( 399, radii, 3, &n, abc  );

          equatr   =  abc[0];
          polar    =  abc[2];
          f        = (equatr - polar) / equatr;

          georec_c ( long, lat, 0.0,  equatr, f,  estate );

          estate[3] = 0.0;
          estate[4] = 0.0;
          estate[5] = 0.0;

          sxform_c ( "IAU_EARTH", "J2000",   et,    xform  );
          mxvg_c   (  xform,       estate,   6,  6, jstate );

       The state `jstate' is the desired J2000 state of the station.
#### Restrictions
       None.
#### Literature_References
        None.
#### Author_and_Institution
       C.H. Acton      (JPL)
       N.J. Bachman    (JPL)
       B.V. Semenov    (JPL)
       W.L. Taber      (JPL)
#### Version
       -CSPICE Version 1.1.3, 27-FEB-2008 (BVS)

           Added FRAMES to the Required_Reading section of the header.

       -CSPICE Version 1.1.2, 24-OCT-2005 (NJB)

           Header updates: example had invalid flattening factor
           computation; this was corrected.  Reference to bodvar_c was
           replaced with reference to bodvcd_c.

       -CSPICE Version 1.1.1, 03-JUL-2003 (NJB) (CHA)

           Various header corrections were made.

       -CSPICE Version 1.1.0, 08-FEB-1998 (NJB)

           References to C2F_CreateStr_Sig were removed; code was
           cleaned up accordingly.  String checks are now done using
           the macro CHKFSTR.

       -CSPICE Version 1.0.0, 25-OCT-1997 (NJB)

          Based on SPICELIB Version 1.0.0, 19-SEP-1995 (WLT)
#### Index_Entries
       Find a state transformation matrix
#### Link to routine sxform_c source file sxform_c.c

    Wed Jun  9 13:05:31 2010