Skip to content

Commit

Permalink
AP_NavEKF3: fixed external yaw EK3_MAG_CAL=5 or 6
Browse files Browse the repository at this point in the history
don't use GSF
  • Loading branch information
tridge committed May 4, 2020
1 parent f43e48a commit 0c1ba48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/AP_NavEKF3/AP_NavEKF3_MagFusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ void NavEKF3_core::SelectMagFusion()

// Handle case where we are not using a yaw sensor of any type and and attempt to reset the yaw in
// flight using the output from the GSF yaw estimator.
if (effectiveMagCal == MagCal::GSF_YAW || !use_compass()) {
if ((effectiveMagCal == MagCal::GSF_YAW || !use_compass()) &&
effectiveMagCal != MagCal::EXTERNAL_YAW &&
effectiveMagCal != MagCal::EXTERNAL_YAW_FALLBACK) {
if (!yawAlignComplete) {
yawAlignComplete = EKFGSF_resetMainFilterYaw();
}
Expand Down

0 comments on commit 0c1ba48

Please sign in to comment.