#- Version # # 1.1.0 -- INSIGHT/e9ov1 -- July 6, 2015 # # Updated for setups based on ``Baseline Elysium Planitia Site E9o, # Rev 2'' site from InSight Planetary Constants and Models # Document, June 11, 2015, JPL D-75286, Revision B; Table 10: # Single Site Baseline Values # # 1.0.0 -- INSIGHT/E9 -- November 14, 2013 # # Initial version; adapted from aliases.msl_ops120808_v2 with one # change -- the two-step conversions now use the calendar date rather # than seconds for the intermiate ET times. # #- Contact Information # # Boris Semenov, 1-818-354-8136, Boris.Semenov@jpl.nasa.gov # #- Abstract # # This file contains UNIX c- or tc-shell aliases providing short cuts # for the common time conversions supported by SPICE's CHRONOS # utility, applicable to INSIGHT. # # Majority of the INSIGHT time conversion aliases have form and usage: # # from2to # # from2to_batch # # where [from] and [to] are any of the following time system/types: # # Acronym Description # --------- -------------------------------------------------- # lmst Local Mean Solar Time (LMST) # ltst Local True Solar Time (LTST) # scet UTC Spacecraft Event Time (UTC SCET) # ert UTC Earth Receive Time (UTC ERT) # sclk Spacecraft on-board Clock (SCLK), byte-based # sclkd Spacecraft on-board Clock (SCLK), decimal # # and # # is a single input time (e.g. 2016-10-07 # 12:15:23.000000, Sol-00001M21:10:52.48011, etc) # # is an input text file listing input times # one-per-line without any blank or non-time # lines, and # # is an output text file containing # corresponding output times one-per-line. # # For example these aliases convert between LMST and SCET: # # lmst2scet from LMST to UTC SCET # scet2sclk from UTC SCET to SCLK # # lmst2scet_batch from LMST to UTC SCET, in batch mode # scet2sclk_batch from UTC SCET to SCLK, in batch mode # # Aliases are also provided for the following "special" conversions: # # scet2ett between UTC SCET and UTC Earth Transmit Time (ETT) # ett2scet # scet2ett_batch # ett2scet_batch # # scet2et between UTC SCET and Ephemeris Time (ET) expressed # et2scet as ephemeris seconds past J2000 # scet2et_batch # et2scet_batch # # scet2doy between UTC SCET in month/day and UTC in DOY formats # doy2scet # scet2doy_batch # doy2scet_batch # # sclk2hex between SCLK in decimal and hexadecimal # hex2sclk representation # sclk2hex_batch # hex2sclk_batch # # scet2lsun computes L-sub-S for given UTC SCET # scet2lsun_batch # # scet2lt computes one way light time for given UTC SCET # scet2lt_batch # # scet2pst computes PST and PDT for given UTC SCET # scet2pdt # scet2pst_batch # scet2pdt_batch # # scet2pstert computes PST/ERT for a given UTC SCET # scet2pstert_batch # # scet2pdtert computes PDT/ERT for a given UTC SCET # scet2pdtert_batch # # Two auxiliary aliases that don't require any arguments are provided # to display kernels used by CHRONOS: # # chronos.sclk displays original SCLK name # chronos.kernels display all kernels used by CHRONOS # # #- Environment # # These variables contain complete path to the normal and LMST # CHRONOS setup files # setenv INSIGHT_LMST_CHRONOS_SETUP "/ftp/pub/naif/INSIGHT/misc/chronos/setups/chronos_lmst.insight_e9ov1_v1" setenv INSIGHT_LTST_CHRONOS_SETUP "/ftp/pub/naif/INSIGHT/misc/chronos/setups/chronos.insight_e9ov1_v1" setenv CHRONOS_EXECUTABLE "/naif/toolkit/exe/chronos" #setenv INSIGHT_LMST_CHRONOS_SETUP "/gds/naif/chronos/chronos_lmst.insight_e9ov1_v1" #setenv INSIGHT_LTST_CHRONOS_SETUP "/gds/naif/chronos/chronos.insight_e9ov1_v1" #setenv CHRONOS_EXECUTABLE "/msop/naif/exe/chronos" # #- Aliases # # From LMST to all other other time systems. # # To convert from LMST to other time systems CHRONOS must be run twice # and the LMST should be pre-parsed to look like SCLK string with # fields separated by spaces with right field forced into count of # 10 microsecs. # alias lmst2ltst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -to lst -nolabel -time `echo \!* | sed "s/SOL/ /ig" | sed "s/m/ /ig" | sed "s/\-/ /g" | sed "s/\:/ /g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%s %s %s %s %05.0f\n",$1,$2,$3,$4,$5*100000)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch`' alias lmst2ltst_batch \ 'cat \!:1 | sed "s/SOL/ /ig" | sed "s/m/ /ig" | sed "s/\-/ /g" | sed "s/\:/ /g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%s %s %s %s %05.0f\n",$1,$2,$3,$4,$5*100000)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch | $CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -to lst -nolabel -batch > \!:2' alias lmst2scet \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time `echo \!* | sed "s/SOL/ /ig" | sed "s/m/ /ig" | sed "s/\-/ /g" | sed "s/\:/ /g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%s %s %s %s %05.0f\n",$1,$2,$3,$4,$5*100000)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch`' alias lmst2scet_batch \ 'cat \!:1 | sed "s/SOL/ /ig" | sed "s/m/ /ig" | sed "s/\-/ /g" | sed "s/\:/ /g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%s %s %s %s %05.0f\n",$1,$2,$3,$4,$5*100000)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from sclk -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch > \!:2' alias lmst2ert \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -to utc -totype ert -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time `echo \!* | sed "s/SOL/ /ig" | sed "s/m/ /ig" | sed "s/\-/ /g" | sed "s/\:/ /g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%s %s %s %s %05.0f\n",$1,$2,$3,$4,$5*100000)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch`' alias lmst2ert_batch \ 'cat \!:1 | sed "s/SOL/ /ig" | sed "s/m/ /ig" | sed "s/\-/ /g" | sed "s/\:/ /g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%s %s %s %s %05.0f\n",$1,$2,$3,$4,$5*100000)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch | $CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -to utc -totype ert -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch > \!:2' alias lmst2sclk \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -to sclk -nolabel -time `echo \!* | sed "s/SOL/ /ig" | sed "s/m/ /ig" | sed "s/\-/ /g" | sed "s/\:/ /g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%s %s %s %s %05.0f\n",$1,$2,$3,$4,$5*100000)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch`' alias lmst2sclk_batch \ 'cat \!:1 | sed "s/SOL/ /ig" | sed "s/m/ /ig" | sed "s/\-/ /g" | sed "s/\:/ /g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%s %s %s %s %05.0f\n",$1,$2,$3,$4,$5*100000)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch | $CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -to sclk -nolabel -batch > \!:2' # # From all other time systems to LMST. # # To convert from other time systems to LMST CHRONOS must be run twice # and the LMST should be post-parsed to look like 'Sol-nnnnnMhh:mm:ss.sssss' # string. # alias ltst2lmst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from et -to sclk -nolabel -time `$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from lst -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -time \!*` | sed "s/1\///g" | sed "s/\:/ /g" | awk '"'"'{printf ("Sol-%sM%s:%s:%s.%s\n",$1,$2,$3,$4,$5)}'"'" alias ltst2lmst_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from lst -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch < \!:1 | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from et -to sclk -nolabel -batch | sed "s/1\///g" | sed "s/\:/ /g" | awk '"'"'{printf ("Sol-%sM%s:%s:%s.%s\n",$1,$2,$3,$4,$5)}'"'"' > \!:2' alias scet2lmst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from et -to sclk -nolabel -time `$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -time \!*` | sed "s/1\///g" | sed "s/\:/ /g" | awk '"'"'{printf ("Sol-%sM%s:%s:%s.%s\n",$1,$2,$3,$4,$5)}'"'" alias scet2lmst_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch < \!:1 | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from et -to sclk -nolabel -batch | sed "s/1\///g" | sed "s/\:/ /g" | awk '"'"'{printf ("Sol-%sM%s:%s:%s.%s\n",$1,$2,$3,$4,$5)}'"'"' > \!:2' alias ert2lmst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from et -to sclk -nolabel -time `$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ert -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -time \!*` | sed "s/1\///g" | sed "s/\:/ /g" | awk '"'"'{printf ("Sol-%sM%s:%s:%s.%s\n",$1,$2,$3,$4,$5)}'"'" alias ert2lmst_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ert -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch < \!:1 | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from et -to sclk -nolabel -batch | sed "s/1\///g" | sed "s/\:/ /g" | awk '"'"'{printf ("Sol-%sM%s:%s:%s.%s\n",$1,$2,$3,$4,$5)}'"'"' > \!:2' alias sclk2lmst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from et -to sclk -nolabel -time `$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -time \!* ` | sed "s/1\///g" | sed "s/\:/ /g" | awk '"'"'{printf ("Sol-%sM%s:%s:%s.%s\n",$1,$2,$3,$4,$5)}'"'" alias sclk2lmst_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch < \!:1 | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from et -to sclk -nolabel -batch | sed "s/1\///g" | sed "s/\:/ /g" | awk '"'"'{printf ("Sol-%sM%s:%s:%s.%s\n",$1,$2,$3,$4,$5)}'"'"' > \!:2' # # Between all time systems EXCEPT LMST. # # These conversions require a single CHRONOS run without pre- or # post-parsing. # # # From LTST to other time systems EXCEPT LMST. # alias ltst2scet \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from lst -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time ' alias ltst2scet_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from lst -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch < \!:1 > \!:2' alias ltst2ert \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from lst -to utc -totype ert -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time ' alias ltst2ert_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from lst -to utc -totype ert -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch < \!:1 > \!:2' alias ltst2sclk \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from lst -to sclk -nolabel -time ' alias ltst2sclk_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from lst -to sclk -nolabel -batch < \!:1 > \!:2' # # From SCET to other time systems EXCEPT LMST. # alias scet2ltst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to lst -nolabel -time ' alias scet2ltst_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to lst -nolabel -batch < \!:1 > \!:2' alias scet2ert \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -totype ert -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time ' alias scet2ert_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -totype ert -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch < \!:1 > \!:2' alias scet2sclk \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to sclk -nolabel -time ' alias scet2sclk_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to sclk -nolabel -batch < \!:1 > \!:2' # # From ERT to other time systems EXCEPT LMST. # alias ert2ltst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ert -to lst -nolabel -time ' alias ert2ltst_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ert -to lst -nolabel -batch < \!:1 > \!:2' alias ert2scet \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ert -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time ' alias ert2scet_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ert -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch < \!:1 > \!:2' alias ert2sclk \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ert -to sclk -nolabel -time ' alias ert2sclk_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ert -to sclk -nolabel -batch < \!:1 > \!:2' # # From SCLK to other time systems EXCEPT LMST. # alias sclk2ltst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to lst -nolabel -time ' alias sclk2ltst_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to lst -nolabel -batch < \!:1 > \!:2' alias sclk2scet \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time ' alias sclk2scet_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch < \!:1 > \!:2' alias sclk2ert \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to utc -totype ert -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time ' alias sclk2ert_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to utc -totype ert -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch < \!:1 > \!:2' # # Special aliases # alias scet2ett \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -totype ett -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time ' alias scet2ett_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -totype ett -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch < \!:1 > \!:2' alias ett2scet \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ett -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time ' alias ett2scet_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ett -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch < \!:1 > \!:2' alias scet2et \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to et -totype seconds -format nnnnnnnnnn.nnnnnn -nolabel -time ' alias scet2et_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to et -totype seconds -format nnnnnnnnnn.nnnnnn -nolabel -batch < \!:1 > \!:2' alias et2scet \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -fromtype seconds -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time ' alias et2scet_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -fromtype seconds -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch < \!:1 > \!:2' alias scet2doy \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -format YYYY-DOY//HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -time ' alias scet2doy_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -format YYYY-DOY//HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch < \!:1 > \!:2' alias doy2scet \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -time ' alias doy2scet_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch < \!:1 > \!:2' alias sclk2hex \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to sclk -totype hex -nolabel -time ' alias sclk2hex_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to sclk -totype hex -nolabel -batch < \!:1 > \!:2' alias hex2sclk \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -fromtype hex -to sclk -nolabel -time ' alias hex2sclk_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -fromtype hex -to sclk -nolabel -batch < \!:1 > \!:2' alias scet2lsun \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to lst -totype lsun -nolabel -time ' alias scet2lsun_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to lst -totype lsun -nolabel -batch < \!:1 > \!:2' alias scet2lt \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -totype lt -nolabel -time ' alias scet2lt_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -totype lt -nolabel -batch < \!:1 > \!:2' alias scet2pst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND ::UTC-8 PST -nolabel -time ' alias scet2pst_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND ::UTC-8 PST -nolabel -batch < \!:1 > \!:2' alias scet2pdt \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND ::UTC-7 PDT -nolabel -time ' alias scet2pdt_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND ::UTC-7 PDT -nolabel -batch < \!:1 > \!:2' # # Going from "decimal" SCLK to all other except LMST: # # - expects input like "N/SSSSSSSSS.DDDD..." or "SSSSSSSSS.DDDD..." # - run sed to remove partition (if present) # - run sed to replace "." with " 0." # - run awk to convert integer and decimal second to "normal" SCLK # - run CHRONOS with LTST setup to convert to output time system # alias sclkd2scet \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time `echo \!* | sed "s/[0-9]\///g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%010d:%05.0f\n",$1,$2*65536)}'"'"'`' alias sclkd2scet_batch \ 'cat \!:1 | sed "s/[0-9]\///g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%010d:%05.0f\n",$1,$2*65536)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to utc -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch > \!:2' alias sclkd2ert \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to utc -totype ert -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -time `echo \!* | sed "s/[0-9]\///g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%010d:%05.0f\n",$1,$2*65536)}'"'"'`' alias sclkd2ert_batch \ 'cat \!:1 | sed "s/[0-9]\///g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%010d:%05.0f\n",$1,$2*65536)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to utc -totype ert -nolabel -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -batch > \!:2' alias sclkd2sclk \ 'echo \!* | sed "s/[0-9]\///g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%010d-%05.0f\n",$1,$2*65536)}'"'" alias sclkd2sclk_batch \ 'cat \!:1 | sed "s/[0-9]\///g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%010d-%05.0f\n",$1,$2*65536)}'"'"' > \!:2' alias sclkd2ltst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to lst -nolabel -time `echo \!* | sed "s/[0-9]\///g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%010d:%05.0f\n",$1,$2*65536)}'"'"'`' alias sclkd2ltst_batch \ 'cat \!:1 | sed "s/[0-9]\///g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%010d:%05.0f\n",$1,$2*65536)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to lst -nolabel -batch > \!:2' # # Going from "decimal" SCLK to LMST: # # - run sed to remove partition (if present) # - run sed to replace "." with " 0." # - run awk to convert integer and decimal second to "normal" SCLK # - run CHRONOS with LTST setup to convert to ET seconds # - run CHRONOS with LMST setup to convert to LMST express as SCLK # - run sed to replace partition, "1/", and separators, ":" with " " # - run awk to format output as "Sol-nnnnnMhh:mm:ss.sssss" # alias sclkd2lmst \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -time `echo \!* | sed "s/[0-9]\///g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%010d:%05.0f\n",$1,$2*65536)}'"'"'` | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from et -to sclk -nolabel -batch | sed "s/1\///g" | sed "s/\:/ /g" | awk '"'"'{printf ("Sol-%sM%s:%s:%s.%s\n",$1,$2,$3,$4,$5)}'"'" alias sclkd2lmst_batch \ 'cat \!:1 | sed "s/[0-9]\///g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%010d:%05.0f\n",$1,$2*65536)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from et -to sclk -nolabel -batch | sed "s/1\///g" | sed "s/\:/ /g" | awk '"'"'{printf ("Sol-%sM%s:%s:%s.%s\n",$1,$2,$3,$4,$5)}'"'"' > \!:2' # # Going all other except LMST to "decimal" SCLK: # # - run CHRONOS with LTST setup to convert from input time to SCLK # - run sed to replace partition separator, "/", with " " # - run sed to replace field separator, ".", with " " # - run awk to convert three tokens of "normal" SCLK to integer and # decimal SCLK # - output looks like "N/SSSSSSSSS.DDDDDD" or "SSSSSSSSS.DDDDDD" # alias scet2sclkd \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to sclk -nolabel -time \!* | sed "s/\// /g" | sed "s/\-/ /g" | awk '"'"'{printf ("%010d.%06.0f\n",$2,$3/65536*1000000)}'"'" alias scet2sclkd_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to sclk -nolabel -batch < \!:1 | sed "s/\// /g" | sed "s/\-/ /g" | awk '"'"'{printf ("%010d.%06.0f\n",$2,$3/65536*1000000)}'"'"' > \!:2' alias ert2sclkd \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ert -to sclk -nolabel -time \!* | sed "s/\// /g" | sed "s/\-/ /g" | awk '"'"'{printf ("%010d.%06.0f\n",$2,$3/65536*1000000)}'"'" alias ert2sclkd_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -fromtype ert -to sclk -nolabel -batch < \!:1 | sed "s/\// /g" | sed "s/\-/ /g" | awk '"'"'{printf ("%010d.%06.0f\n",$2,$3/65536*1000000)}'"'"' > \!:2' alias sclk2sclkd \ 'echo \!* | sed "s/[0-9]\///g" | sed "s/\-/ /g" | sed "s/\./ /g" | sed "s/\:/ /g" | awk '"'"'{printf ("%010d.%06.0f\n",$1,$2/65536*1000000)}'"'" alias sclk2sclkd_batch \ 'cat \!:1 | sed "s/[0-9]\///g" | sed "s/\-/ /g" | sed "s/\./ /g" | sed "s/\:/ /g" | awk '"'"'{printf ("%010d.%06.0f\n",$1,$2/65536*1000000)}'"'"' > \!:2' alias ltst2sclkd \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from lst -to sclk -nolabel -time \!* | sed "s/\// /g" | sed "s/\-/ /g" | awk '"'"'{printf ("%010d.%06.0f\n",$2,$3/65536*1000000)}'"'" alias ltst2sclkd_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from lst -to sclk -nolabel -batch < \!:1 | sed "s/\// /g" | sed "s/\-/ /g" | awk '"'"'{printf ("%010d.%06.0f\n",$2,$3/65536*1000000)}'"'"' > \!:2' # # Going from LMST to "decimal" SCLK: # # - run sed to replace all LMST SOL markers with blanks and force # right field into count of 10 microsecs # - run CHRONOS with LMST setup to convert LMST in SCLK form to ET seconds # - run CHRONOS with LTST setup to convert ET to "normal" SCLK # - run sed to replace partition separator, "/", with " " # - run sed to replace field separator, ".", with " " # - run awk to convert three tokens of "normal" SCLK to integer and # decimal SCLK # - output looks like "N/SSSSSSSSS.DDDDDD" or "SSSSSSSSS.DDDDDD" # alias lmst2sclkd \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -to sclk -nolabel -time `echo \!* | sed "s/SOL/ /ig" | sed "s/m/ /ig" | sed "s/\-/ /g" | sed "s/\:/ /g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%s %s %s %s %05.0f\n",$1,$2,$3,$4,$5*100000)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch` | sed "s/\// /g" | sed "s/\-/ /g" | awk '"'"'{printf ("%010d.%06.0f\n",$2,$3/65536*1000000)}'"'" alias lmst2sclkd_batch \ 'cat \!:1 | sed "s/SOL/ /ig" | sed "s/m/ /ig" | sed "s/\-/ /g" | sed "s/\:/ /g" | sed "s/\./ 0\./g" | awk '"'"'{printf ("%s %s %s %s %05.0f\n",$1,$2,$3,$4,$5*100000)}'"'"' | $CHRONOS_EXECUTABLE -setup $INSIGHT_LMST_CHRONOS_SETUP -from sclk -to et -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND -nolabel -batch | $CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from et -to sclk -nolabel -batch | sed "s/\// /g" | sed "s/\-/ /g" | awk '"'"'{printf ("%010d.%06.0f\n",$2,$3/65536*1000000)}'"'"' > \!:2' # # Two auxiliary aliases are provided to display kernels used by CHRONOS. # In 'chronos.kernels' the output of CHRONOS run with -trace option is # post-formatted to be a file list, one per line. In 'chronos.sclk' the # original SCLK name is pulled out of the comments of the SCLK file, the # name of which is extracted from CHRONOS/-trace output. # alias chronos.kernels \ 'chronos -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -time "2003 jan 1 12:00" -trace | grep -v "Actual command line" | egrep -i "\/kernels\/|\/kernels\/" | sed '"'"'s/SPK\: //g'"'"' | sed '"'"'s/TEXT\: //g'"'"' | awk '"'"'{print $1}'"'" alias chronos.sclk \ 'grep FILE_NAME `chronos -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -time "2003 jan 1 12:00" -trace | egrep "\/sclk\/insight\.tsc|\/NSY_SCLKSCET\......\.tsc"` | grep -v ";" | awk '"'"'{print $3}'"'" # # Aliases to convert from UTC SCET to PST/ERT and PDT/ERT. # alias scet2pstert \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -totype ert -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND ::UTC-8 PST -nolabel -time ' alias scet2pstert_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -totype ert -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND ::UTC-8 PST -nolabel -batch < \!:1 > \!:2' alias scet2pdtert \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -totype ert -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND ::UTC-7 PDT -nolabel -time ' alias scet2pdtert_batch \ '$CHRONOS_EXECUTABLE -setup $INSIGHT_LTST_CHRONOS_SETUP -from utc -to utc -totype ert -format YYYY-MM-DD HR:MN:SC.\#\#\#\#\#\# ::RND ::UTC-7 PDT -nolabel -batch < \!:1 > \!:2' # # End of aliases file. #