20#include <fmt/format.h>
46template<
typename StateKeyType>
55 template<
typename Scalar,
int Size>
73 template<
typename Scalar,
int Size>
78 for (
const auto& key : Phi.
rowKeys())
80 if (
const auto* bias = std::get_if<Keys::InterFreqBias>(&key))
82 Phi(*bias, *bias) = 1;
100 return { Phi(all, all)(0), Q(all, all)(0) };
108 bool ShowGui(
float itemWidth,
float unitWidth,
const char*
id)
110 bool changed =
false;
112 if (gui::widgets::InputDoubleWithUnit(fmt::format(
"{} of the inter-frequency bias (RW)##{}",
120 MakeComboItems<Units::CovarianceClkPhaseDriftUnits>().c_str(),
121 0.0, 0.0,
"%.2e", ImGuiInputTextFlags_CharsScientific))
174struct hash<NAV::Keys::InterFreqBias>
180 return std::hash<NAV::Frequency>()(interFreqBias.
freq);
186#ifndef DOXYGEN_IGNORE
190struct fmt::formatter<NAV::Keys::InterFreqBias> : fmt::formatter<std::string>
196 template<
typename FormatContext>
199 return fmt::formatter<std::string>::format(fmt::format(
"InterFreqBias({})", interFreqBias.
freq), ctx);
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Frequency definition for different satellite systems.
Units used by the system model parameters.
CovarianceClkPhaseDriftUnits
Possible Units for the Standard deviation of the clock phase drift.
Definition Units.hpp:37
double convertUnit(const double &value, Units::CovarianceAccelUnits unit)
Converts the value depending on the unit provided.
std::ostream & operator<<(std::ostream &os, const NAV::Keys::InterFreqBias &obj)
Stream insertion operator overload.
Utility class for logging to console and file.
#define LOG_DEBUG
Debug information. Should not be called on functions which receive observations (spamming)
Definition Logger.hpp:67
Frequency definition for different satellite systems.
Definition Frequency.hpp:59
Inter Frequency Bias System Model.
Definition InterFrequencyBiasModel.hpp:48
void updatePhiAndQ(KeyedMatrix< Scalar, StateKeyType, StateKeyType, Size, Size > &Phi, KeyedMatrix< Scalar, StateKeyType, StateKeyType, Size, Size > &Q, double dt)
Updates the provided Phi and Q matrix.
Definition InterFrequencyBiasModel.hpp:74
std::pair< double, double > calcPhiAndQ(double dt, const Frequency &freq)
Calculates the state transition matrix (𝚽) and the process noise covariance matrix (𝐐)
Definition InterFrequencyBiasModel.hpp:92
friend void to_json(json &j, const InterFrequencyBiasModel &data)
Converts the provided data into a json object.
Definition InterFrequencyBiasModel.hpp:143
double _covarianceInterFrequencyBias
Covariance of the inter-frequency bias [m²/s].
Definition InterFrequencyBiasModel.hpp:138
double _gui_covarianceInterFrequencyBias
GUI selection for the Standard deviation of the inter-frequency bias.
Definition InterFrequencyBiasModel.hpp:136
bool ShowGui(float itemWidth, float unitWidth, const char *id)
Shows a GUI.
Definition InterFrequencyBiasModel.hpp:108
Units::CovarianceClkPhaseDriftUnits _gui_covarianceInterFrequencyBiasUnit
Gui selection for the Unit of the inter-frequency covarianceInterFrequencyBias parameter.
Definition InterFrequencyBiasModel.hpp:133
void initialize(Keys::InterFreqBias bias, KeyedMatrix< Scalar, StateKeyType, StateKeyType, Size, Size > &F, KeyedMatrix< Scalar, StateKeyType, StateKeyType, Size, Size > &G, KeyedMatrix< Scalar, StateKeyType, StateKeyType, Size, Size > &W)
Initializes the inter-frequency bias.
Definition InterFrequencyBiasModel.hpp:56
friend void from_json(const json &j, InterFrequencyBiasModel &data)
Converts the provided json object into the data object.
Definition InterFrequencyBiasModel.hpp:154
Static sized KeyedMatrix.
Definition KeyedMatrix.hpp:1910
const std::vector< RowKeyType > & rowKeys() const
Returns the row keys.
Definition KeyedMatrix.hpp:77
Inter-frequency bias.
Definition InterFrequencyBiasModel.hpp:35
bool operator==(const InterFreqBias &rhs) const
Equal comparison operator.
Definition InterFrequencyBiasModel.hpp:38
Frequency freq
Frequency.
Definition InterFrequencyBiasModel.hpp:40
size_t operator()(const NAV::Keys::InterFreqBias &interFreqBias) const
Hash function.
Definition InterFrequencyBiasModel.hpp:178
Matrix which can be accessed by keys.