mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 22:58:10 +08:00
Navigator: Land: Improve it for VTOL by taking breaking distance into account (#23566)
* vtol adjust landing setpoint * improve comment Co-authored-by: Silvan Fuhrer <silvan@auterion.com> --------- Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -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 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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user