mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 17:33:34 +08:00
EKF: do not fuse multiple times the same height (#767)
* EKF: do not fuse multiple times the same height The _fuse_height flag was never set to zero, hence the fusion was called at each iteration, even if no new data is available. The effects were: high CPU usage and virtually less measurement noise due to multiple fusion of the same sample Also remve unused variables
This commit is contained in:
@@ -139,7 +139,7 @@ bool Ekf::fuseVerticalPosition(const Vector3f &innov, const Vector2f &innov_gate
|
||||
// Helper function that fuses a single velocity or position measurement
|
||||
void Ekf::fuseVelPosHeight(const float innov, const float innov_var, const int obs_index) {
|
||||
|
||||
float Kfusion[24] = {}; // Kalman gain vector for any single observation - sequential fusion is used.
|
||||
float Kfusion[24]; // Kalman gain vector for any single observation - sequential fusion is used.
|
||||
const unsigned state_index = obs_index + 4; // we start with vx and this is the 4. state
|
||||
|
||||
// calculate kalman gain K = PHS, where S = 1/innovation variance
|
||||
|
||||
Reference in New Issue
Block a user