mrozycki/rustmas

Detect incorrectly placed lights using distance from their neighbors in 2D

Closed this issue · 0 comments

Similarly to #85, we can detect incorrectly detected lights at the 2D capture stage. This should be done before normalization, so that obviously wrong points do not throw off normalization. However, incorrectly detected lights in this case should not be completely thrown away, but instead be ignored when calculating bounds during normalization, so that a stray point does not completely change the bounds. The points should still be normalized and returned with lowered accuracy.

We can use multiple strategies for such detection. In the scope of this task, calculate average distance between lights that are next to each other on the cable. Find any pairs of lights for which the distance is above a certain threshold based on the precalculated average. Those measurements should be ignored when calculating bounds for normalization.