lpe: small fixes

This commit is contained in:
TSC21
2017-11-03 23:45:43 +01:00
committed by Lorenz Meier
parent e6efb5ec0a
commit 691c35f47e
5 changed files with 14 additions and 11 deletions
@@ -170,7 +170,7 @@ void BlockLocalPositionEstimator::flowCorrect()
Vector<float, 2> r = y - C * _x;
// residual covariance
Matrix<float, n_y_flow, n_y_flow> S = C * _P * C.transpose()) + R;
Matrix<float, n_y_flow, n_y_flow> S = C * _P * C.transpose() + R;
// publish innovations
_pub_innov.get().flow_innov[0] = r(0);
@@ -179,7 +179,7 @@ void BlockLocalPositionEstimator::flowCorrect()
_pub_innov.get().flow_innov_var[1] = S(1, 1);
// residual covariance, (inverse)
Matrix<float, n_y_flow, n_y_flow> S_I = inv(C);
Matrix<float, n_y_flow, n_y_flow> S_I = inv<float, n_y_flow>(S);
// fault detection
float beta = (r.transpose() * (S_I * r))(0, 0);