mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:28:53 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user