Class RinexNavLoader

Nested Relationships

Nested Types

Class Documentation

class RinexNavLoader

Loader / propagator for RINEX V3 broadcast-ephemeris (“BRDC”) navigation files.

Satellites are identified the same way as in Sp3Loader, e.g. "G01".

Public Functions

RinexNavLoader() = default
explicit RinexNavLoader(const std::filesystem::path &filepath)

Construct and load a single RINEX nav file.

explicit RinexNavLoader(const std::vector<std::filesystem::path> &filepaths)

Construct and load multiple RINEX nav files (e.g. consecutive days); navigation messages are concatenated per-satellite.

void LoadFile(const std::filesystem::path &filepath)

Parse an additional RINEX nav file and merge its messages in.

void LoadYumaFile(const std::filesystem::path &filepath)

Parse a YUMA-format GPS almanac (e.g. from CelesTrak / USCG NAVCEN, a small no-authentication text download) and merge its per-PRN orbital slots in as broadcast navigation messages. YUMA carries only the coarse Keplerian set (e, toa, i, OMEGADOT, sqrt_a, OMEGA0, omega, M0, af0, af1, week); the higher-order harmonic corrections and delta_n / idot are set to zero. This is intended as an orbital-slot seed for numerical propagation (see the lunar-GNSS ODTS almanac constellation source), not as a precise broadcast product. Only GPS (G) satellites are produced.

double GetLatestEpochTai(const std::string &sat_id) const

Reference epoch [TAI seconds] of the most recent navigation message loaded for sat_id (the freshest orbital slot). Used to pick the seed epoch at which the broadcast Keplerian elements are converted to a Cartesian state for numerical propagation, so the state is taken at the message’s own time-of-ephemeris (t_k = 0) rather than Keplerian-extrapolated far from it.

inline const std::vector<std::string> &GetSatellites() const

Identifiers of all satellites with navigation messages loaded so far (e.g. {"G01", "G02", ..., "E11", ...}); GLONASS excluded.

bool HasSatellite(const std::string &sat_id) const
void GetPosVelClock(const std::string &sat_id, Real t_tai, Vec6 &rv_ecef, Real &clock_corr_s) const

Broadcast-ephemeris ECEF position/velocity [m, m/s] (rv_ecef) and clock correction [s] (clock_corr_s, polynomial + relativistic terms only &#8212; see file-level note on the omitted Galileo system-time term) of satellite sat_id at t_tai, computed via Keplerian propagation of the navigation message with the closest time-of-epoch. Mirrors BRDCLoader.get_posvelclock for systems G/E/C/J.

Vec6 GetPosVel(const std::string &sat_id, Real t_tai) const

Broadcast-ephemeris ECEF position/velocity [m, m/s] only.

Public Static Functions

static std::string FilenameForEpoch(Real epoch, Time time_scale = Time::UTC)

Build the CDDIS BRDC filename covering epoch, e.g. BRDC00IGS_R_20260140000_01D_MN.rnx (uncompressed).

static std::filesystem::path DownloadFileForEpoch(Real epoch, Time time_scale = Time::UTC, const std::filesystem::path &cache_dir = std::filesystem::path())

Download/cache the multi-GNSS broadcast-ephemeris (“BRDC”) RINEX nav file covering epoch, then return the uncompressed .rnx path.

The default cache directory is GetOutputDir("gnss_files") / "brdc". Mirrors Sp3Loader::DownloadFileForEpoch: downloads use curl -L --netrc-optional, so credentials can be supplied via ~/.netrc or the EARTHDATA_USERNAME/EARTHDATA_PASSWORD environment variables. The daily product is tried at both CDDIS layouts (.../daily/YYYY/DDD/YYp/ then .../daily/YYYY/brdc/). Throws if CDDIS returns an Earthdata Login HTML page.