mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 15:43:33 +08:00
lpe: fix innovation covariance publishing
This commit is contained in:
@@ -168,14 +168,18 @@ void BlockLocalPositionEstimator::flowCorrect()
|
||||
|
||||
// residual
|
||||
Vector<float, 2> r = y - C * _x;
|
||||
|
||||
// residual covariance
|
||||
Matrix<float, n_y_flow, n_y_flow> S = C * _P * C.transpose()) + R;
|
||||
|
||||
// publish innovations
|
||||
_pub_innov.get().flow_innov[0] = r(0);
|
||||
_pub_innov.get().flow_innov[1] = r(1);
|
||||
_pub_innov.get().flow_innov_var[0] = R(0, 0);
|
||||
_pub_innov.get().flow_innov_var[1] = R(1, 1);
|
||||
_pub_innov.get().flow_innov_var[0] = S(0, 0);
|
||||
_pub_innov.get().flow_innov_var[1] = S(1, 1);
|
||||
|
||||
// residual covariance, (inverse)
|
||||
Matrix<float, n_y_flow, n_y_flow> S_I =
|
||||
inv<float, n_y_flow>(C * _P * C.transpose() + R);
|
||||
Matrix<float, n_y_flow, n_y_flow> S_I = inv(C);
|
||||
|
||||
// fault detection
|
||||
float beta = (r.transpose() * (S_I * r))(0, 0);
|
||||
|
||||
Reference in New Issue
Block a user