Audit RTCM 3 Archive Framing Before Drone GNSS Review
Inspect an archived RTCM 3 correction stream with checksum validation, preserve parser failures, and separate valid transport frames from usable survey corrections.

Identify what the archive actually contains
An archived correction file can contain many readable messages and still leave an important survey question unanswered. Before using it in a NiVO GNSS review, establish whether the file is a raw RTCM 3 byte stream, a receiver-specific container, a text export or a network session capture. Those representations need different opening procedures. This tutorial concerns an already identified local RTCM 3 binary archive and an offline parser inspection. It does not connect to a caster, modify a receiver or establish that any particular NiVO configuration records or consumes the demonstrated message types.
Preserve the received bytes and work from a separate copy. Record the original filename, byte count, digest, recording application and capture interval when those facts are available. Keep account credentials and unrelated session material out of a shared technical record. If the recording includes an application header or another documented wrapper, preserve that original and identify how the RTCM content was extracted. Do not delete unrecognized bytes until a parser appears happy. That can conceal a packaging problem and makes a later reviewer unable to distinguish a clean original capture from a repaired derivative.
Understand the transport checks
The RTKLIB implementation shows RTCM 3 synchronization using the D3 preamble, a ten-bit payload-length field and three appended CRC bytes. Its frame generation and input routines calculate CRC-24Q over the header and payload before comparing the received checksum. These are transport-level relationships, not a description of every message payload. A D3 byte on its own is only a possible starting clue. A length-consistent frame with a matching checksum provides stronger evidence about that candidate byte sequence, while interpretation of the message content remains a separate operation for an appropriate decoder.
Avoid estimating message count by counting preamble bytes in a hex display. A byte value can occur within payload data, and arbitrary line breaks in a text viewer do not define binary message boundaries. Use a parser that follows the declared framing and records its validation behavior. Keep the installed parser version and settings with the audit. Message support evolves independently of the file extension, so an unsupported message should be investigated as a compatibility question rather than automatically called a corrupt archive. Likewise, a CRC failure needs its own evidence before anyone attributes it to a radio, network or receiver fault.

Product context only; this photograph does not depict the constructed examples in this article.
Run a deliberate local parser pass
The pyrtcm project documents file-based iteration, checksum validation and a choice between raising, logging or ignoring parsing errors. For an initial inspection, explicitly enable checksum validation and request raised errors so the first reported failure remains visible. In an environment where the package is already installed and its version recorded, save the example as audit_rtcm.py and replace the illustrative input name with the identified working copy. The code prints a message identity and raw frame length for each yielded message, then prints the yielded-message total only if that iteration completes normally.
Capture both normal output and the exception report using the team's usual local terminal procedure. Do not change the validation option to suppress a failure. Read the error category and compare it with the parser documentation before deciding what it means. A payload interpretation error, an unsupported type and a checksum mismatch are different findings. The article code is an inspection starting point, not a full receiver qualification tool. No real correction archive was processed during article preparation, and there is no invented successful message count or claim of compatibility with a particular survey receiver.
from pyrtcm import RTCMReader, ERR_RAISE, VALCKSUM
count = 0
with open("corrections.rtcm3", "rb") as stream:
reader = RTCMReader(
stream,
validate=VALCKSUM,
quitonerror=ERR_RAISE,
)
for raw, message in reader:
count += 1
print(message.identity, len(raw))
print("Yielded messages:", count)Account for bytes the iterator does not certify
Raised parser errors do not mean that every non-message byte will necessarily cause an exception. The current pyrtcm reader implementation searches for a valid-looking header and skips other bytes while synchronizing. Its reading logic also distinguishes end of file from an incomplete read. Consequently, a clean-looking list of yielded messages is not a byte-for-byte completeness certificate for the original recording. This is a reason to examine the implementation and document the audit scope. It is not permission to erase skipped data or declare the whole file valid because some messages were successfully decoded.
If completeness matters, use an additional framing report or a documented tool that accounts for accepted frame ranges, unclassified ranges and any incomplete tail. Compare that accounting with the original file length. Preserve offsets and original bytes around a reported failure so a second reviewer can reproduce the same boundary question. Extract a bounded candidate only into a separately identified derivative. Keep the relationship to the source explicit. A capture ending partway through a message may reflect an interrupted recording, but that interpretation needs supporting recording history rather than being inferred solely from the final few bytes.
Review correction meaning after framing
A CRC checks the relationship between a transmitted frame and its checksum; it does not determine whether the reference station coordinates are appropriate or whether the data arrived when the rover needed them. After transport inspection, review the actual message identities, station information, observation epochs and relevant signal content using the receiver and processing documentation for the intended workflow. Keep reference metadata alongside the archive. If the necessary meaning cannot be established, retain that limitation instead of using a successful decoder run as a substitute for information the file never contained or the audit did not examine.
The archived sequence also does not reconstruct end-to-end latency on its own. File order, message epoch and recording time have different roles. A network interruption report, rover solution history and correction recording may describe different points in the delivery path. Compare them using an explicitly understood time basis before associating a framing problem with a mission interval. A large number of intact frames can coexist with missing required epochs or an unsuitable source. Conversely, a small damaged section does not justify dismissing unrelated evidence without investigating which records and periods were actually affected.
Produce a bounded, repeatable finding
The audit record should distinguish source identity, parser configuration, yielded messages, reported failures and separate byte-accounting results. State where inspection stopped and which content was not interpreted. Include the exact script or tool settings and preserve reports with the working-copy digest. If a corrected extraction or a different decoder is later used, create a new record and explain the difference. This prevents an apparently improved message count from hiding a changed input, disabled checksum checks or a narrower parser filter. Another analyst should be able to repeat the same first pass without relying on the operator's memory.
Close the review by linking each finding to the next appropriate check. A wrapper mismatch calls for a documented extraction; an unsupported message calls for compatible interpretation; a checksum failure calls for investigation of the affected bytes and recording path. Survey acceptance still requires the relevant observations, references, processing and independent quality evidence. In a NiVO mapping workflow, an RTCM archive audit is useful precisely because its conclusion is limited: it clarifies what the stored correction stream can support before anyone turns a file that opens successfully into an unsupported statement about positioning accuracy or mission continuity.



