22#include "Navigation/Transformations/Units.hpp"
87 double _carrierStdDev = 0.003;
89 double _codeStdDev = 0.9;
91 double _dopplerStdDev = 1;
99 struct ModelParametersSine
104 ModelParametersSine _modelParametersSine;
107 struct ModelParametersSineOffset
113 ModelParametersSineOffset _modelParametersSineOffset;
116 struct ModelParametersSineCN0
123 ModelParametersSineCN0 _modelParametersSineCN0;
126 struct ModelParametersRtklib
132 ModelParametersRtklib _modelParametersRtklib;
135 struct ModelParametersSineType
141 ModelParametersSineType _modelParametersSineType;
144 struct ModelParametersSineSqrt
150 ModelParametersSineSqrt _modelParametersSineSqrt;
153 struct ModelParametersExponential
160 ModelParametersExponential _modelParametersExponential;
163 struct ModelParametersCosineType
170 ModelParametersCosineType _modelParametersCosineType;
175 static constexpr size_t PLOT_SAMPLES = 9001;
177 static constexpr std::array<double, PLOT_SAMPLES> _elevation = genRangeArray<PLOT_SAMPLES>(0.0, deg2rad(0.01), deg2rad(90.001));
179 static constexpr std::array<double, PLOT_SAMPLES> _elevation_deg = genRangeArray<PLOT_SAMPLES>(0.0, 0.01, 90.001);
181 std::vector<std::vector<double>> _stdDevCurvePlot{
Model::COUNT, std::vector<double>(PLOT_SAMPLES) };
187 [[nodiscard]]
double weightingFunction(
Model model,
double elevation,
double cn0)
const;
191 [[nodiscard]]
static double satSysErrorFactorVariance(
const SatelliteSystem& satSys);
195 void updateStdDevCurvePlot(
Model model);
203 friend void to_json(
json& j,
const ModelParametersSineOffset& obj);
218 friend void to_json(
json& j,
const ModelParametersExponential& obj);
221 friend void to_json(
json& j,
const ModelParametersCosineType& obj);
242void to_json(
json& j,
const GnssMeasurementErrorModel::ModelParametersSine& obj);
246void from_json(
const json& j, GnssMeasurementErrorModel::ModelParametersSine& obj);
251void to_json(
json& j,
const GnssMeasurementErrorModel::ModelParametersSineOffset& obj);
255void from_json(
const json& j, GnssMeasurementErrorModel::ModelParametersSineOffset& obj);
260void to_json(
json& j,
const GnssMeasurementErrorModel::ModelParametersSineCN0& obj);
264void from_json(
const json& j, GnssMeasurementErrorModel::ModelParametersSineCN0& obj);
269void to_json(
json& j,
const GnssMeasurementErrorModel::ModelParametersRtklib& obj);
273void from_json(
const json& j, GnssMeasurementErrorModel::ModelParametersRtklib& obj);
278void to_json(
json& j,
const GnssMeasurementErrorModel::ModelParametersSineType& obj);
282void from_json(
const json& j, GnssMeasurementErrorModel::ModelParametersSineType& obj);
287void to_json(
json& j,
const GnssMeasurementErrorModel::ModelParametersSineSqrt& obj);
291void from_json(
const json& j, GnssMeasurementErrorModel::ModelParametersSineSqrt& obj);
296void to_json(
json& j,
const GnssMeasurementErrorModel::ModelParametersExponential& obj);
300void from_json(
const json& j, GnssMeasurementErrorModel::ModelParametersExponential& obj);
305void to_json(
json& j,
const GnssMeasurementErrorModel::ModelParametersCosineType& obj);
309void from_json(
const json& j, GnssMeasurementErrorModel::ModelParametersCosineType& obj);
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Frequency definition for different satellite systems.
Frequency definition for different satellite systems.
Definition Frequency.hpp:59
Errors concerning GNSS observations.
Definition MeasurementErrors.hpp:31
friend void from_json(const json &j, ModelParametersSineCN0 &obj)
Converts the provided json object into a node object.
friend void to_json(json &j, const ModelParametersSineType &obj)
Converts the provided object into json.
double carrierMeasErrorVar(const SatelliteSystem &satSys, double elevation, double cn0) const
Calculates the measurement Error Variance for carrier-phase observations.
friend void from_json(const json &j, ModelParametersSineType &obj)
Converts the provided json object into a node object.
friend void to_json(json &j, const ModelParametersSineCN0 &obj)
Converts the provided object into json.
friend void from_json(const json &j, ModelParametersSine &obj)
Converts the provided json object into a node object.
GnssMeasurementErrorModel()
Default constructor.
friend void to_json(json &j, const ModelParametersExponential &obj)
Converts the provided object into json.
Model
Models.
Definition MeasurementErrors.hpp:38
@ SINE_CN0
Sine and CN0 dependent. See Groves, ch. 9.4.2.4, eq. 9.168, p. 422 (range acceleration is neglected)
Definition MeasurementErrors.hpp:42
@ SINE_TYPE
Sine Type. See King and Bock 2001.
Definition MeasurementErrors.hpp:44
@ None
Measurement error model turned off.
Definition MeasurementErrors.hpp:39
@ COUNT
Amount of items in the enum.
Definition MeasurementErrors.hpp:48
@ EXPONENTIAL
Exponential. See Euler and Goad 1991 / Li et al. 2016.
Definition MeasurementErrors.hpp:46
@ SINE
Sine. See Dach 2015.
Definition MeasurementErrors.hpp:40
@ RTKLIB
RTKLIB error model. See RTKLIB ch. E.6, eq. E.6.24, p. 162.
Definition MeasurementErrors.hpp:43
@ COSINE_TYPE
Cosine Type. See Hadas 2020 eq. 14, p. 8.
Definition MeasurementErrors.hpp:47
@ SINE_SQRT
Sine square-root. See Kiliszek 2022, table 2, p. 5.
Definition MeasurementErrors.hpp:45
@ SINE_OFFSET
Sine with offset. See Zhang 2021 eq. 7, p. 3.
Definition MeasurementErrors.hpp:41
friend void to_json(json &j, const ModelParametersSine &obj)
Converts the provided object into json.
friend void to_json(json &j, const GnssMeasurementErrorModel &obj)
Converts the provided object into json.
friend void from_json(const json &j, ModelParametersExponential &obj)
Converts the provided json object into a node object.
double codeBiasErrorVar() const
Returns the Code Bias Error Variance.
friend void to_json(json &j, const ModelParametersCosineType &obj)
Converts the provided object into json.
friend void from_json(const json &j, ModelParametersCosineType &obj)
Converts the provided json object into a node object.
friend void from_json(const json &j, ModelParametersSineSqrt &obj)
Converts the provided json object into a node object.
friend void from_json(const json &j, GnssMeasurementErrorModel &obj)
Converts the provided json object into a node object.
bool ShowGuiWidgets(const char *id, float width)
Shows a GUI widgets.
double psrRateMeasErrorVar(const Frequency &freq, int8_t num, double elevation, double cn0) const
Returns the Pseudo-range rate Error Variance.
double psrMeasErrorVar(const SatelliteSystem &satSys, double elevation, double cn0) const
Calculates the measurement Error Variance for pseudorange observations.
friend void to_json(json &j, const ModelParametersRtklib &obj)
Converts the provided object into json.
friend void from_json(const json &j, ModelParametersSineOffset &obj)
Converts the provided json object into a node object.
friend void to_json(json &j, const ModelParametersSineSqrt &obj)
Converts the provided object into json.
friend void from_json(const json &j, ModelParametersRtklib &obj)
Converts the provided json object into a node object.
friend void to_json(json &j, const ModelParametersSineOffset &obj)
Converts the provided object into json.
Satellite System type.
Definition SatelliteSystem.hpp:43