[teqc] teqc RINEX header editing

Lou Estey lou at unavco.org
Thu Sep 2 12:58:53 MDT 2004


Dear Roberto,

 >>> I'm trying to format RINEX header. I generated an header config file
 >>> from a suitable RINEX file using teqc ++ config <rinex file> >
 >>> my_obs_config, I updated the fields in my_obs_config and then I
 >> applied the new header using the command teqc -config my_obs_config
 >>> <rinex file>  > <new rinex file>. The new RINEX file seems to present
 >>> old header fields mixed with new ones. Could you tell me the correct
 >>> procedure for header formatting using teqc?
 >>
 >> Sounds like you are doing everything AOK.  Can you snip out
 >> the "before" and "after" headers and send those along so we
 >> can see what you are seeing?

> Thanks. In the zip: in ROMA2140.04o the RINEX I want to modify within 
> the header, in header.cfg the header I want to use, in temp.04o the 
> result of the process. For instance, old comments are present together 
> with new ones.

For everyone else, the header in ROMA2140.04o is:

      2.10           OBSERVATION DATA    G (GPS)             RINEX VERSION / TYPE
teqc  2002Mar14     Sogei               20040901 08:54:16UTCPGM / RUN BY / DATE
MSWin2000|IAx86-PII|wcl386 11.0|MSWin95/98/NT/2000|486/DX+  COMMENT
teqc  2002Mar14                         20040901 08:53:54UTCCOMMENT
BIT 2 OF LLI FLAGS DATA COLLECTED UNDER A/S CONDITION       COMMENT
ROMA                                                        MARKER NAME
AUTOMATIC           SOGEI                                   OBSERVER / AGENCY
IR1200304018        ASHTECH UZ-12       CN00-1A01           REC # / TYPE / VERS
-Unknown-           ASH701945E_M                            ANT # / TYPE
   4649382.2237  1029611.8141  4229025.6232                  APPROX POSITION XYZ
         0.0000        0.0000        0.0000                  ANTENNA: DELTA H/E/N
      1     1                                                WAVELENGTH FACT L1/2
      5    L1    L2    C1    P1    P2                        # / TYPES OF OBSERV
     30.0000                                                 INTERVAL
Version: Version:                                           COMMENT
Project: A__________________________304018_                 COMMENT
  SNR is mapped to RINEX snr flag value [0-9]                COMMENT
   L1 & L2: >= 48 dBHz = 9; 0 dBHz = 0; else 1 + dBHz/6      COMMENT
Forced Modulo Decimation to 30 seconds                      COMMENT
   2004     8     1     0     0    0.0000000     GPS         TIME OF FIRST OBS
                                                             END OF HEADER

the part of the header.cfg config file has (for RINEX Obs file header editing):

-O.s[ystem] G
-O.r[un_by] "Sogei"
-O.o[perator] "Automatic"
-O.ag[ency] "Sogei"
-O.mo[nument] "ROMA"
-O.mn "12757M001"
-O.rn "04580"
-O.rt "TRIMBLE 4700"
-O.rv "Nav 1.20 Sig 0.00"
-O.an "93244"
-O.at "TRM29659.00     NONE"
-O.px[WGS84xyz,m] 4592513.3138 1089904.9089 4276403.5653
-O.pe[hEN,m] 0.0000 0.0000 0.0000
-O.leap 0
-O.mov[ing] 0
-O.c[omment] "MSWin2000|IAx86-PII|wcl386 11.0|MSWin95/98/NT/2000|486/DX+"
-O.c[omment] "DAT2RIN 2.51 TRS    ASI - Telespazio    01AUG04 23:59:49 GMT"
-O.c[omment] "-----------------------------------------------------------"
-O.c[omment] "Offset from BOTTOM OF ANTENNA to PHASE CENTER is 110.0 mm"
-O.c[omment] "-----------------------------------------------------------"
-O.c[omment] "*** Above antenna height is from mark to BOTTOM OF ANTENNA."
-O.int[erval,sec] 30.000000
-O.st[art] 2004  8  1  0  0  0.000000
-O.e[nd]   2004  8  1 23 59 30.012000
-O.def_wf 1 1
-O.obs[_types] L1+C1+L2+P2+D1

and the header of your temp.04o is (and I'm assuming the command
you were executing was `teqc -config header.cfg ROMA2140.04o > temp.04o`)

      2.10           OBSERVATION DATA    G (GPS)             RINEX VERSION / TYPE
teqc  2002Mar14     Sogei               20040902 16:18:21UTCPGM / RUN BY / DATE
MSWin2000|IAx86-PII|wcl386 11.0|MSWin95/98/NT/2000|486/DX+  COMMENT
teqc  2002Mar14     Sogei               20040901 08:54:16UTCCOMMENT
teqc  2002Mar14                         20040901 08:53:54UTCCOMMENT
BIT 2 OF LLI FLAGS DATA COLLECTED UNDER A/S CONDITION       COMMENT
Version: Version:                                           COMMENT
Project: A__________________________304018_                 COMMENT
  SNR is mapped to RINEX snr flag value [0-9]                COMMENT
   L1 & L2: >= 48 dBHz = 9; 0 dBHz = 0; else 1 + dBHz/6      COMMENT
Forced Modulo Decimation to 30 seconds                      COMMENT
ROMA                                                        MARKER NAME
12757M001                                                   MARKER NUMBER
Automatic           Sogei                                   OBSERVER / AGENCY
04580               TRIMBLE 4700        Nav 1.20 Sig 0.00   REC # / TYPE / VERS
93244               TRM29659.00     NONE                    ANT # / TYPE
   4592513.3138  1089904.9089  4276403.5653                  APPROX POSITION XYZ
         0.0000        0.0000        0.0000                  ANTENNA: DELTA H/E/N
      1     1                                                WAVELENGTH FACT L1/2
      5    L1    C1    L2    P2    D1                        # / TYPES OF OBSERV
     30.0000                                                 INTERVAL
      0                                                      LEAP SECONDS
SIGN OF DOPPLER BEING REVERSED                              COMMENT
teqc windowed: start @ 2004 Aug  1 00:00: 0.000             COMMENT
teqc windowed: delta = 86370.012 sec                        COMMENT
teqc windowed:  end  @ 2004 Aug  1 23:59:30.012             COMMENT
teqc edited: all channels excluded                          COMMENT
   2004     8     1     0     0    0.0000000     GPS         TIME OF FIRST OBS
   2004     8     1    23    59   30.0120000     GPS         TIME OF LAST OBS
                                                             END OF HEADER

There are multiple user errors here:

1) teqc ++config is only meant to give you a template all existing options.
Though you could reuse everything in it, this is generally not recommended.
Strip the config options down to the minimum that you need.  Remember:
less is better.  (E.g. the header.cfg contained the option `-rds` = reverse
doppler sign should not be used unless you are absolutely certain that
the input doppler sign is reversed; the option `-O.leap 0` is setting
the optional (for GPS only files) LEAP SECONDS line to a zero value when
in fact the current value is 13; probably never have to use `-O.def_wf 1 1`
unless you are editing some old RINEX file from the days of L2-squaring;
etc.)

2) When using +config or ++config, _original_ comments are output with
-O.c meaning "this was an original COMMENT field".  When you want to insert
an additional comment, use +O.c which means "append this is a additional
COMMENT field".

3) All original COMMENT fields in the RINEX header are preserved.  There is
no way to remove them with teqc.  (This is a design feature.)  Furthermore,
all the original COMMENT fields get pushed up to the top, by design.  Additional
comments with +O.c occur towards the bottom of the header.

4) Any original PGM / RUN BY / DATE line is converted into a COMMENT in the
new header; there is nothing you can do to suppress this.  (This preserves
a sort of history of the different program runs on the file.)

5) The cryptic COMMENT lines like:
MSWin2000|IAx86-PII|wcl386 11.0|MSWin95/98/NT/2000|486/DX+  COMMENT
are automatically added by teqc on each run.  This way, you know which
build of teqc was used to create the RINEX file.  So please never attempt
to duplicate this sort of comment line using +O.c.

6) I would really recommend not adding a comment that makes it appear
that another translator was involved, i.e. DAT2RIN in this case, by
using `+O.c[omment] "DAT2RIN 2.51 TRS    ASI - Telespazio    01AUG04 23:59:49 GMT"`

7) You can't add a new observable out of thin air.  The original file has:
      5    L1    L2    C1    P1    P2                        # / TYPES OF OBSERV
and you are attempting to get L1 doppler (D1) with `-O.obs[_types] L1+C1+L2+P2+D1`.
(Teqc allows this, but you will just end up with empty D1 values in the
new RINEX file.  Also, I'm not sure why you eliminated P1 -- there were
P1 values in the original file -- though you can certainly do this if you
want.)

Now getting back to your config file, the -O.c comment lines should be
replaced with (noting the `+O.c` now):

+O.c[omment] "-----------------------------------------------------------"
+O.c[omment] "Offset from BOTTOM OF ANTENNA to PHASE CENTER is 110.0 mm"
+O.c[omment] "-----------------------------------------------------------"
+O.c[omment] "*** Above antenna height is from mark to BOTTOM OF ANTENNA."

and then these comments will be included in the new header.

 > On the other hand, if I'd like to genrate from an ashtech
 > u file a Rinex with the same kind of header (using the -ash u option) I
 > obtained an empty rinex file. I attached the u file also within the zip.
 > Of course I can use on line command (-O.c and others), but I would like
 > to parametrise it through a config file.

Did you use a command like:

teqc -ash u UROMAA03.335

Just for the record, the 2002 Mar 14 version of teqc will not read the
"data mode 7" U-file records (BR\00\07) , but your U-file contains the
original U-file data records (BR\00\09) and should work fine with that
version of teqc.

cheers,
--lou




More information about the teqc mailing list