mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 06:43:34 +08:00
EKF: Fix bug in calculation of terrain estimator Kalman gain
This commit is contained in:
@@ -104,7 +104,7 @@ void Ekf::fuseHagl()
|
||||
|
||||
if (test_ratio <= 1.0f) {
|
||||
// calculate the Kalman gain
|
||||
float gain = obs_variance / _hagl_innov_var;
|
||||
float gain = _terrain_var / _hagl_innov_var;
|
||||
// correct the state
|
||||
_terrain_vpos -= gain * _hagl_innov;
|
||||
// correct the variance
|
||||
|
||||
Reference in New Issue
Block a user