More filter testing.

This commit is contained in:
jgoppert
2015-11-04 20:58:56 -05:00
parent 76cf91c5fd
commit eddc55827a
2 changed files with 16 additions and 10 deletions
+10 -10
View File
@@ -6,17 +6,17 @@ namespace matrix {
template<typename Type, size_t M, size_t N>
void kalman_correct(
const Matrix<Type, M, M> & P,
const Matrix<Type, N, M> & C,
const Matrix<Type, N, N> & R,
const Vector<Type, N> &r,
Vector<Type, M> & dx,
float & beta
)
const Matrix<Type, M, M> & P,
const Matrix<Type, N, M> & C,
const Matrix<Type, N, N> & R,
const Vector<Type, N> &r,
Vector<Type, M> & dx,
float & beta
)
{
SquareMatrix<Type, N> S_I = SquareMatrix<Type, N>(C*P*C.T() + R).I();
dx = P*C.T()*S_I*r;
beta = Scalar<Type>(r.T()*S_I*r);
SquareMatrix<Type, N> S_I = SquareMatrix<Type, N>(C*P*C.T() + R).I();
dx = P*C.T()*S_I*r;
beta = Scalar<Type>(r.T()*S_I*r);
}
}; // namespace matrix