Skip to content

Commit

Permalink
AP_NavEKF3: align visodom yaw if using optflow and no yaw src
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Nov 21, 2024
1 parent 052ace1 commit be3a499
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/AP_NavEKF/AP_NavEKF_Source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ void AP_NavEKF_Source::align_inactive_sources()
if ((getYawSource() == SourceYaw::COMPASS) ||
(getYawSource() == SourceYaw::GPS) ||
(getYawSource() == SourceYaw::GPS_COMPASS_FALLBACK) ||
(getYawSource() == SourceYaw::GSF)) {
(getYawSource() == SourceYaw::GSF) ||
((getYawSource() == SourceYaw::NONE) && option_is_set(SourceOptions::ALIGN_EXTNAV_POS_WHEN_USING_OPTFLOW))) {
for (uint8_t i=0; i<AP_NAKEKF_SOURCE_SET_MAX; i++) {
if (_source_set[i].yaw == SourceYaw::EXTNAV) {
// ExtNav could potentially be used, so align it
Expand Down

0 comments on commit be3a499

Please sign in to comment.