diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-29 12:00:54 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-29 12:00:54 +0200 |
commit | b64c64d5a3d71a085b603e6f86dfe785a03c6129 (patch) | |
tree | 96e19e64855209918904fdc5788447e5ee1b280d /src | |
parent | 092ede366a531ad68f7ccc2f372f83b8d2993242 (diff) | |
download | px4-firmware-b64c64d5a3d71a085b603e6f86dfe785a03c6129.tar.gz px4-firmware-b64c64d5a3d71a085b603e6f86dfe785a03c6129.tar.bz2 px4-firmware-b64c64d5a3d71a085b603e6f86dfe785a03c6129.zip |
Observation index cannot get negative.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/ekf_att_pos_estimator/estimator_23states.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/ekf_att_pos_estimator/estimator_23states.cpp b/src/modules/ekf_att_pos_estimator/estimator_23states.cpp index df319a93a..8c30521e3 100644 --- a/src/modules/ekf_att_pos_estimator/estimator_23states.cpp +++ b/src/modules/ekf_att_pos_estimator/estimator_23states.cpp @@ -1088,7 +1088,7 @@ void AttPosEKF::FuseVelposNED() stateIndex = 4 + obsIndex; // Calculate the measurement innovation, using states from a // different time coordinate if fusing height data - if (obsIndex >= 0 && obsIndex <= 2) + if (obsIndex <= 2) { innovVelPos[obsIndex] = statesAtVelTime[stateIndex] - observation[obsIndex]; } |