Skip to content

RINEX File Manipulation

The following manipulations are useful mainly to shrink an input file to size and content really needed for the analysis purpose. All these manipulations can be combined with the other described operations.

Data Sampling ( -smp )

Provide the sampling rate [sec] and the optional tolerance range [sec] to link an observation epoch to its nominal epoch via -smp command line parameter. This parameter can be given for any gfzrnx operation.

-smp num[:eps]

For observation data, the default tolerance range (eps) is 0.5 times of the input sampling rate taken from the INTERVAL header element.

In case the INTERVAL header element is not available or not mandatory (e.g. meteorological data) the default tolerance range (eps) is 0.5 times of the via -smp specified sampling rate (num).

gfzrnx -finp pots0070.15o -fout pots0070.15o_rx3_5min -smp 300
gfzrnx -finp pots0070.15o -fout pots0070.15o_rx3_5min -smp 300:0.5

LLI shift

The LLIs (Loss of Lock Indicator) of the unused data epochs between two sample epochs are shifted to the sample epoch if you provide the -smp_lli_shift command line parameter. Otherwise, the LLIs of the sample epoch data are left as they are, and the information is lost. The use of this option slows down the sampling operation.

gfzrnx -finp pots0070.15o -fout pots0070.15o_rx3_5min -smp 300:0.5 -smp_lli_shift

Remark

If more than one observation epoch is found in the tolerance range, only the nearest to the nominal epoch is used. Having several observation epochs within a tolerance range slows down the sampling process, especially for observation files. You can fasten the sampling process providing a reasonable tolerance range (eps) on the command line.

The default tolerance ranges are:

Sampling Rate Default eps
>= 1 s 0.5 s
< 1 s 5 ms

Satellite System Selection ( -satsys )

If you are interested in a subset of satellite systems only, you can use the -satsys command line parameter to provide your desired satellite system. All other satellite systems are omitted in the output file.

-satsys <string>

The satellite systems string (string) consists of Satellite system letters (G-GPS, R-Glonass, E-Galileo, C-Beidou ...).

gfzrnx -finp pots0070.15o -fout pots0070.15o_rx3_GR  -satsys GR
gfzrnx -finp pots0070.15o -fout pots0070.15o_rx3_GRE -satsys GRE
gfzrnx -finp pots0070.15o -fout pots0070.15o_rx2_G   -satsys G   --version_out 2

PRN Selection ( -prn, -no_prn )

For RINEX Observation files one can use a PRN selection/deselection via -prn and -no_prn command line parameters to include/exclude specific PRNs in the RINEX or statistics output. Both parameters can be mixed (-no_prn is prioritized). Simply provide a comma-separated list of PRNs or PRN-ranges.

gfzrnx -finp pots0070.15o -fout pots0070.15o_rx3_small -prn G01,G05-20,R01-24,C05,C06 \
                                                       -no_prn G10,R05-7,R10

Observation Types Selection ( -obs_types )

If you are interested in a subset of observation types only, you can use the -obs_types command line parameter to provide your desired observation types via a comma-separated list of patterns.

The observation types selection works via a pattern matching mode. The pattern matching is done left aligned (e.g. L,L2,L2C or 1,1C).

Here are some examples:

RINEX-2

The input file contains the following observation types.

     8    C1    D1    L1    L2    P2    D2    S2    S1    P1# / TYPES OF OBSERV 

Select code and phase observations only.

gfzrnx -finp pots0070.15o -fout pots0070.15o -obs_types P,C,L

The result will be a file containing the following observation types only.

     5    C1    L1    L2    P1    P2                        # / TYPES OF OBSERV 

The following command line

gfzrnx -finp pots0070.15o -fout pots0070.15o --obs_types P2,C,L

will result in a file containing the following observation types, omitting the P1 observable too.

     4    C1    L1    L2    P2                              # / TYPES OF OBSERV 

RINEX-3\/4

In a simple case, it works the same way as for RINEX-2. For RINEX-3 it is possible to do the selection down to the satellite systems. One has to concatenate the global and the satellite system-dependent definitions via the + character. For satellite system-dependent selections, you have to start with the satellite system character and colon.

list can be: [S:]OT1,OT2,...[+S:OT3,OT4,...][+...]

              S  - satellite system [CEGJRS]
              OT - observation type identifier

A satellite system-dependent record fully replaces a global one.

Here is a global selection overall satellite systems (simple mode) selecting phase and code observations only:

gfzrnx ... -obs_types L1,L2,C1,C2

Here is a selection of frequencies only:

gfzrnx ... -obs_types 1,2

Here is a global selection with special selections for C (Beidou) and G (GPS).

gfzrnx ... -obs_types L1,L2,C1,C2+C:L1,L7,C1,C7+G:L1C,L2W,C1,C2

Remove of Sparse Observation Types ( -remove_sparse_obs_types )

This option works on a satellite system or file level. One can give a limit in % which can be used to eliminate sparse observation types. The basis is the median of the number of observations per single observation type of a satellite system

gfzrnx -finp pots0070.15o -fout pots0070.15o_ok --remove_sparse_obs_types 5
gfzrnx -finp pots0070.15o -fout pots0070.15o_ok -rsot 5

Remove of Sparse Observation Types per PRN ( -rsot_prn )

This option works on the PRN level. One can give a limit in % which can be used to eliminate sparse observation types on the PRN level. The basis is the median of the number of observations per single observation type of a satellite system.

gfzrnx -f -finp SVTL00RUS_R_20240840000_01D_30S_MO.rnx -fout SVTL00RUS_R_20240840000_01D_30S_MO.rnx_filtered -rsot_prn 20

The data statistics show here the sparse obs. types.

   G12   854   854   854   854   837   837   837   837   853PRN / # OF OBS
         853   853   853   837   837   837   837     1     1PRN / # OF OBS
           1     1                                          PRN / # OF OBS
...
   R10   945   945   945   945   945   945   945   945    12PRN / # OF OBS
          27    27    12     0     0     0     0     0     0PRN / # OF OBS
           0     0                                          PRN / # OF OBS
After using the option -rsot_prn sparse data are eliminated and your statistics should look like the following:
   G12   854   854   854   854   837   837   837   837   853PRN / # OF OBS
         853   853   853   837   837   837   837            PRN / # OF OBS
                                                            PRN / # OF OBS
...
   R10   945   945   945   945   945   945   945   945      PRN / # OF OBS
                                                            PRN / # OF OBS
                                                            PRN / # OF OBS

Keep all Observation Types ( -kaot )

For GNSS observation files, complete empty observation types are removed by default. Complete empty PRN data records are removed too. To keep all this data, use the -kaot command line parameter.

Observation Types Sorting ( -ots )

-ots <CPLSD>[:<attribute>]

The default observation types output sorting order is alphanumeric. To control the observation types output order (GNSS observation files only) a string of the first observation types letters should be given. To order by frequency first, the following attributes are possible:

attribute order by
frqasc frequency & observation type (ascending)
frqdsc frequency & observation type (descending)
frq <frq-list> comma-separated list of frequencies given in a certain order
froasc observation type & frequency (ascending)
frodsc observation type & frequency (descending)
fro <frq-list> comma-separated list of frequencies given in a certain order

Some examples:

-ots PCLDS
-ots CL
-ots PCLDS:frqasc
-ots PCLSD:frq1,5,7
-ots PCLDS:frodsc
-ots PCLDS:fro1,5,7

The following obs type order on input:

G   21 C1C L1C D1C S1C L1P D1P L1W D1W S1W D2C S2C C2W L2W  SYS / # / OBS TYPES
       D2W S2W C2X L2X S2X C5X L5X S5X

creates the following output order using different -ots parameters:

-ots CPLDS

G   21 C1C C2W C2X C5X L1C L1P L1W L2W L2X L5X D1C D2C D1P  SYS / # / OBS TYPES 
       D1W D2W S1C S2C S1W S2W S2X S5X                      SYS / # / OBS TYPES

-ots CPLDS:frqasc

G   21 C1C L1C L1P L1W D1C D1P D1W S1C S1W C2W C2X L2W L2X  SYS / # / OBS TYPES 
       D2C D2W S2C S2W S2X C5X L5X S5X                      SYS / # / OBS TYPES

-ots CPLDS:froasc

G   21 C1C C2W C2X C5X L1C L1P L1W L2W L2X L5X D1C D1P D1W  SYS / # / OBS TYPES 
       D2C D2W S1C S1W S2C S2W S2X S5X                      SYS / # / OBS TYPES

The output order of the navigation records can be controlled via -nav_sort or -ns command line parameter. Two options prn, time, prnmtype are possible.

  • In the time mode, the sorting order is by time and prn.

  • In the prn mode, the sorting order is by prn and time.

  • In the prnmtype mode, the sorting order is by prn message_type time.

The standard mode is prn.

gfzrnx -finp pots0070.15n -fout pots0070.15o_srt -ns time

This can be used for any operation on navigation files (check, splice, split, ... ).

gfzrnx -finp ????0070.15n -fout brds0070.15n -ns time
gfzrnx -finp ????0070.15n -fout ::RX3:: -split 3600 --nav_sort time
gfzrnx -finp *.rnx -fout splice.rnx -vo 4 -ns prnmtype

With RINEX version 4 navigation record types (EPH, STO, EOP, ION) have been introduced.

Type Description
EPH Satellite Orbit Ephemmeries
STO System Time Offset
EOP Earth Orientation Parameters
ION Ionospheric Model Parameters

For every navigation record type message types (e.g. CNAV, LNAV, CNV3, ...) have been introduced additionally. If you are interested in a subset of navigation record types and selected message types only, you can use the --nav_types or -nt command line parameter to provide your desired selection.

The selection definition consists of a concatenation via '+' of global or satellite-dependent settings. One complete selection element consists of:

<satellite_system(s)>::<list_of_nav_types>:<list_of_message_types>

It is possible to omit the satellite_system(s) or the list_of_message_types. In this case, all valid supported elements are used. Lists are built via dot. Here are some examples:

--nav_types GC::EPH
--nav_types C::ION.STO
--nav_types C::ION.STO:CNVX
--nav_types EPH+C::ION.STO:CNAV
--nav_types C::ION.STO:CNVX+C::EPH:D1.D2.CNV1+E::EPH:INAV
--nav_types EPH.STO

Countless selection variations are possible to extract needed information only.

gfzrnx -finp *N.rnx -fout BRDC00GFZ_S_20210760000_01D_MN.rnx_EPH_STO -nav_types EPH,STO
gfzrnx -finp *N.rnx -fout BRDC00GFZ_S_20210760000_01D_MN.rnx_ION     -nav_types ION
gfzrnx -finp *N.rnx -fout BRDC00GFZ_S_20210760000_01D_MN.rnx_BDS     -nav_types C::EPH:D1D2+E::EPH:INAV

Remark

Additional command line selection options like -satsys, -prn can be used too.

Supported output versions (-vo) for NAV-files are 2, 3.04, 3.05 and 4.

GPSweek Rollover Correction ( -shift_gpsw )

Due to firmware or Rinex converter problems, we have seen files that show up with data epochs affected by 1024-week rollovers, which leads to data epoch shifts by a multiple of 1024. The week shift to be added must be provided via the -shift_gpsw command line parameter. The file name epoch needs to be corrected first before using the -shift_gpsw command line parameter. gfzrnx checks if the gpsweek difference between the first data epoch and the filename epoch is a multiple of 1024. Only in this case, the epoch shift will be applied.

Here is one example for the file MAR100DEU_R_20190440015_15M_01S_GO.rnx, where the gpsweek for 20190440015 (2019 02 13) is 2040.

     3.03           OBSERVATION DATA    I (IRNSS)           RINEX VERSION / TYPE
Convert 2.4         NovAtel             20190214 093312 UTC PGM / RUN BY / DATE 
MAR100DEU                                                   MARKER NAME         
MAR1                                                        MARKER NUMBER       
gnss@gfz-potsdam.de GFZ                                     OBSERVER / AGENCY   
DCH09470100         NOV OEMV1           3.01-TT             REC # / TYPE / VERS 
DCH09470100         NOVSMART-V1     NONE                    ANT # / TYPE        
G    4 C1C D1C L1C S1C                                      SYS / # / OBS TYPES 
     1.000                                                  INTERVAL            
...
  1999     6    30     0    15    0.0000000     GPS         TIME OF FIRST OBS   
  1999     6    30     0    29   59.0000000     GPS         TIME OF LAST OBS    
                                                            END OF HEADER       
> 1999 06 30 00 15  0.0000000  0 12      -0.000000000000
G01  24177867.102 6      3413.676   127055545.211 6        41.000
G08  20596455.180 8       791.348   108235118.641 8        49.000
...
> 1999 06 30 00 15  1.0000000  0 13      -0.000000000000
G01  24177217.656 7      3412.410   127052132.391 7        42.000
G08  20596304.750 8       789.719   108234328.086 8        49.000
...

The gps-week of 1999 06 30 is 1016 (2040-1016=1024). The shift by 1024 weeks results in the correct data epochs.

gfzrnx -shift_gpsw 1024 -finp MAR100DEU_R_20190440015_15M_01S_GO.rnx -fout MAR100DEU_R_20190440015_15M_01S_GO.rnx_OK
     3.04           OBSERVATION DATA    G                   RINEX VERSION / TYPE
Convert 2.4         GFZ ODC             20190214 093312 UTC PGM / RUN BY / DATE 
gfzrnx-1.12-2370    FILE CONVERSION     20190214 142041 UTC COMMENT             
MAR100DEU                                                   MARKER NAME         
MAR1                                                        MARKER NUMBER       
gnss@gfz-potsdam.de GFZ                                     OBSERVER / AGENCY   
DCH09470100         NOV OEMV1           3.01-TT             REC # / TYPE / VERS 
DCH09470100         NOVSMART-V1     NONE                    ANT # / TYPE        
G    4 C1C D1C L1C S1C                                      SYS / # / OBS TYPES 
     1.000                                                  INTERVAL
...           
  2019     2    13     0    15    0.0000000     GPS         TIME OF FIRST OBS   
  2019     2    13     0    29   59.0000000     GPS         TIME OF LAST OBS    
                                                            END OF HEADER      
> 2019 02 13 00 15 00.0000000  0 12      -0.000000000000
G01  24177867.102 6      3413.676   127055545.211 6        41.000
G08  20596455.180 8       791.348   108235118.641 8        49.000
...
> 2019 02 13 00 15 01.0000000  0 13      -0.000000000000
G01  24177217.656 7      3412.410   127052132.391 7        42.000
G08  20596304.750 8       789.719   108234328.086 8        49.000
...

Antenna Rename ( -ant_rename )

Historical files, especially GPS observation files before the year 2000, use outdated non-IGS-conform antenna names.

With the -ant_rename command line parameter, the antenna names can be updated using the fix implemented table below to have IGS-standard conform antenna names in the header. The renaming is documented in the RINEX header via a COMMENT record which is added.

FROM TO
DORNE MARGOLIN ASH ASH700936A_M
GEODETIC III L1/L2 ASH700718A
GEODETIC L1/L2 L ASH700228A
GEODETIC L1/L2 P ASH700228D
MARINE/RANGE ASHMAR/RANGE
A-C L1 ASHAC_L1
A-C L1/L2 ASHAC_L1/L2
ASH701945.02B ASH701945B_M
ASH701946.012 ASH701946.2
ASH701946.022 ASH701946.2
ASH701975.01Agp ASH701975.01AGP
TR GEOD L1/L2 GP TRM22020.00+GP
TR GEOD L1/L2 W/O GP TRM22020.00-GP
TRM10877.10+RGP TRM12333.00+RGP
JPSMARANT_GGD JNSMARANT_GGD
TRM10877.10+SGP TRM11877.10+SGP
DORNE MARGOLIN LEICA LEIAT504
LEICA AT201 LEIAT201
LEICA AT202 LEIAT202-GP
LEICA AT302 LEIAT302-GP
LEICA AT202 GP LEIAT202+GP
LEICA AT302 GP LEIAT302+GP
LEICA AT303 LEIAT303
LEICA AT501 LEIAT501
LEICA AT502 LEIAT502
LEICA AT503 LEIAT503
MAGELLAN PM-500 MAGPM-500
M-PULSE L1/L2 SURVEY MPLL1/L2_SURV
MACROMETER X-DIPOLE MAC4647942
MINIMAC PATCH MACPATCH
DORNE MARGOLIN B AOAD/M_B
DORNE MARGOLIN R JPLD/M_R
DORNE MARGOLIN T AOAD/M_T
TOPCR3_GGD TPSCR3_GGD
4000SE INTERNAL TRM17200.00
4000SL MICRO TRM12333.00+RGP
4000SLD L1/L2 TRM12562.00+SGP
4000ST INTERNAL TRM4000ST_INT
4000ST KINEMATIC TRM14156.00-GP
4000ST L1 GEODETIC TRM14177.00
4000ST L1/L2 GEOD TRM14532.00
4000SX MICRO TRM11877.10+SGP
DORNE MARGOLIN TRIM TRM29659.00
STXS9+X001A STXS9PX001A

Antenna Rename Table output ( -ant_rename_out )

The table for the antenna renaming can be extended or corrected. Via the command line parameter -ant_rename_out one can get the currently used table for extension or correction. The output file is in json format.

gfzrnx -ant_rename_out
{
    "4000ST L1 GEODETIC"   : "TRM14177.00",
    "MINIMAC PATCH"        : "MACPATCH",
    ....
    "MAGELLAN PM-500"      : "MAGPM-500",
    "TR GEOD L1/L2 W/O GP" : "TRM22020.00-GP"
}

For a direct file output use:

gfzrnx -ant_rename_out -fout ant_rename.json

Antenna Rename Table input ( -ant_rename_inp )

If you want to use an own or extended renaming table, you can provide it via the -ant_rename_inp command line parameter. It overwrites completely the internal table. The input file must be in json format.

gfzrnx -kv -finp pots0030.95o -fout pots0030.95o_new -ant_rename_inp ant_rename.json