// distance between plane and next waypoint in cm.
static uint32_t wp_distance;
// Register containing the index of the current navigation command in the mission script
static int16_t command_nav_index;
// Register containing the index of the previous navigation command in the mission script
// Used to manage the execution of conditional commands
static uint8_t prev_nav_index;
// Register containing the index of the current conditional command in the mission script
static uint8_t command_cond_index;
// Used to track the required WP navigation information
// options include
// NAV_ALTITUDE - have we reached the desired altitude?
// NAV_LOCATION - have we reached the desired location?
// NAV_DELAY - have we waited at the waypoint the desired time?
static float lon_error, lat_error; // Used to report how many cm we are from the next waypoint or loiter target position
static uint8_t land_state; // records state of land (flying to location, descending)
@ -580,14 +576,6 @@ static uint16_t loiter_time_max; // How long we should stay in Lo
@@ -580,14 +576,6 @@ static uint16_t loiter_time_max; // How long we should stay in Lo
static uint32_t loiter_time; // How long have we been loitering - The start time in millis