fstg -- Convert Spacecraft coordinates to Gnomonic direction cosines.
This filter will convert Spacecraft coordinates to Gnomonic direction cosines. The filter searches data tables, row by row, looking for rows where FRAME=S, indicating a Spacecraft coordinate. When a Spacecraft coordinate is found, the X, Y, and associated covariances are converted to Gnomonic direction cosines using quaternion multiplication. (The transforming quaternion is computed using data columns Q1, Q2, Q3, and Q4, where Q4 is the scalar part of the quaternion.) If an error occurs in retrieving the position information, the star is skipped. An error that occurs when retrieving covariances will only cause the covariance transformation to be skipped.
Each column is read and its value set to INDEF. If an error occurs anywhere in the transformation, the row is skipped and the values remain INDEF. The FRAME column is set to G regardless of whether the transformation was completed or was incomplete.
This conversion does a simple multiplication of the quaternion formed from the negative of the roll angle and the position, as follows:
+ (x',y') = Q(-roll) (x,y) Q(-roll)where (x,y) represents the quaternion formed from the position (x,y).
The following columns are used by fstg:
INPUT OUTPUT ----- ------ X X Y Y X_X X_X Y_Y Y_Y X_Y X_Y FRAME FRAME Q1,Q2,Q3,Q4 Q1,Q2,Q3,Q4
1. Convert a data table from Spacecraft to Gnomonic coordinates.
cl> fstg intable
2. Convert a data table from Spacecraft to Gnomonic coordinates, and create a new output table.
cl> fstg intable new_table+ output_table="outtable"
3. Process all tables having the suffix .tab.
cl> fstg *.tab