mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 19:31:36 +08:00
Positioncontrol: limit velocity upwards during smooth takeoff
This commit is contained in:
committed by
Lorenz Meier
parent
0f4eb8e766
commit
60a9b45c88
@@ -188,7 +188,7 @@ void PositionControl::_positionController()
|
|||||||
_VelMaxXY);
|
_VelMaxXY);
|
||||||
_vel_sp(0) = vel_sp_xy(0);
|
_vel_sp(0) = vel_sp_xy(0);
|
||||||
_vel_sp(1) = vel_sp_xy(1);
|
_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)
|
void PositionControl::_velocityController(const float &dt)
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ namespace Controller
|
|||||||
{
|
{
|
||||||
struct Constraints {
|
struct Constraints {
|
||||||
float tilt_max;
|
float tilt_max;
|
||||||
|
float vel_max_z_up;
|
||||||
|
float vel_max_z_down;
|
||||||
|
float vel_max_xy;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user