AP_NavEKF3: optical flow fusion checks source

This commit is contained in:
Randy Mackay 2020-08-17 21:03:19 +09:00
parent 4cadaa5194
commit 8a56ce49be
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ void NavEKF3_core::SelectFlowFusion()
// Fuse optical flow data into the main filter
if (flowDataToFuse && tiltOK) {
if (frontend->_flowUse == FLOW_USE_NAV) {
if ((frontend->_flowUse == FLOW_USE_NAV) && (frontend->_sources.getVelXYSource() == AP_NavEKF_Source::SourceXY::OPTFLOW)) {
// Set the flow noise used by the fusion processes
R_LOS = sq(MAX(frontend->_flowNoise, 0.05f));
// Fuse the optical flow X and Y axis data into the main filter sequentially