diff --git a/ArduPlane/commands_logic.cpp b/ArduPlane/commands_logic.cpp index cad18cffe8..7762e9cb7a 100644 --- a/ArduPlane/commands_logic.cpp +++ b/ArduPlane/commands_logic.cpp @@ -320,6 +320,10 @@ void Plane::do_takeoff(const AP_Mission::Mission_Command& cmd) 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; + if (auto_state.takeoff_pitch_cd <= 0) { + // if the mission doesn't specify a pitch use 4 degrees + auto_state.takeoff_pitch_cd = 400; + } auto_state.takeoff_altitude_rel_cm = next_WP_loc.alt - home.alt; next_WP_loc.lat = home.lat + 10; next_WP_loc.lng = home.lng + 10;