Firmware
Classes | Public Member Functions | List of all members
FlightTasks Class Reference

Public Member Functions

bool update ()
 Call regularly in the control loop cycle to execute the task. More...
 
const vehicle_local_position_setpoint_s getPositionSetpoint ()
 Get the output data from the current task. More...
 
const vehicle_constraints_s getConstraints ()
 Get task dependent constraints. More...
 
const landing_gear_s getGear ()
 Get landing gear position. More...
 
const vehicle_trajectory_waypoint_s getAvoidanceWaypoint ()
 Get task avoidance desired waypoints. More...
 
const vehicle_trajectory_waypoint_s & getEmptyAvoidanceWaypoint ()
 Get empty avoidance desired waypoints. More...
 
int switchTask ()
 Switch to the next task in the available list (for testing) More...
 
int switchTask (FlightTaskIndex new_task_index)
 Switch to a specific task (for normal usage) More...
 
int switchTask (int new_task_index)
 
int getActiveTask () const
 Get the number of the active task. More...
 
bool isAnyTaskActive () const
 Check if any task is active. More...
 
void handleParameterUpdate ()
 Call this whenever a parameter update notification is received (parameter_update uORB message)
 
const char * errorToString (const int error)
 Call this method to get the description of a task error.
 
void setYawHandler (WeatherVane *ext_yaw_handler)
 Sets an external yaw handler. More...
 
void reActivate ()
 This method will re-activate current task.
 
void updateVelocityControllerIO (const matrix::Vector3f &vel_sp, const matrix::Vector3f &thrust_sp)
 

Member Function Documentation

§ getActiveTask()

int FlightTasks::getActiveTask ( ) const
inline

Get the number of the active task.

Returns
number of active task, -1 if there is none

§ getAvoidanceWaypoint()

const vehicle_trajectory_waypoint_s FlightTasks::getAvoidanceWaypoint ( )

Get task avoidance desired waypoints.

Returns
auto triplets in the mc_pos_control

§ getConstraints()

const vehicle_constraints_s FlightTasks::getConstraints ( )

Get task dependent constraints.

Returns
setpoint constraints that has to be respected by the position controller

§ getEmptyAvoidanceWaypoint()

const vehicle_trajectory_waypoint_s& FlightTasks::getEmptyAvoidanceWaypoint ( )

Get empty avoidance desired waypoints.

Returns
empty triplets in the mc_pos_control

§ getGear()

const landing_gear_s FlightTasks::getGear ( )

Get landing gear position.

Returns
landing gear

§ getPositionSetpoint()

const vehicle_local_position_setpoint_s FlightTasks::getPositionSetpoint ( )

Get the output data from the current task.

Returns
output setpoint, to be executed by position control

§ isAnyTaskActive()

bool FlightTasks::isAnyTaskActive ( ) const
inline

Check if any task is active.

Returns
true if a task is active, false if not

§ setYawHandler()

void FlightTasks::setYawHandler ( WeatherVane ext_yaw_handler)
inline

Sets an external yaw handler.

The active flight task can use the yaw handler to implement a different yaw control strategy.

§ switchTask() [1/2]

int FlightTasks::switchTask ( )
inline

Switch to the next task in the available list (for testing)

Returns
1 on success, <0 on error

§ switchTask() [2/2]

int FlightTasks::switchTask ( FlightTaskIndex  new_task_index)

Switch to a specific task (for normal usage)

Parameters
taskindex to switch to
Returns
1 on success, 0 on no change, <0 on error

§ update()

bool FlightTasks::update ( )

Call regularly in the control loop cycle to execute the task.

Returns
true on success, false on error

The documentation for this class was generated from the following files: