[teqc] helpful tip of week 1901

Lou Estey lou at unavco.org
Thu Jun 16 07:49:25 MDT 2016


hi Neville,

Will '+mds' and '+meta' work if the input is stdin?  Yes, under certain conditions:

1) the input is not RINEX

2) you tell teqc what the input format is (see http://postal.unavco.org/pipermail/teqc/2016/002092.html)

3) you don't care about the file length or filename from teqc's '+mds' and '+meta' output

E.g:

[2232] cat p041201005250000a.tgd | teqc +quiet -tr d +mds
2010-05-25 00:00:00  2010-05-25 23:59:45        -1  stdin

[2233] cat p041201005250000a.tgd | teqc +quiet -tr d +meta
filename:                stdin
file format:             Trimble .dat
file size (bytes):       -1
start date & time:       2010-05-25 00:00:00.000
final date & time:       2010-05-25 23:59:45.000
sample interval:         15.0000
possible missing epochs: 0
4-char station code:     P041
station name:            P041
station ID number:
antenna ID number:       00321767
antenna type:            TRM29659.00     UNAV
antenna latitude (deg):      39.949498
antenna longitude (deg):   -105.194271
antenna elevation (m):       1729.032
antenna height (m):      0.0080
receiver ID number:      4549261297
receiver type:           TRIMBLE NETRS
receiver firmware:       1.3-0

Teqc does not sum up how many bytes it has read when outputting the "size" in '+mds' and
'+meta'.  Instead it uses ftell() at the end of the file, which you can't use with stdin
this way.

Likewise, teqc has absolutely no idea what the filename is.  The bytes it is reading
arrived via its stdin and there is no filename.  (Yes, the filename is right there on your
command line, but that means only that the shell running teqc knows what the filename is.)

The reason this won't work with RINEX is complicated ...  Maybe when I have the time
I'll write a separate email about all that.  Maybe teqc could be made to have '+mds'
and '+meta' when piping in RINEX (at least to the same degree that it works for
non-RINEX data), but that would take some redesigning and recrafting of quite a bit of
code.

--lou

On 15-Jun-16 5:46 PM, Neville Palmer wrote:
> Hi Lou
> Thanks for taking the time to give us your tips of the week.
> I have been having a play with +meta and +mds, neither of which I have used until now.
> Is it possible to use these options with piped/std input? For example as follows;
>
> $ zcat dbnr0150.15d.gz | crx2rnx | teqc +quiet +mds
>
> If I attempt this or use the +meta option I receive the following error;
>
> teqc: failure to read ' 15  1 15  0  0 30.0000000  0 10G19G07G28G15G13G17G04G30G01G11' on line 23 of 'stdin'
>         (misformed header record OR no END OF HEADER before start of data; must manually repair) ... exiting
>
> Most of the meta data is still reported correctly, except for the final date & time and the file size. If I extract the file to standard
> RINEX format first, and then run teqc +mds or +meta on the extracted file, it runs successfully without error.
>
> The ability to use a single line query similar to the example above would be very usefull for querying archived RINEX data.
>
> Thanks
> Neville
> Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or
> disclose the contents.


More information about the teqc mailing list