EKF: save some stack memory

This commit is contained in:
Paul Riseborough
2016-11-02 09:06:06 +01:00
committed by Lorenz Meier
parent f472324ae8
commit 1b59a89a18
4 changed files with 5 additions and 1 deletions
+1
View File
@@ -433,6 +433,7 @@ void Ekf::fuseOptFlow()
// apply covariance correction via P_new = (I -K*H)*P
// first calculate expression for KHP
// then calculate P - KHP
float KH[_k_num_states][_k_num_states];
for (unsigned row = 0; row < _k_num_states; row++) {
for (unsigned column = 0; column <= 6; column++) {
KH[row][column] = gain[row] * H_LOS[obs_index][column];