NAME

ahtimeconv - Convert mission time in different formats

USAGE

ahtimeconv intime, insys, inform, outsys, and outform

DESCRIPTION

'ahtimeconv' takes an input time (see parameter 'intime') in one time system (see parameter 'insys') and converts the time in another time systems (see parameter 'outsys'). The input and output time formats must be specified by the parameters 'inform' and 'outform'. The allowed formats are : calendar days as YYYY-MM-DDThh:mm:ss (c1), calendar day as YYYY:DDD:hh:mm:ss (c2), MJD (m), JD (j), seconds from epoch (s), and days from epoch (d). The time systems supported are : Coordinated Universal Time (UTC), Terrestrial Time (TT), and Mission Elapsed Time (MET). The latter is defined as a number of seconds relative to an epoch given in the parameter 'epochtime'. The epoch time system and format may be given in the parameters 'epochsys' and 'epochform'.
The result of the time conversion is written in the parameter 'outtime'. For each converted time also the corresponding GPS time is calculated and written in the parameter 'gsptime'. 'ahtimeconv' requires the leap second FITS file (see parameter 'leapsec').

PARAMETERS

intime [string]
Input time in the time system and format specified in 'insys' and 'inform'.

insys [string]
Input system for the input time. Values allowed M for MET, T for TT and U for UTC.

inform [string]
Input format for the input time. Values allowed are : s seconds from epoch, d days from epoch, c1 calendar days as YYYY-MM-DDThh:mm:ss, c2 calendar days as YYYY:DDD:hh:mm:ss, j for Julian Day , m for Modified Julian Day.

outsys [string]
Output system for the output time. Values allowed M for MET, T for TT and U for UTC.

outform [string]
Output format for the output time. Values allowed are : s seconds from epoch, d days from epoch, c1 calendar days as YYYY-MM-DDThh:mm:ss, c2 calendar days as YYYY:DDD:hh:mm:ss, j for Julian Day , m for Modified Julian Day.

epochtime [string]
Epoch time in the time system and format specified by 'epochsys' and 'epochform'

epochsys [string]
Epoch system for the input epoch. Values allowed M for MET, T for TT and U for UTC.

epochform [string]
Epoch format for the input epoch. Values allowed are : c1 calendar days as YYYY-MM-DDThh:mm:ss, c2 calendar days as YYYY:DDD:hh:mm:ss, j for Julian Day , m for Modified Julian Day.

outtime [string]
Output time after the convertion.

gpstime [real]
GPS time [s] of the output time.

(leapsecfile = REFDATA) [string]
Name of the input leap second file. If set to CALDB or REFDATA uses the leapsecond file in either CALDB or REFDATA area.

numdigits [integer]
Number of decimal digits in sub-seconds

(buffer = -1) [integer]
Rows to buffer (-1=auto, 0=none, >0=numrows).

(clobber = no) [boolean]
Overwrites the existing output file if set to yes (yes/[no]).

(chatter = 1) [integer]
Chatter level for output. Set to 0 to suppress output, or to 1, 2, or 3 for increasing the chatter of the output.

(logfile = !DEFAULT) [string]
Log filename. If set to DEFAULT uses the name of the task and, if preceded by '!', overwrite the file if it exists. If set to NONE no log file is created.

(debug = no) [boolean]
Diagnostic output is printed out on the screen if set to yes (yes/[no]).

(history = yes) [boolean]
Records tool parameters in HISTORY ([yes]/no).

(mode = ql) [string ql|hl|q]
Mode to query the parameter file. Acceptable values include: 'ql' (query and learn/remember), 'hl' (hidden and learn/remember), 'q' (query but don't remember),'h' (hidden).

EXAMPLES

1. Convert UTC time to mission time using default epoch:


 $ ahtimeconv 2014-01-01T00:00:00 U c1 M s

 ahtimeconv: input time:  2014-01-01T00:00:00  input time system: U  input format:  c1
 ahtimeconv: output time: 63158400  output time system: T  output format: s
  
2. Convert UTC time to mission time using custom epoch:
 $ ahtimeconv 2014-01-01T00:00:00 U c1 M s epochtime=2010-01-01T00:00:00

 ahtimeconv: input time:  2014-01-01T00:00:00  input time system: U  input format:  c1
 ahtimeconv: output time: 126230400  output time system: T  output format: s
  
3. Convert TT time to UTC
$ ahtimeconv 56658 TT m U c1

 ahtimeconv: input time:  56658  input time system:  T  input format:  m
 ahtimeconv: output time: 2013-12-31T23:58:53.816000  output time system: U  output format: c1



SEE ALSO

LAST MODIFIED

February 2, 2016