A parsed RINEX broadcast-navigation product (GPS LNAV, Galileo I/NAV+F/NAV, BeiDou D1/D2, GLONASS).
Holds the broadcast Keplerian elements and clock terms as a resource handle,
the broadcast-ephemeris counterpart to Orbis.GNSS.SP3. Pass a handle to
Orbis.GNSS.Positioning.solve/4 to position from broadcast ephemeris instead
of a precise SP3 product. The navigation file is parsed exactly once; the
parsed product is held as a reference, not re-parsed per call.
Parsing covers RINEX 3.x and 4.xx files: GPS, Galileo, and BeiDou records (including BeiDou geostationary satellites), and GLONASS (a PZ-90.11 state-vector model propagated by Runge-Kutta integration rather than Keplerian elements). Other constellations in a mixed file are skipped, as are version-4 CNAV-family messages.
The orbit and clock models follow IS-GPS-200 (GPS LNAV), the Galileo OS-SIS-ICD (I/NAV + F/NAV), and the BeiDou BDS-SIS-ICD (D1/D2), parsed from RINEX 3.x/4.xx navigation records.
Epochs
position/3 interprets the query epoch in GPS time (GPST). A NaiveDateTime or
{{year, month, day}, {hour, minute, second}} is converted to a continuous
second-of-J2000 via Orbis.GNSS.Time; the crate maps that onto each system's
own time scale (BDT for BeiDou, UTC-referenced for GLONASS) before selecting the
governing record. No leap-second shifting is applied to the supplied epoch.
Summary
Types
@type t() :: %Orbis.GNSS.Broadcast{handle: reference()}
Functions
Parse a RINEX 3.x or 4.xx navigation file from disk.
Returns {:ok, %Orbis.GNSS.Broadcast{}} or {:error, reason}. The file
is read and parsed once; the parsed product is held as a resource handle.
Like load/1 but raises on failure.
Parse an in-memory RINEX 3.x or 4.xx navigation text buffer into a handle.
@spec position(t(), String.t(), NaiveDateTime.t() | tuple()) :: {:ok, Orbis.GNSS.Broadcast.State.t()} | {:error, term()}
Evaluate the broadcast state of satellite sat_id at epoch.
sat_id is the canonical RINEX token, e.g. "G01" (GPS PRN 1), "E12",
"C30", "R07". epoch is a NaiveDateTime or a
{{year, month, day}, {hour, minute, second}} tuple, interpreted in GPS time.
Returns {:ok, %Orbis.GNSS.Broadcast.State{}} with the ECEF position (meters)
and satellite clock offset (seconds), {:error, :no_ephemeris} when no
broadcast record covers that satellite at that epoch (the validity window has no
match — this is not extrapolated), or {:error, reason} for a malformed
satellite token or a non-integer-second tuple epoch.
Evaluating the same satellite across a window reuses the parsed handle; the navigation file is never re-read.