[teqc] helpful tip of week 1917

Lou Estey lou at unavco.org
Wed Oct 5 08:06:19 MDT 2016

This week's tip: the '-tbin' and '-ast' options

These options are pretty well covered in the original HTML tutorial in Section 13:

This tip is a reminder that '-tbin' is a pretty powerful option covering all the
following conversion cases:

- N manufacturer's format or BINEX files to M RINEX filesets
- N RINEX files of same type to M RINEX files of same type as input
- N manufacturer's format or BINEX files to M BINEX files
- N RINEX filesets to M BINEX files

... N >= 1 and M >= 1.  This is what we call a "many-to-many" relationship.
The N input files do not have to have the same span of time, but they do have
to be listed on the command in increasing time order, as usual.

Note that if you have N >= 1 are satisfied with the input's start and end times
and you want M == 1, then you don't need the '-tbin' option at all; this case is
done automatically by default by teqc and is commonly used.

But you can use '-tbin' for the following situations, each with one teqc command:
- you want to break up a single multi-day file into daily files, or
- you want to merge many sub-daily (e.g. hourly) files into one or more daily files, or
- you want to break up one or more daily files into sub-daily files,
- and so on.
Users of teqc who were used to doing all these operations with many teqc commands
with different '-st', '-e, and/or '+dX' options and then eventually discover the
'-tbin' option to get the same results run as one teqc command are very happy
simplifying their work.

The only tricky thing -- and I sometimes forget this myself -- is to additionally
have in any command line using '-tbin':

'+obs +' if you want GNSS observables
'+nav +[...] if you want GNSS navigation messages
'+met +' if you want meteorologic data

... assuming these quantities are in the input.  (I'm trying to figure out some
strategies for automatically setting these in some cases, such as the important
case of N RINEX files of same type to M RINEX files of same type as input.)

The first argument after the '-tbin' option is the time span of the output files,
the default unit (if none is specified) in seconds.  Append a 'm' for minutes,
'h' for hours, 'd' for days; e.g. '-tbin 86400 temp', '-tbin 1440m temp',
'-tbin 24h temp', and '-tbin 1d temp' all mean the same thing: make daily
output files starting with the prefix 'temp'.

The option '-ast' (not to be confused with '-st') works with '-tbin' when in
those rare cases you want the resultant output files to be aligned with a very
specific start time.  The example in Section 13 is (with a few minor editorial

You want the input of the RINEX file input.obs broken up into files of 1/12 sidereal
days with filenames starting with prefix sidx, and you want the first file to be time
aligned to 00h30m09s (GPS time, as usual) of the first day of data, and you want the
data to start at 01h30m10s in the first file; then use:

      teqc +obs + -tbin 7180.3409 sidx -ast 00:30:09.000 -st 01:30:10 input.obs

If the input data started on day 2016:165, then the output files would be named:
sidx165a3009.16o (but data doesn't start in this file until 01h30m10s)

Note that the length of a sidereal day is 23h 56m 4.091s, so 1/12th of a sidereal day
is 7180.3409 seconds.

Recall from the tutorial that the '165a3009', '165c2950', '165e2930', ... in the
filenames means day 165 with time-bins starting at 00h30m09s, 02h29m50s, 04h29m30s, ...
but the actual start of the first file can be controlled with the '-st' option.

There might be other interesting uses of the '-ast' option.  You tell me.

Happy teqc-ing!


p.s. In July, Neville Palmer at GNS in New Zealand reported a couple of minor problems
with the '-tbin' option: http://postal.unavco.org/pipermail/teqc/2016/002118.html
These have been fixed: http://postal.unavco.org/pipermail/teqc/2016/002127.html
and the fixes will be in the next release.

Louis H. Estey, Ph.D.              office:  [+001] 303-381-7456
UNAVCO, 6350 Nautilus Drive           FAX:  [+001] 303-381-7451
Boulder, CO  80301-5554            e-mail:  lou  unavco.org
      WWW:  http://www.unavco.org   http://jules.unavco.org

"If the universe is the answer, what is the question?"
                                                -- Leon Lederman

Past helpful tips:

week 1894: using teqc config files - http://postal.unavco.org/pipermail/teqc/2016/002067.html
week 1895: qc of high-rate data - http://postal.unavco.org/pipermail/teqc/2016/002071.html
week 1896: UNIX/Linux shells for Windows - http://postal.unavco.org/pipermail/teqc/2016/002072.html
week 1897: '-' vs. '+' teqc options - http://postal.unavco.org/pipermail/teqc/2016/002076.html
week 1898: auto-identification of formats - http://postal.unavco.org/pipermail/teqc/2016/002092.html
week 1899: auto-identification vs. format flags - http://postal.unavco.org/pipermail/teqc/2016/002096.html
week 1900: square brackets in options - http://postal.unavco.org/pipermail/teqc/2016/002105.html
week 1901: using option '+mds' - http://postal.unavco.org/pipermail/teqc/2016/002108.html
week 1902: qc results w/ problematic nav messages - http://postal.unavco.org/pipermail/teqc/2016/002113.html
week 1903: '-no_orb[it]' and '-no_pos[ition]' options - http://postal.unavco.org/pipermail/teqc/2016/002115.html
week 1904: '-week' option - http://postal.unavco.org/pipermail/teqc/2016/002117.html
week 1905: using '+bcf' for XYZ/geodetic conversion - http://postal.unavco.org/pipermail/teqc/2016/002126.html
week 1906: the '+v[erify]' option - http://postal.unavco.org/pipermail/teqc/2016/002128.html
week 1907: '+C2', '+L5', "+L6', '+L7', '+L8', and '+all' options - http://postal.unavco.org/pipermail/teqc/2016/002130.html
week 1908: no doppler shortcut; RINEX L2 - http://postal.unavco.org/pipermail/teqc/2016/002131.html
week 1909: using paths w/ file names - http://postal.unavco.org/pipermail/teqc/2016/002132.html
week 1910: the (un)importance of file names - http://postal.unavco.org/pipermail/teqc/2016/002133.html
week 1911: notices, warnings, and errors - http://postal.unavco.org/pipermail/teqc/2016/002134.html
week 1912: the '-max_rx_SVs' option - http://postal.unavco.org/pipermail/teqc/2016/002137.html
week 1913: the end of '++igs' and '+igs' - http://postal.unavco.org/pipermail/teqc/2016/002140.html
week 1914: splicing together RINEX files - http://postal.unavco.org/pipermail/teqc/2016/002144.html
week 1915: using '-O.int' and '-O.dec' - http://postal.unavco.org/pipermail/teqc/2016/002145.html
week 1916: '+doy' option - http://postal.unavco.org/pipermail/teqc/2016/002146.html

More information about the teqc mailing list