astrodynamics_gnss/lib.rs
1//! # astrodynamics-gnss
2//!
3//! GNSS domain layer built on top of the [`astrodynamics`] core crate. This is
4//! a **sibling crate, not a cargo feature** of `astrodynamics`: a
5//! propagation-only consumer must never have to compile the IONEX/SP3 parsers.
6//!
7//! This crate defines the foundational GNSS types and a public façade organized
8//! by user-facing tasks:
9//!
10//! - [`ephemeris`] — precise SP3 and broadcast ephemeris products,
11//! - [`rinex`] — RINEX navigation/observation parsing and CRINEX decoding,
12//! - [`positioning`] — single-point positioning and DOP diagnostics,
13//! - [`atmosphere`] — ionosphere and troposphere corrections,
14//! - [`orbit`] — compact reduced-orbit fitting/evaluation.
15//!
16//! Implementation modules (`sp3`, `rinex_nav`, `spp`, etc.) are crate-private.
17//! This is a clean 0.9 public surface rather than a compatibility shim around
18//! the original implementation-shaped module layout.
19//!
20//! ## Units policy (internal representation)
21//!
22//! All quantities are stored and computed in **SI base units**, with the frame
23//! and datum encoded in the type name (per the spec's frames-in-the-type-system
24//! rule), never hidden behind a bare `position_m`:
25//!
26//! - **Length / position:** meters (`_m`). SP3 positions are ITRF/IGS-frame
27//! ECEF meters; SPP receiver positions are WGS84/ITRF-compatible ECEF meters.
28//! (The core `astrodynamics` state crate works in kilometers; conversions
29//! happen explicitly at the boundary, never implicitly.)
30//! - **Time / clock:** seconds (`_s`). Epochs are represented by the core
31//! `astrodynamics` time family (`Instant`/`TimeScale`), always scale-tagged;
32//! there is no bare ambiguous epoch.
33//! - **Velocity:** meters per second (`_m_s`).
34//! - **Angles:** radians (`_rad`) internally. Degrees appear only at I/O edges
35//! and are named `_deg`.
36//! - **Frequency:** hertz (`_hz`).
37//!
38//! Field and parameter names carry the unit suffix so the unit is visible at
39//! every call site. Matrix/vector linear algebra uses `nalgebra`
40//! (`DMatrix`/`DVector`) per the spec.
41
42// ---------------------------------------------------------------------------
43// Module layout. Additional product modules are added as each lands.
44// ---------------------------------------------------------------------------
45
46mod broadcast; // broadcast-ephemeris (GPS LNAV / Galileo I/NAV) orbit + clock
47pub mod constants; // shared GNSS physical/time constants
48mod crinex; // Hatanaka (CRINEX) observation-file decoder
49mod dop; // dilution-of-precision geometry (GDOP/PDOP/HDOP/VDOP/TDOP)
50mod glonass; // GLONASS PZ-90.11 state-vector RK4 propagation
51mod ionex; // Klobuchar broadcast model + IONEX ionospheric maps
52mod reduced_orbit; // compact mean-element orbit approximation (fitted)
53mod rinex_nav; // RINEX 3 navigation-message parsing (GPS/Galileo broadcast)
54mod rinex_obs; // RINEX 3 observation parsing + single-frequency pseudoranges
55mod sp3; // SP3-c / SP3-d parser + arbitrary-epoch interpolation
56mod spp; // single-point positioning (least-squares PVT)
57mod tropo; // Saastamoinen zenith + Niell (NMF) mapping troposphere
58
59mod error;
60pub mod frame;
61mod id;
62mod parse;
63
64pub mod atmosphere;
65pub mod ephemeris;
66pub mod geometry;
67pub mod ils; // bounded integer least squares (ambiguity-resolution kernel)
68pub mod orbit;
69pub mod positioning;
70pub mod prelude;
71pub mod rinex;
72pub mod rtk_filter; // sequential RTK baseline filter — serializable state ABI (kernel migration)
73pub mod terrain;
74
75pub use error::{Error, Result};
76pub use frame::{ItrfPositionM, ItrfVelocityMS, Wgs84Geodetic};
77pub use id::{GnssSatelliteId, GnssSystem};