57 position = position_setpoint_s::SETPOINT_TYPE_POSITION,
58 velocity = position_setpoint_s::SETPOINT_TYPE_VELOCITY,
59 loiter = position_setpoint_s::SETPOINT_TYPE_LOITER,
60 takeoff = position_setpoint_s::SETPOINT_TYPE_TAKEOFF,
61 land = position_setpoint_s::SETPOINT_TYPE_LAND,
62 idle = position_setpoint_s::SETPOINT_TYPE_IDLE,
63 offboard = position_setpoint_s::SETPOINT_TYPE_OFFBOARD,
64 follow_target = position_setpoint_s::SETPOINT_TYPE_FOLLOW_TARGET,
81 bool updateInitialize()
override;
82 bool updateFinalize()
override;
90 void _setDefaultConstraints()
override;
92 void _updateInternalWaypoints();
99 float _mc_cruise_speed{0.0f};
107 float _target_acceptance_radius{0.0f};
108 int _mission_gear{landing_gear_s::GEAR_KEEP};
110 float _yaw_sp_prev{NAN};
111 bool _yaw_sp_aligned{
false};
116 (ParamFloat<px4::params::MPC_XY_CRUISE>) _param_mpc_xy_cruise,
117 (ParamFloat<px4::params::MPC_CRUISE_90>) _param_mpc_cruise_90,
118 (ParamFloat<px4::params::NAV_MC_ALT_RAD>)
119 _param_nav_mc_alt_rad,
120 (ParamInt<px4::params::MPC_YAW_MODE>) _param_mpc_yaw_mode,
121 (ParamInt<px4::params::COM_OBS_AVOID>) _param_com_obs_avoid,
122 (ParamFloat<px4::params::MPC_YAWRAUTO_MAX>) _param_mpc_yawrauto_max,
123 (ParamFloat<px4::params::MIS_YAW_ERR>) _param_mis_yaw_err,
124 (ParamBool<px4::params::WV_EN>) _param_wv_en
129 bool _yaw_lock{
false};
142 float _reference_altitude{NAN};
148 void _limitYawRate();
149 bool _evaluateTriplets();
151 bool _evaluateGlobalReference();
152 State _getCurrentState();
153 void _set_heading_from_mode();
Definition of geo / math functions to perform geodesic calculations.
matrix::Vector2f _closest_pt
closest point to the vehicle position on the line previous - target
matrix::Vector3f _triplet_target
current triplet from navigator which may differ from the intenal one (_target) depending on the vehic...
Vehicle is in normal tracking mode from triplet previous to triplet target.
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
WaypointType
This enum has to agree with position_setpoint_s type definition The only reason for not using the str...
Vehilce is behind previous waypoint.
Abstract base class for different advanced flight tasks like orbit, follow me, ...
matrix::Vector3f _triplet_next_wp
next triplet from navigator which may differ from the intenal one (_next_wp) depending on the vehicle...
void setYawHandler(WeatherVane *ext_yaw_handler) override
Sets an external yaw handler which can be used to implement a different yaw control strategy...
ObstacleAvoidance _obstacle_avoidance
class adjusting setpoints according to external avoidance module's input
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
matrix::Vector3f _triplet_prev_wp
previous triplet from navigator which may differ from the intenal one (_prev_wp) depending on the veh...
Vehicle is more than cruise speed away from track.
Vehicle is in front of target.
This class is used to inject the setpoints of an obstacle avoidance system into the FlightTasks...