From 1e3c23e5a3a8c211b90a506588c1d1b86499a42c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 3 Jan 2015 10:36:14 +1100 Subject: [PATCH] Plane: on takeoff set prev_WP_loc to current_loc --- ArduPlane/commands_logic.pde | 1 + 1 file changed, 1 insertion(+) diff --git a/ArduPlane/commands_logic.pde b/ArduPlane/commands_logic.pde index d346a05b8a..58017f24bd 100644 --- a/ArduPlane/commands_logic.pde +++ b/ArduPlane/commands_logic.pde @@ -304,6 +304,7 @@ static void do_RTL(void) static void do_takeoff(const AP_Mission::Mission_Command& cmd) { + prev_WP_loc = current_loc; set_next_WP(cmd.content.location); // pitch in deg, airspeed m/s, throttle %, track WP 1 or 0 auto_state.takeoff_pitch_cd = (int16_t)cmd.p1 * 100;