#rinex #gps #glonass #galileo #timing

app rinex-cli

Command line tool parse and analyze RINEX data

7 releases (breaking)

0.5.0 Nov 26, 2022
0.4.1 Sep 16, 2022
0.3.0 Jul 27, 2022
0.2.0 Jun 3, 2022
0.0.1 Mar 13, 2022

#78 in Command line utilities

43 downloads per month


15K SLoC


Command line tool to parse, analyze and manage RINEX files.

crates.io License License

The first purpose of this tool is to expose the library in a high level and easy to use fashion.
The application will be able to parse all RINEX formats supported by the library, refer to the front page to understand which RINEX format is currently supported.

Some GNSS data processing algorithms are implemented, like

  • signal recombination
  • signal analysis (DCBs, MP, ...)

Refer to the dedicated page

Some teqc operations are supported, see the following paragraph

RINEX files

Several RINEX files exist. The tool support most RINEX formats, some exotic formats are still under development, refer to the main table

File naming conventions

File names are disregarded by these tools, you can analyze & parse files that do not follow naming conventions.

When producing data, this tool will eventually help the user to generate RINEX that follows naming conventions, but that is currently under development.

Compressed data

CRINEX (V1 and V3) are natively supported.

This tool supports gzip compressed files, as long as their name is terminated by .gz.

Data visualization & analysis

Most data analysis, like DCBs or RINEX record analysis produce plots.
Plots currently come in the form of PNG files.

Efficient plotting is tied to efficient data filtering and resampling, because RINEX files contain a lot of data.

Example of received signal power analysis:

Data is most of the time plotted against time.
Time axis represents UTC epochs, normalized to 1st epoch (starting a "0"), and expressed in seconds.

teqc operations

teqc is a well known application to process RINEX.
Unlike teqc, this application is not capable of processing Binary RINEX ("BINEX") and proprietary formats in general.

Some teqc operations are supported:

  • merge several RINEX together into a single file.
  • split given RINEX into two
  • resampling to reduce data quantity
  • ascii-plot to print a very descriptive tiny plot in the terminal, as contained in reports generated by teqc

Getting started

Install dependencies:

apt-get install libfontconfig1-dev

Always compile Rust code with the --release flag for optimized implementation.
Cf. our benchmark results to see how optimized code compares to non optimized (--debug).

cargo build --release
./target/release/rinex-cli -h

In the following "rinex-cli" means "target/release/rinex-cli" previously compiled.

Arguments order does not matter for the application.

rinex-cli --fp /tmp/amel010.21g

Some arguments support an array of values to be given, in this case, we use a CSV description.

For instance, when retaining specific vehicules:

rinex-cli \
     -f test_resources/OBS/V2/rovn0010.21o \
        --retain-sv G01,G02

Tool philosophy

The tool expects one RINEX file passed with --fp.

Basic RINEX identification is triggered by requesting data enumarations, like encountered Epochs (--epoch) or Sv (--sv). In this mode, only console visualization exists and data is presented in JSON format. Refer to JSON section for more detail.

Basic identifications produce a terminal output (stdout).
Some basic analysis (like epoch or sample rate analysis) produce one plot.

Most RINEX analysis are graphical, that means one or several PNG files are to be generated. Advanced operations (RINEX processing) require a Navigaton Context to be provided (--nav), and such analysis are always graphical.

RINEX record analysis is highly dependent on the type of RINEX that was provided (--fp).

Readable JSON

This tool uses JSON format to expose data by default. This makes it easy to import into other tools, for instance external Python scripts with Eval().

The --pretty argument improves the rendering of JSON data, to make it readable.

rinex-cli --pretty -f /tmp/amel010.21g \
      --epoch --sv-filter R01,G01 

rinex-cli -f /tmp/amel010.21g \
      --decimate-interval 00:05:00 \
            --sv-filter G01 --pretty

RINEX Identification

Basic Identification consists in extracting high level information to understand which data is contained in a given RINEX. Examples of such information would be Epoch enumeration, or Sv enumeration.

For example, identify encountered epochs:

rinex-cli -f test_resources/OBS/V2/KOSG0010.95O --epochs
rinex-cli -f test_resources/OBS/V2/KOSG0010.95O --epochs --pretty

As always, Identification operations can be stacked together, to perform several at once. For example, identify encountered vehicules at the same time:

rinex-cli -f test_resources/OBS/V2/KOSG0010.95O --epochs --sv --pretty

Basic analysis

Several analysis can be performed, like --sv-epoch or sample rate analysis with --epoch-hist. All of them will generate a plot (PNG file). Refer to their dedicated page for more information.

Record analysis

If both RINEX identification and analysis modes were not activated, we will perform Record analysis.

Filtering or Resampling operations can be stacked to Record analysis, to focus on data of interest.

Move to the record analysis page for thorough examples of RINEX record manipulations.

File generation

Like input files, output files do not have to follow RINEX naming conventions.
Eventually, this tool might have a file creation helper, to help the user follow naming conventions, but it is currenly under development.

File generation applies to all the following operations

  • filtering: create a new RINEX from the stripped RINEX content
  • merge: merge two files into a single RINEX
  • split: split a file into two.

For example, let's extract G01 from this file

rinex-cli -f test_resources/CRNX/V3/ESBC00DNK_R_20201770000_01D_30S_MO.crx.gz \
    --retain-sv \
        --output g01.txt

Header section is simply copied and maintained.

File generation and compression

It is possible compress data to .gz directly, if the specified --output is terminated by .gz.

It is also possible to convert Observation Data to CRINEX directly

  • to CRINX1 if the specified --output is terminated by a standard YYd termination
  • to CRINX3 if the specified --output is termined by .crx

In cases where CRINEX conversion is feasible, it is possible to stack the .gz compression on top of it

  • YYd.gz to specify a CRNX1 + gz
  • crx.gz to specify a CRNX3 + gz

Likewise, the mirror operations are feasible:

  • extract .gz compressed data and dump it as readable
  • extract a CRINEX and dump it as a readable RINEX

Header section customization

A header section customization interface is currently under development.
It is possible to pass custom header fields, one per --output flag, to customize such section of the RINEX to be generated.

The custom-header flag accepts either a direct JSON description of the Rinex::Header structure, or a local file containing such a description.

# list encountered "observables"
rinex-cli -f test_resources/OBS/V3/CBW100NLD_R_20210010000_01D_MN.rnx --obs

# extract raw phase data and pseudo range only


~382K SLoC