mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 10:53:34 +08:00
ekf: add vehicle at rest to flags
This commit is contained in:
committed by
Mathieu Bresciani
parent
89bcebd631
commit
b6420d0b79
+1
-1
@@ -716,7 +716,7 @@ void Ekf::fuseHeading()
|
||||
if (_mag_use_inhibit) {
|
||||
// The magnetometer cannot be trusted but we need to fuse a heading to prevent a badly
|
||||
// conditioned covariance matrix developing over time.
|
||||
if (!_vehicle_at_rest) {
|
||||
if (!_control_status.flags.vehicle_at_rest) {
|
||||
// Vehicle is not at rest so fuse a zero innovation and record the
|
||||
// predicted heading to use as an observation when movement ceases.
|
||||
_heading_innov = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user