Skip to content

Commit

Permalink
Landing horizontal velocity compensation / unsteady landing (PX4#23546)
Browse files Browse the repository at this point in the history
* initial working

* implemented feedback
  • Loading branch information
Claudio-Chies authored and vertiq-jordan committed Aug 21, 2024
1 parent 046a471 commit fec86bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ bool FlightTaskAuto::_evaluateTriplets()
_triplet_prev_wp(2) = -(_sub_triplet_setpoint.get().previous.alt - _reference_altitude);

} else {
_triplet_prev_wp = _position;
_triplet_prev_wp = _triplet_target;
}

_prev_was_valid = _sub_triplet_setpoint.get().previous.valid;
Expand Down
7 changes: 6 additions & 1 deletion src/modules/navigator/land.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@ 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;

if (_navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING) {
_navigator->calculate_breaking_stop(_mission_item.lat, _mission_item.lon);
}

mission_item_to_position_setpoint(_mission_item, &pos_sp_triplet->current);
pos_sp_triplet->previous.valid = false;
pos_sp_triplet->next.valid = false;

_navigator->set_position_setpoint_triplet_updated();
Expand Down

0 comments on commit fec86bb

Please sign in to comment.