0.4.1
Loading...
Searching...
No Matches
NAV::SPP::KalmanFilter Class Reference

The Spp Kalman Filter related options. More...

Public Member Functions

void addInterFrequencyBias (const Frequency &freq)
 Adds the frequency as inter-frequency bias state.
 
void deinitialize ()
 Deinitialize the KF (can be used to reinitialize the Filter when results seem strange)
 
const KeyedMatrixXd< States::StateKeyType, States::StateKeyType > & getErrorCovarianceMatrix () const
 Returns the Error covariance matrix 𝐏
 
const KeyedVectorXd< States::StateKeyType > & getState () const
 Returns the State vector x̂
 
const std::vector< SPP::States::StateKeyType > & getStateKeys () const
 Get the States in the Kalman Filter.
 
void initialize (const KeyedVectorXd< States::StateKeyType > &states, const KeyedMatrixXd< States::StateKeyType, States::StateKeyType > &variance)
 Initialize the filter.
 
bool isInitialized () const
 Checks wether the Kalman filter is initialized.
 
void predict (const double &dt, const Eigen::Vector3d &lla_pos, const std::string &nameId)
 Does the Kalman Filter prediction.
 
void reset (const std::vector< SatelliteSystem > &satelliteSystems)
 Resets the filter.
 
void setClockBiasErrorCovariance (double clkPhaseDrift)
 Set the P matrix entry for the covariance of the clock phase drift.
 
bool ShowGuiWidgets (const char *id, bool useDoppler, bool multiConstellation, bool estimateInterFrequencyBiases, float itemWidth, float unitWidth)
 Shows the GUI input to select the options.
 
void update (const std::vector< Meas::MeasKeyTypes > &measKeys, const KeyedMatrixXd< Meas::MeasKeyTypes, States::StateKeyType > &H, const KeyedMatrixXd< Meas::MeasKeyTypes, Meas::MeasKeyTypes > &R, const KeyedVectorXd< Meas::MeasKeyTypes > &dz, const std::string &nameId)
 Does the Kalman Filter update.
 

Private Types

enum class  InitCovarianceClockDriftUnits : uint8_t {
  m_s ,
  s_s ,
  m2_s2 ,
  s2_s2
}
 Possible Units for the P matrix initialization clock drift uncertainty. More...
 
enum class  InitCovarianceVelocityUnits : uint8_t {
  m_s ,
  m2_s2
}
 Possible Units for the P matrix initialization velocity uncertainty. More...
 

Private Attributes

double _gui_initCovarianceClockDrift
 GUI selection for the P matrix initialization clock drift uncertainty.
 
InitCovarianceClockDriftUnits _gui_initCovarianceClockDriftUnit
 Gui selection for the Unit of the P matrix initialization clock drift uncertainty.
 
double _gui_initCovarianceInterSysClockDrift
 GUI selection for the P matrix initialization inter system clock drift uncertainty.
 
InitCovarianceClockDriftUnits _gui_initCovarianceInterSysClockDriftUnit
 Gui selection for the Unit of the P matrix initialization inter system clock drift uncertainty.
 
double _gui_initCovarianceVelocity
 GUI selection for the P matrix initialization velocity uncertainty.
 
InitCovarianceVelocityUnits _gui_initCovarianceVelocityUnit
 Gui selection for the Unit of the P matrix initialization velocity uncertainty.
 
double _initCovarianceClockDrift
 Covariance of the P matrix initialization clock drift uncertainty [m²/s²].
 
double _initCovarianceInterSysClockDrift
 Covariance of the P matrix initialization inter system clock drift uncertainty [m²/s²].
 
double _initCovarianceVelocity
 Covariance of the P matrix initialization velocity uncertainty [m²/s²].
 
bool _initialized
 Boolean that determines, if Kalman Filter is initialized (from weighted LSE solution)
 
InterFrequencyBiasModel< SPP::States::StateKeyType_interFrequencyBiasModel
 Inter-frequency bias Model.
 
KeyedKalmanFilterD< SPP::States::StateKeyType, SPP::Meas::MeasKeyTypes_kalmanFilter
 Kalman Filter representation.
 
MotionModel< SPP::States::StateKeyType_motionModel
 Motion Model.
 
ReceiverClockModel< SPP::States::StateKeyType_receiverClockModel
 Receiver clock Model.
 
SystemModelCalcAlgorithm _systemModelCalcAlgorithm
 Algorithm to calculate the system models with.
 
const std::array< SPP::States::StateKeyType, 6 > & PosVelKey
 All position and velocity keys.
 
const std::array< SPP::States::StateKeyType, 3 > & VelKey
 All velocity keys.
 

Friends

void from_json (const json &j, KalmanFilter &data)
 Converts the provided json object into the data object.
 
void to_json (json &j, const KalmanFilter &data)
 Converts the provided data into a json object.
 

Detailed Description

The Spp Kalman Filter related options.

Definition at line 37 of file KalmanFilter.hpp.

Member Enumeration Documentation

◆ InitCovarianceClockDriftUnits

enum class NAV::SPP::KalmanFilter::InitCovarianceClockDriftUnits : uint8_t
strongprivate

Possible Units for the P matrix initialization clock drift uncertainty.

Enumerator
m_s 

[ m / s ]

s_s 

[ s / s ]

m2_s2 

[ m^2 / s^2 ]

s2_s2 

[ s^2 / s^2 ]

Definition at line 139 of file KalmanFilter.hpp.

◆ InitCovarianceVelocityUnits

enum class NAV::SPP::KalmanFilter::InitCovarianceVelocityUnits : uint8_t
strongprivate

Possible Units for the P matrix initialization velocity uncertainty.

Enumerator
m_s 

[ m / s ]

m2_s2 

[ m^2 / s^2 ]

Definition at line 123 of file KalmanFilter.hpp.

Member Function Documentation

◆ addInterFrequencyBias()

void NAV::SPP::KalmanFilter::addInterFrequencyBias ( const Frequency & freq)

Adds the frequency as inter-frequency bias state.

Parameters
[in]freqFrequency to estimate the inter-frequency bias for

Definition at line 185 of file KalmanFilter.cpp.

◆ deinitialize()

void NAV::SPP::KalmanFilter::deinitialize ( )

Deinitialize the KF (can be used to reinitialize the Filter when results seem strange)

Definition at line 123 of file KalmanFilter.cpp.

◆ getErrorCovarianceMatrix()

const KeyedMatrixXd< States::StateKeyType, States::StateKeyType > & NAV::SPP::KalmanFilter::getErrorCovarianceMatrix ( ) const
nodiscard

Returns the Error covariance matrix 𝐏

Definition at line 299 of file KalmanFilter.cpp.

◆ getState()

const KeyedVectorX< double, States::StateKeyType > & NAV::SPP::KalmanFilter::getState ( ) const
nodiscard

Returns the State vector x̂

Definition at line 294 of file KalmanFilter.cpp.

◆ getStateKeys()

const std::vector< SPP::States::StateKeyType > & NAV::SPP::KalmanFilter::getStateKeys ( ) const
nodiscard

Get the States in the Kalman Filter.

Definition at line 289 of file KalmanFilter.cpp.

◆ initialize()

void NAV::SPP::KalmanFilter::initialize ( const KeyedVectorXd< States::StateKeyType > & states,
const KeyedMatrixXd< States::StateKeyType, States::StateKeyType > & variance )

Initialize the filter.

Parameters
statesStates to initialize with
varianceVariance of the state

Definition at line 101 of file KalmanFilter.cpp.

◆ isInitialized()

bool NAV::SPP::KalmanFilter::isInitialized ( ) const
inlinenodiscard

Checks wether the Kalman filter is initialized.

Definition at line 53 of file KalmanFilter.hpp.

◆ predict()

void NAV::SPP::KalmanFilter::predict ( const double & dt,
const Eigen::Vector3d & lla_pos,
const std::string & nameId )

Does the Kalman Filter prediction.

Parameters
[in]dtTime step [s]
[in]lla_posPosition in Latitude, Longitude, Altitude [rad, rad, m]
[in]nameIdName and id of the node calling this (only used for logging purposes)

Definition at line 128 of file KalmanFilter.cpp.

◆ reset()

void NAV::SPP::KalmanFilter::reset ( const std::vector< SatelliteSystem > & satelliteSystems)

Resets the filter.

Parameters
satelliteSystemsSatellite systems to consider

Definition at line 33 of file KalmanFilter.cpp.

◆ setClockBiasErrorCovariance()

void NAV::SPP::KalmanFilter::setClockBiasErrorCovariance ( double clkPhaseDrift)

Set the P matrix entry for the covariance of the clock phase drift.

Parameters
clkPhaseDriftClock phase drift variance in [m^2 / s]

Definition at line 278 of file KalmanFilter.cpp.

◆ ShowGuiWidgets()

bool NAV::SPP::KalmanFilter::ShowGuiWidgets ( const char * id,
bool useDoppler,
bool multiConstellation,
bool estimateInterFrequencyBiases,
float itemWidth,
float unitWidth )

Shows the GUI input to select the options.

Parameters
[in]idUnique id for ImGui.
[in]useDopplerWhether to use doppler measurements
[in]multiConstellationWhether to use multiple constellations
[in]estimateInterFrequencyBiasesWhether to use estimate inter frequency biases
[in]itemWidthWidth of the widgets
[in]unitWidthWidth on unit inputs
Returns
True when something was changed

Definition at line 197 of file KalmanFilter.cpp.

◆ update()

void NAV::SPP::KalmanFilter::update ( const std::vector< Meas::MeasKeyTypes > & measKeys,
const KeyedMatrixXd< Meas::MeasKeyTypes, States::StateKeyType > & H,
const KeyedMatrixXd< Meas::MeasKeyTypes, Meas::MeasKeyTypes > & R,
const KeyedVectorXd< Meas::MeasKeyTypes > & dz,
const std::string & nameId )

Does the Kalman Filter update.

Parameters
[in]measKeysMeasurement keys
[in]HMeasurement sensitivity matrix 𝐇
[in]RMeasurement noise covariance matrix 𝐑
[in]dzMeasurement innovation 𝜹𝐳
[in]nameIdName and id of the node calling this (only used for logging purposes)

Definition at line 168 of file KalmanFilter.cpp.

Friends And Related Symbol Documentation

◆ from_json

void from_json ( const json & j,
KalmanFilter & data )
friend

Converts the provided json object into the data object.

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

Definition at line 314 of file KalmanFilter.cpp.

◆ to_json

void to_json ( json & j,
const KalmanFilter & data )
friend

Converts the provided data into a json object.

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

Definition at line 304 of file KalmanFilter.cpp.

Field Documentation

◆ _gui_initCovarianceClockDrift

double NAV::SPP::KalmanFilter::_gui_initCovarianceClockDrift
private

GUI selection for the P matrix initialization clock drift uncertainty.

Definition at line 150 of file KalmanFilter.hpp.

◆ _gui_initCovarianceClockDriftUnit

InitCovarianceClockDriftUnits NAV::SPP::KalmanFilter::_gui_initCovarianceClockDriftUnit
private

Gui selection for the Unit of the P matrix initialization clock drift uncertainty.

Definition at line 147 of file KalmanFilter.hpp.

◆ _gui_initCovarianceInterSysClockDrift

double NAV::SPP::KalmanFilter::_gui_initCovarianceInterSysClockDrift
private

GUI selection for the P matrix initialization inter system clock drift uncertainty.

Definition at line 160 of file KalmanFilter.hpp.

◆ _gui_initCovarianceInterSysClockDriftUnit

InitCovarianceClockDriftUnits NAV::SPP::KalmanFilter::_gui_initCovarianceInterSysClockDriftUnit
private

Gui selection for the Unit of the P matrix initialization inter system clock drift uncertainty.

Definition at line 157 of file KalmanFilter.hpp.

◆ _gui_initCovarianceVelocity

double NAV::SPP::KalmanFilter::_gui_initCovarianceVelocity
private

GUI selection for the P matrix initialization velocity uncertainty.

Definition at line 132 of file KalmanFilter.hpp.

◆ _gui_initCovarianceVelocityUnit

InitCovarianceVelocityUnits NAV::SPP::KalmanFilter::_gui_initCovarianceVelocityUnit
private

Gui selection for the Unit of the P matrix initialization velocity uncertainty.

Definition at line 129 of file KalmanFilter.hpp.

◆ _initCovarianceClockDrift

double NAV::SPP::KalmanFilter::_initCovarianceClockDrift
private

Covariance of the P matrix initialization clock drift uncertainty [m²/s²].

Definition at line 152 of file KalmanFilter.hpp.

◆ _initCovarianceInterSysClockDrift

double NAV::SPP::KalmanFilter::_initCovarianceInterSysClockDrift
private

Covariance of the P matrix initialization inter system clock drift uncertainty [m²/s²].

Definition at line 162 of file KalmanFilter.hpp.

◆ _initCovarianceVelocity

double NAV::SPP::KalmanFilter::_initCovarianceVelocity
private

Covariance of the P matrix initialization velocity uncertainty [m²/s²].

Definition at line 134 of file KalmanFilter.hpp.

◆ _initialized

bool NAV::SPP::KalmanFilter::_initialized
private

Boolean that determines, if Kalman Filter is initialized (from weighted LSE solution)

Definition at line 113 of file KalmanFilter.hpp.

◆ _interFrequencyBiasModel

InterFrequencyBiasModel<SPP::States::StateKeyType> NAV::SPP::KalmanFilter::_interFrequencyBiasModel
private

Inter-frequency bias Model.

Definition at line 118 of file KalmanFilter.hpp.

◆ _kalmanFilter

KeyedKalmanFilterD<SPP::States::StateKeyType, SPP::Meas::MeasKeyTypes> NAV::SPP::KalmanFilter::_kalmanFilter
private

Kalman Filter representation.

Definition at line 110 of file KalmanFilter.hpp.

◆ _motionModel

MotionModel<SPP::States::StateKeyType> NAV::SPP::KalmanFilter::_motionModel
private

Motion Model.

Definition at line 116 of file KalmanFilter.hpp.

◆ _receiverClockModel

ReceiverClockModel<SPP::States::StateKeyType> NAV::SPP::KalmanFilter::_receiverClockModel
private

Receiver clock Model.

Definition at line 117 of file KalmanFilter.hpp.

◆ _systemModelCalcAlgorithm

SystemModelCalcAlgorithm NAV::SPP::KalmanFilter::_systemModelCalcAlgorithm
private

Algorithm to calculate the system models with.

Definition at line 115 of file KalmanFilter.hpp.

◆ PosVelKey

const std::array<SPP::States::StateKeyType, 6>& NAV::SPP::KalmanFilter::PosVelKey
private

All position and velocity keys.

Definition at line 107 of file KalmanFilter.hpp.

◆ VelKey

const std::array<SPP::States::StateKeyType, 3>& NAV::SPP::KalmanFilter::VelKey
private

All velocity keys.

Definition at line 105 of file KalmanFilter.hpp.


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