mc_pos_control: added gradual landing speed logic

depending on two altitudes that can get set as parameter
the logic linearly slows down from higher land altitude 1 to slower land altitude 2
This commit is contained in:
Matthias Grob
2017-03-22 15:21:34 +01:00
committed by Dennis Mannhart
parent 7434bcc693
commit 72fb7a5062
2 changed files with 64 additions and 13 deletions
@@ -512,3 +512,33 @@ PARAM_DEFINE_FLOAT(MPC_XY_MAN_EXPO, 0.0f);
* @group Multicopter Position Control
*/
PARAM_DEFINE_FLOAT(MPC_Z_MAN_EXPO, 0.0f);
/**
* Altitude for 1. step of slow landing (descend)
*
* Below this altitude descending velocity gets limited
* to a value between "MPC_Z_VEL_MAX" and "MPC_LAND_SPEED"
* to enable a smooth descent experience
* Value needs to be higher than "MPC_LAND_ALT2"
*
* @unit m
* @min 0
* @max 122
* @decimal 1
* @group Multicopter Position Control
*/
PARAM_DEFINE_FLOAT(MPC_LAND_ALT1, 10.0f);
/**
* Altitude for 2. step of slow landing (landing)
*
* Below this altitude descending velocity gets limited to "MPC_LAND_SPEED"
* Value needs to be lower than "MPC_LAND_ALT1"
*
* @unit m
* @min 0
* @max 122
* @decimal 1
* @group Multicopter Position Control
*/
PARAM_DEFINE_FLOAT(MPC_LAND_ALT2, 5.0f);