Work on filter.

This commit is contained in:
jgoppert
2015-11-04 20:56:44 -05:00
parent 52956e360a
commit 76cf91c5fd
2 changed files with 9 additions and 6 deletions
+1
View File
@@ -22,6 +22,7 @@ set(CMAKE_CXX_FLAGS
-Wall -Wall
-Weffc++ -Weffc++
-Werror -Werror
-std=c++11
#-Wfatal-errors #-Wfatal-errors
) )
+8 -6
View File
@@ -10,17 +10,19 @@ int main()
{ {
const size_t n_x = 6; const size_t n_x = 6;
const size_t n_y = 5; const size_t n_y = 5;
SquareMatrix<float, n_x> P = eye<float, n_x>()*0.1; SquareMatrix<float, n_x> P = eye<float, n_x>();
SquareMatrix<float, n_y> R = eye<float, n_y>()*0.1; SquareMatrix<float, n_y> R = eye<float, n_y>();
Matrix<float, n_y, n_x> C; Matrix<float, n_y, n_x> C;
C(0,0) = 1; C.setIdentity();
Vector<float, n_y> r; float data[] = {1,2,3,4,5};
r.setZero(); Vector<float, n_y> r(data);
r(0) = 1;
Vector<float, n_x> dx; Vector<float, n_x> dx;
float beta = 0; float beta = 0;
kalman_correct<float, 6, 5>(P, C, R, r, dx, beta); kalman_correct<float, 6, 5>(P, C, R, r, dx, beta);
dx.print();
return 0; return 0;
} }