mc_pos_control: slow down in auto when close to target

mc_pos_control: move limit vel xy after velocity controller
This commit is contained in:
Dennis Mannhart
2017-03-22 15:21:34 +01:00
parent 8e5a573cb3
commit 0d6f994145
2 changed files with 133 additions and 16 deletions
@@ -256,6 +256,38 @@ PARAM_DEFINE_FLOAT(MPC_XY_VEL_D, 0.01f);
*/
PARAM_DEFINE_FLOAT(MPC_XY_CRUISE, 5.0f);
/**
* Nominal horizontal velocity minimum cruise speed when close to target
*
* Normal horizontal velocity in AUTO modes (includes
* also RTL / hold / etc.) and endpoint for
* position stabilized mode (POSCTRL).
*
* @unit m/s
* @min 0.0
* @max 10.0
* @increment 1
* @decimal 2
* @group Multicopter Position Control
*/
PARAM_DEFINE_FLOAT(MPC_CRUISE_MIN, 0.5f);
/**
* Distance Threshold Horizontal Auto
*
* The distance defines at which point the vehicle
* has to slow down to reach target if no direct
* passing to the next target is desired
*
* @unit m
* @min 1.0
* @max 50.0
* @increment 1
* @decimal 2
* @group Multicopter Position Control
*/
PARAM_DEFINE_FLOAT(MPC_TARGET_THRE, 10.0f);
/**
* Maximum horizontal velocity
*