mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 19:47:36 +08:00
mc_pos_control auto: set speed at 90degrees to 1
This commit is contained in:
committed by
Lorenz Meier
parent
38f796f991
commit
c4c18caed4
@@ -1550,8 +1550,8 @@ void MulticopterPositionControl::control_auto(float dt)
|
||||
* the velocity at target should be 1/5 * cruising speed;
|
||||
* angle = 2 -> vel_close = min_cruising_speed */
|
||||
|
||||
/* middle cruise speed is a number between maximum cruising speed and minimum cruising speed and corresponds to speed at angle = 1.0 */
|
||||
float middle_cruise_speed = get_cruising_speed_xy() / 5.0f;
|
||||
/* middle cruise speed is a number between maximum cruising speed and minimum cruising speed and corresponds to speed at angle = 1.0 = 90degrees */
|
||||
float middle_cruise_speed = 1.0f;
|
||||
|
||||
/* make sure min cruise speed is always smaller than middle cruise speed but larger than 0*/
|
||||
float min_cruise_speed = (_min_cruise_speed.get() < middle_cruise_speed) ? _min_cruise_speed.get() : middle_cruise_speed
|
||||
|
||||
@@ -252,13 +252,13 @@ PARAM_DEFINE_FLOAT(MPC_XY_CRUISE, 5.0f);
|
||||
* position stabilized mode (POSCTRL).
|
||||
*
|
||||
* @unit m/s
|
||||
* @min 0.5
|
||||
* @max 8.0
|
||||
* @min 0.05
|
||||
* @max 1.0
|
||||
* @increment 1
|
||||
* @decimal 2
|
||||
* @group Multicopter Position Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MPC_CRUISE_MIN, 1.0f);
|
||||
PARAM_DEFINE_FLOAT(MPC_CRUISE_MIN, 0.5f);
|
||||
|
||||
/**
|
||||
* Maximum horizontal velocity setpoint for manual controlled mode
|
||||
|
||||
Reference in New Issue
Block a user