From ec9e4902592e58f8e323a6e9889d2ad1f31fb743 Mon Sep 17 00:00:00 2001 From: Angel Date: Mon, 24 Jun 2019 17:25:41 +0200 Subject: [PATCH] Missed conversion to radians in AutoMapper and AutoMapper2 --- src/lib/FlightTasks/tasks/AutoMapper/FlightTaskAutoMapper.cpp | 2 +- src/lib/FlightTasks/tasks/AutoMapper2/FlightTaskAutoMapper2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/FlightTasks/tasks/AutoMapper/FlightTaskAutoMapper.cpp b/src/lib/FlightTasks/tasks/AutoMapper/FlightTaskAutoMapper.cpp index 1ddfc7df6a45..91feecace29f 100644 --- a/src/lib/FlightTasks/tasks/AutoMapper/FlightTaskAutoMapper.cpp +++ b/src/lib/FlightTasks/tasks/AutoMapper/FlightTaskAutoMapper.cpp @@ -125,7 +125,7 @@ void FlightTaskAutoMapper::_generateLandSetpoints() _position_setpoint = Vector3f(_target(0), _target(1), NAN); _velocity_setpoint = Vector3f(Vector3f(NAN, NAN, _param_mpc_land_speed.get())); // set constraints - _constraints.tilt = _param_mpc_tiltmax_lnd.get(); + _constraints.tilt = math::radians(_param_mpc_tiltmax_lnd.get()); _constraints.speed_down = _param_mpc_land_speed.get(); _gear.landing_gear = landing_gear_s::GEAR_DOWN; } diff --git a/src/lib/FlightTasks/tasks/AutoMapper2/FlightTaskAutoMapper2.cpp b/src/lib/FlightTasks/tasks/AutoMapper2/FlightTaskAutoMapper2.cpp index d650346bf83d..ef64afb22ac3 100644 --- a/src/lib/FlightTasks/tasks/AutoMapper2/FlightTaskAutoMapper2.cpp +++ b/src/lib/FlightTasks/tasks/AutoMapper2/FlightTaskAutoMapper2.cpp @@ -136,7 +136,7 @@ void FlightTaskAutoMapper2::_prepareLandSetpoints() _velocity_setpoint = Vector3f(Vector3f(NAN, NAN, speed_lnd)); // set constraints - _constraints.tilt = _param_mpc_tiltmax_lnd.get(); + _constraints.tilt = math::radians(_param_mpc_tiltmax_lnd.get()); _gear.landing_gear = landing_gear_s::GEAR_DOWN; }