mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
StickAccelerationXY: change function name feasibility limit -> jerk limit
for clarity because it's more accurate.
This commit is contained in:
committed by
Daniel Agar
parent
c71a228f15
commit
fee4728b1f
@@ -78,7 +78,7 @@ void StickAccelerationXY::generateSetpoints(Vector2f stick_xy, const float yaw,
|
||||
Sticks::limitStickUnitLengthXY(stick_xy);
|
||||
Sticks::rotateIntoHeadingFrameXY(stick_xy, yaw, yaw_sp);
|
||||
_acceleration_setpoint = stick_xy.emult(acceleration_scale);
|
||||
applyFeasibilityLimit(dt);
|
||||
applyJerkLimit(dt);
|
||||
|
||||
// Add drag to limit speed and brake again
|
||||
Vector2f drag = calculateDrag(acceleration_scale.edivide(velocity_scale), dt, stick_xy, _velocity_setpoint);
|
||||
@@ -109,7 +109,7 @@ void StickAccelerationXY::getSetpoints(Vector3f &pos_sp, Vector3f &vel_sp, Vecto
|
||||
acc_sp.xy() = _acceleration_setpoint;
|
||||
}
|
||||
|
||||
void StickAccelerationXY::applyFeasibilityLimit(const float dt)
|
||||
void StickAccelerationXY::applyJerkLimit(const float dt)
|
||||
{
|
||||
// Apply jerk limit - acceleration slew rate
|
||||
// Scale each jerk limit with the normalized projection of the acceleration
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
void getSetpoints(matrix::Vector3f &pos_sp, matrix::Vector3f &vel_sp, matrix::Vector3f &acc_sp);
|
||||
|
||||
private:
|
||||
void applyFeasibilityLimit(const float dt);
|
||||
void applyJerkLimit(const float dt);
|
||||
matrix::Vector2f calculateDrag(matrix::Vector2f drag_coefficient, const float dt, const matrix::Vector2f &stick_xy,
|
||||
const matrix::Vector2f &vel_sp);
|
||||
void applyTiltLimit(matrix::Vector2f &acceleration);
|
||||
|
||||
Reference in New Issue
Block a user