[teqc] helpful tip of week 2031

Lou Estey lou at unavco.org
Wed Dec 12 06:47:40 MST 2018


This week's tip: why zero-length files that are created are left in place

Occasionally I receive an email from a flustered teqc user about teqc creating a
zero-length file -- usually what is expected to be a RINEX file. What's going on
in such a case?

A typical situation is from translation of a raw data format to RINEX, where the
command might be something like:

teqc {various options} +nav t.gps,t.glo,t.sbs,t.gal +met t.met raw_file > t.obs

... and then one or more (or maybe all!) of the t.* files end up being zero-length.
This means that whatever you are requesting for RINEX, given the other options in
the command and the input, simply does not exist as interpreted by teqc or is
simply not in the raw data input file. Possible causes:

- the wrong data format was assumed by teqc; e.g. see tip of week 1898,
https://postal.unavco.org/pipermail/teqc/2016/002092.html,

- the wrong data format flag was used in the command; e.g. see tip of week 1899,
https://postal.unavco.org/pipermail/teqc/2016/002096.html,

- what you are requesting is simply not in the input, e.g. maybe there are no
meteorological data to convert into a RINEX met file resulting in t.met being
zero-length.

If there is nothing to put into such files, why do they end up being created?
Well, if using the '+nav', '+met', and/or '+obs' options (the last one is not used in
the above command) with an actual file name (*), then teqc immediately creates empty
output files (even before starting to read the raw input file) to be populated if/when
appropriate pieces of the input are encountered for those specific output files.
If nothing is found to put into any of one of them, then it ends up being left as
a zero-length file after teqc finishes.

Why doesn't teqc remove any such zero-length files? Well, it could, but I'm going
to offer a couple of reasons as to why doing so would probably be just as confusing
as leaving them as is.

First, in the above command, teqc is _not_ creating the file t.obs. Instead, teqc
is writing all parts of what would be a RINEX obs file to stdout and the shell
(that is executing the teqc command) is redirecting teqc's stdout into a file named
t.obs. So teqc knows absolutely nothing about the existence of a file named t.obs.
So if nothing is output as RINEX obs to stdout by teqc, then the shell redirects
nothing to t.obs and t.obs ends up being empty. In the end, since teqc knows nothing
about the file t.obs created by the shell, it cannot remove a zero-length t.obs.

Thus, leaving all the zero-length files that teqc creates in place leads to
consistent behaviour with any zero-length file that results from teqc writing to
stdout and the shell redirecting any stdout to a file.

Second, for the files that teqc itself creates and is trying to populate, leaving
behind a zero-length file and not removing such a file informs the user that nothing
was found to go into the requested file. For example, in the above command, let's
suppose that t.glo ended up zero-length. In this case, the intent of the user
was to get GLONASS ephemerides into a GLONASS RINEX nav file. By leaving the
zero-length t.glo in place, this informs the user:

a) yes, teqc understood that the user wanted a GLONASS RINEX nav file created,

b) but no, there was nothing appropriate found from the input to put into the
GLONASS RINEX nav file.

You can see that if teqc removed any zero-length t.glo, then you would not know
for sure whether (a) above had occurred or, instead, that you had a syntax error
on the teqc command such that teqc was not properly instructed to create a GLONASS
RINEX nav file.

Both of these reasons are why zero-length files created by teqc are left in place
and not removed.

Happy teqc-ing!

cheers,
--lou

* Of course with '+nav' if '-' is used in place of a filename, this just means to
skip even trying to create that particular one. And if '-tbin' is being used, then
'+' indicates "create a file only if anything to go into a time-binned file is found".

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

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

Past helpful tips:

week 1894: using teqc config files - https://postal.unavco.org/pipermail/teqc/2016/002067.html
week 1895: qc of high-rate data - https://postal.unavco.org/pipermail/teqc/2016/002071.html
week 1896: UNIX/Linux shells for Windows - https://postal.unavco.org/pipermail/teqc/2016/002072.html
week 1897: '-' vs. '+' teqc options - https://postal.unavco.org/pipermail/teqc/2016/002076.html
week 1898: auto-identification of formats - https://postal.unavco.org/pipermail/teqc/2016/002092.html
week 1899: auto-identification vs. format flags - https://postal.unavco.org/pipermail/teqc/2016/002096.html
week 1900: square brackets in options - https://postal.unavco.org/pipermail/teqc/2016/002105.html
week 1901: using option '+mds' - https://postal.unavco.org/pipermail/teqc/2016/002108.html
week 1902: qc results w/ problematic nav messages - https://postal.unavco.org/pipermail/teqc/2016/002113.html
week 1903: '-no_orb[it]' and '-no_pos[ition]' options - https://postal.unavco.org/pipermail/teqc/2016/002115.html
week 1904: '-week' option - https://postal.unavco.org/pipermail/teqc/2016/002117.html
week 1905: using '+bcf' for XYZ/geodetic conversion - https://postal.unavco.org/pipermail/teqc/2016/002126.html
week 1906: the '+v[erify]' option - https://postal.unavco.org/pipermail/teqc/2016/002128.html
week 1907: '+C2', '+L5', "+L6', '+L7', '+L8', '+all' options - https://postal.unavco.org/pipermail/teqc/2016/002130.html
week 1908: getting RINEX doppler and L2 - https://postal.unavco.org/pipermail/teqc/2016/002131.html
week 1909: using paths w/ file names - https://postal.unavco.org/pipermail/teqc/2016/002132.html
week 1910: the (un)importance of file names - https://postal.unavco.org/pipermail/teqc/2016/002133.html
week 1911: notices, warnings, and errors - https://postal.unavco.org/pipermail/teqc/2016/002134.html
week 1912: the '-max_rx_SVs' option - https://postal.unavco.org/pipermail/teqc/2016/002137.html
week 1913: the end of '++igs' and '+igs' - https://postal.unavco.org/pipermail/teqc/2016/002140.html
week 1914: splicing together RINEX files - https://postal.unavco.org/pipermail/teqc/2016/002144.html
week 1915: using '-O.int' and '-O.dec' - https://postal.unavco.org/pipermail/teqc/2016/002145.html
week 1916: '+doy' option - https://postal.unavco.org/pipermail/teqc/2016/002146.html
week 1917: '-tbin' and '-ast' options - https://postal.unavco.org/pipermail/teqc/2016/002152.html
week 1918: mp12 RMS before/after Oct 2013 - https://postal.unavco.org/pipermail/teqc/2016/002158.html
week 1919: the global windowing options - https://postal.unavco.org/pipermail/teqc/2016/002159.html
week 1920: '-M.dec' and '-N.dec' options - https://postal.unavco.org/pipermail/teqc/2016/002163.html
week 1921: combining time filtering options - https://postal.unavco.org/pipermail/teqc/2016/002176.html
week 1922: helping me (or someone else on the list) help you - https://postal.unavco.org/pipermail/teqc/2016/002187.html
week 1923: the "build" line - https://postal.unavco.org/pipermail/teqc/2016/002190.html
week 1924: the qc '-w[idth]' option - https://postal.unavco.org/pipermail/teqc/2016/002193.html
week 1925: qc with explicit time windowing - https://postal.unavco.org/pipermail/teqc/2016/002194.html
week 1926: the '+rx_state' option - https://postal.unavco.org/pipermail/teqc/2016/002200.html
week 1927: the '-O.sum' option - https://postal.unavco.org/pipermail/teqc/2016/002204.html
week 1928: the '+meta' and '+mds' options - https://postal.unavco.org/pipermail/teqc/2016/002206.html
week 1930: more on '-O.sum' - https://postal.unavco.org/pipermail/teqc/2017/002207.html
week 1931: the '-O.s[ystem]' option - https://postal.unavco.org/pipermail/teqc/2017/002208.html
week 1932: leap seconds - https://postal.unavco.org/pipermail/teqc/2017/002215.html
week 1936: what you can (and shouldn't) do in a RINEX obs file - https://postal.unavco.org/pipermail/teqc/2017/002229.html
week 1938: the '+psp' option - https://postal.unavco.org/pipermail/teqc/2017/002231.html
week 1939: the '+diag' option - https://postal.unavco.org/pipermail/teqc/2017/002235.html
week 1951: '-n_<system>' and SV filtering options - https://postal.unavco.org/pipermail/teqc/2017/002277.html
week 1953: more with '+diag' option - https://postal.unavco.org/pipermail/teqc/2017/002287.html
week 1954: using '+diag' output to split raw files - https://postal.unavco.org/pipermail/teqc/2017/002290.html
week 1955: current qc notation - https://postal.unavco.org/pipermail/teqc/2017/002302.html
week 1956: the '+qcq' option - https://postal.unavco.org/pipermail/teqc/2017/002304.html
week 1957: using Trimble formats - https://postal.unavco.org/pipermail/teqc/2017/002305.html
week 1958: ToC != ToE messages - https://postal.unavco.org/pipermail/teqc/2017/002310.html
week 1959: receivers vs. formats - https://postal.unavco.org/pipermail/teqc/2017/002311.html
week 1960: when the '-week' option is very wrong to use - https://postal.unavco.org/pipermail/teqc/2017/002314.html
week 1961: "less" is usually best - https://postal.unavco.org/pipermail/teqc/2017/002315.html
week 1962: using GPS L2C with teqc - https://postal.unavco.org/pipermail/teqc/2017/002316.html
week 1964: the '+eds' options - https://postal.unavco.org/pipermail/teqc/2017/002317.html
week 1965: handling RINEX comment lines - https://postal.unavco.org/pipermail/teqc/2017/002324.html
week 1966: the '+dUTC_p' options - https://postal.unavco.org/pipermail/teqc/2017/002331.html
week 1967: the strange position from '+meta' - https://postal.unavco.org/pipermail/teqc/2017/002355.html
week 1972: what shows up as metadata in RINEX headers - https://postal.unavco.org/pipermail/teqc/2017/002362.html
week 1973: GPS L2C navigation messages - https://postal.unavco.org/pipermail/teqc/2017/002363.html
week 1974: the '+ion_p' options - https://postal.unavco.org/pipermail/teqc/2017/002370.html
week 1975: the '+event' options - https://postal.unavco.org/pipermail/teqc/2017/002372.html
week 1976: options '+smtt' (default) vs. '-smtt' - https://postal.unavco.org/pipermail/teqc/2017/002374.html
week 1977: the reported interval with '+meta' for a RINEX obs file - https://postal.unavco.org/pipermail/teqc/2017/002377.html
week 1978: the '-N.dUTC' options - https://postal.unavco.org/pipermail/teqc/2017/002378.html
week 1979: the various qc elevation angles - https://postal.unavco.org/pipermail/teqc/2017/002383.html
week 1980: avoid in RINEX: Transit data - https://postal.unavco.org/pipermail/teqc/2017/002385.html
week 1981: avoid in RINEX: epoch flag = 6 - https://postal.unavco.org/pipermail/teqc/2017/002389.html
week 1982: avoid in RINEX: RCV CLOCK OFFS APPL = 1 - https://postal.unavco.org/pipermail/teqc/2018/002392.html
week 1983: don't count on in RINEX: receiver clock offset per epoch - https://postal.unavco.org/pipermail/teqc/2018/002393.html
week 1984: requirements for multiple target files/stdin - https://postal.unavco.org/pipermail/teqc/2018/002410.html
week 1985: default output for various input - https://postal.unavco.org/pipermail/teqc/2018/002412.html
week 1986: the '+latency' options - https://postal.unavco.org/pipermail/teqc/2018/002419.html
week 1987: the 'O.px and 'O.pg' options - https://postal.unavco.org/pipermail/teqc/2018/002422.html
week 1988: the '+relax' option - https://postal.unavco.org/pipermail/teqc/2018/002423.html
week 1992: the '+x_tilt' options - https://postal.unavco.org/pipermail/teqc/2018/002452.html
week 1993: GLONASS: slot and freq. chnl. numbers - https://postal.unavco.org/pipermail/teqc/2018/002453.html
week 1994: GLONASS: slot numbers > 24 - https://postal.unavco.org/pipermail/teqc/2018/002454.html
week 1995: GLONASS: signals - https://postal.unavco.org/pipermail/teqc/2018/002456.html
week 1996: GLONASS: broadcast ephemeris - https://postal.unavco.org/pipermail/teqc/2018/002457.html
week 1997: GLONASS: system time and broadcast time parameters - https://postal.unavco.org/pipermail/teqc/2018/002458.html
week 1998: qc: 'lite' vs. 'full' - https://postal.unavco.org/pipermail/teqc/2018/002470.html
week 1999: qc: the 'full' point-position and the antenna 'height' - https://postal.unavco.org/pipermail/teqc/2018/002474.html
week 2000: qc: what's a "complete observation"? - https://postal.unavco.org/pipermail/teqc/2018/002475.html
week 2001: qc: percentage of actual to expected complete observations - https://postal.unavco.org/pipermail/teqc/2018/002483.html
week 2014: qc: interpreting slips - https://postal.unavco.org/pipermail/teqc/2018/002521.html
week 2015: qc: loss-of-lock - https://postal.unavco.org/pipermail/teqc/2018/002524.html
week 2016: qc: observations per slip - https://postal.unavco.org/pipermail/teqc/2018/002526.html
week 2017: qc: multipath rms - https://postal.unavco.org/pipermail/teqc/2018/002527.html
week 2018: qc: signal-to-noise - https://postal.unavco.org/pipermail/teqc/2018/002532.html
week 2019: qc: the ASCII time plot - https://postal.unavco.org/pipermail/teqc/2018/002534.html
week 2020: qc: little known (but sometimes useful) options - https://postal.unavco.org/pipermail/teqc/2018/002535.html
week 2021: qc: qc full: the '-dn' and '+dn' ASCII time plot lines, part I - https://postal.unavco.org/pipermail/teqc/2018/002544.html
week 2022: qc: qc full: the '-dn' and '+dn' ASCII time plot lines, part II - https://postal.unavco.org/pipermail/teqc/2018/002554.html
week 2023: qc: point-position elevation restrictions - https://postal.unavco.org/pipermail/teqc/2018/002556.html
week 2024: qc: main "filtering" possibilities - https://postal.unavco.org/pipermail/teqc/2018/002557.html
week 2025: qc: expectations for teqc's PP in Solar Cycle 25 - https://postal.unavco.org/pipermail/teqc/2018/002558.html
week 2026: qc: when the antenna is moving (a lot) - https://postal.unavco.org/pipermail/teqc/2018/002564.html
week 2027: qc: direct quality check of raw data - https://postal.unavco.org/pipermail/teqc/2018/002569.html
week 2028: navigation message intervals and using '-tbin' - https://ls.unavco.org/pipermail/teqc/2018/002578.html
week 2029: the '-ns' and '-ne' time windowing options - https://ls.unavco.org/pipermail/teqc/2018/002579.html
week 2030: "no routine" messages in stderr - https://ls.unavco.org/pipermail/teqc/2018/002580.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://postal.unavco.org/pipermail/teqc/attachments/20181212/70b3f453/attachment-0001.html>


More information about the teqc mailing list