mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-08 15:38:53 +08:00
gps_alt: reset GPS alt variance usign helper function
This commit is contained in:
+1
-3
@@ -74,9 +74,7 @@ void Ekf::initialiseCovariance()
|
|||||||
P(9,9) = sq(fmaxf(_params.range_noise, 0.01f));
|
P(9,9) = sq(fmaxf(_params.range_noise, 0.01f));
|
||||||
|
|
||||||
} else if (_control_status.flags.gps_hgt) {
|
} else if (_control_status.flags.gps_hgt) {
|
||||||
float lower_limit = fmaxf(_params.gps_pos_noise, 0.01f);
|
P(9,9) = getGpsAltVar();
|
||||||
float upper_limit = fmaxf(_params.pos_noaid_noise, lower_limit);
|
|
||||||
P(9,9) = sq(1.5f * math::constrain(_gps_sample_delayed.vacc, lower_limit, upper_limit));
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
P(9,9) = sq(fmaxf(_params.baro_noise, 0.01f));
|
P(9,9) = sq(fmaxf(_params.baro_noise, 0.01f));
|
||||||
|
|||||||
Reference in New Issue
Block a user