mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 06:23:34 +08:00
EKF: remove Ekf::KHP and move KHP to the methods where it's used
Everywhere where KHP is used, it is first completely reset, thus making it unnecessary to keep it as a class member. This saves 2.3KB RAM. Stack sizes don't need changing, since there is already a function Ekf::predictCovariance(), which needs around 3KB of stack and is called close to where the fuse* functions are called.
This commit is contained in:
@@ -439,6 +439,7 @@ void Ekf::fuseOptFlow()
|
||||
}
|
||||
}
|
||||
|
||||
float KHP[_k_num_states][_k_num_states];
|
||||
for (unsigned row = 0; row < _k_num_states; row++) {
|
||||
for (unsigned column = 0; column < _k_num_states; column++) {
|
||||
float tmp = KH[row][0] * P[0][column];
|
||||
|
||||
Reference in New Issue
Block a user