Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/sxform_c.html
Дата изменения: Sat Dec 17 06:09:58 2005 Дата индексирования: Mon Apr 11 00:11:32 2016 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п |
Return the state transformation matrix from one frame to another at a specified epoch.
None.
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.
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.
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 | - - - - - -
None.
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.
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.
None.
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.
None.
C.H. Acton (JPL) N.J. Bachman (JPL) W.L. Taber (JPL)
None.
-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)
Find a state transformation matrix