GPS Yaw: Always reset Yaw when GPS Yaw fusion is starting

Also avoid fusing fake mag data when an other source of yaw aiding
is active, even if in MAG_TYPE_NONE mode.
This commit is contained in:
bresch
2020-06-23 08:43:48 +02:00
committed by Mathieu Bresciani
parent ff8b5ec69d
commit 3c6790f5d5
6 changed files with 45 additions and 42 deletions
+9
View File
@@ -1634,6 +1634,15 @@ void Ekf::stopGpsVelFusion()
_gps_vel_test_ratio.setZero();
}
void Ekf::startGpsYawFusion()
{
_control_status.flags.mag_dec = false;
stopEvYawFusion();
stopMagHdgFusion();
stopMag3DFusion();
_control_status.flags.gps_yaw = true;
}
void Ekf::stopGpsYawFusion()
{
_control_status.flags.gps_yaw = false;