mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 15:23:34 +08:00
local_position_estimator: move to WQ and delete unused SubscriptionPollable
This commit is contained in:
@@ -109,7 +109,7 @@ void BlockLocalPositionEstimator::sonarCorrect()
|
||||
// residual
|
||||
Vector<float, n_y_sonar> r = y - C * _x;
|
||||
// residual covariance
|
||||
Matrix<float, n_y_sonar, n_y_sonar> S = C * _P * C.transpose() + R;
|
||||
Matrix<float, n_y_sonar, n_y_sonar> S = C * m_P * C.transpose() + R;
|
||||
|
||||
// publish innovations
|
||||
_pub_innov.get().hagl_innov = r(0);
|
||||
@@ -138,10 +138,10 @@ void BlockLocalPositionEstimator::sonarCorrect()
|
||||
// kalman filter correction if no fault
|
||||
if (!(_sensorFault & SENSOR_SONAR)) {
|
||||
Matrix<float, n_x, n_y_sonar> K =
|
||||
_P * C.transpose() * S_I;
|
||||
m_P * C.transpose() * S_I;
|
||||
Vector<float, n_x> dx = K * r;
|
||||
_x += dx;
|
||||
_P -= K * C * _P;
|
||||
m_P -= K * C * m_P;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user