Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landing horizontal velocity compensation / unsteady landing #23546

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/modules/flight_mode_manager/tasks/Auto/FlightTaskAuto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,12 @@ void FlightTaskAuto::_prepareLandSetpoints()
if (_type_previous != WaypointType::land) {
// initialize yaw and xy-position
_land_heading = _yaw_setpoint;
_stick_acceleration_xy.resetPosition(Vector2f(_target(0), _target(1)));
_initial_land_position = Vector3f(_target(0), _target(1), NAN);
_stick_acceleration_xy.resetPosition(Vector2f(_triplet_target(0), _triplet_target(1)));
_initial_land_position = Vector3f(_triplet_target(0), _triplet_target(1), NAN);
}

// Update xy-position in case of landing position changes (etc. precision landing)
_land_position = Vector3f(_target(0), _target(1), NAN);
_land_position = Vector3f(_triplet_target(0), _triplet_target(1), NAN);

// User input assisted landing
if (_param_mpc_land_rc_help.get() && _sticks.checkAndUpdateStickInputs()) {
Expand Down
2 changes: 2 additions & 0 deletions src/modules/navigator/land.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Land::on_activation()
/* convert mission item to current setpoint */
struct position_setpoint_triplet_s *pos_sp_triplet = _navigator->get_position_setpoint_triplet();
pos_sp_triplet->previous.valid = false;
// set current mission_item so that we can breake before reaching the landing waypoint
_navigator->calculate_breaking_stop(_mission_item.lat, _mission_item.lon);
mission_item_to_position_setpoint(_mission_item, &pos_sp_triplet->current);
pos_sp_triplet->next.valid = false;

Expand Down
Loading