44 #include <px4_platform_common/module_params.h> 254 DEFINE_PARAMETERS_CUSTOM_PARENT(ModuleParams,
255 (ParamFloat<px4::params::MPC_XY_VEL_MAX>) _param_mpc_xy_vel_max,
256 (ParamFloat<px4::params::MPC_Z_VEL_MAX_DN>) _param_mpc_z_vel_max_dn,
257 (ParamFloat<px4::params::MPC_Z_VEL_MAX_UP>) _param_mpc_z_vel_max_up,
258 (ParamFloat<px4::params::MPC_TILTMAX_AIR>) _param_mpc_tiltmax_air
matrix::Vector3f _acceleration_setpoint
vehicle_trajectory_waypoint_s _desired_waypoint
Desired waypoints.
matrix::Vector3f _velocity
current vehicle velocity
static const vehicle_local_position_setpoint_s empty_setpoint
Empty setpoint.
void handleParameterUpdate()
Call this whenever a parameter update notification is received (parameter_update uORB message) ...
hrt_abstime _time_stamp_activate
time stamp when task was activated
void _checkEkfResetCounters()
const landing_gear_s & getGear()
Get landing gear position.
virtual bool activate(vehicle_local_position_setpoint_s last_setpoint)
Call once on the event where you switch to the task.
matrix::Vector3f _velocity_setpoint_feedback
virtual void _setDefaultConstraints()
Set constraints to default values.
float _deltatime
passed time in seconds since the task was last updated
static const landing_gear_s empty_landing_gear_default_keep
default landing gear state
virtual void _ekfResetHandlerVelocityXY()
virtual ~FlightTask()=default
virtual void _ekfResetHandlerPositionXY()
const vehicle_trajectory_waypoint_s & getAvoidanceWaypoint()
Get avoidance desired waypoint.
virtual void _ekfResetHandlerHeading(float delta_psi)
hrt_abstime _time_stamp_current
time stamp at the beginning of the current task update
matrix::Vector3f _position_setpoint
Setpoints which the position controller has to execute.
High-resolution timer with callouts and timekeeping.
virtual bool update()=0
To be called regularly in the control loop cycle to execute the task.
float _dist_to_bottom
current height above ground level
const vehicle_constraints_s & getConstraints()
Get vehicle constraints.
static constexpr uint64_t _timeout
maximal time in us before a loop or data times out
virtual void _ekfResetHandlerVelocityZ()
matrix::Vector3f _jerk_setpoint
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
virtual bool updateFinalize()
Call after update() to constrain the generated setpoints in order to comply with the constraints of t...
matrix::Vector3f _thrust_setpoint
virtual void _ekfResetHandlerPositionZ()
struct FlightTask::@63 _reset_counters
virtual bool updateInitialize()
Call before activate() or update() to initialize time and input data.
void updateVelocityControllerIO(const matrix::Vector3f &vel_sp, const matrix::Vector3f &thrust_sp)
matrix::Vector3f _thrust_setpoint_feedback
matrix::Vector3f _position
current vehicle position
float _time
passed time in seconds since the task was activated
matrix::Vector3f _velocity_setpoint
uORB::SubscriptionData< vehicle_local_position_s > _sub_vehicle_local_position
virtual void reActivate()
Call this to reset an active Flight Task.
vehicle_constraints_s _constraints
Vehicle constraints.
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
virtual bool _checkTakeoff()
Determine when to trigger a takeoff (ignored in flight)
virtual bool applyCommandParameters(const vehicle_command_s &command)
To be called to adopt parameters from an arrived vehicle command.
void _evaluateVehicleLocalPosition()
Check and update local position.
void _resetSetpoints()
Reset all setpoints to NAN.
const vehicle_local_position_setpoint_s getPositionSetpoint()
Get the output data.
float _yaw
current vehicle yaw heading
uORB::SubscriptionData< vehicle_attitude_s > _sub_attitude
static const vehicle_constraints_s empty_constraints
Empty constraints.
void _initEkfResetCounters()
Monitor the EKF reset counters and call the appropriate handling functions in case of a reset event...
virtual void setYawHandler(WeatherVane *ext_yaw_handler)
Sets an external yaw handler which can be used by any flight task to implement a different yaw contro...
hrt_abstime _time_stamp_last
time stamp when task was last updated