MPC: limit tilt to maximum safe value of 89 degrees

The algorithm fails at 90 degrees due to tanf being INF
This commit is contained in:
bresch
2020-03-23 13:36:23 +01:00
committed by Mathieu Bresciani
parent 315135c07e
commit 5babf644f0
2 changed files with 16 additions and 2 deletions
@@ -306,7 +306,7 @@ PARAM_DEFINE_FLOAT(MPC_XY_VEL_MAX, 12.0f);
*
* @unit deg
* @min 20.0
* @max 180.0
* @max 89.0
* @decimal 1
* @group Multicopter Position Control
*/
@@ -319,7 +319,7 @@ PARAM_DEFINE_FLOAT(MPC_TILTMAX_AIR, 45.0f);
*
* @unit deg
* @min 10.0
* @max 90.0
* @max 89.0
* @decimal 1
* @group Multicopter Position Control
*/