18#include <fmt/format.h>
37using StateKeyType = std::variant<Keys::MotionModelKey, Keys::RecvClkBias, Keys::RecvClkDrift, Keys::InterFreqBias>;
98struct hash<
NAV::SPP::Meas::Psr>
104 return std::hash<NAV::SatSigId>()(psr.
satSigId);
109struct hash<
NAV::SPP::Meas::Doppler>
115 return std::hash<NAV::SatSigId>()(doppler.
satSigId) << 12;
120#ifndef DOXYGEN_IGNORE
124struct fmt::formatter<
NAV::SPP::Meas::Psr> : fmt::formatter<std::string>
130 template<
typename FormatContext>
131 auto format(
const NAV::SPP::Meas::Psr& psr, FormatContext& ctx)
const
133 return fmt::formatter<std::string>::format(fmt::format(
"psr({})", psr.
satSigId), ctx);
139struct fmt::formatter<
NAV::SPP::Meas::Doppler> : fmt::formatter<std::string>
145 template<
typename FormatContext>
146 auto format(
const NAV::SPP::Meas::Doppler& doppler, FormatContext& ctx)
const
148 return fmt::formatter<std::string>::format(fmt::format(
"dop({})", doppler.
satSigId), ctx);
154struct fmt::formatter<
NAV::SPP::States::StateKeyType> : fmt::formatter<std::string>
160 template<
typename FormatContext>
163 using namespace NAV::Keys;
165 if (
const auto* s = std::get_if<MotionModelKey>(&state))
167 return fmt::formatter<std::string>::format(fmt::format(
"{}", *s), ctx);
169 if (
const auto* recvClkErr = std::get_if<RecvClkBias>(&state))
171 return fmt::formatter<std::string>::format(fmt::format(
"{}", *recvClkErr), ctx);
173 if (
const auto* recvClkDrift = std::get_if<RecvClkDrift>(&state))
175 return fmt::formatter<std::string>::format(fmt::format(
"{}", *recvClkDrift), ctx);
177 if (
const auto* interFreqBias = std::get_if<NAV::Keys::InterFreqBias>(&state))
179 return fmt::formatter<std::string>::format(fmt::format(
"{}", *interFreqBias), ctx);
182 return fmt::formatter<std::string>::format(
"ERROR", ctx);
194 template<
typename FormatContext>
197 if (
const auto* psr = std::get_if<NAV::SPP::Meas::Psr>(&meas))
199 return fmt::formatter<std::string>::format(fmt::format(
"{}", *psr), ctx);
201 if (
const auto* doppler = std::get_if<NAV::SPP::Meas::Doppler>(&meas))
203 return fmt::formatter<std::string>::format(fmt::format(
"{}", *doppler), ctx);
206 return fmt::formatter<std::string>::format(
"ERROR", ctx);
std::ostream & operator<<(std::ostream &os, const NAV::SPP::Meas::Psr &obj)
Stream insertion operator overload.
Inter Frequency Bias System Model.
Receiver Clock System Model.
Structs identifying a unique satellite.
std::variant< Psr, Doppler > MeasKeyTypes
Alias for the measurement key type.
std::variant< Keys::MotionModelKey, Keys::RecvClkBias, Keys::RecvClkDrift, Keys::InterFreqBias > StateKeyType
Alias for the state key type.
constexpr size_t POS_VEL_STATE_COUNT
Amount of states.
constexpr size_t VEL_STATE_COUNT
Amount of states to estimate for the velocity.
constexpr size_t POS_STATE_COUNT
Amount of states to estimate for the position.
Range-rate (doppler) measurement [m/s].
SatSigId satSigId
Satellite Signal Id.
bool operator==(const Doppler &rhs) const
Equal comparison operator.
Pseudorange measurement [m].
bool operator==(const Psr &rhs) const
Equal comparison operator.
SatSigId satSigId
Satellite Signal Id.
Identifies a satellite signal (satellite frequency and number)
size_t operator()(const NAV::SPP::Meas::Doppler &doppler) const
Hash function.
size_t operator()(const NAV::SPP::Meas::Psr &psr) const
Hash function.