Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
autopilot_guided.h File Reference
#include "std.h"
+ Include dependency graph for autopilot_guided.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GUIDED_FLAG_XY_OFFSET   (1<<0)
 Bitmask for setting the flags attribute in autopilot_guided_update function See function description for more details. More...
 
#define GUIDED_FLAG_XY_BODY   (1<<1)
 
#define GUIDED_FLAG_Z_OFFSET   (1<<2)
 
#define GUIDED_FLAG_YAW_OFFSET   (1<<3)
 
#define GUIDED_FLAG_XY_VEL   (1<<5)
 
#define GUIDED_FLAG_Z_VEL   (1<<6)
 
#define GUIDED_FLAG_YAW_RATE   (1<<7)
 

Functions

bool autopilot_guided_goto_ned (float x, float y, float z, float heading)
 Set position and heading setpoints in GUIDED mode. More...
 
bool autopilot_guided_goto_ned_relative (float dx, float dy, float dz, float dyaw)
 Set position and heading setpoints wrt. More...
 
bool autopilot_guided_goto_body_relative (float dx, float dy, float dz, float dyaw)
 Set position and heading setpoints wrt. More...
 
bool autopilot_guided_move_ned (float vx, float vy, float vz, float heading)
 Set velocity and heading setpoints in GUIDED mode. More...
 
void autopilot_guided_update (uint8_t flags, float x, float y, float z, float yaw)
 Set guided setpoints using flag mask in GUIDED mode. More...
 

Detailed Description

Autopilot guided mode interface.

Definition in file autopilot_guided.h.

Macro Definition Documentation

◆ GUIDED_FLAG_XY_BODY

#define GUIDED_FLAG_XY_BODY   (1<<1)

Definition at line 95 of file autopilot_guided.h.

◆ GUIDED_FLAG_XY_OFFSET

#define GUIDED_FLAG_XY_OFFSET   (1<<0)

Bitmask for setting the flags attribute in autopilot_guided_update function See function description for more details.

Definition at line 94 of file autopilot_guided.h.

◆ GUIDED_FLAG_XY_VEL

#define GUIDED_FLAG_XY_VEL   (1<<5)

Definition at line 98 of file autopilot_guided.h.

◆ GUIDED_FLAG_YAW_OFFSET

#define GUIDED_FLAG_YAW_OFFSET   (1<<3)

Definition at line 97 of file autopilot_guided.h.

◆ GUIDED_FLAG_YAW_RATE

#define GUIDED_FLAG_YAW_RATE   (1<<7)

Definition at line 100 of file autopilot_guided.h.

◆ GUIDED_FLAG_Z_OFFSET

#define GUIDED_FLAG_Z_OFFSET   (1<<2)

Definition at line 96 of file autopilot_guided.h.

◆ GUIDED_FLAG_Z_VEL

#define GUIDED_FLAG_Z_VEL   (1<<6)

Definition at line 99 of file autopilot_guided.h.

Function Documentation

◆ autopilot_guided_goto_body_relative()

bool autopilot_guided_goto_body_relative ( float  dx,
float  dy,
float  dz,
float  dyaw 
)

Set position and heading setpoints wrt.

current position AND heading in GUIDED mode.

Parameters
dxrelative position (body frame, forward) in meters.
dyrelative position (body frame, right) in meters.
dzrelative position (body frame, down) in meters.
dyawOffset relative to current heading setpoint in radians.
Returns
TRUE if setpoint was set (currently in AP_MODE_GUIDED)

Definition at line 58 of file autopilot_guided.c.

References AP_MODE_GUIDED, autopilot_get_mode(), autopilot_guided_goto_ned(), heading, FloatEulers::psi, stateGetNedToBodyEulers_f(), stateGetPositionNed_f(), stateIsLocalCoordinateValid(), NedCoor_f::x, NedCoor_f::y, and NedCoor_f::z.

Referenced by mavlink_common_message_handler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autopilot_guided_goto_ned()

bool autopilot_guided_goto_ned ( float  x,
float  y,
float  z,
float  heading 
)

Set position and heading setpoints in GUIDED mode.

Parameters
xNorth position (local NED frame) in meters.
yEast position (local NED frame) in meters.
zDown position (local NED frame) in meters.
headingSetpoint in radians.
Returns
TRUE if setpoint was set (currently in AP_MODE_GUIDED)

Definition at line 35 of file autopilot_guided.c.

References AP_MODE_GUIDED, autopilot_get_mode(), guidance_h_set_guided_heading(), guidance_h_set_guided_pos(), guidance_v_set_guided_z(), and heading.

Referenced by autopilot_guided_goto_body_relative(), autopilot_guided_goto_ned_relative(), and mavlink_common_message_handler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autopilot_guided_goto_ned_relative()

bool autopilot_guided_goto_ned_relative ( float  dx,
float  dy,
float  dz,
float  dyaw 
)

Set position and heading setpoints wrt.

current position in GUIDED mode.

Parameters
dxOffset relative to current north position (local NED frame) in meters.
dyOffset relative to current east position (local NED frame) in meters.
dzOffset relative to current down position (local NED frame) in meters.
dyawOffset relative to current heading setpoint in radians.
Returns
TRUE if setpoint was set (currently in AP_MODE_GUIDED)

Definition at line 46 of file autopilot_guided.c.

References AP_MODE_GUIDED, autopilot_get_mode(), autopilot_guided_goto_ned(), heading, FloatEulers::psi, stateGetNedToBodyEulers_f(), stateGetPositionNed_f(), stateIsLocalCoordinateValid(), NedCoor_f::x, NedCoor_f::y, and NedCoor_f::z.

Referenced by mavlink_common_message_handler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autopilot_guided_move_ned()

bool autopilot_guided_move_ned ( float  vx,
float  vy,
float  vz,
float  heading 
)

Set velocity and heading setpoints in GUIDED mode.

Parameters
vxNorth velocity (local NED frame) in meters/sec.
vyEast velocity (local NED frame) in meters/sec.
vzDown velocity (local NED frame) in meters/sec.
headingSetpoint in radians.
Returns
TRUE if setpoint was set (currently in AP_MODE_GUIDED)

Definition at line 71 of file autopilot_guided.c.

References AP_MODE_GUIDED, autopilot_get_mode(), guidance_h_set_guided_heading(), guidance_h_set_guided_vel(), guidance_v_set_guided_vz(), and heading.

Referenced by mavlink_common_message_handler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autopilot_guided_update()

void autopilot_guided_update ( uint8_t  flags,
float  x,
float  y,
float  z,
float  yaw 
)

Set guided setpoints using flag mask in GUIDED mode.

Parameters
flagsBits 0-3 are used to determine the axis system to be used. If bits 0 and 1 are clear then the coordinates are set in absolute NE coordinates. If bit 1 is set bit 0 is ignored. Bits 5-7 define whether the setpoints should be used as position or velocity. Bit flags are defined as follows: bit 0: x,y as offset coordinates bit 1: x,y in body coordinates bit 2: z as offset coordinates bit 3: yaw as offset coordinates bit 4: free bit 5: x,y as vel bit 6: z as vel bit 7: yaw as rate
xNorth position/velocity in meters or meters/sec.
yEast position/velocity in meters or meters/sec.
zDown position/velocity in meters or meters/sec.
yawHeading or heading rate setpoint in radians or radians/sec.

Definition at line 95 of file autopilot_guided.c.

References AP_MODE_GUIDED, autopilot_get_mode(), guidance_h_set_guided_body_vel(), guidance_h_set_guided_heading(), guidance_h_set_guided_heading_rate(), guidance_h_set_guided_pos(), guidance_h_set_guided_vel(), guidance_v_set_guided_vz(), guidance_v_set_guided_z(), FloatEulers::psi, stateGetNedToBodyEulers_f(), stateGetPositionNed_f(), stateIsLocalCoordinateValid(), FloatVect2::x, NedCoor_f::x, FloatVect2::y, NedCoor_f::y, and NedCoor_f::z.

Referenced by firmware_parse_msg(), and nav_fish_velocity_run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: