Browse Source

mc_pos_control auto: set speed at 90degrees to 1

sbg
Dennis Mannhart 8 years ago committed by Lorenz Meier
parent
commit
c4c18caed4
  1. 4
      src/modules/mc_pos_control/mc_pos_control_main.cpp
  2. 6
      src/modules/mc_pos_control/mc_pos_control_params.c

4
src/modules/mc_pos_control/mc_pos_control_main.cpp

@ -1550,8 +1550,8 @@ void MulticopterPositionControl::control_auto(float dt)
* the velocity at target should be 1/5 * cruising speed; * the velocity at target should be 1/5 * cruising speed;
* angle = 2 -> vel_close = min_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 */ /* 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 = get_cruising_speed_xy() / 5.0f; float middle_cruise_speed = 1.0f;
/* make sure min cruise speed is always smaller than middle cruise speed but larger than 0*/ /* 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 float min_cruise_speed = (_min_cruise_speed.get() < middle_cruise_speed) ? _min_cruise_speed.get() : middle_cruise_speed

6
src/modules/mc_pos_control/mc_pos_control_params.c

@ -252,13 +252,13 @@ PARAM_DEFINE_FLOAT(MPC_XY_CRUISE, 5.0f);
* position stabilized mode (POSCTRL). * position stabilized mode (POSCTRL).
* *
* @unit m/s * @unit m/s
* @min 0.5 * @min 0.05
* @max 8.0 * @max 1.0
* @increment 1 * @increment 1
* @decimal 2 * @decimal 2
* @group Multicopter Position Control * @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 * Maximum horizontal velocity setpoint for manual controlled mode

Loading…
Cancel
Save