Skip to main content

Module constellation

Module constellation 

Source
Expand description

GNSS constellation identity catalog and validation helpers.

This is a data/catalog layer: it builds normalized satellite identity records from public sources and compares those records with GNSS products. It does not alter positioning solves or infer application-specific health rules. It is deterministic and performs no network access; fetching the source bytes is the caller’s (binding’s) job.

GPS, Galileo, GLONASS, BeiDou, and QZSS are supported. The base source for every system is a CelesTrak OMM/JSON group (gps-ops, galileo, glo-ops, beidou, and the QZSS members of the gnss group); the within-system PRN / slot is parsed from OBJECT_NAME and rendered as the SP3/RINEX id ("G13", "E07", "R13", "C19", "J02") via gnss_sp3_id. Each constellation names its satellites differently, so from_celestrak_omm dispatches on GnssSystem to a per-system identity adapter:

  • GPS: (PRN nn) in the object name is the PRN directly.
  • BeiDou: (Cnn) in the object name is the PRN directly.
  • QZSS: (QZSS/PRN nnn) carries the broadcast PRN (193..=201); the RINEX slot is nnn - 192 (J01..J09), per RINEX 3.0x.
  • Galileo: the object name is the GSATdddd build id, which carries no PRN; the SVID/PRN is resolved from the published GSAT->SVID table galileo_prn_for_gsat.
  • GLONASS: the parenthesized number is the GLONASS (Uragan) number, not the orbital slot; the slot is resolved from the published slot table glonass_slot_for_number, and the FDMA frequency-channel number (which is not in OMM at all) from glonass_fdma_channel.

NAVCEN’s GPS constellation status page can be parsed and merged as an optional overlay for SVN and NANU usability details. There is no clean equivalent health oracle for the other systems, so usability overlays are GPS-only; the OMM identity round-trip and the GLONASS FDMA check are the gates for the rest.

The OMM input is the canonical Omm produced by the core OMM parser (crate::astro::omm::{parse_json, parse_json_array}): this module does not re-parse OMM from scratch, it reads OBJECT_NAME and NORAD_CAT_ID off already-parsed records.

use sidereon_core::constellation::{to_csv, BoolStyle, Record, RecordSource};
use sidereon_core::GnssSystem;

let record = Record {
    system: GnssSystem::Gps,
    prn: 3,
    svn: None,
    norad_id: 40294,
    sp3_id: "G03".to_string(),
    fdma_channel: None,
    active: true,
    usable: true,
    source: RecordSource::default(),
};
assert_eq!(
    to_csv(&[record], BoolStyle::Lower),
    "prn,norad_cat_id,active,sp3_id\n3,40294,true,G03\n"
);

Structs§

Catalog
The result of a lenient constellation catalog build: the records that resolved, plus the OMM entries that did not.
CelestrakSource
CelesTrak gps-ops provenance fields preserved on a record.
Diff
Change report between two catalog snapshots, keyed by (system, prn).
FieldChange
A single field change on a PRN that exists in both diffed snapshots.
NavcenSource
NAVCEN status provenance fields preserved on a record or conflict.
NavcenStatus
A parsed row from NAVCEN’s GPS constellation status table.
Record
A normalized GNSS satellite identity record.
RecordSource
Per-source provenance kept on a Record.
SkippedOmm
An OMM record that from_celestrak_omm_lenient could not resolve to a Record for the requested system.
Validation
Validation report for a constellation catalog.

Enums§

BoolStyle
How the CSV active column renders booleans.
ConstellationError
Failure modes of the constellation catalog builders.

Functions§

changed
Returns true when a diff has any findings.
diff
Compare two catalog snapshots by (system, prn) identity.
from_celestrak_omm
Build records for system from already-parsed CelesTrak OMM records, failing on the first unresolvable entry.
from_celestrak_omm_lenient
Build records for system from already-parsed CelesTrak OMM records, skipping (rather than aborting on) entries that do not resolve.
galileo_prn_for_gsat
GSAT build id -> Galileo SVID (E-number).
glonass_fdma_channel
GLONASS orbital slot (1..=24) -> FDMA L1/L2 frequency-channel number k.
glonass_slot_for_number
GLONASS (Uragan) number -> orbital slot (1..=24) for the operational constellation.
gnss_sp3_id
Render the canonical SP3/RINEX satellite token for a constellation + PRN ((Gps, 7) -> "G07", (Glonass, 13) -> "R13").
is_valid
Returns true when a validation report has no findings.
merge_navcen
Merge NAVCEN status rows into normalized records by PRN.
parse_navcen
Parse NAVCEN’s GPS constellation status HTML from raw bytes.
to_csv
Export records as the compact mapping CSV.
validate
Validate catalog identity without an SP3 product.
validate_against_sp3
Validate catalog identity against a loaded SP3 product.
validate_against_sp3_ids
Validate catalog identity against a plain list of SP3/RINEX satellite tokens.
validate_against_sp3_ids_strict
Validate against a plain SP3 id list and fail unless the catalog is clean.