43 #include <uORB/topics/position_setpoint_triplet.h> 44 #include <uORB/topics/position_setpoint.h> 45 #include <uORB/topics/home_position.h> 46 #include <uORB/topics/vehicle_status.h> 47 #include <lib/ecl/geo/geo.h> 56 position = position_setpoint_s::SETPOINT_TYPE_POSITION,
57 velocity = position_setpoint_s::SETPOINT_TYPE_VELOCITY,
58 loiter = position_setpoint_s::SETPOINT_TYPE_LOITER,
59 takeoff = position_setpoint_s::SETPOINT_TYPE_TAKEOFF,
60 land = position_setpoint_s::SETPOINT_TYPE_LAND,
61 idle = position_setpoint_s::SETPOINT_TYPE_IDLE,
62 offboard = position_setpoint_s::SETPOINT_TYPE_OFFBOARD,
63 follow_target = position_setpoint_s::SETPOINT_TYPE_FOLLOW_TARGET,
80 bool activate()
override;
81 bool updateInitialize()
override;
82 bool updateFinalize()
override;
90 void _setDefaultConstraints()
override;
91 matrix::Vector2f _getTargetVelocityXY();
92 void _updateInternalWaypoints();
93 bool _compute_heading_from_2D_vector(
float &heading, matrix::Vector2f v);
95 matrix::Vector3f _prev_prev_wp{};
96 matrix::Vector3f _prev_wp{};
97 matrix::Vector3f _target{};
98 matrix::Vector3f _next_wp{};
99 float _mc_cruise_speed{0.0f};
104 float _target_acceptance_radius = 0.0f;
105 int _mission_gear = landing_gear_s::GEAR_KEEP;
113 _param_nav_mc_alt_rad,
120 matrix::Vector2f _lock_position_xy{NAN, NAN};
121 bool _yaw_lock =
false;
122 float _yaw_sp_prev = NAN;
132 matrix::Vector2f _closest_pt;
134 map_projection_reference_s _reference_position{};
135 float _reference_altitude = NAN;
142 void _limitYawRate();
143 bool _evaluateTriplets();
144 bool _isFinite(
const position_setpoint_s &sp);
145 bool _evaluateGlobalReference();
146 State _getCurrentState();
147 void _set_heading_from_mode();
Vehicle is in normal tracking mode from triplet previous to triplet target.
Definition: px4_param.h:313
Definition: WeatherVane.hpp:48
Definition: FlightTask.hpp:58
WaypointType
This enum has to agree with position_setpoint_s type definition The only reason for not using the str...
Definition: FlightTaskAuto.hpp:55
Definition: FlightTaskAuto.hpp:73
State
Definition: FlightTaskAuto.hpp:66
void setYawHandler(WeatherVane *ext_yaw_handler) override
Sets an external yaw handler which can be used to implement a different yaw control strategy...
Definition: FlightTaskAuto.hpp:87
Definition: px4_param.h:318
Vehilce is behind previous waypoint.
Abstract base class for different advanced flight tasks like orbit, follow me, ...
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
Definition: drv_hrt.h:58
Vehicle is more than cruise speed away from track.
ObstacleAvoidance _obstacle_avoidance
class adjusting setpoints according to external avoidance module's input
Definition: FlightTaskAuto.hpp:107
Vehicle is in front of target.
Definition: ObstacleAvoidance.hpp:58
Definition: SubscriptionArray.hpp:46
This class is used to inject the setpoints of an obstacle avoidance system into the FlightTasks...