Hatanaka

crates.io License License crates.io
Rust crates.io

RINEX file compression and decompression tool.
This tool implements the latest RINEX crate which allows powerful interaction with these complex files.

Yuki Hatanaka came up with a simple yet efficient compression algorithm for RINEX Data,
latest revision is CRINEX3 and is specified here.

For more information on the compression core algorithm,
refer to the hatanaka section of the library

Supported revisions

CRINEX2 does not technically exist

Getting started

Decompress a CRINEX file with -d

bash cargo run -- -d --filepath /tmp/data.22d

This produces an "output.rnx" RINEX file.

Use -o to set the output file name:

bash cargo run -- -d --filepath /tmp/data.22d -o /tmp/myfile cargo run -- -d --filepath /tmp/data.22d --output /tmp/custom

Modern Observation Data and --strict flag

CRX2RNX violates RINEX standard when decompressing V > 2 (modern) RINEX Observation data,
because decompressed epochs are not contrainted to 80 characters.

Epoch events

COMMENTS are preserved through compression / decompression, as you would expect.
Just like CRX2RNX, epochs with weird events are left untouched.
Therefore, explanations on these epochs events, usually described in the form of COMMENTS are preserved.

Compression behavior & limitations

This tool uses an M=8 maximal compression order,
which should be fine for all CRINEX ever produced,
considering they were probably produced with CRX2RNX
which hardcodes an M=5 limitation.

Unlike CRX2RNX, this tool is not limited to M,
you can increase the default value if you think "higher" compression will be encountered in a given file: bash cargo run -- -d -m 8 --filepath /tmp/data.22d

Best compression performances seem to be obtained for m=4
which is handled by default.