FlightTaskOrbit: Fix vertical speed limit

This commit is contained in:
Matthias Grob
2022-01-21 16:05:34 +01:00
parent 38de07186d
commit d73d8f390b
2 changed files with 1 additions and 2 deletions
@@ -252,9 +252,9 @@ void FlightTaskOrbit::_updateTrajectoryBoundaries()
_position_smoothing.setMaxJerk({max_jerk, max_jerk, max_jerk}); // TODO : Should be computed using heading
_altitude_velocity_smoothing.setMaxJerk(max_jerk);
if (_unsmoothed_velocity_setpoint(2) < 0.f) { // up
const float z_accel_constraint = _param_mpc_acc_up_max.get();
if (_velocity_setpoint(2) < 0.f) { // up
_position_smoothing.setMaxVelocityZ(_param_mpc_z_v_auto_up.get());
_position_smoothing.setMaxAccelerationZ(z_accel_constraint);
_altitude_velocity_smoothing.setMaxVel(_param_mpc_z_vel_max_up.get());
@@ -120,7 +120,6 @@ private:
bool _in_circle_approach = false;
PositionSmoothing _position_smoothing;
VelocitySmoothing _altitude_velocity_smoothing;
Vector3f _unsmoothed_velocity_setpoint;
/** yaw behaviour during the orbit flight according to MAVLink's ORBIT_YAW_BEHAVIOUR enum */
int _yaw_behaviour = orbit_status_s::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;