forked from Archive/PX4-Autopilot
ekf2: set uncertainty of global origin to 0 when fusing GNSS data
When global measurements are fused in the filter, the local position naturally contains the global position uncertainty.
This commit is contained in:
parent
10db6b6eda
commit
5465a2184e
|
@ -142,6 +142,7 @@ void Ekf::controlGnssHeightFusion(const gpsSample &gps_sample)
|
||||||
|
|
||||||
_information_events.flags.reset_hgt_to_gps = true;
|
_information_events.flags.reset_hgt_to_gps = true;
|
||||||
resetVerticalPositionTo(-measurement, measurement_var);
|
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();
|
bias_est.reset();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -248,6 +248,7 @@ void Ekf::controlGpsFusion(const imuSample &imu_delayed)
|
||||||
// reset position
|
// reset position
|
||||||
_information_events.flags.reset_pos_to_gps = true;
|
_information_events.flags.reset_pos_to_gps = true;
|
||||||
resetHorizontalPositionTo(position, pos_obs_var);
|
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;
|
_aid_src_gnss_pos.time_last_fuse = _time_delayed_us;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue