NAME

ahtimeconv - Convert mission time to different formats

USAGE

ahtimeconv intime insys inform outsys outform

DESCRIPTION

The mission-independent task ahtimeconv takes an input time (see parameter 'intime') in one time system (see parameter 'insys') and converts this time to a different time system (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 days 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'. Currently, the default value of 'epochtime' pertains to Hitomi.

The result of the time conversion is written to the parameter 'outtime'. For each converted time, the corresponding GPS time is also calculated and written to the parameter 'gpstime'. The ahtimeconv task also requires the leap second file (see parameter 'leapsec').

PARAMETERS

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

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

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

outsys = U [string M|T|U]
Output system for the output time.

outform = c1 [string s|d|c1|c2|j|m]
Output format for the output time.

(epochtime = 2014-01-01T00:00:00) [string]
Epoch time in the time system and format specified by 'epochsys' and 'epochform'.

(epochsys = U) [string] [string M|T|U]
Epoch system for the input epoch.

(epochform = c1) [string c1|c2|j|m]
Epoch format for the input epoch.

(outtime) [string]
Output time after the conversion.

(gpstime) [double]
GPS time [s] of the output time.

(leapsecfile = REFDATA) [string REFDATA|CALDB|file name]
Name of the file giving the table of leap seconds. If set to CALDB or REFDATA, the file is read from the calibration database, CalDB, or the REFDATA area, respectively.

(numdigits = 6) [integer 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18]
Number of decimal digits [sub-seconds].

(buffer = -1) [integer -1|0|N]
Rows to buffer (-1=auto, 0=none, N>0=number of rows).

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

(chatter = 1) [integer 0|1|2|3]
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 DEFAULT|NONE|file name]
Log file name. If set to DEFAULT, uses the name of the task and, if preceded by "!", overwrites the file if it exists. If set to NONE, no log file is created.

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

(history = yes) [boolean yes|no]
Records task parameters in HISTORY.

EXAMPLES

  1. Convert UTC time to mission time using the default epoch.
  2.    ahtimeconv 2014-01-01T00:00:00 U c1 M s
    
    Output:
       ahtimeconv: input time:  2014-01-01T00:00:00  input time system:  U  input format:  c1
       ahtimeconv: output time: 0  output time system: T  output format: s
    
  3. Convert UTC time to mission time using a custom epoch.
  4.    ahtimeconv 2021-01-01T00:00:00 U c1 M s epochtime=2019-01-01T00:00:00
    
    Output:
       ahtimeconv: input time:  2021-01-01T00:00:00  input time system:  U  input format:  c1
       ahtimeconv: output time: 63158400  output time system: T  output format: s
    
  5. Convert TT time to UTC time using a custom epoch.
  6.    ahtimeconv 58848 TT m U c1 epochtime=2019-01-01T00:00:00
    
    Output:
       ahtimeconv: input time:  58848  input time system:  T  input format:  m
       ahtimeconv: output time: 2019-12-30T23:58:50.816000  output time system: U  output format: c1
    

LAST MODIFIED

February 25, 2024