diff --git a/ArduPlane/commands_logic.cpp b/ArduPlane/commands_logic.cpp index 2fe16dc96b..a0e83d100b 100644 --- a/ArduPlane/commands_logic.cpp +++ b/ArduPlane/commands_logic.cpp @@ -1055,10 +1055,10 @@ bool Plane::verify_landing_vtol_approach(const AP_Mission::Mission_Command &cmd) { nav_controller->update_loiter(cmd.content.location, radius, direction); - const float breakout_direction_rad = radians(wrap_180(vtol_approach_s.approach_direction_deg + (direction > 0 ? 270 : 90))); + const float breakout_direction_rad = radians(vtol_approach_s.approach_direction_deg + (direction > 0 ? 270 : 90)); // breakout when within 5 degrees of the opposite direction - if (fabsf(ahrs.yaw - breakout_direction_rad) < radians(5.0f)) { + if (fabsf(wrap_PI(ahrs.yaw - breakout_direction_rad)) < radians(5.0f)) { gcs().send_text(MAV_SEVERITY_INFO, "Starting VTOL land approach path"); vtol_approach_s.approach_stage = APPROACH_LINE; set_next_WP(cmd.content.location);