mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-12 15:57:35 +08:00
EKF: fix bug causing height offset when GPS use stops
This bug causes the last vertical velocity observation to be continuously fused.
This commit is contained in:
committed by
Lorenz Meier
parent
b227aca4a8
commit
75e65901ae
@@ -183,7 +183,7 @@ void Ekf::fuseVelPosHeight()
|
||||
innov_check_pass_map[5] = (_vel_pos_test_ratio[5] <= 1.0f) || !_control_status.flags.tilt_align;
|
||||
|
||||
// record the successful velocity fusion event
|
||||
if ((_fuse_hor_vel || _fuse_hor_vel_aux) && vel_check_pass) {
|
||||
if ((_fuse_hor_vel || _fuse_hor_vel_aux || _fuse_vert_vel) && vel_check_pass) {
|
||||
_time_last_vel_fuse = _time_last_imu;
|
||||
_innov_check_fail_status.flags.reject_vel_NED = false;
|
||||
|
||||
@@ -191,7 +191,7 @@ void Ekf::fuseVelPosHeight()
|
||||
_innov_check_fail_status.flags.reject_vel_NED = true;
|
||||
}
|
||||
|
||||
_fuse_hor_vel = _fuse_hor_vel_aux = false;
|
||||
_fuse_hor_vel = _fuse_hor_vel_aux = _fuse_vert_vel = false;
|
||||
|
||||
// record the successful position fusion event
|
||||
if (pos_check_pass && _fuse_pos) {
|
||||
|
||||
Reference in New Issue
Block a user