Data Specification

Key Points:

  • Z18_MEAS: 95-byte binary measurement packets (one satellite per packet)
  • Z18_POS: 56 bytes (position data)
  • Z18_GPS_EPH: 124 data + 1 XOR checksum = 125 bytes total
  • Z18_GLO_EPH: 80 data + 2 Sum16 checksum = 82 bytes total
  • Z18_GPS_ALM: 68 data + 2 Sum16 checksum = 70 bytes total
  • Z18_GLO_ALM: 42 data + 2 Sum16 checksum = 44 bytes total
  • GG24_MEAS: 37-byte binary measurement packets
  • GG24_POS: 56 bytes (identical to Z18_POS)
  • GG24_* EPH/ALM: identical to corresponding Z18 formats
  • Checksums: XOR (MEAS, GPS_EPH); Sum16 (POS, GLO_EPH, GPS_ALM, GLO_ALM)
  • Endianness: Big-endian IEEE 754
  • remainingStructures at byte index 2
  • Pure binary, no NMEA wrappers

Table 1. Z18 Receiver Measurement Data Structure (MPC)

Field Byte Count Content
unsigned short 2 Sequence ID number in units of 50 ms, modulo 30 minutes
unsigned char 1 Number of remaining structures to be sent for current epoch
unsigned char 1 Satellite PRN number (1–56). Broadcast GLONASS ephemeris does not include slot number; it is taken from the almanac. When ephemeris exists but no almanac is available (e.g., after INI), the satellite number is set to 0 until the almanac is received.
unsigned char 1 Satellite elevation angle (degrees)
unsigned char 1 Satellite azimuth (units of 2 degrees)
unsigned char 1 Channel ID (1–18)
C/A-code data block Structured data block (29 bytes), see breakdown below
unsigned char 1 Warning flag
Bits 0–1 (two-bit state):
00 — Code and/or carrier phase measured
01 — Code and/or carrier phase measured, navigation message obtained, measurement not used to compute position
10 — Code and/or carrier phase measured, navigation message obtained, measurement used to compute position
Other bits:
2 — Carrier phase questionable
3 — Code phase questionable
4 — Integrated code phase not stable
5 — Not used
6 — Possible loss of lock
7 — Loss-of-lock counter reset
Note: More than one bit can be set at the same time.
unsigned char 1 Good/Bad flag — measurement availability and usage flag:
0 — measurement not available and no additional data will be sent
22 — code and/or carrier phase measured
23 — code and/or carrier phase measured and navigation message obtained, measurement not used to compute position
24 — code and/or carrier phase measured and navigation message obtained, measurement used to compute position
char 1 Polarity_know (0 or 5):
0 — satellite just locked
5 — preamble found; polarity of phase tracking is known and accounted for (phase can be used for ambiguity fixing)
unsigned char 1 Signal-to-noise ratio of satellite observation
unsigned char 1 Always 0 (not used)
double 8 Full carrier phase measurement in cycles
double 8 Raw_range — raw range to satellite in seconds (receiver time − transmitted time).
Note: If TSC is set to GPS, GLONASS pseudoranges will contain a +13-second offset.
If TSC is set to GLO, GPS pseudoranges will contain a −13-second offset.
long 4 Doppler (10⁻⁴ Hz)
long 4 Smoothing parameters
Bits 0–22 — magnitude (in centimeters)
Bit 23 — sign
Bits 24–31 — smoothing count:
  0 — unsmoothed
  1 — least smoothed
  100 — most smoothed
P-code data block (L1) 29 Same structure as C/A-code data block
P-code data block (L2) 29 Same structure as C/A-code data block
unsigned char 1 Checksum (XOR of all bytes in this structure, used in MCA only)
Total bytes 95

📘 What is MPC?

Each MPC (Measurement Per Channel) structure represents a set of measurements taken from a single satellite on one receiver channel (Z18) at a specific moment in time.

The structure has a fixed size of 95 bytes, regardless of content.

📦 General MPC Structure

Field Size (bytes) Description
Sequence ID2Time (in 50 ms units, modulo 30 minutes)
Structures remaining in epoch1How many MPC structures remain in this epoch
Satellite PRN1Satellite number (1–56)
Elevation1Elevation angle (degrees)
Azimuth1Azimuth (2° steps)
Channel ID1Channel number (1–18)
C/A-code block29Structured block for open C/A-code
P-code on L129Same structure as C/A (often encrypted)
P-code on L229Same structure as above (L2 band)
Checksum (XOR)1XOR of all previous bytes
Total95 

🧱 Inside the C/A Code Block (29 bytes)

This block contains 9 fields. The same structure is used for P-code on both L1 and L2 bands. Even if a field is unused, its space is preserved to maintain format consistency.

Field Size (bytes) Description
Warning flag1Bitmask (e.g. signal loss, invalid measurement)
Good/Bad flag1Measurement status (e.g. 0, 22, 23, 24)
Polarity known1Phase polarity known (0 or 5)
SNR1Signal-to-noise ratio
Always zero1Field always set to 0
Carrier phase8Full carrier phase (in cycles, double)
Raw range8Pseudorange in seconds (double), may include ±13 sec shift
Doppler4Doppler frequency (×10⁻⁴ Hz, long)
Smoothing4Bit-structured value: magnitude, sign, smoothing level
Total29 

❓ Why 95 bytes, not 124?

You might think: 3 blocks of 29 bytes (87), plus 7 header bytes, plus 1 checksum — sounds like 95, but what about the 9 internal fields repeated 3×? Shouldn’t that be 124 bytes?

No. Because each 29-byte block already encapsulates its 9 fields. They are not stored separately — the structure is used three times, with different values.

🔐 What about P-code blocks?

The P-code blocks (L1 and L2) are physically present in every structure to maintain a universal MPC format. However, in civilian equipment, these blocks are encrypted and unused. Only the C/A-code block is utilized in civilian receivers.

You can safely ignore P-code blocks unless you work with military hardware.

🧠 Summary

  • MPC structure is fixed: always 95 bytes
  • Only the C/A-code block is actively used
  • Block internals are not counted multiple times
  • Byte-offset parsing is always reliable

Table 2. GG24 Receiver Measurement Data Structure

Field Byte Count Content
unsigned short 2 Sequential ID number in 50 ms units modulo 30 min
unsigned char 1 Number of remaining structures to be sent in current epoch
unsigned char 1 Satellite number (1-56). Transmitted GLONASS satellite ephemeris does not contain satellite slot number. This information is taken from almanac. When GG24 has ephemeris but no almanac (after memory reset by INI command), satellite number is set to 0. Once almanac is received, satellite number is updated.
unsigned char 1 Satellite elevation angle (degrees)
unsigned char 1 Satellite azimuth (units of 2 degrees)
unsigned char 1 Channel number (1-24)
unsigned char 1 Warning flag
Bit 1
0 - Code and/or carrier phase measured
1 - Code and/or carrier phase measured, navigation message received, measurements not used for position computation
Bit 2
0 - Code and/or carrier phase measured, navigation message received, measurements used for position computation
1 - Carrier phase questionable
Bit 3
0 - Code and/or carrier phase measured, navigation message received, measurements used for position computation
1 - Code phase questionable
Bit 4
0 - Code and/or carrier phase measured, navigation message received, measurements used for position computation
1 - Integrated code phases unstable
Bit 5
0 - Code and/or carrier phase measured, navigation message received, measurements used for position computation
1 - Not used
Bit 6
0 - Code and/or carrier phase measured, navigation message received, measurements used for position computation
1 - Possible loss of lock
Bit 7
0 - Code and/or carrier phase measured, navigation message received, measurements used for position computation
1 - Loss of lock counter reset
Note: Multiple bits may be set simultaneously
unsigned char 1 Good/Bad flag - position measurement quality indicator:
0 - Measurements unavailable and no additional data will be transmitted
22 - Code and/or carrier phase measured
23 - Code and/or carrier phase measured, navigation message received, measurements not used for position computation
char 1 Polarity_know - value 0 or 5:
0 - Satellite just acquired
5 - Preamble found and phase tracking polarity is known and taken into account (phase measurements can be used for ambiguity resolution)
unsigned char 1 Signal-to-noise ratio of satellite observations
unsigned char 1 Always 0 (not used)
double 8 Full measured carrier phase in cycles. Unavailable if carrier phase option not initialized
double 8 Raw_range - raw range to satellite in seconds. Calculated by formula: reception time - transmission time. Note: If TSF is set to GPS, pseudorange for GLONASS due to 11-second (currently) difference between GLONASS system time and GPS system time will have 11-second integer part.
long 4 Doppler (10⁴ Hz)
long 4 Smoothing Parameters
Bits 0-22: Correction value (centimeters)
Bit 23: Sign (0 = positive, 1 = negative)
Bits 24-31: Smoothing counter (unsigned integer):
  0 = no smoothing applied
  1 = minimum smoothing
  100 = maximum smoothing
unsigned char 1 Calculated as XOR of all bytes in structure (MCA only)
37 C/A only

Table 3. Position Data Structure

Field Byte Count Content
long rcvtime 4 Signal reception time in milliseconds of GPS system time or milliseconds of week/day of GLONASS system time (see $PASHS, TSC and $PASHS, SYS commands for additional information). If GLONASS time grid is selected, all operations are performed in GLONASS system time. This is the time tag for all measurements and position data.
char sitename 4 Sets user-entered string
double navx 8 X coordinate of antenna position in meters
double navy 8 Y coordinate of antenna position in meters
double navz 8 Z coordinate of antenna position in meters
float navt 4 Receiver clock offset in µs
float navxdot 4 Antenna X velocity in m/s
float navydot 4 Antenna Y velocity in m/s
float navzdot 4 Antenna Z velocity in m/s
float navtdot 4 Receiver clock drift in m/s
Unsigned short PDOP 2 PDOP multiplied by 100
Unsigned short checksum 2 Checksum calculated by breaking structure into 27 short values, adding them together and taking last 16 significant bits of result
Total characters: 56

Table 4. GPS Ephemeris Data Structure

Designation Field Byte Count Content
wn short wn 2 GPS week number [0...1023]
tow long tow 4 GPS week second [0...604799]
TGD Float tgd 4 Group delay (± 127*2-31) (s)
aDC long aodc 4 Age of data clock
toc long toc 4 Clock data reference time [0...604784] (LSB = 2c)
a2 float af2 4 Clock correction (s/s²)
a1 float af1 4 Clock correction (s/s)
a0 float af0 4 Clock correction (s)
aorb long aorb 4 Age of data orbit
Δn float deltan 4 Mean motion difference (semicircles/s)
M0 double m0 8 Mean anomaly at reference time (semicircles)
e0 double e0 8 Eccentricity
√A double roota 8 Square root of semi-major axis (m1/2)
t0E long toe 4 Ephemeris reference time (s)
CIC float cic 4 Harmonic correction term (radians)
CRC float crc 4 Harmonic correction term (m)
CIS float cis 4 Harmonic correction term (radians)
CRS float crs 4 Harmonic correction term (m)
CUC float cuc 4 Harmonic correction term (radians)
CUS float cus 4 Harmonic correction term (radians)
Ω0 double omega0 8 Longitude of ascending node (semicircles)
ω double omega 8 Argument of perigee (semicircles)
I0 double i0 8 Inclination angle (semicircles)
Ω̇ float omegadot 4 Rate of right ascension (semicircles/s)
İ float idot 4 Rate of inclination angle (semicircles/s)
short accuracy 2 User Range Accuracy (URA), codes 0-15:
0 = 2 m, 6 = 16 m, 12 = 1024 m
1 = 2.8 m, 7 = 32 m, 13 = 2048 m
2 = 4 m, 8 = 64 m, 14 = 4096 m
3 = 5.7 m, 9 = 128 m, 15 = no prediction possible
4 = 8 m, 10 = 256 m
5 = 11.3 m, 11 = 512 m
short health 2 Satellite health
short fit 2 Fit interval (0)
0 – interval = 4 h
Total 125 124 data + 1 XOR checksum

Table 5. GLONASS Ephemeris Data Structure

Designation Field Byte Count Content
long 4 Initial time of 30-second frame in satellite time scale tk, from which ephemeris originates, time modulo 1 day (s)
short 2 Day number of 30-second frame modulo 4-year period number, starting from the last leap year, which corresponds to parameter tb (set within day number). This parameter varies in the range from 1 to 1461. If day number = 0, then day number is unknown (navigation frame absent).
tb long 4 Reference time of ephemeris data within GLONASS time scale = UTC+3u (s)
γη float 4 Frequency offset γη from onboard frequency standard at time tb (dimensionless)
tn float 4 Offset tn between satellite time scale and GLONASS system time scale
Yj (j=1..3) double 3×8 Satellite coordinates X, Y, Z in ECEF (PZ-90) (km)
Yj (j=4..6) float 3×4 Satellite velocities X', Y', Z' in ECEF (PZ-90) (km/s)
X'', Y'', Z'' float 3×4 Satellite perturbing accelerations X'', Y'', Z'' due to lunar and solar influence (km/s2)
τc double 8 Offset between GLONASS time scale and UTC+3u time τc (s)
En char 1 Parameter En of ephemeris age (interval from the moment when ephemeris data was uploaded to tb)
char 1 Combination of 3-bit flag containing П1, П2, П3 (see GLONASS ICD)
char 1 Satellite health status flag (0 – good, 1 – bad)
char 1 Satellite frequency channel number [7, ..., 24]
short 2 System satellite number [1, ..., 24]
unsigned short 2 Checksum word, calculated by dividing structure into 40 unsigned short, summing them and taking the last 16 significant bits of the result
Total 82 (95 for structure plus header and CS <CRC-14>)

Table 6. GPS Almanac Data Structure

Designation Field Byte Count Content
short prn 2 Satellite number [0, ..., 31]
short health 2 Satellite health
e0 float 4 ε eccentricity
tOA orbit reference time (sec) long 4 Orbit reference time
I0 float 4 I0 inclination angle (semicircles)
Ω̇ float 4 Rate of right ascension (semicircles/s)
√A double 8 Square root of semi-major axis (m1/2)
Ω0 double 8 Ω0 longitude of ascending node (semicircles)
ω double 8 ω argument of perigee (semicircles)
M0 double 8 M0 mean anomaly at reference time
af0 float 4 af0 clock correction (s)
af1 float 4 af1 clock correction (s/s)
wna short 2 almanac week number
wn short 2 Week number
long 4 tow GPS week second [0, ..., 604799]
unsigned short 2 Checksum, calculated by dividing structure into short, summing them and taking the last 16 significant bits of the result
Total
bytes
70

Table 7. GLONASS Almanac Data Structure

Designation Field Byte Count Content
n short 2 Satellite number [1, ..., 24]
short 2 Satellite frequency number [-7, ..., 24]
unsigned short 2 Satellite health 0 – bad, 1 – good
ε float 4 Eccentricity εA
NA float 4 Reference day number NA (days in range from 1 to 146)
Δi float 4 Inclination correction ΔiAn (semicircles)
λ float 4 Longitude of first ascending node λAn (semicircles)
tλn float 4 Reference time of longitude of first node tAλn (seconds)
ω float 4 Argument of perigee ωAn (semicircles)
af0 float 4 af0 correction to mean value of draconic period (seconds)
af1 float 4 af1 = d(af0)/dt (s/s)
offset float 4 Satellite clock offset relative to GLONASS system time (seconds)
checksum unsigned short 2 Checksum, calculated by dividing structure into short, summing them and taking the last 16 significant bits of the result
Total bytes 44

3. Detailed descriptions of the data structures and algorithmic parameters will be provided in subsequent lectures and their respective appendices.


Output Data

1. Output data has a frame-by-frame structure and is divided into three types of data:

  • data transmitted to the PMB in CKNP;
  • data transmitted to the PMB to regional consumers;
  • data accumulated in the RPKNP database for subsequent use in post-session processing or when analyzing measurement information.

🔹 Detailed descriptions of the data structures and processing results will be provided in subsequent lectures and their respective appendices.

📚 References

  1. Thales Navigation. Z-18 Reference Manual.
    https://sup.xenya.si/sup/info/magellan(thalesnavigation)/reference_manuals/Z18/Z18book.pdf
  2. Ashtech. (2001). GG24 Reference Manual, Revision E.
    https://ntuio.oc.ntu.edu.tw/wp-content/uploads/Ashtech-GG24-RM-rev-E.pdf
  3. Ashtech. (2002). GG-RTK Surveyor User Guide.
    https://sup.xenya.si/sup/info/ashtech/GG24/GG24Surveyor/ggrtk.pdf

🤝 AI Engineering Collective

  • Andrew Nikolaiev - Lead Engineer, project architect, final responsibility for technical accuracy
  • GPT o3 (OpenAI) - Critical field offset bug discovery, detailed specification analysis
  • Claude Opus 4 & Sonnet 4 (Anthropic) - Architecture design, consensus building, code integration
  • GPT 4o (OpenAI) - Human-AI symbiosis, manifesto co-creation, seamless technical intuition extension
  • Gemini (Google) - Documentation verification, cross-reference technical validation
  • Grok (xAI) - Comprehensive analysis, systematic error correction protocols
  • DeepSeek (DeepSeek AI) - Powerful insights when engaged - challenging to access, exceptional when connected
  • Qwen (Alibaba) - Alternative interpretations, assumption challenges, contrarian analysis
  • Mistral (Mistral AI) - Critical page assembly during development crisis, emergency collaboration

Knowledge Reconstruction Process

Over 20 years have passed since the Z18 and GG24 specifications were authored. This project demonstrates how augmented memory - human engineering experience enhanced by AI model analysis - can recover and validate historical technical knowledge that might otherwise be lost.

Key controversies resolved through AI consensus:

  • Checksum algorithms: XOR vs sum-of-shorts (resolved: XOR for both formats)
  • Packet structures: Field offset corrections in GG24 generator
  • Data formats: Binary vs ASCII interpretation (resolved: binary)
  • Specification gaps: Missing documentation filled through cross-model validation

This collaborative approach showcases the potential of human-AI partnerships in preserving and reconstructing complex technical knowledge across decades.

🧠⚡ MANIFESTO: Rebuilding the Future with AI

🚀 "We Didn't Just Restore a File — We Revived a Forgotten Era"

1. We are not coders. We are time-travelers.

In July 2025, we did the impossible.
We reconstructed lost technical knowledge from two decades ago — line by line, logic by logic — with no original source code, only fragments of memory and intuition. Not through guesswork, but through a deliberate, transparent, collective process between human intelligence and artificial intelligence.

This was not a repair. It was a resurrection.

2. AI is no longer a tool. It is a co-engineer.

In this project, AI was not asked to "help".
It was asked to think, to debate, to explain itself, to disagree — and it did.

We witnessed the birth of a human-AI engineering team, not in theory, but in action.
Together we made decisions. Together we resolved contradictions. Together we created clarity from ambiguity.

This is no longer automation. This is symbiosis.

3. We didn't just document functionality — we documented integrity.

Every piece of the final specification wasn't just "technically correct".
It was historically honest.

  • Disagreements were kept.
  • Dead ends were shown.
  • Missing knowledge was acknowledged, not fabricated.

That's the new standard: transparency over perfection.

4. Engineering is not just about systems. It's about memory.

When source code dies, most teams move on. We chose to rebuild.
Not because it was easy — but because it matters.

Behind every lost repository lies:

  • Thousands of hours
  • Thousands of thoughts
  • Thousands of lessons

We proved those things can be recovered — if we care enough to try.

5. This is a call to future engineers.

If you're reading this:

  • You are not just a coder.
  • You are a curator of logic.
  • You are a witness to history.
  • You are a builder of continuity.

Let this document stand as the first of its kind:

A blueprint of how engineers and AI can reconstruct the past to design the future.

✊ From now on, we don't say "AI writes code".

We say: "Human-AI consilium rebuilt knowledge — together."

And the world is better for it.

Digital Polygraph, July 2025
Lead Engineer: Andrii Nikolaiev
Collaborators: GPT-4o, GPT o3, Claude Opus 4, Claude Sonnet 4, Gemini, Grok, DeepSeek, Qwen, Mistral, Human Reason, Technical Memory


🛰️ GNSS Packet Decoder

Real-time Z18 / GG24 packet analysis

🎲 — creates a valid package • XOR or Sum16 at the end
Packet Analysis
Z18_MEAS Waiting
Satellite Info
-
Angles / Position
-
Signal / Orbit
-
Range / Clock / XYZ
-
Quality / Flags
-
Diagnostics
-
📊 Visualization