# OIP-0033: GNSS time and location evidence: NTRIP/RTCM and RINEX inputs, Galileo OSNMA status, NTS and Roughtime, jamming and spoofing indicators

| Field | Value |
|---|---|
| Status | DRAFT |
| Function | `time` (§5.4) and `qualify` (§5.6); no new function (the register keeps exactly twelve) |
| Uses | the live `time-quality` and `observation-record` objects and their `evidenceRefs`; no change to either schema |
| Affects | §5.4 (three bullets, REQ-5.4-5 to REQ-5.4-9); new schema `gnss-evidence` with five positive and sixteen negative fixtures, and one new positive `time-quality` fixture; `registers/functions.yaml` (`gnss-evidence` joins the objects of `time`); `registers/relations.yaml` (new rows `EXT-NTS`, `EXT-RTCM3`, `EXT-RINEX`, `EXT-OSNMA`); `registers/implements-edges.json` and `registers/requirements.yaml` regenerated; cases CT-NODE-330 to CT-NODE-332 (automated, kind `invariant`) with the invariant module `sdk/python/src/obsp/inv_oip0033.py` and its tests; example evidence in the OBSP-NODE and OBSP-SITE sets; one expected-failure set of `sdk/python/tests/test_obsp.py` |
| Reference | `reference/rust/obsp-gnss-evidence` (the evaluator and its constructed vectors; already in the tree, not part of the patches) |
| Protocol version | obsp/0.1 |
| Last call | 30 days (new optional evidence object for an existing function) unless the editors rule otherwise |

## Problem

§5.4 requires a TimeQuality with a source class, an offset bound, a holdover state and integrity flags, says network
time MUST be authenticated (NTS) or come from a site grandmaster, says GNSS alone MUST NOT be trusted, and says spoofing
and jamming indicators MUST lower the quality. It says nothing about the evidence behind those members. A node can
report `AUTHENTICATED_PNT` with no statement of what authenticated it, `NTS` with no record of the key establishment,
and `spoofingSuspected: false` with no statement of which indicators were watched. Galileo now broadcasts navigation
message authentication (OSNMA); receivers report its state, but nothing says whether that state is something the
protocol checked or something a receiver claimed, or whether it is enough to trust GNSS time (it is not: OSNMA
authenticates the navigation data, not the signal's arrival time, so a replayed or delayed signal can still carry
authentic data). Roughtime offers signed time from several servers; nothing says whether it may be a source class.
Reference stations stream their antenna position over NTRIP in RTCM messages and publish it in RINEX headers; nothing
lets an observation's position be compared with them. Two implementations can therefore report the same TimeQuality
from very different evidence, and a consumer cannot tell.

## Change

### Specification (§5.4, three bullets)

- Evidence from GNSS, NTS and Roughtime inputs MAY be attached to a TimeQuality, and evidence of a GNSS position to an
  observation, as a GnssEvidence referenced from `evidenceRefs` with kind `gnss-evidence`. A TimeQuality that references
  one MUST NOT claim a better source class, a smaller offset bound or a trust that the evidence does not support, and
  MUST carry every integrity flag the evidence raises.
- A navigation-message authentication state reported by a receiver (Galileo OSNMA) MUST be recorded as reported by the
  receiver and MUST NOT by itself make GNSS time trusted. GNSS time MAY be classed `AUTHENTICATED_PNT` only when an
  independent authenticated time source (NTS, or a valid Roughtime response) agrees with it within that source's bound.
- A Roughtime response MUST be checked under the validity rules of its specification before use and serves as a bound
  on other sources, never as the source class.

The TimeQuality schema does not change: no new source class, no new member. The evidence lives in its own document,
referenced like any other evidence, so a node that uses no GNSS is unaffected.

### The `gnss-evidence` object

`GnssEvidence` (`urn:obsp:schema:v3.1:gnssevidence`, `apiVersion` `obsp/gnss-evidence/v3.1`) holds:

- `inputs`: every input kind looked for (`RTCM3`, `NTRIP`, `RINEX`, `OSNMA_STATUS`, `RECEIVER_INDICATORS`, `NTS`,
  `ROUGHTIME`), each with its `result` (`VALID`, `INVALID`, `REPORTED`, `ABSENT`) and its `basis`: `CHECKED` (the
  evaluator checked the bytes it was given, whose digest it carries), `RECEIVER_REPORTED` or `CLIENT_REPORTED` (a value
  the receiver or the NTS client stated). A reported input is `REPORTED`, never `VALID`; an absent input carries no
  digest; a checked input that was present always does.
- `osnma`: the OSNMA state as the receiver reported it (`AUTHENTICATED`, `NOT_AUTHENTICATED`, `FAILED`,
  `NOT_AVAILABLE`), `basis` fixed to `RECEIVER_REPORTED`, and whether the receiver reports its time synchronisation
  requirement met.
- `indicatorReasons`: the indicators that crossed their policy threshold (`AGC_DROP`, `CN0_DROP`, `CN0_UNIFORM`,
  `POSITION_JUMP`, `CLOCK_JUMP`, `CONSTELLATION_DISAGREEMENT`, `OSNMA_FAILED`) and the failed cross-checks
  (`GNSS_DISAGREES_WITH_NTS`, `GNSS_DISAGREES_WITH_ROUGHTIME`), with `policy` recording the thresholds used.
- `time`: what the evidence supports for a TimeQuality, member for member (`sourceClass`, `offsetBound`, `holdover`,
  `integrity`, `trusted`), with the same constraints as TimeQuality, plus `crossChecks` (source, difference, bound,
  agreement).
- `location`: `CORROBORATED`, `UNCORROBORATED`, `CONTRADICTED` or `NOT_ASSESSED`, the position sources compared
  (receiver fix, RTCM 1005/1006 antenna reference point, RINEX approximate position) and the largest disagreement.
- `notAssessed`: what could not be assessed for lack of input. Nothing absent is filled in.

### Rules (GNSS-01 to GNSS-12)

| Id | Rule | Where it is checked |
|---|---|---|
| GNSS-01 | Every input is listed with its result and basis; checked inputs carry the digest of the bytes checked; reported inputs are never `VALID` | schema (`$defs.Input`) |
| GNSS-02 | RTCM 3 frames are used only when every frame passes its CRC-24Q; RINEX only at version 3 or 4 | reference evaluator |
| GNSS-03 | The OSNMA state is carried as reported; `FAILED` raises `authenticationFailed` | schema (`basis` const, top-level `allOf`) |
| GNSS-04 | An indicator over its policy threshold raises its integrity flag | invariant `gnss-evidence-rules` |
| GNSS-05 | Any integrity flag makes `trusted` false | schema (`$defs.Time`) |
| GNSS-06 | NTS counts only with an NTS-KE response that passes RFC 8915 section 4 and a client report that the NTP exchange authenticated; its bound is half the reported round-trip delay plus the reported dispersion | reference evaluator; invariant (`NTS` class needs a `VALID` NTS input) |
| GNSS-07 | Roughtime counts only when valid under section 5.4 of its draft, and is never the source class | reference evaluator; schema (no such class) |
| GNSS-08 | `AUTHENTICATED_PNT` needs OSNMA `AUTHENTICATED` as reported, the time synchronisation requirement reported met, no integrity flag, and an agreeing independent source; its bound is that source's bound plus the observed difference | schema (OSNMA state, an agreeing cross-check); invariant (bound, agreement against the numbers) |
| GNSS-09 | With no usable source, `UNKNOWN` with an `UNKNOWN` bound carrying no number | schema |
| GNSS-10 | `trusted` only for `AUTHENTICATED_PNT` or `NTS`, `BOUNDED`, `LOCKED` or `HOLDOVER`, no flag | schema |
| GNSS-11 | Location qualification from at least two independent positions against the policy distance | schema (shape); invariant (distance against policy, no `CORROBORATED` with a flag) |
| GNSS-12 | Nothing absent is filled in | schema (`notAssessed`, absent inputs carry no digest); reference evaluator |

Linking rules (REQ-5.4-6): a TimeQuality that references a GnssEvidence finds it in the evidence set by digest, has its
source class or a lower one (`GNSS_ONLY`, `SYSTEM_CLOCK`, `UNKNOWN`), is trusted only if the evidence is, carries every
flag the evidence raises and claims no smaller bound (invariant `gnss-time-quality-agrees`). An observation that
references a GnssEvidence whose location is `CONTRADICTED` carries a `SUSPECT` or `BAD` quality flag (invariant
`gnss-observation-evidence-linked`).

### Policy values

The indicator thresholds are not taken from any standard. The reference evaluator's defaults are: AGC 6 dB below
baseline, C/N0 drop 10 dB, C/N0 spread across satellites under 1 dB-Hz (a uniform spoofer), position jump 50 m, clock
jump 1000 ns, constellation disagreement 30 m, location disagreement 10 m. They have no measured basis (open question
2); a deployment sets its own and the document records them.

### Inputs and the standards behind them

| Input | Standard | What is used | Checked |
|---|---|---|---|
| NTS | RFC 8915 (September 2020), section 4, 4.1.1 to 4.1.8 | NTS-KE record format and the response rules (End of Message, Next Protocol, Error, Warning, AEAD, New Cookie, Server and Port Negotiation) | `checked: opened` 2026-11-21 |
| Roughtime | draft-ietf-ntp-roughtime-19 (Internet-Draft, expires September 2026), sections 4, 5.1 to 5.4 | message and packet format, response tags, Merkle path, validity of a response; version number 0x8000000c while a draft | `checked: opened` 2026-11-21; tracked, not targeted: no relations row until an RFC is published |
| RTCM 3 over NTRIP | RTCM 10403.x (differential GNSS services, version 3) and RTCM 10410.1 (NTRIP version 2) | frame layer and CRC-24Q, message numbers of the multiple signal messages, messages 1005 and 1006 | `checked: not checked` (sold standards; the field layouts follow public descriptions) |
| RINEX | RINEX 3.05 and 4.01 (IGS and RTCM-SC104) | header line layout, RINEX VERSION / TYPE, MARKER NAME, APPROX POSITION XYZ, END OF HEADER | `checked: not checked` |
| Galileo OSNMA | Galileo OSNMA Signal-in-Space ICD and the OSNMA receiver guidelines (European GNSS programme) | the receiver states the evaluator records; the time synchronisation requirement as a receiver-reported yes or no | `checked: not checked` (issue numbers not confirmed) |

No statement here says that a receiver, a caster, a server or an implementation meets any of these standards.

### Reference evaluator

`reference/rust/obsp-gnss-evidence` reads an input document and writes a GnssEvidence. It checks RTCM frames and their
CRC-24Q, reads the 1005/1006 reference point, reads RINEX 3 and 4 headers, checks an NTS-KE response under RFC 8915
section 4 and a Roughtime exchange under section 5.4 of the draft (both signatures, the delegation window, the Merkle
path), and records the OSNMA state, the indicators and the NTP measurement as reported. Its seventeen vectors are
constructed by the crate (frames built from the field layouts, NTS-KE records encoded per the RFC, Roughtime responses
signed with keys derived from public labels, written receiver reports); `tests/vectors/README.md` lists the
real-signal vectors still needed. `sdk/python/tests/test_inv_oip0033.py` validates every expected output of the
evaluator against the schema and the invariants.

### Cases

| Case | Function | Profiles | Invariant | Evidence | Covers |
|---|---|---|---|---|---|
| CT-NODE-330 | time | OBSP-NODE, OBSP-SITE | `gnss-evidence-rules` | time-quality | GNSS-01 to GNSS-12 on each GnssEvidence in the set (schema and consistency) |
| CT-NODE-331 | time | OBSP-NODE, OBSP-SITE | `gnss-time-quality-agrees` | time-quality | REQ-5.4-6: a TimeQuality claims no more than its evidence |
| CT-NODE-332 | qualify | OBSP-NODE, OBSP-SITE | `gnss-observation-evidence-linked` | observation-record | REQ-5.4-5, GNSS-11: a referenced location evidence is present and a contradiction is flagged |

GNSS evidence is optional: with no GnssEvidence and no reference to one, the invariants have nothing to check. Each
case names the evidence its function already requires (a TimeQuality, an observation record), so a set without it
fails as it does today and the coverage of `time` and `qualify` does not come from these cases alone.

## Compatibility

Additive. No existing schema, record or case changes. A node that attaches no GnssEvidence sees no difference. The
example sets of OBSP-NODE and OBSP-SITE gain a GnssEvidence, a TimeQuality that references it and an observation record
that references it, and stay PASS. The negative OBSP-NODE set now also fails CT-NODE-330 and CT-NODE-331 (it has no
TimeQuality), which `sdk/python/tests/test_obsp.py` records.

## Tests

- Positive fixtures: an NTS source, locked (`gnss-evidence.valid`); OSNMA as reported with GNSS agreeing with NTS and
  Roughtime (`authenticated-pnt`); no input at all (`nothing-assessed`); a contradicted location; an OSNMA failure. A
  TimeQuality that references the `authenticated-pnt` evidence.
- Negative fixtures, one rule each: GNSS alone trusted; trusted with spoofing suspected; `AUTHENTICATED_PNT` without a
  cross-check, with only disagreeing cross-checks, without OSNMA `AUTHENTICATED`, with the time synchronisation
  requirement not met; OSNMA failure without `authenticationFailed`; OSNMA presented as checked; a reported input
  presented as `VALID`; Roughtime as the source class; an unknown bound given as zero; trusted with an unknown holdover;
  an absent input with a digest; a checked input without one; `CONTRADICTED` without a distance; `NOT_ASSESSED` with a
  position.
- `sdk/python/tests/test_inv_oip0033.py` (16 tests): the example set passes; an empty set has nothing to check; each
  invariant message on a mutated document (reason without flag, cross-check against its numbers, bound too small, NTS
  class without a valid input, corroborated over policy, schema errors, missing evidence, a TimeQuality claiming more,
  a smaller bound, another class, a downgrade allowed, a contradicted location without a flag); every expected output
  of the reference evaluator validates and passes; the cases are registered.
- The crate's own tests: 10 unit tests (CRC-24Q check value, 1005/1006 round trip and sign, RINEX 3 and 4 and refusals,
  NTS-KE rules, Roughtime tag values from the draft and each validity failure) and 4 vector tests.

## Open questions

1. Whether `AUTHENTICATED_PNT` should also require a minimum number of OSNMA-authenticated satellites, and whether a
   Roughtime-only cross-check (a bound of seconds) should be enough for it, or only for an `ESTIMATED` bound.
2. The indicator thresholds: real jamming and spoofing captures are needed to set them; until then they are reference
   defaults with no measured basis.
3. Whether the protocol should verify OSNMA itself from recorded navigation pages (the TESLA chain and MACK tags)
   instead of recording the receiver's state; this needs the ICD opened and recorded pages as vectors.
4. Whether Roughtime should gain a relations row once it is published as an RFC.
5. Whether a location evidence should be able to raise an observation quality flag on its own, rather than requiring
   the producer to set it.

## On acceptance with other drafts

The patches apply alone to the current tree. With them applied, draft patches that also regenerate
`registers/implements-edges.json` or `registers/requirements.yaml`, append to `sdk/python/src/obsp/conformance.py`, add
rows after `EXT-PTP` in `registers/relations.yaml`, edit the objects of `time` in `registers/functions.yaml` or the
expected-failure set of `sdk/python/tests/test_obsp.py` no longer apply as they stand (OIP-0005, 0006, 0007, 0008, 0009,
0010, 0011, 0012, 0013, 0017, 0019, 0020, 0022, 0024, 0025, 0026, 0027, 0028, 0029, 0030, 0032): whichever is accepted
second regenerates the registers and merges the hunks.
