From f7bddda3d504447b2be951d6b4d6d6dcbe69e9f7 Mon Sep 17 00:00:00 2001 From: bresch Date: Thu, 10 Dec 2020 10:17:15 +0100 Subject: [PATCH] gps_alt: do not scale up reported gps vertical accuracy The comment said that the horizontal accuracy needs to be scaled up using the typical epv/eph ratio but the epv (vacc) is already available, so no scaling is required. --- EKF/ekf_helper.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/EKF/ekf_helper.cpp b/EKF/ekf_helper.cpp index 92f7aa5eb1..30ef13635f 100644 --- a/EKF/ekf_helper.cpp +++ b/EKF/ekf_helper.cpp @@ -1247,10 +1247,9 @@ void Ekf::updateBaroHgtOffset() float Ekf::getGpsAltVar() { // observation variance - receiver defined and parameter limited - // use scaled horizontal position accuracy assuming typical ratio of VDOP/HDOP const float lower_limit = fmaxf(_params.gps_pos_noise, 0.01f); const float upper_limit = fmaxf(_params.pos_noaid_noise, lower_limit); - const float gps_alt_var = sq(1.5f * math::constrain(_gps_sample_delayed.vacc, lower_limit, upper_limit)); + const float gps_alt_var = sq(math::constrain(_gps_sample_delayed.vacc, lower_limit, upper_limit)); return gps_alt_var; }