.. _program_listing_file_interfaces_rinex_nav_loader.h: Program Listing for File rinex_nav_loader.h =========================================== |exhale_lsh| :ref:`Return to documentation for file ` (``interfaces/rinex_nav_loader.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include #include #include #include "lupnt/core/definitions.h" namespace lupnt { class RinexNavLoader { public: RinexNavLoader() = default; explicit RinexNavLoader(const std::filesystem::path& filepath); explicit RinexNavLoader(const std::vector& filepaths); void LoadFile(const std::filesystem::path& filepath); const std::vector& GetSatellites() const { return sats_; } 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; Vec6 GetPosVel(const std::string& sat_id, Real t_tai) const; private: struct NavMessage { double epoch_tai = 0.0; double af0 = 0.0, af1 = 0.0, af2 = 0.0; double crs = 0.0, delta_n = 0.0, m0 = 0.0; double cuc = 0.0, ecc = 0.0, cus = 0.0, sqrt_a = 0.0; double toe = 0.0, cic = 0.0, omega0 = 0.0, cis = 0.0; double i0 = 0.0, crc = 0.0, omega = 0.0, omega_dot = 0.0, idot = 0.0; double week = 0.0; }; std::vector sats_; std::map> nav_; // sat_id -> messages (any order) void ParseFile(const std::filesystem::path& filepath); int FindClosestMessage(const std::string& sat_id, double t_tai) const; }; } // namespace lupnt