mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-10 21:51:35 +08:00
ekf2_ev: do not reset learned bias
When ev resets without GNSS currently active, still consider the position bias that was learned so far (GNSS fusion was maybe used in the past and a meaningful bias was esimated).
This commit is contained in:
@@ -230,8 +230,7 @@ void Ekf::updateEvPosFusion(const Vector2f &measurement, const Vector2f &measure
|
|||||||
if (!_control_status.flags.gps) {
|
if (!_control_status.flags.gps) {
|
||||||
ECL_INFO("reset to %s", EV_AID_SRC_NAME);
|
ECL_INFO("reset to %s", EV_AID_SRC_NAME);
|
||||||
_information_events.flags.reset_pos_to_vision = true;
|
_information_events.flags.reset_pos_to_vision = true;
|
||||||
resetHorizontalPositionTo(measurement, measurement_var);
|
resetHorizontalPositionTo(measurement - _ev_pos_b_est.getBias(), measurement_var);
|
||||||
_ev_pos_b_est.reset();
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_ev_pos_b_est.setBias(-Vector2f(_state.pos.xy()) + measurement);
|
_ev_pos_b_est.setBias(-Vector2f(_state.pos.xy()) + measurement);
|
||||||
|
|||||||
Reference in New Issue
Block a user