mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-08 16:18:53 +08:00
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:
+1
-2
@@ -1247,10 +1247,9 @@ void Ekf::updateBaroHgtOffset()
|
|||||||
float Ekf::getGpsAltVar()
|
float Ekf::getGpsAltVar()
|
||||||
{
|
{
|
||||||
// observation variance - receiver defined and parameter limited
|
// 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 lower_limit = fmaxf(_params.gps_pos_noise, 0.01f);
|
||||||
const float upper_limit = fmaxf(_params.pos_noaid_noise, lower_limit);
|
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;
|
return gps_alt_var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user