From c46b4a29b8c0be96e40959305e52e6e753e555ed Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 21 Jun 2015 20:00:38 +0200 Subject: [PATCH] EKF: Publish initial altitude estimate in any case --- .../ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp b/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp index 4208ed0deb..877bff6585 100644 --- a/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp +++ b/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp @@ -699,10 +699,9 @@ void AttitudePositionEstimatorEKF::task_main() // Publish Local Position estimations publishLocalPosition(); - // Publish Global Position, but only if it's any good - if (_gpsIsGood || _global_pos.dead_reckoning) { - publishGlobalPosition(); - } + // Publish Global Position, it will have a large uncertainty + // set if only altitude is known + publishGlobalPosition(); // Publish wind estimates if (hrt_elapsed_time(&_wind.timestamp) > 99000) {