RINEX crate
Parser
RINEX files contain a lot of data and this library is capable of parsing most of it.
To fully understand how to operate this lib, refer to the RinexType section you are interested in.
Production (writer)
RINEX file production (writer) is work in progress and will be supported
in next releases
File naming convention
This parser does not care for the RINEX file name, it is possible to parse a file
that does not respect standard naming conventions.
Known weaknesses
- Unusual RINEX files with a unique epoch may not be parsed correctly in some cases
- Only Observation Data V > 2 currently has a format restriction, see dedicated page
Getting started
The Rinex::from_file method parses a local RINEX file:
let rinex = from_file
.unwrap;
The test_resources/ folder contains short but relevant RINEX files,
spanning almost all revisions and supported types, mainly for CI purposes.
For data analysis and manipulation, you must refer to the official RINEX definition
This interactive portal
is also a nice interface to discover RINEX.
Header & general information
The header contains high level information.
println!;
This includes Rinex:
- revision number
- GNSS constellation
- possible file compression infos
- recorder & station infos
- hardware, RF infos
commentsare exposed in a string array, by order of appearance- and much more
println!;
assert_eq!
println!
println!;
println!;
println!;
println!;
println!;
println!;
RINEX record
The Rinex structure comprises the header previously defined,
and the record which contains the data payload.
Most record content are sorted by epochs, but that is RINEX dependent:
refer to the main page for more information. When a record
is indexed by epochs, that means it is sorted by sampling timestamps
and an epoch::Flag validating this epoch.
Note that epochs Flags are only relevant in Observation Data;
it is fixed to "Ok" in other records.
RINEX files usually span 24h at a steady sampling interval.
record is a complex structure, which depends
on the RINEX type. In this paragraph, we expose how to iterate (browse)
every supported record types. Advanced users
must differentiate between Vector inner data and Map (Hash or BTree) inner data.
The only difference is basically how you reference the internal data:
- Vector: by position index (integer)
- Map (hash or btree): by an object. This provides efficient data classification right away.
The difference between a Hash and a BTree map, is that the btreemap is naturally sorted. This is the type we use anytime we need to guarantee classification at all times. For example, in epochs so the record is chronologically sorted.
- Navigation Record browsing
let record = record.as_nav
.unwrap; // user must verify this is feasible
for in record.iter
- Observation Record browsing
let record = record.as_obs
.unwrap; // user must verify this is feasible
for in record.iter
- Meteo Record browsing
let record = record.as_nav
.unwrap; // user must verify this is feasible
for in record.iter
- Antex Record browsing
let record = record.as_antex
.unwrap; // user must verify this is feasible
for in record.iter
Epoch object
epoch is a chrono::NaiveDateTime object validated by an
EpochFlag.
A valid epoch is validated with EpochFlag::Ok, refer to specific API.
To demonstrate how to operate the epoch API, we'll take
a Navigation Rinex file as an example.
First, let's grab the record:
let rinex = from_file
.unwrap;
let record = rinex.record
.as_nav // NAV record unwrapping
.unwrap; // would fail on other RINEX types
epochs serve as keys of the first hashmap.
The keys() iterator is the easiest way to to determine
which epochs were idenfitied.
Here we are only interested in the .date field of an epoch, to determine
the encountered timestamps:
let epochs: = record
.keys // keys interator
.map // building a key.date vector
.collect;
epochs =
unique() to filter epochs makes no sense - and is not available,
because a valid RINEX exposes a unique data set per epoch.
For RINEX files that do not expose an Epoch flag, like Navigation or Meteo data,
we fix it to Ok (valid epoch) by default.
Refer to specific Observation files documentation to see how filtering using epoch flags is powerful and relevant.
Sv object
Sv for Satellite Vehicule, is also
used to sort and idenfity datasets.
For instance, in a NAV file,
we have one set of NAV data per Sv per epoch.
Sv is tied to a rinex::constellation and comprises an 8 bit
identification number.
Useful high level methods
interval: returns the nominal sampling interval - nominal time difference between two successive epochs in thisrecord. See API for more informationsampling_dead_time: returns a list ofepochsfor which time difference between epoch and previous epoch exceeded the nominal sampling interval.
Advanced RINEX file operations
Advanced operations like file Merging will be available in next releases.
Merged RINEX files will be parsed properly: meaning the record is built correctly.
Informations on the merging operation will be exposed either in the .comments structure,
if "standard" comments were provided.
Specific documentation
Documentation and example of use for specific RINEX formats
Work in progress
Topics to be unlocked by next releases
- RINEX file production : provide
to_filemethods to produce supported RINEX formats - RINEX Clock data type
- RINEX special operations like
mergingwhen producing a new file - Merging + compression for OBS data