From dd1d58bab56de2b93aa5c461e82f82001e421ed6 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Mon, 7 Mar 2016 22:41:38 +1100 Subject: [PATCH] EKF: Remove unnecessary matrix operations from optical flow fusion The updated formulation means that H_LOS[][8] is always zero, so these operations are no longer required. --- EKF/optflow_fusion.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/EKF/optflow_fusion.cpp b/EKF/optflow_fusion.cpp index 40da07635d..f4aff85dbc 100644 --- a/EKF/optflow_fusion.cpp +++ b/EKF/optflow_fusion.cpp @@ -456,8 +456,6 @@ void Ekf::fuseOptFlow() for (unsigned column = 0; column <= 5; column++) { KH[row][column] = gain[row] * H_LOS[obs_index][column]; } - - KH[row][8] = gain[row] * H_LOS[obs_index][8]; } for (unsigned row = 0; row < _k_num_states; row++) { @@ -468,7 +466,6 @@ void Ekf::fuseOptFlow() tmp += KH[row][3] * P[3][column]; tmp += KH[row][4] * P[4][column]; tmp += KH[row][5] * P[5][column]; - tmp += KH[row][8] * P[8][column]; KHP[row][column] = tmp; } }