NAME

prefilter - Derive attitude and orbit related quantities.

USAGE

prefilter

DESCRIPTION

prefilter derives attitude and orbit related quantities based on pointing and position information.

NORAD two line elements (TLEs) are propagated to determine the satellite position and quaternions are interpolated from an attitude file at fixed time intervals. The time, position and attitude are then employed to derive and output some subset of the following quantities (based on the columns parameter): TIME, TIME_ADJ, POSITION, VELOCITY, QUATERNION, PNTUNIT, POLAR, BORESIGHT, SAT_ALT, SAT_LAT, SAT_LON, RA, DEC, ROLL, ELV, BR_EARTH, FOV_FLAG, SUNSHINE, SUN_ANGLE, MOON_ANGLE, RAM_ANGLE, ANG_DIST, COR_ASCA, COR_SAX, MCILWAIN_L, SAA, SAA_TIME

prefilter was originally developed for the Swift mission, but it can be used for other missions provided a coordfits style attitude file, and two line elements (or XTE-style orbit ephemeris) are available.

Note that while the mission epoch is in UTC, the start and end parameters are expressed in the time system of the attitude file. The time system and related keywords (TIMESYS, TIMEUNIT, MJDREF*, ...) are copied from the input attitude file to the output.

For output TIME column takes values <start> + k * <interval>. The output TIME_ADJ column takes values TIME + offset where offset is controlled by the <timeadj> parameter. timeadj allows a time correction to be applied to the TIME values. The TIME value is used unchanged when looking up TIME in the attitude file, but for other output columns, TIME_ADJ is used. The time adjustment may be particularly important when calculating position and several other output columns are dependent on position.

PARAMETERS

outname [filename]
Name of the output file. To overwrite a preexisting file with the same name, prefix the name with an exclamation point '!', or set the 'clobber' parameter = YES.
columns ALL|[space-separated-values]|@[filename]
Specifies which derived quantities to output.
orbmode TLE_TEXT2|TLE_TEXT3|TLE_FITS|atSetElement|atSetElement2|XTE
Specifies the orbit mode which controls how orbname will be processed. TLE_TEXT2 and TLE_TEXT3 corresponds to a Two-Line Element file with either two or three plain text lines per element set. TLE_FITS is a Two-Line Element file stored in FITS format. atSetElement and atSetElement2 refer to orbital element files used by the atFunctions library. XTE corresponds to an orbit ephemeris file in the format of RXTE, Chandra or NICER.
orbname [filename]
Name of the orbit file.
attname [filename]
Name of the attitude file.
alignfile [string]
Name of the coordfits alignment file or NONE.
leapname [filename]
Name of the leap second file.
rigname [filename]
Name of the atFunctions rigidity file.
start [real]
Output start time in seconds since mission epoch expressed in TIMESYS.
end [real]
Output end time in seconds since mission epoch expressed in TIMESYS.
interval [real]
Output interval [seconds].
ranom [real]
Nominal right ascension of spacecraft boresight [degrees].
decnom [real]
Nominal declination of spacecraft boresight [degrees].
attextrap [real]
Limit on attitude extrapolation [seconds].
missepoch [string]
Mission epoch in UTC specified as yyyy-dd-mmThh:mm:ss.sss.
(timeadj = DEFAULT) [string]
This parameter can be used to adjust times used for calculations. TIME_ADJ = TIME + offset where the value of offset depends on the value of the timeadj parameter. timeadj=DEFAULT (the default), allows mission-specific determination of offset. timeadj=CONST:<value> sets offset to value. timeadj=KEY:<value> sets offset to the value of a keyword from the attitude file. timeadj=LEAPS sets offset to the opposite of the number of leap seconds since missepoch to start.

Now, back to timeadj=DEFAULT. For the Swift mission, DEFAULT is treated as KEY:UTCFINIT (if that keyword is present), or LEAPS if it is not. For all other missions, DEFAULT is treated as LEAPS. Note that LEAPS is consistent with past behavior.

origin [string]
Value for FITS ORIGIN keyword.
(clobber = NO) [boolean]
If outname already exists, then "clobber = yes" will overwrite it.
(history = yes) [boolean]
If set, HISTORY keywords are written to output.
(chatter = 1) [integer, 0 - 5]
Controls the amount of informative text written to standard output. Setting chatter = 5 will produce detailed diagnostic output, otherwise this task normally does not write any output.

EXAMPLES

1. Execute prefilter prompting the user for parameter values.

	prefilter

2. Execute prefilter providing the attitude file name and indicating the TLE file to process on the command line.

	prefilter attname=./ATTITUDE.fits orbmode=TLE orbname=./TLE.fits

SEE ALSO

prefilter implementation notes

LAST MODIFIED

October 2016