mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
ekf2: reset globlal position uncertainty when GNSS is fused
There is no reason to keep an uncertainty on the origin as it is then already contained in the local position estimate when GNSS data is fused in the filter.
This commit is contained in:
@@ -142,6 +142,7 @@ void Ekf::controlGnssHeightFusion(const gpsSample &gps_sample)
|
||||
|
||||
_information_events.flags.reset_hgt_to_gps = true;
|
||||
resetVerticalPositionTo(-measurement, measurement_var);
|
||||
_gpos_origin_epv = 0.f; // The uncertainty of the global origin is now contained in the local position uncertainty
|
||||
bias_est.reset();
|
||||
|
||||
} else {
|
||||
|
||||
@@ -248,6 +248,7 @@ void Ekf::controlGpsFusion(const imuSample &imu_delayed)
|
||||
// reset position
|
||||
_information_events.flags.reset_pos_to_gps = true;
|
||||
resetHorizontalPositionTo(position, pos_obs_var);
|
||||
_gpos_origin_eph = 0.f; // The uncertainty of the global origin is now contained in the local position uncertainty
|
||||
_aid_src_gnss_pos.time_last_fuse = _time_delayed_us;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user