mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 00:03:34 +08:00
mag_control: fuse fake heading during leveling fine alignment (#17964)
Co-authored-by: Daniel Agar <daniel@agar.ca>
This commit is contained in:
co-authored by
Daniel Agar
parent
f2ae8ae814
commit
17ebcd2456
@@ -781,6 +781,11 @@ void Ekf::fuseHeading()
|
||||
// Vehicle is at rest so use the last moving prediction as an observation
|
||||
// to prevent the heading from drifting and to enable yaw gyro bias learning
|
||||
// before takeoff.
|
||||
|
||||
if (!PX4_ISFINITE(_last_static_yaw)) {
|
||||
_last_static_yaw = predicted_hdg;
|
||||
}
|
||||
|
||||
measured_hdg = _last_static_yaw;
|
||||
|
||||
}
|
||||
@@ -836,6 +841,11 @@ void Ekf::fuseHeading()
|
||||
// Vehicle is at rest so use the last moving prediction as an observation
|
||||
// to prevent the heading from drifting and to enable yaw gyro bias learning
|
||||
// before takeoff.
|
||||
|
||||
if (!PX4_ISFINITE(_last_static_yaw)) {
|
||||
_last_static_yaw = predicted_hdg;
|
||||
}
|
||||
|
||||
measured_hdg = _last_static_yaw;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user