mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 22:40:34 +08:00
mc_pos_control: correct sign of acceleration state
Non-functional change, just change the sign in the correct place to avoid further confusion.
This commit is contained in:
committed by
Mathieu Bresciani
parent
74e99faedf
commit
38093e4887
@@ -145,7 +145,7 @@ void PositionControl::_velocityControl(const float dt)
|
||||
{
|
||||
// PID velocity control
|
||||
Vector3f vel_error = _vel_sp - _vel;
|
||||
Vector3f acc_sp_velocity = vel_error.emult(_gain_vel_p) + _vel_int + _vel_dot.emult(_gain_vel_d);
|
||||
Vector3f acc_sp_velocity = vel_error.emult(_gain_vel_p) + _vel_int - _vel_dot.emult(_gain_vel_d);
|
||||
|
||||
// For backwards compatibility of the gains to non-acceleration based control, needs to be overcome with configuration conversion
|
||||
acc_sp_velocity *= CONSTANTS_ONE_G / _hover_thrust;
|
||||
|
||||
Reference in New Issue
Block a user