18 #include "navigation.h"
20 #include "generated/flight_plan.h"
22 #ifndef STEREOCAM_FOLLOW_ME_USE_OPTITRACK
23 #define STEREOCAM_FOLLOW_ME_USE_OPTITRACK FALSE
26 #define HEADING_CHANGE_PER_MEASUREMENT 260
27 #define CENTER_IMAGE_HOR 65
28 #define MAXIMUM_ALTITUDE_FOLLOWING 3.0
29 #define MINIMUM_ALTITUDE_FOLLOWING 1.0
37 static const int amountOfRollPhaseTime = 15;
38 static const int amountOfYawPhaseTime = 15;
42 if (*isRollPhaseArg) {
43 if (*phaseCounterArg > amountOfRollPhaseTime) {
49 if (*phaseCounterArg > amountOfYawPhaseTime) {
64 static int phaseCounter=0, isRollPhase=0, isYawPhase=0;
65 static float heightGain=0.3;
72 float heading_change = 0.0;
76 heading_change = 0.25;
81 heading_change = -0.25;
102 if (heightObject > 50) {
104 }
else if (heightObject < 20) {
118 #if STEREOCAM_FOLLOW_ME_USE_OPTITRACK
123 if (distanceToObject < 35) {
125 }
else if (distanceToObject < 60) {