mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 07:09:48 +08:00
Navigator: replace custom NAV_EPSILON_POSITION with FLT_EPSILON
Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user