Skip to content

Commit

Permalink
reintroduce check (HULKs#1207)
Browse files Browse the repository at this point in the history
Co-authored-by: okiwi6 <oleflb>
  • Loading branch information
oleflb authored Jul 15, 2024
1 parent 9b9ee32 commit 347c2b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/control/src/ball_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ impl BallFilter {
.start_time
.duration_since(ball.last_seen)
.expect("time ran backwards");
let validity_high_enough =
hypothesis.validity >= filter_parameters.validity_discard_threshold;
is_ball_inside_field(ball, field_dimensions)
&& validity_high_enough
&& duration_since_last_observation < filter_parameters.hypothesis_timeout
};

Expand Down

0 comments on commit 347c2b6

Please sign in to comment.