42 void reset(
const std::vector<SatelliteSystem>& satelliteSystems);
59 void predict(
const double& dt,
const Eigen::Vector3d& lla_pos,
const std::string& nameId);
67 void update(
const std::vector<Meas::MeasKeyTypes>& measKeys,
71 const std::string& nameId);
85 bool ShowGuiWidgets(
const char*
id,
bool useDoppler,
bool multiConstellation,
bool estimateInterFrequencyBiases,
float itemWidth,
float unitWidth);
92 [[nodiscard]]
const std::vector<SPP::States::StateKeyType>&
getStateKeys()
const;
nlohmann::json json
json namespace
Keys for the SPP algorithm for use inside the KeyedMatrices.
The class is responsible for all time-related tasks.
Inter Frequency Bias System Model.
Kalman Filter with keyed states.
Receiver Clock System Model.
Structs identifying a unique satellite.
Frequency definition for different satellite systems.
static constexpr double C
Speed of light [m/s].
Inter Frequency Bias System Model.
Receiver Clock System Model.
The Spp Kalman Filter related options.
MotionModel< SPP::States::StateKeyType > _motionModel
Motion Model.
InitCovarianceClockDriftUnits _gui_initCovarianceClockDriftUnit
Gui selection for the Unit of the P matrix initialization clock drift uncertainty.
void deinitialize()
Deinitialize the KF (can be used to reinitialize the Filter when results seem strange)
void setClockBiasErrorCovariance(double clkPhaseDrift)
Set the P matrix entry for the covariance of the clock phase drift.
const std::vector< SPP::States::StateKeyType > & getStateKeys() const
Get the States in the Kalman Filter.
const std::array< SPP::States::StateKeyType, 6 > & PosVelKey
All position and velocity keys.
void reset(const std::vector< SatelliteSystem > &satelliteSystems)
Resets the filter.
void predict(const double &dt, const Eigen::Vector3d &lla_pos, const std::string &nameId)
Does the Kalman Filter prediction.
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.
InitCovarianceVelocityUnits
Possible Units for the P matrix initialization velocity uncertainty.
const KeyedVectorXd< States::StateKeyType > & getState() const
Returns the State vector x̂
ReceiverClockModel< SPP::States::StateKeyType > _receiverClockModel
Receiver clock Model.
double _initCovarianceClockDrift
Covariance of the P matrix initialization clock drift uncertainty [m²/s²].
void initialize(const KeyedVectorXd< States::StateKeyType > &states, const KeyedMatrixXd< States::StateKeyType, States::StateKeyType > &variance)
Initialize the filter.
double _initCovarianceInterSysClockDrift
Covariance of the P matrix initialization inter system clock drift uncertainty [m²/s²].
void addInterFrequencyBias(const Frequency &freq)
Adds the frequency as inter-frequency bias state.
InitCovarianceClockDriftUnits _gui_initCovarianceInterSysClockDriftUnit
Gui selection for the Unit of the P matrix initialization inter system clock drift uncertainty.
SystemModelCalcAlgorithm _systemModelCalcAlgorithm
Algorithm to calculate the system models with.
friend void to_json(json &j, const KalmanFilter &data)
Converts the provided data into a json object.
InterFrequencyBiasModel< SPP::States::StateKeyType > _interFrequencyBiasModel
Inter-frequency bias Model.
InitCovarianceVelocityUnits _gui_initCovarianceVelocityUnit
Gui selection for the Unit of the P matrix initialization velocity uncertainty.
double _gui_initCovarianceVelocity
GUI selection for the P matrix initialization velocity uncertainty.
KeyedKalmanFilterD< SPP::States::StateKeyType, SPP::Meas::MeasKeyTypes > _kalmanFilter
Kalman Filter representation.
friend void from_json(const json &j, KalmanFilter &data)
Converts the provided json object into the data object.
double _gui_initCovarianceClockDrift
GUI selection for the P matrix initialization clock drift uncertainty.
const std::array< SPP::States::StateKeyType, 3 > & VelKey
All velocity keys.
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)
double _gui_initCovarianceInterSysClockDrift
GUI selection for the P matrix initialization inter system clock drift uncertainty.
bool ShowGuiWidgets(const char *id, bool useDoppler, bool multiConstellation, bool estimateInterFrequencyBiases, float itemWidth, float unitWidth)
Shows the GUI input to select the options.
InitCovarianceClockDriftUnits
Possible Units for the P matrix initialization clock drift uncertainty.
bool isInitialized() const
Checks wether the Kalman filter is initialized.
const KeyedMatrixXd< States::StateKeyType, States::StateKeyType > & getErrorCovarianceMatrix() const
Returns the Error covariance matrix 𝐏
constexpr std::array< StateKeyType, 6 > PosVel
Vector with all position and velocity keys.
constexpr std::array< StateKeyType, 3 > Vel
All velocity keys.
void to_json(json &j, const Algorithm &obj)
Converts the provided object into json.
void from_json(const json &j, Algorithm &obj)
Converts the provided json object into a node object.
KeyedVectorX< double, RowKeyType > KeyedVectorXd
Dynamic size KeyedVector with double types.
KeyedKalmanFilter< double, StateKeyType, MeasKeyType > KeyedKalmanFilterD
Keyed Kalman Filter class with double as type.
KeyedMatrixX< double, RowKeyType, ColKeyType > KeyedMatrixXd
Dynamic size KeyedMatrix with double types.
SystemModelCalcAlgorithm
Algorithms to calculate the system model with.