diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-21 14:58:37 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-21 19:44:30 +0200 |
commit | 0673740e0e0ed4bc2134805ee1d556b92d4b7da5 (patch) | |
tree | f0881c35aac2af9c95adb184a40aa15d1f823348 /src/modules | |
parent | 6bab694e457a5c90b6500a2dc1f45b98fc36307c (diff) | |
download | px4-firmware-0673740e0e0ed4bc2134805ee1d556b92d4b7da5.tar.gz px4-firmware-0673740e0e0ed4bc2134805ee1d556b92d4b7da5.tar.bz2 px4-firmware-0673740e0e0ed4bc2134805ee1d556b92d4b7da5.zip |
Initialize velNED fields correctly, preventing a bogus initial filter reset
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/ekf_att_pos_estimator/estimator_23states.cpp | 5 |
1 files changed, 4 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 d364facad..673865dd4 100644 --- a/src/modules/ekf_att_pos_estimator/estimator_23states.cpp +++ b/src/modules/ekf_att_pos_estimator/estimator_23states.cpp @@ -35,8 +35,11 @@ AttPosEKF::AttPosEKF() magDeclination = 0.0f; dAngIMU.zero(); dVelIMU.zero(); - ekfDiverged = false; + velNED[0] = 0.0f; + velNED[1] = 0.0f; + velNED[2] = 0.0f; delAngTotal.zero(); + ekfDiverged = false; memset(&last_ekf_error, 0, sizeof(last_ekf_error)); ZeroVariables(); |