mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 15:40:31 +08:00
do not reset yaw if vehicle on ground
This commit is contained in:
committed by
Paul Riseborough
parent
14227eaf1d
commit
c4492b17c1
+1
-1
@@ -1379,7 +1379,7 @@ void Ekf::controlMagFusion()
|
||||
|
||||
// We need to reset the yaw angle after climbing away from the ground to enable
|
||||
// recovery from ground level magnetic interference.
|
||||
if (!_control_status.flags.mag_align_complete) {
|
||||
if (!_control_status.flags.mag_align_complete && _control_status.flags.in_air) {
|
||||
// Check if height has increased sufficiently to be away from ground magnetic anomalies
|
||||
// and request a yaw reset if not already requested.
|
||||
float terrain_vpos_estimate = get_terrain_valid() ? _terrain_vpos : _last_on_ground_posD;
|
||||
|
||||
Reference in New Issue
Block a user