diff --git a/src/modules/flight_mode_manager/tasks/Auto/FlightTaskAuto.cpp b/src/modules/flight_mode_manager/tasks/Auto/FlightTaskAuto.cpp index 19b7298fef..c1e4e096e8 100644 --- a/src/modules/flight_mode_manager/tasks/Auto/FlightTaskAuto.cpp +++ b/src/modules/flight_mode_manager/tasks/Auto/FlightTaskAuto.cpp @@ -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