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
@@ -161,6 +161,7 @@ void Ekf::fuseAirspeed()
// 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++) {
KH[row][4] = Kfusion[row] * H_TAS[4];
KH[row][5] = Kfusion[row] * H_TAS[5];