48 [[nodiscard]] std::string
type()
const override;
51 [[nodiscard]]
static std::string
category();
58 [[nodiscard]]
json save()
const override;
98 const Eigen::MatrixXd& R,
99 const Eigen::VectorXd& e,
100 const Eigen::MatrixXd& H,
101 const Eigen::MatrixXd& P);
254 return "B-spline KF";
nlohmann::json json
json namespace
Parent Class for all IMU Observations.
Generalized Kalman Filter class.
Information about a sensor which is connected to a certain pin.
Widget to modify time point values.
KalmanFilter _kalmanFilter
Kalman Filter representation.
void updateNumberOfInputPins()
Adds/Deletes Input Pins depending on the variable _nInputPins.
std::vector< Eigen::Matrix3d > _imuRotations_accel
Rotations of all connected accelerometers - key: pinIndex, value: Rotation matrix of the acceleromete...
uint8_t _numStatesEst
Number of estimated states (depends on imuFusionType)
friend constexpr const char * to_string(ImuFusionType value)
Converts the enum to a string.
const uint8_t _numStatesEstIRWKF
Number of states estimated by the IRW-KF (angular rate, angular acceleration, specific force,...
void initializeMountingAngles()
Initializes the rotation matrices used for the mounting angles of the sensors.
std::string type() const override
String representation of the Class Type.
bool initialize() override
Initialize the node.
Eigen::Vector3d _procNoiseCoeffsAccelTemp
Temporary vector for the initial coefficients' process noise for the acceleration.
bool _kfInitialized
flag to check whether KF has been auto-initialized
bool _checkKalmanMatricesRanks
Check the rank of the Kalman matrices every iteration (computationally expensive)
bool _imuCharacteristicsIdentical
If the multiple IMUs have the same characteristics, GUI input cells can be reduced considerably.
std::vector< Eigen::Matrix3d > _imuRotations_gyro
Rotations of all connected gyros - key: pinIndex, value: Rotation matrix of the gyro platform to body...
Eigen::Vector3d _initCovarianceCoeffsAngRateTemp
Temporary vector for the initial coefficients' initial covariance for the angular rate.
std::vector< Eigen::Vector3d > _measurementNoiseVariances
Container for measurement noises of each sensor.
ImuFusion(const ImuFusion &)=delete
Copy constructor.
const uint8_t _numBsplines
Number of quadratic B-splines that make up the entire 3D stacked B-spline.
json save() const override
Saves the node into a json object.
void recvSignal(InputPin::NodeDataQueue &queue, size_t pinIdx)
Receive Function for the signal at the time tₖ
const uint8_t _numMeasurements
Number of measurements overall.
size_t _nInputPins
Number of input pins.
InsTime _lastFiltObs
Previous observation (for timestamp)
ImuFusion & operator=(const ImuFusion &)=delete
Copy assignment operator.
~ImuFusion() override
Destructor.
void measurementNoiseMatrix_R(Eigen::MatrixXd &R, size_t pinIndex=0) const
Calculates the initial measurement noise matrix R.
ImuPos _imuPos
Position and rotation information for conversion from platform to body frame.
InsTime _firstTimestamp
Saves the first timestamp in [s].
PinDataIRWKF _pinDataIRWKF
Stores IRW-KF specific parameter data.
Eigen::Vector3d _initCoeffsAccelTemp
Temporary vector for the initial coefficients for acceleration.
double _imuFrequency
Highest IMU sample rate in [Hz] (for time step in KF prediction)
std::vector< Eigen::Vector3d > _biasCovariances
Container for the bias covariances.
double _averageEndTime
Time until averaging ends and filtering starts in [s].
static std::string typeStatic()
String representation of the Class Type.
bool _imuPosSet
Check whether the combined solution has an '_imuPos' set.
static Eigen::MatrixXd measurementNoiseMatrix_R_adaptive(double alpha, const Eigen::MatrixXd &R, const Eigen::VectorXd &e, const Eigen::MatrixXd &H, const Eigen::MatrixXd &P)
Calculates the adaptive measurement noise matrix R.
static constexpr size_t OUTPUT_PORT_INDEX_BIASES
Flow (ImuBiases)
static constexpr size_t OUTPUT_PORT_INDEX_COMBINED_SIGNAL
Flow (ImuObs)
void guiConfig() override
ImGui config window which is shown on double click.
ImuFusion()
Default constructor.
std::vector< std::shared_ptr< const NAV::ImuObs > > _cumulatedImuObs
Container that collects all imuObs for averaging for auto-init of the KF.
void restore(const json &j) override
Restores the node from a json object.
static std::string category()
String representation of the Class Category.
Eigen::Vector3d _initCovarianceCoeffsAccelTemp
Temporary vector for the initial coefficients' initial covariance for the acceleration.
ImuFusion & operator=(ImuFusion &&)=delete
Move assignment operator.
std::vector< size_t > _cumulatedPinIds
Container that collects all pinIds for averaging for auto-init of the KF.
uint8_t _numStates
Number of states overall.
const uint8_t _numStatesEstBsplineKF
Number of states estimated by the B-spline KF (3 stacked B-splines in 3D for angular rate and specifi...
double _timeSinceStartup
Time since startup in [s].
bool _initJerkAngAcc
flag to determine how jerk and angular acceleration states are initialized if '_autoInitKF = true'
std::vector< Eigen::VectorXd > _processNoiseVariances
Container for process noise of each state.
void deinitialize() override
Deinitialize the node.
double _latestKnot
Latest knot in [s].
const uint8_t _numStatesPerPin
Number of states per pin (biases of accel and gyro)
ImuFusionType _imuFusionType
KF-type for the IMU fusion, selected in the GUI.
bool _autoInitKF
Auto-initialize the Kalman Filter - GUI setting.
ImuFusionType
Possible KF-types for the IMU fusion.
@ Bspline
B-spline Kalman filter.
@ IRWKF
IRW Kalman filter.
@ COUNT
Number of items in the enum.
double _splineSpacing
Time difference between two quadratic B-splines in the stacked B-spline.
std::vector< PinData > _pinData
Stores parameter data for each connected sensor.
Eigen::Vector3d _procNoiseCoeffsAngRateTemp
Temporary vector for the initial coefficients' process noise for the angular rate.
ImuFusion(ImuFusion &&)=delete
Move constructor.
void combineSignals(const std::shared_ptr< const ImuObs > &imuObs)
Combines the signals.
PinDataBsplineKF _pinDataBsplineKF
Stores Bspline-KF specific parameter data.
bool _imuBiasesIdentical
If the multiple IMUs have the same bias, GUI input cells can be reduced considerably.
InsTime _latestTimestamp
Saves the timestamp of the measurement before in [s].
InsTime _avgEndTime
Time until averaging ends and filtering starts as 'InsTime'.
Eigen::Vector3d _initCoeffsAngRateTemp
Temporary vector for the initial coefficients for angular rate.
Imu(const Imu &)=delete
Copy constructor.
The class is responsible for all time-related tasks.
Generalized Kalman Filter class.
const char * to_string(gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
Converts the enum to a string.
Sensor information specific to the Bspline-KF.
Sensor information specific to the IRW-KF.