82 float tmp[filter->
n][filter->
n];
113 float S[filter->
m][filter->
m];
114 float K[filter->
n][filter->
m];
115 float tmp1[filter->
n][filter->
m];
116 float tmp2[filter->
n][filter->
n];
141 float err[filter->
n];
142 float dx_err[filter->
n];
static void float_mat_mul_transpose(float **o, float **a, float **b, int m, int n, int l)
o = a * b'
static void float_vect_sum(float *o, const float *a, const float *b, const int n)
o = a + b
static void float_vect_zero(float *a, const int n)
a = 0
static void float_mat_diff(float **o, float **a, float **b, int m, int n)
o = a - b
static void float_mat_sum(float **o, float **a, float **b, int m, int n)
o = a + b
static void float_mat_vect_mul(float *o, float **a, float *b, int m, int n)
o = a * b
static void float_mat_mul_copy(float **o, float **a, float **b, int m, int n, int l)
o = a * b
static void float_mat_zero(float **a, int m, int n)
a = 0
static void float_mat_mul(float **o, float **a, float **b, int m, int n, int l)
o = a * b
static void float_vect_diff(float *o, const float *a, const float *b, const int n)
o = a - b
#define MAKE_MATRIX_PTR(_ptr, _mat, _rows)
Make a pointer to a matrix of _rows lines.
void float_mat_invert(float **o, float **mat, int n)
Calculate inverse of any n x n matrix (passed as C array) o = mat^-1 Algorithm verified with Matlab.
bool linear_kalman_filter_init(struct linear_kalman_filter *filter, uint8_t n, uint8_t c, uint8_t m)
Init all matrix and vectors to zero.
void linear_kalman_filter_predict(struct linear_kalman_filter *filter, float *U)
Prediction step.
void linear_kalman_filter_update(struct linear_kalman_filter *filter, float *Y)
Update step.
#define KF_MAX_STATE_SIZE
float C[KF_MAX_MEAS_SIZE][KF_MAX_STATE_SIZE]
observation matrix
uint8_t n
state vector size (<= KF_MAX_STATE_SIZE)
float R[KF_MAX_MEAS_SIZE][KF_MAX_MEAS_SIZE]
measurement covariance noise
uint8_t m
measurement vector size (<= KF_MAX_MEAS_SIZE)
float X[KF_MAX_STATE_SIZE]
estimated state X
uint8_t c
command vector size (<= KF_MAX_CMD_SIZE)
float P[KF_MAX_STATE_SIZE][KF_MAX_STATE_SIZE]
state covariance matrix
float A[KF_MAX_STATE_SIZE][KF_MAX_STATE_SIZE]
dynamic matrix
float B[KF_MAX_STATE_SIZE][KF_MAX_CMD_SIZE]
command matrix
float Q[KF_MAX_STATE_SIZE][KF_MAX_STATE_SIZE]
proces covariance noise
Paparazzi floating point algebra.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.