27 ,
float *process_noise,
float *measurement_noise)
63 Xprev[0][0] = state[0];
64 Xprev[1][0] = state[1];
67 float _Pprevious[2][2];
69 Pprevious[0][0] = covariance[0];
70 Pprevious[0][1] = covariance[1];
71 Pprevious[1][0] = covariance[2];
72 Pprevious[1][1] = covariance[3];
77 Z[0][0] = measurements[0];
78 Z[1][0] = measurements[1];
83 Q[0][0] = process_noise[0];
86 Q[1][1] = process_noise[1];
91 R[0][0] = measurement_noise[0];
94 R[1][1] = measurement_noise[1];
97 float _Xpredict[2][1];
102 float _Ppredict[2][2];
117 float _temp_mat[2][2];
119 float _temp_mat2[2][2];
121 float _temp_mat3[2][2];
124 float _temp_vec[2][1];
126 float _temp_vec2[2][1];
161 float det_temp2 = 1 / (temp_mat3[0][0] * temp_mat3[1][1] - temp_mat3[0][1] * temp_mat3[1][0]);
162 temp_mat2[0][0] = det_temp2 * (temp_mat3[1][1]);
163 temp_mat2[0][1] = det_temp2 * (-1 * temp_mat3[1][0]);
164 temp_mat2[1][0] = det_temp2 * (-1 * temp_mat3[0][1]);
165 temp_mat2[1][1] = det_temp2 * (temp_mat3[0][0]);
197 covariance[0] = Pnext[0][0];
198 covariance[1] = Pnext[0][1];;
199 covariance[2] = Pnext[1][0];;
200 covariance[3] = Pnext[1][1];;
203 state[0] = Xnext[0][0];
204 state[1] = Xnext[1][0];
static void float_mat_transpose(float **a, int n)
transpose square matrix
#define MAKE_MATRIX_PTR(_ptr, _mat, _rows)
Make a pointer to a matrix of _rows lines.
static gazebo::physics::ModelPtr model
void kalman_filter_linear_2D_float(float *model, float *measurements, float *covariance, float *state, float *process_noise, float *measurement_noise)
A simple linear 2D kalman filter, computed using floats and matrices.
static void float_mat_copy(float **a, float **b, int m, int n)
a = b
static void float_mat_diff(float **o, float **a, float **b, int m, int n)
o = a - b
Paparazzi floating point algebra.
static struct FloatVect3 H
static void float_mat_sum(float **o, float **a, float **b, int m, int n)
o = a + b
static void float_mat_mul(float **o, float **a, float **b, int m, int n, int l)
o = a * b