Skip to content

Commit b8a6024

Browse files
MaEtUgRsfuhrer
authored andcommitted
navigator land: don't project VTOL braking waypoint without global position
1 parent b6eb8db commit b8a6024

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/modules/navigator/land.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ void
8383
Land::on_active()
8484
{
8585
/* for VTOL update landing location during back transition */
86-
if (_navigator->get_vstatus()->is_vtol &&
87-
_navigator->get_vstatus()->in_transition_mode) {
86+
if (_navigator->get_vstatus()->is_vtol
87+
&& _navigator->get_vstatus()->in_transition_mode
88+
&& _navigator->get_local_position()->xy_global) {
8889
struct position_setpoint_triplet_s *pos_sp_triplet = _navigator->get_position_setpoint_triplet();
8990

9091
// create a wp in front of the VTOL while in back-transition, based on MPC settings that will apply in MC phase afterwards

0 commit comments

Comments
 (0)