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.
This commit is contained in:
bresch 2020-12-10 10:17:15 +01:00 committed by Paul Riseborough
parent 02369cd415
commit f7bddda3d5

View File

@ -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;
}