mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-peak.git
synced 2025-08-06 13:27:34 +00:00
Add: Dynamic KF and remove timesteps from normal KF
This commit is contained in:
39
include/sta/math/algorithms/dynamicKalmanFilter.hpp
Normal file
39
include/sta/math/algorithms/dynamicKalmanFilter.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef DYNAMIC_KALMAN_FILTER_HPP
|
||||
#define DYNAMIC_KALMAN_FILTER_HPP
|
||||
#include <sta/math/linalg/matrix.hpp>
|
||||
|
||||
namespace math
|
||||
{
|
||||
|
||||
struct KalmanState
|
||||
{
|
||||
matrix error;
|
||||
matrix x;
|
||||
};
|
||||
|
||||
class DynamicKalmanFilter
|
||||
{
|
||||
private:
|
||||
matrix A_;
|
||||
matrix T_;
|
||||
matrix B_;
|
||||
matrix C_;
|
||||
matrix Q_;
|
||||
matrix R_;
|
||||
uint8_t n_;
|
||||
matrix identity_;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
DynamicKalmanFilter(matrix, matrix, matrix, matrix, matrix, matrix);
|
||||
~DynamicKalmanFilter();
|
||||
KalmanState predict(float, KalmanState, matrix);
|
||||
KalmanState correct(KalmanState, matrix);
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // DYNAMIC_KALMAN_FILTER_HPP
|
@@ -27,8 +27,8 @@ private:
|
||||
public:
|
||||
KalmanFilter(matrix, matrix, matrix, matrix, matrix);
|
||||
~KalmanFilter();
|
||||
KalmanState predict(float, KalmanState, matrix);
|
||||
KalmanState correct(float,KalmanState, matrix);
|
||||
KalmanState predict(KalmanState, matrix);
|
||||
KalmanState correct(KalmanState, matrix);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user