From b8a602414d5bd38b02349c3bb96b2cbed986d0ff Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Thu, 24 Oct 2024 19:53:55 +0200 Subject: [PATCH] navigator land: don't project VTOL braking waypoint without global position --- src/modules/navigator/land.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/navigator/land.cpp b/src/modules/navigator/land.cpp index d83b592a458c..67291b405edf 100644 --- a/src/modules/navigator/land.cpp +++ b/src/modules/navigator/land.cpp @@ -83,8 +83,9 @@ void Land::on_active() { /* for VTOL update landing location during back transition */ - if (_navigator->get_vstatus()->is_vtol && - _navigator->get_vstatus()->in_transition_mode) { + if (_navigator->get_vstatus()->is_vtol + && _navigator->get_vstatus()->in_transition_mode + && _navigator->get_local_position()->xy_global) { struct position_setpoint_triplet_s *pos_sp_triplet = _navigator->get_position_setpoint_triplet(); // create a wp in front of the VTOL while in back-transition, based on MPC settings that will apply in MC phase afterwards