diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-03 17:55:33 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-03 17:55:33 +0200 |
commit | ed65d1748e55e156dbf2067521685f804d5aefd6 (patch) | |
tree | 470c38031e3a60dcc06e0949558b240f2298f24b /src/modules/ekf_att_pos_estimator | |
parent | 0ff1195c36edcc6e5e3a83d1ee2041e050395bb5 (diff) | |
download | px4-firmware-ed65d1748e55e156dbf2067521685f804d5aefd6.tar.gz px4-firmware-ed65d1748e55e156dbf2067521685f804d5aefd6.tar.bz2 px4-firmware-ed65d1748e55e156dbf2067521685f804d5aefd6.zip |
Fix initialization of position variable
Diffstat (limited to 'src/modules/ekf_att_pos_estimator')
-rw-r--r-- | src/modules/ekf_att_pos_estimator/estimator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/ekf_att_pos_estimator/estimator.cpp b/src/modules/ekf_att_pos_estimator/estimator.cpp index 15dbd0597..bfb2007af 100644 --- a/src/modules/ekf_att_pos_estimator/estimator.cpp +++ b/src/modules/ekf_att_pos_estimator/estimator.cpp @@ -2537,6 +2537,8 @@ void AttPosEKF::InitialiseFilter(float (&initvelNED)[3], double referenceLat, do // we are at reference altitude, so measurement must be zero hgtMea = 0.0f; + posNE[0] = 0.0f; + posNE[1] = 0.0f; // the baro offset must be this difference now baroHgtOffset = baroHgt - referenceHgt; |