Browse Source

AutoLineSmoothVel - Remove duplicate of _yaw_sp_prev update. This is done in the Auto FlightTask, _limit_yaw_rate

sbg
bresch 6 years ago committed by Lorenz Meier
parent
commit
d13dfdcd24
  1. 3
      src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.hpp
  2. 2
      src/lib/FlightTasks/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp
  3. 1
      src/lib/FlightTasks/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.hpp

3
src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.hpp

@ -104,6 +104,8 @@ protected:
float _target_acceptance_radius = 0.0f; /**< Acceptances radius of the target */ float _target_acceptance_radius = 0.0f; /**< Acceptances radius of the target */
int _mission_gear = landing_gear_s::GEAR_KEEP; int _mission_gear = landing_gear_s::GEAR_KEEP;
float _yaw_sp_prev = NAN;
ObstacleAvoidance _obstacle_avoidance; /**< class adjusting setpoints according to external avoidance module's input */ ObstacleAvoidance _obstacle_avoidance; /**< class adjusting setpoints according to external avoidance module's input */
DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTask, DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTask,
@ -119,7 +121,6 @@ protected:
private: private:
matrix::Vector2f _lock_position_xy{NAN, NAN}; /**< if no valid triplet is received, lock positition to current position */ matrix::Vector2f _lock_position_xy{NAN, NAN}; /**< if no valid triplet is received, lock positition to current position */
bool _yaw_lock = false; /**< if within acceptance radius, lock yaw to current yaw */ bool _yaw_lock = false; /**< if within acceptance radius, lock yaw to current yaw */
float _yaw_sp_prev = NAN;
uORB::Subscription<position_setpoint_triplet_s> *_sub_triplet_setpoint{nullptr}; uORB::Subscription<position_setpoint_triplet_s> *_sub_triplet_setpoint{nullptr};
uORB::Subscription<vehicle_status_s> *_sub_vehicle_status{nullptr}; uORB::Subscription<vehicle_status_s> *_sub_vehicle_status{nullptr};

2
src/lib/FlightTasks/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.cpp

@ -82,8 +82,6 @@ void FlightTaskAutoLineSmoothVel::_generateHeading()
if (!_generateHeadingAlongTraj()) { if (!_generateHeadingAlongTraj()) {
_yaw_setpoint = _yaw_sp_prev; _yaw_setpoint = _yaw_sp_prev;
} }
_yaw_sp_prev = _yaw_setpoint;
} }
bool FlightTaskAutoLineSmoothVel::_generateHeadingAlongTraj() bool FlightTaskAutoLineSmoothVel::_generateHeadingAlongTraj()

1
src/lib/FlightTasks/tasks/AutoLineSmoothVel/FlightTaskAutoLineSmoothVel.hpp

@ -79,7 +79,6 @@ protected:
void _generateTrajectory(); void _generateTrajectory();
VelocitySmoothing _trajectory[3]; ///< Trajectories in x, y and z directions VelocitySmoothing _trajectory[3]; ///< Trajectories in x, y and z directions
float _yaw_sp_prev{NAN};
bool _want_takeoff{false}; bool _want_takeoff{false};
/* counters for estimator local position resets */ /* counters for estimator local position resets */

Loading…
Cancel
Save