From d0cbb8607fed325450285ad2128d432be9710a5a Mon Sep 17 00:00:00 2001 From: Claudio Chies <61051109+Claudio-Chies@users.noreply.github.com> Date: Mon, 19 Aug 2024 08:40:08 +0200 Subject: [PATCH 1/2] vtol adjust landing setpoint --- src/modules/navigator/land.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/navigator/land.cpp b/src/modules/navigator/land.cpp index 8277378a6670..0cdf2e68d4c4 100644 --- a/src/modules/navigator/land.cpp +++ b/src/modules/navigator/land.cpp @@ -86,10 +86,8 @@ Land::on_active() _navigator->get_vstatus()->in_transition_mode) { struct position_setpoint_triplet_s *pos_sp_triplet = _navigator->get_position_setpoint_triplet(); - // create a virtual wp 1m in front of the vehicle to track during the backtransition - waypoint_from_heading_and_distance(_navigator->get_global_position()->lat, _navigator->get_global_position()->lon, - _navigator->get_local_position()->heading, 1.f, - &pos_sp_triplet->current.lat, &pos_sp_triplet->current.lon); + // create a wp in front of the VTOL until which the VTOL in multicopter mode is able to decelerate + _navigator->calculate_breaking_stop(pos_sp_triplet->current.lat, pos_sp_triplet->current.lon); _navigator->set_position_setpoint_triplet_updated(); } From 2d62493b88ae0f0e7a48d4d250c29096d687164a Mon Sep 17 00:00:00 2001 From: Claudio Chies <61051109+Claudio-Chies@users.noreply.github.com> Date: Mon, 19 Aug 2024 13:38:45 +0200 Subject: [PATCH 2/2] improve comment Co-authored-by: Silvan Fuhrer --- src/modules/navigator/land.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/navigator/land.cpp b/src/modules/navigator/land.cpp index 0cdf2e68d4c4..0a2346154a46 100644 --- a/src/modules/navigator/land.cpp +++ b/src/modules/navigator/land.cpp @@ -86,7 +86,7 @@ Land::on_active() _navigator->get_vstatus()->in_transition_mode) { struct position_setpoint_triplet_s *pos_sp_triplet = _navigator->get_position_setpoint_triplet(); - // create a wp in front of the VTOL until which the VTOL in multicopter mode is able to decelerate + // create a wp in front of the VTOL while in back-transition, based on MPC settings that will apply in MC phase afterwards _navigator->calculate_breaking_stop(pos_sp_triplet->current.lat, pos_sp_triplet->current.lon); _navigator->set_position_setpoint_triplet_updated();