forked from Archive/PX4-Autopilot
ekf2: Ignore optical flow samples with too large integration time spans. Fixes #14165
Within ekf2, optical flow messages (amongst others) are fused to the state estimates. It might occur that optical flow sensors report unreliable and unrealistic spikes. In that case, the state estimator went crazy so far and just ignored optical flow values from that moment on. The common thread for all these spikes seems to be a too high integration time span. Therefore, this fix adds a simple logic that ignores unrealistically high integration time spans. As a threshold, 1 second was chosen. Reported-by: Dominik Natter <dominik.natter@gmail.com>
This commit is contained in:
parent
d360919789
commit
d8831c5133
|
@ -1061,7 +1061,8 @@ void Ekf2::Run()
|
|||
flow.time_us = optical_flow.timestamp;
|
||||
|
||||
if (PX4_ISFINITE(optical_flow.pixel_flow_y_integral) &&
|
||||
PX4_ISFINITE(optical_flow.pixel_flow_x_integral)) {
|
||||
PX4_ISFINITE(optical_flow.pixel_flow_x_integral) &&
|
||||
flow.dt < 1) {
|
||||
|
||||
_ekf.setOpticalFlowData(flow);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue