Tobias Fenner 71f56df23b adsb: Fix vertical separation check using wrong parameter
The collision detection incorrectly used crosstrack_separation
(horizontal radius) for both horizontal and vertical checks.
This resulted in the vertical separation threshold being ignored,
creating a spherical detection zone instead of the intended
cylindrical "hockey puck" shape.

Fixed by using vertical_separation parameter for altitude
difference check on line 80.

The bug was likely introduced as a copy-paste error when creating
the vertical check from the horizontal check template. The existing
unit test uses identical values for both parameters (500.0f),
which masked this bug.

Testing: Code review. The existing unit tests pass, but they don't
catch this bug due to using equal values. Future test improvement
would be to use different crosstrack_separation and vertical_separation
values.

Signed-off-by: Tobias Fenner <tobyrfenner@gmail.com>
2025-10-21 11:21:27 +02:00
..
2022-12-20 08:18:09 +01:00