mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
Enforce enough braking power when users set higher horizontal speeds
This commit is contained in:
@@ -585,6 +585,11 @@ MulticopterPositionControl::parameters_update(bool force)
|
||||
_params.hold_max_z = (v < 0.0f ? 0.0f : v);
|
||||
param_get(_params_handles.acc_hor_max, &v);
|
||||
_params.acc_hor_max = v;
|
||||
/*
|
||||
* increase the maximum horizontal acceleration such that stopping
|
||||
* within 1 s from full speed is feasible
|
||||
*/
|
||||
_params.acc_hor_max = math::max(_params.vel_cruise(0), _params.acc_hor_max);
|
||||
param_get(_params_handles.alt_mode, &v_i);
|
||||
_params.alt_mode = v_i;
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@ PARAM_DEFINE_FLOAT(MPC_VELD_LP, 5.0f);
|
||||
* @decimal 2
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MPC_ACC_HOR_MAX, 10.0f);
|
||||
PARAM_DEFINE_FLOAT(MPC_ACC_HOR_MAX, 5.0f);
|
||||
|
||||
/**
|
||||
* Altitude control mode, note mode 1 only tested with LPE
|
||||
|
||||
Reference in New Issue
Block a user