mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 15:53:33 +08:00
lpe: small fixes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user