invstm_c |

Table of contents## Procedureinvstm_c ( Inverse of state transformation matrix ) void invstm_c ( ConstSpiceDouble mat [6][6], SpiceDouble invmat [6][6] ) ## AbstractReturn the inverse of a state transformation matrix. ## Required_ReadingROTATION ## KeywordsMATH MATRIX TRANSFORMATION ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- mat I A state transformation matrix. invmat O The inverse of `mat'. ## Detailed_Inputmat is a state transformation matrix for converting states relative to one frame to states relative to another. The state transformation of a state vector, `s', is performed by the matrix-vector product. mat * s. For `mat' to be a "true" state transformation matrix it must have the form .- -. | : | | r : 0 | |.......:......| | : | | w*r : r | | : | `- -' where `r' is a 3x3 rotation matrix, 0 is the 3x3 zero matrix and `w' is a 3x3 skew-symmetric matrix. NOTE: no checks are performed on `mat' to ensure that it does indeed have the form described above. ## Detailed_Outputinvmat is the inverse of `mat' under the operation of matrix multiplication. If `mat' has the form described above, then `invmat' has the form shown below. .- -. | t : | | r : 0 | |........:......| | t : t | | (w*r) : r | | : | `- -' (The superscript "t" denotes the matrix transpose operation.) ## ParametersNone. ## ExceptionsError free. 1) No checks are performed to ensure that the input matrix is indeed a state transformation matrix. ## FilesNone. ## ParticularsGiven a matrix for transforming states relative frame 1 to states relative frame 2, the routine produces the inverse matrix. That is, it returns the matrix for transforming states relative to frame 2 to states relative to frame 1. This special routine exists because unlike the inverse of a rotation matrix, the inverse of a state transformation matrix, is NOT simply the transpose of the matrix. ## ExamplesThe numerical results shown for this example may differ across platforms. The results depend on the SPICE kernels used as input, the compiler and supporting libraries, and the machine specific arithmetic implementation. 1) Suppose you have a geometric state of a spacecraft in Earth body-fixed reference frame and wish to express this state relative to an Earth centered J2000 frame. The following example code illustrates how to carry out this computation. Use the PCK kernel below to load the required high precision orientation of the ITRF93 Earth body-fixed reference frame. Note that the body ID code used in this file for the Earth is 3000. earth_720101_070426.bpc Example code begins here. /. Program invstm_ex1 ./ #include <stdio.h> #include "SpiceUsr.h" int main( ) { /. Local variables. ./ SpiceDouble invmat [6][6]; SpiceDouble istat1 [6]; SpiceDouble istat2 [6]; SpiceDouble mat [6][6]; SpiceDouble xmat [6][6]; SpiceInt earth; /. Define the state of the spacecraft, in km and km/s, and the `et' epoch, in seconds past J2000. ./ SpiceDouble et = 0.0; SpiceDouble state [6] = { 175625246.29100420, 164189388.12540060, -62935198.26067264, 11946.73372264, -12771.29732556, 13.84902914 }; /. Load the required high precision Earth PCK. ./ furnsh_c ( "earth_720101_070426.bpc" ); /. First get the state transformation from J2000 frame to Earth body-fixed frame at the time of interest `et'. The body ID code used in high precision PCK files for the Earth is 3000; this number indicates that the terrestrial frame used is ITRF93. ./ earth = 3000; tisbod_c ( "J2000", earth, et, mat ); /. Get the inverse of `mat'. ./ ## RestrictionsNone. ## Literature_ReferencesNone. ## Author_and_InstitutionJ. Diaz del Rio (ODC Space) ## Version-CSPICE Version 1.0.0, 25-NOV-2021 (JDR) ## Index_Entriesinverse of state transformation matrix |

Fri Dec 31 18:41:08 2021