diff --git a/sw/airborne/subsystems/nav.c b/sw/airborne/subsystems/nav.c index b3d07a2815..e3cab5e156 100644 --- a/sw/airborne/subsystems/nav.c +++ b/sw/airborne/subsystems/nav.c @@ -139,7 +139,7 @@ void nav_circle_XY(float x, float y, float radius) { (dist2_center > Square(abs_radius + dist_carrot) || dist2_center < Square(abs_radius - dist_carrot)) ? 0 : - atan((*stateGetHorizontalSpeedNorm_f())*(*stateGetHorizontalSpeedNorm_f()) / (GRAVITY*radius)); + atan((*stateGetHorizontalSpeedNorm_f())*(*stateGetHorizontalSpeedNorm_f()) / (NAV_GRAVITY*radius)); float carrot_angle = dist_carrot / abs_radius; carrot_angle = Min(carrot_angle, M_PI/4); diff --git a/sw/airborne/subsystems/nav.h b/sw/airborne/subsystems/nav.h index 14dd78a2ff..9bb7b544f0 100644 --- a/sw/airborne/subsystems/nav.h +++ b/sw/airborne/subsystems/nav.h @@ -41,7 +41,7 @@ #include "subsystems/navigation/common_flight_plan.h" #include "subsystems/navigation/common_nav.h" -#define GRAVITY 9.806 +#define NAV_GRAVITY 9.806 #define Square(_x) ((_x)*(_x)) #define DistanceSquare(p1_x, p1_y, p2_x, p2_y) (Square(p1_x-p2_x)+Square(p1_y-p2_y))