Hatanaka CRX to RINEX: Compact Format Guide
Hatanaka compression (Compact RINEX, or CRINEX) is a lossless ASCII encoding developed at GSI Japan that replaces full GNSS observation values at each epoch with higher-order numerical differences between consecutive epochs. Public archives such as IGS and national CORS repositories distribute observation files as .crx.gz or .YYd.Z to cut transfer size, while downstream processing tools that require plain RINEX need crx2rnx decompression back to .rnx or .YYo without altering the underlying RINEX version.
How Hatanaka epoch differencing works
In a plain RINEX observation file, each satellite entry repeats full 14-character floating-point pseudoranges and carrier-phase counts every epoch. Because satellite range changes smoothly over 1-second or 30-second sampling intervals, Yuki Hatanaka (GSI Japan) designed Compact RINEX (CRINEX) to store only higher-order numerical differences between consecutive epochs, resetting the difference state whenever a satellite appears or experiences a cycle discontinuity.
- Two-stage archive compression: epoch differencing removes smooth numeric redundancy first, then standard gzip (.gz) or Unix compress (.Z) shrinks the remaining ASCII stream.
- Header marker: every Compact RINEX file starts with CRINEX VERS / TYPE (CRINEX 1.0 for RINEX 2 .YYd files; CRINEX 3.0 for RINEX 3 and 4 .crx files) followed by the original RINEX header.
- Version preservation: decompressing a .crx or .YYd file restores the exact recorded RINEX version (2.11, 3.04, or 4.01) without upgrading or downgrading observation codes.
Sources: GSI Japan: RNXCMP / Compact RINEX (CRX) format and crx2rnx · IGS: formats and standards
Compact RINEX extensions and archive wrappers
Archive naming conventions distinguish RINEX 2 short names from RINEX 3/4 long names and separate observation files from broadcast navigation files:
| Extension / Wrapper | Format Generation | Data Type | Typical Archive Usage |
|---|---|---|---|
| .YYd / .YYd.Z / .YYd.gz | RINEX 2 (CRINEX 1) | Observation only | Legacy 8.3 short-name archives (e.g., algo0010.24d.Z) |
| .crx / .crx.gz | RINEX 3 & 4 (CRINEX 3) | Observation only | IGS long-name archives (XXXX00CCC_R_..._MO.crx.gz) |
| .YYo / .rnx | Plain RINEX 2 / 3 / 4 | Observation | Uncompressed observation files ready for QC and positioning |
| .YYn / .rnx (MN) | Plain RINEX navigation | Broadcast ephemeris | Never Hatanaka-compressed; distributed plain or gzipped |
Sources: IGS: RINEX 2.11 format · IGS/RTCM RINEX Working Group: RINEX 3.05 specification
Common decompression pitfalls to avoid
Most Hatanaka decoding errors come from handling the file as editable text before running crx2rnx:
- Never edit CRX files in a text editor before decompressing: changing line endings, stripping trailing spaces, or trimming header lines breaks sequential epoch replay mid-file.
- Unpack outer wrappers once: a .crx.gz or .YYd.Z file has two layers (general compression outside, Hatanaka inside); decompressing only .gz still leaves a .crx file that plain-RINEX tools reject.
- Separate version conversion from decompression: if your processor needs RINEX 2.11 from a RINEX 3 .crx archive, decompress to plain RINEX 3 first (or run version conversion explicitly) and inspect SYS / # / OBS TYPES afterward.
- Audit station metadata after decoding: verify MARKER NAME, ANT # / TYPE, and ANTENNA: DELTA H/E/N before feeding the decompressed file into PPP, PPK, or network adjustment.
Sources: GSI Japan: RNXCMP / Compact RINEX (CRX) format and crx2rnx · IGS: formats and standards
Decompressing and compressing CRX files in PosFlow
The public panel at /crx-to-rinex-converter starts on Hatanaka decompress (and also lets you switch to Hatanaka compress or RINEX version conversion) without creating an account. It accepts .crx, .YYd, .rnx, .obs, and .YYo files—including .gz and .Z wrappers—and processes them on PosFlow cloud servers up to 20 MB per file (2 runs per day, with download links available for 60 minutes) while keeping the original RINEX version unchanged. For larger files (up to 100 MB per file on the Free plan) or multi-file batch archives, use the signed-in workspace at https://posflow.ai/flux, then audit the decompressed observations in /rinex-quality-checker.
Common questions
Is Hatanaka CRX compression completely lossless?
Yes. Hatanaka encoding stores exact integer differences between consecutive observation epochs rather than discarding precision. Running crx2rnx on an intact .crx or .YYd file restores every pseudorange, carrier-phase, Doppler, and signal-strength entry verbatim, and re-compressing the result round-trips identically.
Why does GNSS software fail to open a .crx or .YYd file directly?
A Hatanaka-compressed observation file begins with a CRINEX VERS / TYPE header line instead of a standard RINEX VERSION / TYPE header, followed by difference-encoded epoch blocks. Software that only parses plain RINEX stops at the header until you decompress the file to .rnx or .YYo.
Are RINEX navigation or meteorological files ever Hatanaka-compressed?
No. Hatanaka compression applies strictly to RINEX observation files because their high-rate epoch series carry strong numeric correlation. Broadcast navigation (ephemeris) and meteorological files are already small ASCII tables and are distributed directly as plain text or wrapped with gzip (.gz) or Unix compress (.Z).
References and methodology
Technical definitions follow the sources below. Worked examples are illustrative; product-specific thresholds are identified as PosFlow settings. Send a correction with the article URL and the relevant specification.