Navigator: replace custom NAV_EPSILON_POSITION with FLT_EPSILON

Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
Silvan
2025-01-24 17:15:09 +01:00
committed by Silvan Fuhrer
parent 7e47605871
commit 2f2e56c097
2 changed files with 1 additions and 3 deletions
+1 -1
View File
@@ -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;
-2
View File
@@ -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,