Skip to content
Snippets Groups Projects
Commit 3538f028 authored by Dennis Mannhart's avatar Dennis Mannhart Committed by Lorenz Meier
Browse files

mc_pos_control: use 0.5 of acceleration for auto

parent 807d45c9
No related branches found
No related tags found
No related merge requests found
......@@ -1552,7 +1552,7 @@ void MulticopterPositionControl::control_auto(float dt)
/* we want to accelerate */
float acc_z = (vel_sp_z - fabsf(_vel_sp(2))) / dt;
float acc_max = (flying_upward) ? _acceleration_z_max_up.get() : _acceleration_z_max_down.get();
float acc_max = (flying_upward) ? (_acceleration_z_max_up.get() * 0.5f) : (_acceleration_z_max_down.get() * 0.5f);
if (acc_z > acc_max) {
vel_sp_z = _acceleration_z_max_up.get() * dt + fabsf(_vel_sp(2));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment