mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
FlightTaskAuto: landing position updates for precision landing (#20951)
- precision landing works incorrectly, target position is not updated during the descent above target - _prepareLandSetpoints needs to update _land_position continuously Co-authored-by: kapacheuski <kapacheuski@gmail.com>
This commit is contained in:
parent
deb6053d56
commit
3e149ee6c5
@ -229,12 +229,14 @@ void FlightTaskAuto::_prepareLandSetpoints()
|
||||
}
|
||||
|
||||
if (_type_previous != WaypointType::land) {
|
||||
// initialize xy-position and yaw to waypoint such that home is reached exactly without user input
|
||||
_land_position = Vector3f(_target(0), _target(1), NAN);
|
||||
// initialize yaw
|
||||
_land_heading = _yaw_setpoint;
|
||||
_stick_acceleration_xy.resetPosition(Vector2f(_target(0), _target(1)));
|
||||
}
|
||||
|
||||
// Update xy-position in case of landing position changes (etc. precision landing)
|
||||
_land_position = Vector3f(_target(0), _target(1), NAN);
|
||||
|
||||
// User input assisted landing
|
||||
if (_param_mpc_land_rc_help.get() && _sticks.checkAndUpdateStickInputs()) {
|
||||
// Stick full up -1 -> stop, stick full down 1 -> double the speed
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user