mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 05:53:33 +08:00
range aid: switch to baro/gps even if rng aid conditions met and rng faulty
This commit is contained in:
committed by
ChristophTobler
parent
2f382c8e0e
commit
066c641d61
+6
-2
@@ -730,9 +730,11 @@ void Ekf::controlHeightFusion()
|
||||
}
|
||||
}
|
||||
|
||||
} else if (_baro_data_ready && !_baro_hgt_faulty && !_in_range_aid_mode) {
|
||||
} else if (_baro_data_ready && !_baro_hgt_faulty &&
|
||||
!(_in_range_aid_mode && !_range_data_ready && !_rng_hgt_faulty)) {
|
||||
setControlBaroHeight();
|
||||
_fuse_height = true;
|
||||
_in_range_aid_mode = false;
|
||||
|
||||
// we have just switched to using baro height, we don't need to set a height sensor offset
|
||||
// since we track a separate _baro_hgt_offset
|
||||
@@ -785,9 +787,11 @@ void Ekf::controlHeightFusion()
|
||||
}
|
||||
}
|
||||
|
||||
} else if (_gps_data_ready && !_gps_hgt_faulty && !_in_range_aid_mode) {
|
||||
} else if (_gps_data_ready && !_gps_hgt_faulty &&
|
||||
!(_in_range_aid_mode && !_range_data_ready && !_rng_hgt_faulty)) {
|
||||
setControlGPSHeight();
|
||||
_fuse_height = true;
|
||||
_in_range_aid_mode = false;
|
||||
|
||||
// we have just switched to using gps height, calculate height sensor offset such that current
|
||||
// measurment matches our current height estimate
|
||||
|
||||
Reference in New Issue
Block a user