51 [[nodiscard]] std::string
type()
const override;
72 constexpr static size_t OUTPUT_PORT_INDEX_COMBINED_SIGNAL = 0;
73 constexpr static size_t OUTPUT_PORT_INDEX_BIASES = 1;
76 bool initialize()
override;
79 void deinitialize()
override;
82 void updateNumberOfInputPins();
85 void initializeMountingAngles();
100 [[nodiscard]]
static Eigen::MatrixXd measurementNoiseMatrix_R_adaptive(
double alpha,
101 const Eigen::MatrixXd& R,
102 const Eigen::VectorXd& e,
103 const Eigen::MatrixXd& H,
104 const Eigen::MatrixXd& P);
112 void measurementNoiseMatrix_R(Eigen::MatrixXd& R,
size_t pinIndex = 0)
const;
116 void combineSignals(
const std::shared_ptr<const ImuObs>& imuObs);
120 size_t _nInputPins = 2;
123 const uint8_t _numStatesEstIRWKF = 12;
126 const uint8_t _numStatesEstBsplineKF = 18;
129 const uint8_t _numBsplines = 9;
132 const uint8_t _numStatesPerPin = 6;
135 const uint8_t _numMeasurements = 6;
138 uint8_t _numStatesEst{};
141 uint8_t _numStates = 12;
144 KalmanFilter _kalmanFilter{ _numStates, _numMeasurements };
148 double _imuFrequency{ 100 };
151 double _averageEndTime{ 1 };
157 bool _autoInitKF =
true;
160 bool _imuCharacteristicsIdentical =
true;
163 bool _imuBiasesIdentical =
true;
166 std::vector<std::shared_ptr<const NAV::ImuObs>> _cumulatedImuObs;
169 std::vector<size_t> _cumulatedPinIds;
172 bool _initJerkAngAcc =
true;
175 bool _kfInitialized =
false;
179 std::vector<PinData> _pinData;
181 PinDataIRWKF _pinDataIRWKF;
183 PinDataBsplineKF _pinDataBsplineKF;
186 Eigen::Vector3d _initCoeffsAngRateTemp{};
188 Eigen::Vector3d _initCoeffsAccelTemp{};
190 Eigen::Vector3d _initCovarianceCoeffsAngRateTemp{};
192 Eigen::Vector3d _initCovarianceCoeffsAccelTemp{};
194 Eigen::Vector3d _procNoiseCoeffsAngRateTemp{};
196 Eigen::Vector3d _procNoiseCoeffsAccelTemp{};
199 std::vector<Eigen::Vector3d> _biasCovariances;
201 std::vector<Eigen::VectorXd> _processNoiseVariances;
203 std::vector<Eigen::Vector3d> _measurementNoiseVariances;
206 std::vector<Eigen::Matrix3d> _imuRotations_accel;
209 std::vector<Eigen::Matrix3d> _imuRotations_gyro;
213 InsTime _latestTimestamp{};
216 InsTime _firstTimestamp{};
219 double _timeSinceStartup{};
222 double _latestKnot{};
225 double _splineSpacing = 1.0;
229 bool _checkKalmanMatricesRanks =
false;
232 bool _imuPosSet =
false;
235 enum class ImuFusionType
244 friend constexpr const char*
to_string(ImuFusionType value);
247 ImuFusionType _imuFusionType = ImuFusionType::Bspline;
friend constexpr const char * to_string(ImuFusionType value)
Converts the enum to a string.
Definition ImuFusion.hpp:250