mc_pos_control: convert tilt_max to degrees

This commit is contained in:
Anton Babushkin 2014-04-25 22:53:48 +02:00
parent ac0b50eaa4
commit a432ed4900
2 changed files with 8 additions and 4 deletions

View File

@ -356,8 +356,10 @@ MulticopterPositionControl::parameters_update(bool force)
param_get(_params_handles.thr_min, &_params.thr_min);
param_get(_params_handles.thr_max, &_params.thr_max);
param_get(_params_handles.tilt_max, &_params.tilt_max);
_params.tilt_max = math::radians(_params.tilt_max);
param_get(_params_handles.land_speed, &_params.land_speed);
param_get(_params_handles.land_tilt_max, &_params.land_tilt_max);
_params.land_tilt_max = math::radians(_params.land_tilt_max);
float v;
param_get(_params_handles.xy_p, &v);

View File

@ -176,11 +176,12 @@ PARAM_DEFINE_FLOAT(MPC_XY_FF, 0.5f);
*
* Limits maximum tilt in AUTO and EASY modes.
*
* @unit deg
* @min 0.0
* @max 1.57
* @max 90.0
* @group Multicopter Position Control
*/
PARAM_DEFINE_FLOAT(MPC_TILT_MAX, 1.0f);
PARAM_DEFINE_FLOAT(MPC_TILT_MAX, 45.0f);
/**
* Landing descend rate
@ -195,8 +196,9 @@ PARAM_DEFINE_FLOAT(MPC_LAND_SPEED, 1.0f);
*
* Limits maximum tilt on landing.
*
* @unit deg
* @min 0.0
* @max 1.57
* @max 90.0
* @group Multicopter Position Control
*/
PARAM_DEFINE_FLOAT(MPC_LAND_TILT, 0.3f);
PARAM_DEFINE_FLOAT(MPC_LAND_TILT, 15.0f);