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