RINEX
Rust package to parse and analyze Rinex files
Many RINEX file types exist,
the RinexType enum (refer to API)
describes the types of RINEX currently supported:
RinexType::NavigationMessage(NAV) messagesRinexType::ObservationData(OBS) dataRinexType::MeteoData(Meteo) data
RINEX files contain a lot of data and this library is capable of parsing all of it.
To fully understand how to operate this lib, refer to the RinexType section you are interested in.
Link to the official API
Supported RINEX revisions
- 2.00 ⩽ v < 4.0 Tested
- v = 4.0 should work, not garanteed at the moment
Getting started
Use Rinex::from_file to parse a local RINEX file:
let path = from;
let rinex = from_file.unwrap;
The data/ folder contains a bunch of RINEX files, spanning almost all revisions
and all supported file types, mainly
for CI purposes: you can refer to them.
For data analysis and manipulation, you must refer to the official RINEX definition
This interactive portal is also a nice interface to discover or figure things out.
Header & general information
The header contains high level information.
Comments are currently discarded and not exposed by the parser.
println!;
This includes Rinex:
- revision number
- GNSS constellation
- possible file compression infos
- recorder & station infos
- hardware, RF infos
- 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 payload data.
The Record is optionnal at the moment and
set to None in case of CRINEX Observation Data,
as this lib is not able to decompress the file content, therefore
unable to fully parse it. The header is still parsed though.
RINEX records uses hashmap collections (dictionnaries)
to expose the data,
firstly indexed by epoch and secondly indexed by sv (Satellite Vehicule)
in case of NAV and OBS data.
Refer to the Record enum signature in the API, for the type of record you are
interested in.
epoch is simply an alias of the chrono::NaiveDateTime structure,
thefore all of its methods are available.
To grab the rinex record from a parsed file, in the example of a NAV file, one can do:
let rinex = from_file
.unwrap;
let record = rinex.record
.unwrap // option<record>, to still work in CRINEX context
.as_nav // NAV record example
.unwrap; // as_nav() expected to succeed
epochs serve as keys of the first hashmap.
The keys() iterator is then the easiest way to to determine
which epochs were idenfitied:
let epochs: = record
.keys // keys interator
.collect;
according to hashmap documentation: .keys() are exposed randomly/unsorted:
epochs =
You can use itertools to enhance the iterator methods and sort them easily:
use Itertools;
let epochs: = record
.keys
.sort // unlocked
.collect;
epochs =
.unique() filter is not available to hashmap,
due to hashmap.insert() behavior which always overwrites
a previous value for a given key.
It is not needed in our case because:
epochsare unique, we only have one set of data per epochsvis tied to an epoch, therefore a previous set of data for that particular vehicule is stored at another epoch
Data payload
Data payload are described in the specific documentation pages down below,
for each supported RINEX files.
In any case, they are encapsulated in the ComplexEnum enum,
which wraps:
- "f32": unscaled float value
- "f64": unscaled double precision
- "str": raw string value
- "u8": 8 bit value
Refer to the ComplexEnum API and following detailed examples.
Navigation Data
Refer to related API and Navigation Data documentation
Observation Data
Refer to related API and Observation Data documentation
GNSS Time specific operations
wip
Meteo Data
wip
Clocks data
wip