Skip to content

Commit

Permalink
Navigator: replace custom NAV_EPSILON_POSITION with FLT_EPSILON
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 7e47605 commit 2f2e56c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/modules/navigator/mission_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ MissionBlock::mission_item_to_position_setpoint(const mission_item_s &item, posi
sp->lon = item.lon;
sp->alt = get_absolute_altitude_for_item(item);
sp->yaw = item.yaw;
sp->loiter_radius = (fabsf(item.loiter_radius) > NAV_EPSILON_POSITION) ? fabsf(item.loiter_radius) :
sp->loiter_radius = (fabsf(item.loiter_radius) > FLT_EPSILON) ? fabsf(item.loiter_radius) :
_navigator->get_loiter_radius();
sp->loiter_direction_counter_clockwise = item.loiter_radius < 0;

Expand Down
2 changes: 0 additions & 2 deletions src/modules/navigator/navigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
# define NUM_MISSIONS_SUPPORTED 500
#endif

#define NAV_EPSILON_POSITION 0.001f /**< Anything smaller than this is considered zero */

/* compatible to mavlink MAV_CMD */
enum NAV_CMD {
NAV_CMD_IDLE = 0,
Expand Down

0 comments on commit 2f2e56c

Please sign in to comment.