Skip to content

Commit

Permalink
Navigator: use FLT_EPSILON instead of 0.0001f for >0 float comparison
Browse files Browse the repository at this point in the history
Signed-off-by: Silvan <[email protected]>
  • Loading branch information
sfuhrer committed Jan 29, 2025
1 parent 2f2e56c commit ddf591c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/navigator/mission_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ MissionBlock::mission_item_to_position_setpoint(const mission_item_s &item, posi
_navigator->get_loiter_radius();
sp->loiter_direction_counter_clockwise = item.loiter_radius < 0;

if (item.acceptance_radius > 0.001f && PX4_ISFINITE(item.acceptance_radius)) {
if (item.acceptance_radius > FLT_EPSILON && PX4_ISFINITE(item.acceptance_radius)) {
// if the mission item has a specified acceptance radius, overwrite the default one from parameters
sp->acceptance_radius = item.acceptance_radius;

Expand Down

0 comments on commit ddf591c

Please sign in to comment.