MAV'RIC
|
Public Member Functions | |
Waypoint () | |
Creates a blank waypoint. | |
Waypoint (mavlink_mission_item_t &packet) | |
Initialize the waypoint handler. | |
Waypoint (uint8_t frame, uint16_t command, uint8_t autocontinue, float param1, float param2, float param3, float param4, float param5, float param6, float param7) | |
Initialize the waypoint handler. | |
void | send (const Mavlink_stream &mavlink_stream, uint32_t sysid, const mavlink_message_t *msg, uint16_t seq, uint8_t current) |
Sends a given waypoint via a MAVLink message. | |
uint8_t | frame () const |
Gets the frame of the waypoint. | |
uint16_t | command () const |
Gets the command of the waypoint. | |
uint8_t | autocontinue () const |
Gets the autocontinue state of the waypoint. | |
float | param1 () const |
Gets param1 of the waypoint. | |
float | param2 () const |
Gets param2 of the waypoint. | |
float | param3 () const |
Gets param3 of the waypoint. | |
float | param4 () const |
Gets param4 of the waypoint. | |
float | param5 () const |
Gets param5 of the waypoint. | |
float | param6 () const |
Gets param6 of the waypoint. | |
float | param7 () const |
Gets param7 of the waypoint. | |
bool | heading (float &heading) const |
Gets the heading of the waypoint. | |
bool | radius (float &radius) const |
Gets the radius of the waypoint. | |
local_position_t | local_pos () const |
Gets the waypoint in local coordinates. | |
Protected Attributes | |
uint8_t | frame_ |
The reference frame of the waypoint. | |
uint16_t | command_ |
The MAV_CMD_NAV id of the waypoint. | |
uint8_t | autocontinue_ |
Flag to tell whether the vehicle should auto continue to the next waypoint once it reaches the current waypoint. | |
float | param1_ |
Parameter depending on the MAV_CMD_NAV id. | |
float | param2_ |
Parameter depending on the MAV_CMD_NAV id. | |
float | param3_ |
Parameter depending on the MAV_CMD_NAV id. | |
float | param4_ |
Parameter depending on the MAV_CMD_NAV id. | |
float | param5_ |
Parameter depending on the MAV_CMD_NAV id. | |
float | param6_ |
Parameter depending on the MAV_CMD_NAV id. | |
float | param7_ |
Parameter depending on the MAV_CMD_NAV id. |
Waypoint::Waypoint | ( | mavlink_mission_item_t & | packet | ) |
Initialize the waypoint handler.
packet | The received packet for creating a waypoint |
Waypoint::Waypoint | ( | uint8_t | frame, |
uint16_t | command, | ||
uint8_t | autocontinue, | ||
float | param1, | ||
float | param2, | ||
float | param3, | ||
float | param4, | ||
float | param5, | ||
float | param6, | ||
float | param7 | ||
) |
Initialize the waypoint handler.
frame | The reference frame of the waypoint |
command | The MAV_CMD_NAV id of the waypoint |
autocontinue | Flag to tell whether the vehicle should auto continue to the next waypoint once it reaches the current waypoint |
param1 | Parameter depending on the MAV_CMD_NAV id |
param2 | Parameter depending on the MAV_CMD_NAV id |
param3 | Parameter depending on the MAV_CMD_NAV id |
param4 | Parameter depending on the MAV_CMD_NAV id |
param5 | Parameter depending on the MAV_CMD_NAV id (usually x/latitude) |
param6 | Parameter depending on the MAV_CMD_NAV id (usually y/longitude) |
param7 | Parameter depending on the MAV_CMD_NAV id (usually z/altitude) |
uint8_t Waypoint::autocontinue | ( | ) | const |
Gets the autocontinue state of the waypoint.
uint16_t Waypoint::command | ( | void | ) | const |
Gets the command of the waypoint.
uint8_t Waypoint::frame | ( | ) | const |
Gets the frame of the waypoint.
bool Waypoint::heading | ( | float & | heading | ) | const |
Gets the heading of the waypoint.
Outputs 0 if unsuccessful
heading | Output: heading |
local_position_t Waypoint::local_pos | ( | ) | const |
Gets the waypoint in local coordinates.
float Waypoint::param1 | ( | ) | const |
Gets param1 of the waypoint.
float Waypoint::param2 | ( | ) | const |
Gets param2 of the waypoint.
float Waypoint::param3 | ( | ) | const |
Gets param3 of the waypoint.
float Waypoint::param4 | ( | ) | const |
Gets param4 of the waypoint.
float Waypoint::param5 | ( | ) | const |
Gets param5 of the waypoint.
float Waypoint::param6 | ( | ) | const |
Gets param6 of the waypoint.
float Waypoint::param7 | ( | ) | const |
Gets param7 of the waypoint.
bool Waypoint::radius | ( | float & | radius | ) | const |
Gets the radius of the waypoint.
Outputs 0 if unsuccessful
radius | Output: radius |
void Waypoint::send | ( | const Mavlink_stream & | mavlink_stream, |
uint32_t | sysid, | ||
const mavlink_message_t * | msg, | ||
uint16_t | seq, | ||
uint8_t | current | ||
) |
Sends a given waypoint via a MAVLink message.
mavlink_stream | The mavlink stream to send the message through |
sysid | The system ID |
msg | The pointer to the received MAVLink message structure asking for a waypoint |
seq | The sequence number of the packet |
current | States if the waypoint is the current waypoint (If is the waypoint we are heading towards and are current en route to waypoint) |