FlightTaskManualAltitude: use StickTiltXY for horizontal stick mapping

This commit is contained in:
Matthias Grob
2023-02-24 11:51:17 +01:00
parent 21d580293a
commit 728570828f
5 changed files with 11 additions and 29 deletions
@@ -240,7 +240,7 @@ void FlightTaskAuto::_prepareLandSetpoints()
// 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
vertical_speed *= (1 + _sticks.getPositionExpo()(2));
vertical_speed *= (1 - _sticks.getThrottleZeroCenteredExpo());
// Only set a yawrate setpoint if weather vane is not active or the yaw stick is out of its dead-zone
if (!_weathervane.isActive() || fabsf(_sticks.getYawExpo()) > FLT_EPSILON) {
@@ -248,7 +248,7 @@ void FlightTaskAuto::_prepareLandSetpoints()
_deltatime);
}
_stick_acceleration_xy.generateSetpoints(_sticks.getPositionExpo().slice<2, 1>(0, 0), _yaw, _land_heading, _position,
_stick_acceleration_xy.generateSetpoints(_sticks.getPitchRollExpo(), _yaw, _land_heading, _position,
_velocity_setpoint_feedback.xy(), _deltatime);
_stick_acceleration_xy.getSetpoints(_land_position, _velocity_setpoint, _acceleration_setpoint);