HACK: do not trigger a mag reset after takeoff

This commit is contained in:
bresch
2023-01-12 15:25:19 +01:00
committed by fury1895
parent 34423a6c92
commit a460808774
+4 -1
View File
@@ -162,7 +162,10 @@ void Ekf::checkHaglYawResetReq()
// and request a yaw reset if not already requested.
static constexpr float mag_anomalies_max_hagl = 1.5f;
const bool above_mag_anomalies = (getTerrainVPos() - _state.pos(2)) > mag_anomalies_max_hagl;
_mag_yaw_reset_req = _mag_yaw_reset_req || above_mag_anomalies;
if (above_mag_anomalies) {
_control_status.flags.mag_aligned_in_flight = true;
}
}
}