StickAccelerationXY: change function name feasibility limit -> jerk limit

for clarity because it's more accurate.
This commit is contained in:
Matthias Grob
2021-04-21 14:33:00 +02:00
committed by Daniel Agar
parent c71a228f15
commit fee4728b1f
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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);