16#include <unordered_map>
34 [[nodiscard]]
static std::string
type()
44 return m_satellites.at(satId).calcSatellitePos(transTime);
51 return m_satellites.at(satId).calcSatellitePosVel(transTime);
58 return m_satellites.at(satId).calcSatellitePosVelAccel(transTime);
68 return m_satellites.at(satId).calcClockCorrections(recvTime, dist, freq);
76 return m_satellites.at(satId).calcSatellitePositionVariance(recvTime);
102 auto satNavData =
m_satellites.at(satId).searchNavigationData(recvTime);
103 if (satNavData ==
nullptr)
105 [[maybe_unused]]
auto printNavData = [&]() {
107 for (
const auto& navData :
m_satellites.at(satId).getNavigationData())
109 ret += fmt::format(
"[{} - diff {:.0f}s], ", navData->refTime.toYMDHMS(
GPST),
110 static_cast<double>(std::abs((navData->refTime - recvTime).count())));
112 return ret.substr(0, ret.length() - 2);
115 LOG_TRACE(
"[{}][{}]: No navigation data found. Available data are at time: {}", satId, recvTime.
toYMDHMS(
GPST), printNavData());
152 double a0 = std::nan(
"");
153 double a1 = std::nan(
"");
Ionospheric Correction data.
Utility class for logging to console and file.
#define LOG_TRACE
Detailled info to trace the execution of the program. Should not be called on functions which receive...
Utility functions for std::pair.
Structs identifying a unique satellite.
Calculations and data related to satellite orbit, clock, ...
Frequency definition for different satellite systems.
GNSS Navigation message information.
Orbit::Pos calcSatellitePos(const SatId &satId, const InsTime &transTime) const
Calculates position, velocity and acceleration of the satellite at transmission time.
size_t nSatellites() const
Returns the amount of satellites contained in this message.
void addSatelliteNavData(const SatId &satId, const std::shared_ptr< SatNavData > &satNavData)
Adds the provided satellite navigation data to the satellite.
double calcSatellitePositionVariance(const SatId &satId, const InsTime &recvTime) const
Calculates the Variance of the satellite position in [m].
static std::string type()
Returns the type of the data class.
std::unordered_map< std::pair< TimeSystem, TimeSystem >, TimeSystemCorrections > timeSysCorr
Time system correction parameters. Difference between GNSS system time and UTC or other time systems.
const auto & satellites() const
Get the satellites.
Clock::Corrections calcSatelliteClockCorrections(const SatId &satId, const InsTime &recvTime, double dist, const Frequency &freq) const
Calculates clock bias and drift of the satellite.
std::shared_ptr< NAV::SatNavData > searchNavigationData(const SatId &satId, const InsTime &recvTime) const
Checks whether the satellite is included in the internal data.
bool isHealthy(const SatId &satId, const InsTime &recvTime) const
Checks whether the signal is healthy.
void reset()
Resets the data by clearing the member variables.
std::unordered_map< SatId, Satellite > m_satellites
Map of satellites containing the navigation message data.
Orbit::PosVel calcSatellitePosVel(const SatId &satId, const InsTime &transTime) const
Calculates position, velocity and acceleration of the satellite at transmission time.
Orbit::PosVelAccel calcSatellitePosVelAccel(const SatId &satId, const InsTime &transTime) const
Calculates position, velocity and acceleration of the satellite at transmission time.
IonosphericCorrections ionosphericCorrections
Ionospheric correction values.
SatelliteSystem satelliteSystems
Satellite Systems available.
The class is responsible for all time-related tasks.
constexpr InsTime_YMDHMS toYMDHMS(TimeSystem timesys=UTC, int digits=-1) const
Converts this time object into a different format.
@ SatSys_None
No Satellite system.
Satellite clock corrections.
Time system correction parameters.
double a0
a0 / tau_c Coefficient of linear polynomial [s] Δt = a0 + a1 * (t - t_ref)
double a1
a1 Coefficient of linear polynomial [s/s]
Satellite Position, Velocity and Acceleration.
Satellite Position and Velocity.
Identifies a satellite (satellite system and number)