From 300ba65f6478709de27f331ef9557140f2f3cabb Mon Sep 17 00:00:00 2001 From: priseborough Date: Wed, 7 Jan 2015 12:35:05 +1100 Subject: [PATCH] AP_NavEKF: Remove duplicate flow measurement state correction --- libraries/AP_NavEKF/AP_NavEKF.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libraries/AP_NavEKF/AP_NavEKF.cpp b/libraries/AP_NavEKF/AP_NavEKF.cpp index d353d1409c..ff2d459515 100644 --- a/libraries/AP_NavEKF/AP_NavEKF.cpp +++ b/libraries/AP_NavEKF/AP_NavEKF.cpp @@ -2961,11 +2961,6 @@ void NavEKF::FuseOptFlow() } else if (!flowXfailed) { prevFlowFuseTime_ms = imuSampleTime_ms; } - // correct the state vector - for (uint8_t j = 0; j <= 21; j++) - { - states[j] = states[j] - Kfusion[j] * innovOptFlow[obsIndex]; - } // Attitude, velocity and position corrections are averaged across multiple prediction cycles between now and the anticipated time for the next measurement. // Don't do averaging of quaternion state corrections if total angle change across predicted interval is going to exceed 0.1 rad bool highRates = ((flowUpdateCountMax * correctedDelAng.length()) > 0.1f);