Class AntexLoader

Nested Relationships

Nested Types

Class Documentation

class AntexLoader

Loader / querier for satellite antenna phase-center offsets (PCO) from an IGS ANTEX file.

PCO values are stored (and returned) in the satellite-antenna North/East/Up (NEU) frame, in meters (ANTEX stores them in millimeters). Converting a PCO to a geocentric/inertial frame requires the satellite “IJK” rotation matrix; see ComputeIjkToEcefRotation and ApplyPcoCorrectionEcef below, which port the convention used by projects/GNSSEphemeris/phase_center_offset.py::ijk_to_ecef_rot (verified against projects/.../generate_antenna_pco.ipynb).

Public Functions

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

Construct and load a single ANTEX file.

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

Parse an additional ANTEX file and merge its satellite entries in.

Vec3d GetPco(GnssConst gnss_const, int prn, GnssFreq freq, Real t_tai) const

Look up the satellite antenna phase-center offset (PCO), in the satellite North/East/Up (NEU) antenna frame [m], for satellite prn of constellation gnss_const, frequency freq, at epoch t_tai (used to select the correct validity-period entry; ANTEX validity spans are wide — weeks to years — so any reasonable choice of time system for t_tai is adequate). Mirrors ANTEXLoader.get_pco. Throws if no matching entry/frequency is found.

Vec3d GetPco(const std::string &gnss_letter, int prn, const std::string &antex_freq_code, Real t_tai) const

Same as GetPco, but specifying the raw ANTEX frequency code directly (e.g. "G01", "E05") instead of a GnssFreq enum value.

std::vector<std::string> GetAvailableFreqCodes(GnssConst gnss_const, int prn, Real t_tai) const

List the ANTEX frequency codes available for satellite prn of constellation gnss_const at epoch t_tai (e.g. {"G01","G02","G05"}).

bool HasSatellite(GnssConst gnss_const, int prn) const

Public Static Functions

static Mat3d ComputeIjkToEcefRotation(Real t_tai, const Vec3d &r_sat_ecef)

“IJK” rotation matrix used to express a satellite-antenna NEU PCO vector in ECEF, as pco_ecef = Cijk * pco_neu. Columns are: ivec = jvec x kvec, jvec = normalize(r_sun_ecef - r_sat_ecef), kvec = -normalize(r_sat_ecef) Note: this triad is intentionally distinct from (and, in general, not orthonormal with) the canonical GnssAttitude body frame &#8212; jvec here is the raw (un-orthogonalized) approximate Earth-Sun direction, not GnssAttitude::GetEy(). It is ported verbatim from phase_center_offset.py::ijk_to_ecef_rot (the reference used to generate the precomputed PCO-corrected ephemerides in generate_antenna_pco.ipynb / test_ephemeris_loading.ipynb), and MUST be kept distinct to remain numerically consistent with that data.

static Vec3d ApplyPcoCorrectionEcef(Real t_tai, const Vec3d &pos_sp3_ecef, const Vec3d &pco_neu_m)

Apply the PCO correction to an SP3 (center-of-mass) ECEF position: pos_corrected = pos_sp3_ecef + Cijk(t_tai, pos_sp3_ecef) * pco_neu. Mirrors the workflow in generate_antenna_pco.ipynb.

static std::string GnssLetter(GnssConst gnss_const)

Single-letter GNSS system identifier used by SP3/ANTEX/RINEX satellite IDs, e.g. GnssConst::GPS -> "G", GnssConst::GALILEO -> "E".

static std::string SatId(GnssConst gnss_const, int prn)

SP3/ANTEX/RINEX satellite identifier, e.g. (GPS, 5) -> "G05".