mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 04:33:10 +08:00
Landing horizontal velocity compensation / unsteady landing (#23546)
* initial working * implemented feedback
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user