navigator land: don't project VTOL braking waypoint without global position

This commit is contained in:
Matthias Grob
2024-10-25 13:56:20 +02:00
committed by Silvan Fuhrer
parent b6eb8dbfd9
commit b8a602414d
+3 -2
View File
@@ -83,8 +83,9 @@ void
Land::on_active() Land::on_active()
{ {
/* for VTOL update landing location during back transition */ /* for VTOL update landing location during back transition */
if (_navigator->get_vstatus()->is_vtol && if (_navigator->get_vstatus()->is_vtol
_navigator->get_vstatus()->in_transition_mode) { && _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(); 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 // create a wp in front of the VTOL while in back-transition, based on MPC settings that will apply in MC phase afterwards