mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 08:44:08 +08:00
Positioncontrol: limit velocity upwards during smooth takeoff
This commit is contained in:
parent
0f4eb8e766
commit
60a9b45c88
@ -188,7 +188,7 @@ void PositionControl::_positionController()
|
||||
_VelMaxXY);
|
||||
_vel_sp(0) = vel_sp_xy(0);
|
||||
_vel_sp(1) = vel_sp_xy(1);
|
||||
_vel_sp(2) = math::constrain(_vel_sp(2), -_VelMaxZ.up, _VelMaxZ.down);
|
||||
_vel_sp(2) = math::constrain(_vel_sp(2), -_constraints.vel_max_z_up, _VelMaxZ.down);
|
||||
}
|
||||
|
||||
void PositionControl::_velocityController(const float &dt)
|
||||
|
||||
@ -54,6 +54,9 @@ namespace Controller
|
||||
{
|
||||
struct Constraints {
|
||||
float tilt_max;
|
||||
float vel_max_z_up;
|
||||
float vel_max_z_down;
|
||||
float vel_max_xy;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user