0.2.0
Loading...
Searching...
No Matches
IRWKF.hpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
13
14#pragma once
15
16#include "util/Eigen.hpp"
17#include "../PinData.hpp"
20
21#include <vector>
22
23// TODO: Refactor: 'NAV::ImuFusion::IRWKF'
24namespace NAV::IRWKF
25{
30[[nodiscard]] Eigen::MatrixXd initialStateTransitionMatrix_Phi(const double& dt, const uint8_t& numStates);
31
37[[nodiscard]] Eigen::MatrixXd initialErrorCovarianceMatrix_P0(const std::vector<Eigen::Vector3d>& initCovariances, const uint8_t& numStates, const bool& imuCharacteristicsIdentical = false);
38
45void processNoiseMatrix_Q(Eigen::MatrixXd& Q, const double& dt, const std::vector<Eigen::VectorXd>& processNoiseVariances, const uint8_t& numStates, const bool& imuCharacteristicsIdentical = false);
46
50void stateTransitionMatrix_Phi(Eigen::MatrixXd& Phi, const double& dt);
51
61[[nodiscard]] Eigen::MatrixXd designMatrix_H(const Eigen::Matrix3d& DCM_accel,
62 const Eigen::Matrix3d& DCM_gyro,
63 const size_t& pinIndex,
64 const uint8_t& numMeasurements,
65 const uint8_t& numStates,
66 const uint8_t& numStatesEst,
67 const uint8_t& numStatesPerPin);
68
80KalmanFilter initializeKalmanFilterManually(const size_t& numInputPins,
81 const std::vector<PinData>& pinData,
82 const PinDataIRWKF& pinDataIRWKF,
83 const uint8_t& numStates,
84 const double& dtInit,
85 std::vector<Eigen::VectorXd>& processNoiseVariances,
86 KalmanFilter& kalmanFilter,
87 const bool& imuCharacteristicsIdentical,
88 const bool& imuBiasesIdentical);
89
104 const std::vector<PinData>& pinData,
105 const PinDataIRWKF& pinDataIRWKF,
106 const std::vector<size_t>& cumulatedPinIds,
107 const std::vector<std::shared_ptr<const NAV::ImuObs>>& cumulatedImuObs,
108 const bool& initJerkAngAcc,
109 const double& dtInit,
110 const uint8_t& numStates,
111 const uint8_t& numMeasurements,
112 std::vector<Eigen::VectorXd>& processNoiseVariances,
113 KalmanFilter& kalmanFilter);
114
119Eigen::Vector3d mean(const std::vector<std::vector<double>>& sensorType, const size_t& containerPos);
120
125Eigen::Vector3d variance(const std::vector<std::vector<double>>& sensorType, const size_t& containerPos);
126} // namespace NAV::IRWKF
Vector space operations.
void stateTransitionMatrix_Phi(Eigen::MatrixXd &Phi, const double &dt)
Calculates the state-transition-matrix 𝚽
KalmanFilter initializeKalmanFilterAuto(const size_t &nInputPins, const std::vector< PinData > &pinData, const PinDataIRWKF &pinDataIRWKF, const std::vector< size_t > &cumulatedPinIds, const std::vector< std::shared_ptr< const NAV::ImuObs > > &cumulatedImuObs, const bool &initJerkAngAcc, const double &dtInit, const uint8_t &numStates, const uint8_t &numMeasurements, std::vector< Eigen::VectorXd > &processNoiseVariances, KalmanFilter &kalmanFilter)
Initializes the IRWKF automatically, i.e. init values are calculated by averaging the data in the fir...
Eigen::MatrixXd initialStateTransitionMatrix_Phi(const double &dt, const uint8_t &numStates)
Calculates the state-transition-matrix 𝚽
Eigen::Vector3d mean(const std::vector< std::vector< double > > &sensorType, const size_t &containerPos)
Calculates the mean values of each axis in a vector that contains 3d measurements of a certain sensor...
Eigen::Vector3d variance(const std::vector< std::vector< double > > &sensorType, const size_t &containerPos)
Calculates the variance of each axis in a vector that contains 3d measurements of a certain sensor ty...
Parent Class for all IMU Observations.
Generalized Kalman Filter class.
Information about a sensor which is connected to a certain pin.
Generalized Kalman Filter class.
Definition KalmanFilter.hpp:25
Sensor information specific to the IRW-KF.
Definition PinData.hpp:105