0.3.0
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
NAV::GnssMeasurementErrorModel Class Reference

Errors concerning GNSS observations. More...

Data Structures

struct  ModelParametersCosineType
 Model parameters for the 'cosine - type' model. More...
 
struct  ModelParametersExponential
 Model parameters for the 'exponential' model. More...
 
struct  ModelParametersRtklib
 Model parameters for the 'RTKLIB' model. More...
 
struct  ModelParametersSine
 Model parameters for the 'sine' model. More...
 
struct  ModelParametersSineCN0
 Model parameters for the 'sine + CN0' model. More...
 
struct  ModelParametersSineOffset
 Model parameters for the 'sine + offset' model. More...
 
struct  ModelParametersSineSqrt
 Model parameters for the 'sine - sqrt' model. More...
 

Public Types

enum  Model : uint8_t {
  None ,
  SINE ,
  SINE_OFFSET ,
  SINE_CN0 ,
  RTKLIB ,
  SINE_SQRT ,
  EXPONENTIAL ,
  COSINE_TYPE ,
  COUNT
}
 Models. More...
 

Public Member Functions

double carrierMeasErrorVar (const SatelliteSystem &satSys, double elevation, double cn0) const
 Calculates the measurement Error Variance for carrier-phase observations.
 
double codeBiasErrorVar () const
 Returns the Code Bias Error Variance.
 
 GnssMeasurementErrorModel ()
 Default constructor.
 
double psrMeasErrorVar (const SatelliteSystem &satSys, double elevation, double cn0) const
 Calculates the measurement Error Variance for pseudorange observations.
 
double psrRateMeasErrorVar (const Frequency &freq, int8_t num, double elevation, double cn0) const
 Returns the Pseudo-range rate Error Variance.
 
bool ShowGuiWidgets (const char *id, float width)
 Shows a GUI widgets.
 

Private Member Functions

void updateStdDevCurvePlot (Model model)
 Updates the curve plot data for the given model.
 
double weightingFunction (Model model, double elevation, double cn0) const
 Calculates the weighting function for the standard deviation.
 

Static Private Member Functions

static double satSysErrorFactorVariance (const SatelliteSystem &satSys)
 Returns an error factor for the variance depending on the satellite system.
 

Private Attributes

double _carrierStdDev
 Carrier Measurement error standard deviation per Frequency [m].
 
double _codeStdDev
 Code/Pseudorange Measurement error standard deviation per Frequency [m].
 
double _dopplerStdDev
 Doppler Frequency error factor [Hz] - Measurement error standard deviation.
 
Model _model
 Model to use.
 
ModelParametersCosineType _modelParametersCosineType
 Model parameters for the 'cosine - type' model.
 
ModelParametersExponential _modelParametersExponential
 Model parameters for the 'exponential' model.
 
ModelParametersRtklib _modelParametersRtklib
 Model parameters for the 'RTKLIB' model.
 
ModelParametersSine _modelParametersSine
 Model parameters for the 'sine' model.
 
ModelParametersSineCN0 _modelParametersSineCN0
 Model parameters for the 'sine + CN0' model.
 
ModelParametersSineOffset _modelParametersSineOffset
 Model parameters for the 'sine + offset' model.
 
ModelParametersSineSqrt _modelParametersSineSqrt
 Model parameters for the 'sine - sqrt' model.
 
double _plotCN0
 Carrier-to-Noise density [dB-Hz] to use in the plot.
 
std::vector< std::vector< double > > _stdDevCurvePlot
 Standard deviations for plotting.
 

Static Private Attributes

static constexpr std::array< double, PLOT_SAMPLES_elevation
 Elevation data for plotting [rad].
 
static constexpr std::array< double, PLOT_SAMPLES_elevation_deg
 Elevation data for plotting [rad].
 
static constexpr size_t PLOT_SAMPLES
 Amount of samples for the plot.
 

Friends

void from_json (const json &j, GnssMeasurementErrorModel &obj)
 Converts the provided json object into a node object.
 
void from_json (const json &j, GnssMeasurementErrorModel::ModelParametersCosineType &obj)
 Converts the provided json object into a node object.
 
void from_json (const json &j, GnssMeasurementErrorModel::ModelParametersExponential &obj)
 Converts the provided json object into a node object.
 
void from_json (const json &j, GnssMeasurementErrorModel::ModelParametersRtklib &obj)
 Converts the provided json object into a node object.
 
void from_json (const json &j, GnssMeasurementErrorModel::ModelParametersSine &obj)
 Converts the provided json object into a node object.
 
void from_json (const json &j, GnssMeasurementErrorModel::ModelParametersSineCN0 &obj)
 Converts the provided json object into a node object.
 
void from_json (const json &j, GnssMeasurementErrorModel::ModelParametersSineOffset &obj)
 Converts the provided json object into a node object.
 
void from_json (const json &j, GnssMeasurementErrorModel::ModelParametersSineSqrt &obj)
 Converts the provided json object into a node object.
 
void to_json (json &j, const GnssMeasurementErrorModel &obj)
 Converts the provided object into json.
 
void to_json (json &j, const ModelParametersCosineType &obj)
 Converts the provided object into json.
 
void to_json (json &j, const ModelParametersExponential &obj)
 Converts the provided object into json.
 
void to_json (json &j, const ModelParametersRtklib &obj)
 Converts the provided object into json.
 
void to_json (json &j, const ModelParametersSine &obj)
 Converts the provided object into json.
 
void to_json (json &j, const ModelParametersSineCN0 &obj)
 Converts the provided object into json.
 
void to_json (json &j, const ModelParametersSineOffset &obj)
 Converts the provided object into json.
 
void to_json (json &j, const ModelParametersSineSqrt &obj)
 Converts the provided object into json.
 

Detailed Description

Errors concerning GNSS observations.

Definition at line 30 of file MeasurementErrors.hpp.

Member Enumeration Documentation

◆ Model

Models.

Enumerator
None 

Measurement error model turned off.

SINE 

Sine. See [39] Dach 2015.

SINE_OFFSET 

Sine with offset. See [51] Zhang 2021 eq. 7, p. 3.

SINE_CN0 

Sine and CN0 dependent. See [17] Groves, ch. 9.4.2.4, eq. 9.168, p. 422 (range acceleration is neglected)

RTKLIB 

RTKLIB error model. See [44] RTKLIB ch. E.6, eq. E.6.24, p. 162.

SINE_SQRT 

Sine square-root. See [26] Kiliszek 2022, table 2, p. 5.

EXPONENTIAL 

Exponential. See [19] Euler and Goad 1991 / [4] Li et al. 2016.

COSINE_TYPE 

Cosine Type. See [18] Hadas 2020 eq. 14, p. 8.

COUNT 

Amount of items in the enum.

Definition at line 37 of file MeasurementErrors.hpp.

Constructor & Destructor Documentation

◆ GnssMeasurementErrorModel()

NAV::GnssMeasurementErrorModel::GnssMeasurementErrorModel ( )

Default constructor.

Definition at line 27 of file MeasurementErrors.cpp.

Member Function Documentation

◆ carrierMeasErrorVar()

double NAV::GnssMeasurementErrorModel::carrierMeasErrorVar ( const SatelliteSystem & satSys,
double elevation,
double cn0 ) const
nodiscard

Calculates the measurement Error Variance for carrier-phase observations.

Parameters
[in]satSysSatellite System
[in]elevationSatellite Elevation in [rad]
[in]cn0Carrier-to-Noise density [dB-Hz]
Returns
Variance of the measurement error [m^2]

Definition at line 40 of file MeasurementErrors.cpp.

◆ codeBiasErrorVar()

double NAV::GnssMeasurementErrorModel::codeBiasErrorVar ( ) const
nodiscard

Returns the Code Bias Error Variance.

Returns
Variance of the code bias error [m^2]

Definition at line 51 of file MeasurementErrors.cpp.

◆ psrMeasErrorVar()

double NAV::GnssMeasurementErrorModel::psrMeasErrorVar ( const SatelliteSystem & satSys,
double elevation,
double cn0 ) const
nodiscard

Calculates the measurement Error Variance for pseudorange observations.

Parameters
[in]satSysSatellite System
[in]elevationSatellite Elevation in [rad]
[in]cn0Carrier-to-Noise density [dB-Hz]
Returns
Variance of the measurement error [m^2]

Definition at line 35 of file MeasurementErrors.cpp.

◆ psrRateMeasErrorVar()

double NAV::GnssMeasurementErrorModel::psrRateMeasErrorVar ( const Frequency & freq,
int8_t num,
double elevation,
double cn0 ) const
nodiscard

Returns the Pseudo-range rate Error Variance.

Parameters
[in]freqFrequency the measurement originates from
[in]numFrequency number. Only used for GLONASS G1 and G2
[in]elevationSatellite Elevation in [rad]
[in]cn0Carrier-to-Noise density [dB-Hz]
Returns
Variance of the Pseudo-range rate error [m^2/s^2]

Definition at line 45 of file MeasurementErrors.cpp.

◆ satSysErrorFactorVariance()

double NAV::GnssMeasurementErrorModel::satSysErrorFactorVariance ( const SatelliteSystem & satSys)
staticnodiscardprivate

Returns an error factor for the variance depending on the satellite system.

Parameters
satSysSatellite system

Definition at line 59 of file MeasurementErrors.cpp.

◆ ShowGuiWidgets()

bool NAV::GnssMeasurementErrorModel::ShowGuiWidgets ( const char * id,
float width )

Shows a GUI widgets.

Parameters
[in]idUnique id for ImGui.
[in]widthWidth of the widgets

Definition at line 120 of file MeasurementErrors.cpp.

◆ updateStdDevCurvePlot()

void NAV::GnssMeasurementErrorModel::updateStdDevCurvePlot ( Model model)
private

Updates the curve plot data for the given model.

Parameters
modelError model to use

Definition at line 112 of file MeasurementErrors.cpp.

◆ weightingFunction()

double NAV::GnssMeasurementErrorModel::weightingFunction ( Model model,
double elevation,
double cn0 ) const
nodiscardprivate

Calculates the weighting function for the standard deviation.

Parameters
[in]modelModel to use
[in]elevationSatellite Elevation in [rad]
[in]cn0Carrier-to-Noise density [dB-Hz]

Definition at line 83 of file MeasurementErrors.cpp.

Friends And Related Symbol Documentation

◆ from_json [1/8]

void from_json ( const json & j,
GnssMeasurementErrorModel & obj )
friend

Converts the provided json object into a node object.

Parameters
[in]jJson object with the needed values
[out]objObject to fill from the json

Definition at line 372 of file MeasurementErrors.cpp.

◆ from_json [2/8]

void from_json ( const json & j,
GnssMeasurementErrorModel::ModelParametersCosineType & obj )
friend

Converts the provided json object into a node object.

Parameters
[in]jJson object with the needed values
[out]objObject to fill from the json

Definition at line 476 of file MeasurementErrors.cpp.

◆ from_json [3/8]

void from_json ( const json & j,
GnssMeasurementErrorModel::ModelParametersExponential & obj )
friend

Converts the provided json object into a node object.

Parameters
[in]jJson object with the needed values
[out]objObject to fill from the json

Definition at line 461 of file MeasurementErrors.cpp.

◆ from_json [4/8]

void from_json ( const json & j,
GnssMeasurementErrorModel::ModelParametersRtklib & obj )
friend

Converts the provided json object into a node object.

Parameters
[in]jJson object with the needed values
[out]objObject to fill from the json

Definition at line 434 of file MeasurementErrors.cpp.

◆ from_json [5/8]

void from_json ( const json & j,
GnssMeasurementErrorModel::ModelParametersSine & obj )
friend

Converts the provided json object into a node object.

Parameters
[in]jJson object with the needed values
[out]objObject to fill from the json

Definition at line 394 of file MeasurementErrors.cpp.

◆ from_json [6/8]

void from_json ( const json & j,
GnssMeasurementErrorModel::ModelParametersSineCN0 & obj )
friend

Converts the provided json object into a node object.

Parameters
[in]jJson object with the needed values
[out]objObject to fill from the json

Definition at line 420 of file MeasurementErrors.cpp.

◆ from_json [7/8]

void from_json ( const json & j,
GnssMeasurementErrorModel::ModelParametersSineOffset & obj )
friend

Converts the provided json object into a node object.

Parameters
[in]jJson object with the needed values
[out]objObject to fill from the json

Definition at line 406 of file MeasurementErrors.cpp.

◆ from_json [8/8]

void from_json ( const json & j,
GnssMeasurementErrorModel::ModelParametersSineSqrt & obj )
friend

Converts the provided json object into a node object.

Parameters
[in]jJson object with the needed values
[out]objObject to fill from the json

Definition at line 447 of file MeasurementErrors.cpp.

◆ to_json [1/8]

void to_json ( json & j,
const GnssMeasurementErrorModel & obj )
friend

Converts the provided object into json.

Parameters
[out]jJson object which gets filled with the info
[in]objObject to convert into json

Definition at line 354 of file MeasurementErrors.cpp.

◆ to_json [2/8]

void to_json ( json & j,
const ModelParametersCosineType & obj )
friend

Converts the provided object into json.

Parameters
[out]jJson object which gets filled with the info
[in]objObject to convert into json

Definition at line 468 of file MeasurementErrors.cpp.

◆ to_json [3/8]

void to_json ( json & j,
const ModelParametersExponential & obj )
friend

Converts the provided object into json.

Parameters
[out]jJson object which gets filled with the info
[in]objObject to convert into json

Definition at line 453 of file MeasurementErrors.cpp.

◆ to_json [4/8]

void to_json ( json & j,
const ModelParametersRtklib & obj )
friend

Converts the provided object into json.

Parameters
[out]jJson object which gets filled with the info
[in]objObject to convert into json

Definition at line 427 of file MeasurementErrors.cpp.

◆ to_json [5/8]

void to_json ( json & j,
const ModelParametersSine & obj )
friend

Converts the provided object into json.

Parameters
[out]jJson object which gets filled with the info
[in]objObject to convert into json

Definition at line 388 of file MeasurementErrors.cpp.

◆ to_json [6/8]

void to_json ( json & j,
const ModelParametersSineCN0 & obj )
friend

Converts the provided object into json.

Parameters
[out]jJson object which gets filled with the info
[in]objObject to convert into json

Definition at line 412 of file MeasurementErrors.cpp.

◆ to_json [7/8]

void to_json ( json & j,
const ModelParametersSineOffset & obj )
friend

Converts the provided object into json.

Parameters
[out]jJson object which gets filled with the info
[in]objObject to convert into json

Definition at line 399 of file MeasurementErrors.cpp.

◆ to_json [8/8]

void to_json ( json & j,
const ModelParametersSineSqrt & obj )
friend

Converts the provided object into json.

Parameters
[out]jJson object which gets filled with the info
[in]objObject to convert into json

Definition at line 440 of file MeasurementErrors.cpp.

Field Documentation

◆ _carrierStdDev

double NAV::GnssMeasurementErrorModel::_carrierStdDev
private

Carrier Measurement error standard deviation per Frequency [m].

Definition at line 86 of file MeasurementErrors.hpp.

◆ _codeStdDev

double NAV::GnssMeasurementErrorModel::_codeStdDev
private

Code/Pseudorange Measurement error standard deviation per Frequency [m].

Definition at line 88 of file MeasurementErrors.hpp.

◆ _dopplerStdDev

double NAV::GnssMeasurementErrorModel::_dopplerStdDev
private

Doppler Frequency error factor [Hz] - Measurement error standard deviation.

Definition at line 90 of file MeasurementErrors.hpp.

◆ _elevation

std::array<double, PLOT_SAMPLES> NAV::GnssMeasurementErrorModel::_elevation
staticconstexprprivate

Elevation data for plotting [rad].

Definition at line 167 of file MeasurementErrors.hpp.

◆ _elevation_deg

std::array<double, PLOT_SAMPLES> NAV::GnssMeasurementErrorModel::_elevation_deg
staticconstexprprivate

Elevation data for plotting [rad].

Definition at line 169 of file MeasurementErrors.hpp.

◆ _model

Model NAV::GnssMeasurementErrorModel::_model
private

Model to use.

Definition at line 83 of file MeasurementErrors.hpp.

◆ _modelParametersCosineType

ModelParametersCosineType NAV::GnssMeasurementErrorModel::_modelParametersCosineType
private

Model parameters for the 'cosine - type' model.

Definition at line 160 of file MeasurementErrors.hpp.

◆ _modelParametersExponential

ModelParametersExponential NAV::GnssMeasurementErrorModel::_modelParametersExponential
private

Model parameters for the 'exponential' model.

Definition at line 150 of file MeasurementErrors.hpp.

◆ _modelParametersRtklib

ModelParametersRtklib NAV::GnssMeasurementErrorModel::_modelParametersRtklib
private

Model parameters for the 'RTKLIB' model.

Definition at line 131 of file MeasurementErrors.hpp.

◆ _modelParametersSine

ModelParametersSine NAV::GnssMeasurementErrorModel::_modelParametersSine
private

Model parameters for the 'sine' model.

Definition at line 103 of file MeasurementErrors.hpp.

◆ _modelParametersSineCN0

ModelParametersSineCN0 NAV::GnssMeasurementErrorModel::_modelParametersSineCN0
private

Model parameters for the 'sine + CN0' model.

Definition at line 122 of file MeasurementErrors.hpp.

◆ _modelParametersSineOffset

ModelParametersSineOffset NAV::GnssMeasurementErrorModel::_modelParametersSineOffset
private

Model parameters for the 'sine + offset' model.

Definition at line 112 of file MeasurementErrors.hpp.

◆ _modelParametersSineSqrt

ModelParametersSineSqrt NAV::GnssMeasurementErrorModel::_modelParametersSineSqrt
private

Model parameters for the 'sine - sqrt' model.

Definition at line 140 of file MeasurementErrors.hpp.

◆ _plotCN0

double NAV::GnssMeasurementErrorModel::_plotCN0
private

Carrier-to-Noise density [dB-Hz] to use in the plot.

Definition at line 93 of file MeasurementErrors.hpp.

◆ _stdDevCurvePlot

std::vector<std::vector<double> > NAV::GnssMeasurementErrorModel::_stdDevCurvePlot
private

Standard deviations for plotting.

Definition at line 171 of file MeasurementErrors.hpp.

◆ PLOT_SAMPLES

size_t NAV::GnssMeasurementErrorModel::PLOT_SAMPLES
staticconstexprprivate

Amount of samples for the plot.

Definition at line 165 of file MeasurementErrors.hpp.


The documentation for this class was generated from the following files: