[nav] change GRAVITY to NAV_GRAVITY to avoid collision

This commit is contained in:
Gautier Hattenberger
2013-06-14 15:45:54 +02:00
parent 813660036a
commit 6ec20fd834
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)
|| dist2_center < Square(abs_radius - dist_carrot)) ? || dist2_center < Square(abs_radius - dist_carrot)) ?
0 : 0 :
atan((*stateGetHorizontalSpeedNorm_f())*(*stateGetHorizontalSpeedNorm_f()) / (GRAVITY*radius)); atan((*stateGetHorizontalSpeedNorm_f())*(*stateGetHorizontalSpeedNorm_f()) / (NAV_GRAVITY*radius));
float carrot_angle = dist_carrot / abs_radius; float carrot_angle = dist_carrot / abs_radius;
carrot_angle = Min(carrot_angle, M_PI/4); carrot_angle = Min(carrot_angle, M_PI/4);
+1 -1
View File
@@ -41,7 +41,7 @@
#include "subsystems/navigation/common_flight_plan.h" #include "subsystems/navigation/common_flight_plan.h"
#include "subsystems/navigation/common_nav.h" #include "subsystems/navigation/common_nav.h"
#define GRAVITY 9.806 #define NAV_GRAVITY 9.806
#define Square(_x) ((_x)*(_x)) #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)) #define DistanceSquare(p1_x, p1_y, p2_x, p2_y) (Square(p1_x-p2_x)+Square(p1_y-p2_y))