[nav_launcher] Minor functionality fix so it works in simulation

This commit is contained in:
Michal Podhradsky
2017-03-27 17:58:05 -07:00
parent b9e71e9fa4
commit e4773906de
2 changed files with 1 additions and 4 deletions
@@ -1,6 +1,6 @@
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
<flight_plan alt="1550" ground_alt="1350" lat0="41.815562" lon0="-111.982437" max_dist_from_home="3000" name="BasicTuning" security_height="25" home_mode_height="-200" qfu="90" geofence_sector="FlightArea" geofence_max_alt="2000" geofence_max_height="500">
<flight_plan alt="1550" ground_alt="1350" lat0="41.815562" lon0="-111.982437" max_dist_from_home="3000" name="BasicTuning" security_height="25" home_mode_height="200" qfu="90" geofence_sector="FlightArea" geofence_max_alt="2000" geofence_max_height="500">
<header>
#include "subsystems/datalink/datalink.h"
</header>
-3
View File
@@ -120,7 +120,6 @@ void nav_launcher_setup(void)
stateGetPositionUtm_f()->alt + LAUNCHER_TAKEOFF_CIRCLE_ALT;
CLaunch_Status = L_Pitch_Nav;
autopilot_set_kill_throttle(false);
}
bool nav_launcher_run(void)
@@ -141,7 +140,6 @@ bool nav_launcher_run(void)
NavVerticalThrottleMode(MAX_PPRZ * (1));
NavAttitude(0);
autopilot_set_kill_throttle(false);
//If the plane has been launched and has traveled for more than a specified distance, switch to line nav
if (stateGetHorizontalSpeedNorm_f() > LAUNCHER_TAKEOFF_MIN_SPEED_LINE) {
@@ -159,7 +157,6 @@ bool nav_launcher_run(void)
NavVerticalAutoThrottleMode(LAUNCHER_TAKEOFF_PITCH);
NavVerticalThrottleMode(MAX_PPRZ * (1));
nav_route_xy(launch_x, launch_y, launch_line_x, launch_line_y);
autopilot_set_kill_throttle(false);
//If the aircraft is above a specific alt, greater than a specific speed or too far away, circle up
if (((stateGetPositionUtm_f()->alt