diff --git a/thirdParty/mavlink/include/ardupilotmega/ardupilotmega.h b/thirdParty/mavlink/include/ardupilotmega/ardupilotmega.h
index 4d13e0b543c9a021cd9811f4378bb84dfdc47d49..64827032d4512c8bc54eaebf643402449e77c8f6 100644
--- a/thirdParty/mavlink/include/ardupilotmega/ardupilotmega.h
+++ b/thirdParty/mavlink/include/ardupilotmega/ardupilotmega.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://qgroundcontrol.org/mavlink/
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Saturday, August 13 2011, 08:44 UTC
*/
#ifndef ARDUPILOTMEGA_H
#define ARDUPILOTMEGA_H
@@ -33,12 +33,14 @@ extern "C" {
// MESSAGE DEFINITIONS
+#include "./mavlink_msg_sensor_offsets.h"
+#include "./mavlink_msg_set_mag_offsets.h"
// MESSAGE LENGTHS
#undef MAVLINK_MESSAGE_LENGTHS
-#define MAVLINK_MESSAGE_LENGTHS { 3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 0, 0, 0, 0, 0, 5, 5, 26, 16, 36, 5, 6, 0, 0, 21, 0, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51 }
+#define MAVLINK_MESSAGE_LENGTHS { 3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 18, 18, 20, 20, 0, 0, 0, 26, 16, 36, 5, 6, 56, 26, 21, 18, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51 }
#ifdef __cplusplus
}
diff --git a/thirdParty/mavlink/include/ardupilotmega/mavlink.h b/thirdParty/mavlink/include/ardupilotmega/mavlink.h
index 8ee2430d74ef6945bd88749e49e4bc4105c40747..a54a6df31be8cf0a3c3ab7dfd8e2d3ca7b14855c 100644
--- a/thirdParty/mavlink/include/ardupilotmega/mavlink.h
+++ b/thirdParty/mavlink/include/ardupilotmega/mavlink.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://pixhawk.ethz.ch/software/mavlink
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Saturday, August 13 2011, 08:44 UTC
*/
#ifndef MAVLINK_H
#define MAVLINK_H
diff --git a/thirdParty/mavlink/include/ardupilotmega/mavlink_msg_sensor_offsets.h b/thirdParty/mavlink/include/ardupilotmega/mavlink_msg_sensor_offsets.h
new file mode 100644
index 0000000000000000000000000000000000000000..a3191c787073e5e7ff962713befe89a8b07bf7a2
--- /dev/null
+++ b/thirdParty/mavlink/include/ardupilotmega/mavlink_msg_sensor_offsets.h
@@ -0,0 +1,342 @@
+// MESSAGE SENSOR_OFFSETS PACKING
+
+#define MAVLINK_MSG_ID_SENSOR_OFFSETS 150
+
+typedef struct __mavlink_sensor_offsets_t
+{
+ int16_t mag_ofs_x; ///< magnetometer X offset
+ int16_t mag_ofs_y; ///< magnetometer Y offset
+ int16_t mag_ofs_z; ///< magnetometer Z offset
+ float mag_declination; ///< magnetic declination (radians)
+ int32_t raw_press; ///< raw pressure from barometer
+ int32_t raw_temp; ///< raw temperature from barometer
+ float gyro_cal_x; ///< gyro X calibration
+ float gyro_cal_y; ///< gyro Y calibration
+ float gyro_cal_z; ///< gyro Z calibration
+ float accel_cal_x; ///< accel X calibration
+ float accel_cal_y; ///< accel Y calibration
+ float accel_cal_z; ///< accel Z calibration
+
+} mavlink_sensor_offsets_t;
+
+
+
+/**
+ * @brief Pack a sensor_offsets message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param mag_ofs_x magnetometer X offset
+ * @param mag_ofs_y magnetometer Y offset
+ * @param mag_ofs_z magnetometer Z offset
+ * @param mag_declination magnetic declination (radians)
+ * @param raw_press raw pressure from barometer
+ * @param raw_temp raw temperature from barometer
+ * @param gyro_cal_x gyro X calibration
+ * @param gyro_cal_y gyro Y calibration
+ * @param gyro_cal_z gyro Z calibration
+ * @param accel_cal_x accel X calibration
+ * @param accel_cal_y accel Y calibration
+ * @param accel_cal_z accel Z calibration
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_sensor_offsets_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z, float mag_declination, int32_t raw_press, int32_t raw_temp, float gyro_cal_x, float gyro_cal_y, float gyro_cal_z, float accel_cal_x, float accel_cal_y, float accel_cal_z)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SENSOR_OFFSETS;
+
+ i += put_int16_t_by_index(mag_ofs_x, i, msg->payload); // magnetometer X offset
+ i += put_int16_t_by_index(mag_ofs_y, i, msg->payload); // magnetometer Y offset
+ i += put_int16_t_by_index(mag_ofs_z, i, msg->payload); // magnetometer Z offset
+ i += put_float_by_index(mag_declination, i, msg->payload); // magnetic declination (radians)
+ i += put_int32_t_by_index(raw_press, i, msg->payload); // raw pressure from barometer
+ i += put_int32_t_by_index(raw_temp, i, msg->payload); // raw temperature from barometer
+ i += put_float_by_index(gyro_cal_x, i, msg->payload); // gyro X calibration
+ i += put_float_by_index(gyro_cal_y, i, msg->payload); // gyro Y calibration
+ i += put_float_by_index(gyro_cal_z, i, msg->payload); // gyro Z calibration
+ i += put_float_by_index(accel_cal_x, i, msg->payload); // accel X calibration
+ i += put_float_by_index(accel_cal_y, i, msg->payload); // accel Y calibration
+ i += put_float_by_index(accel_cal_z, i, msg->payload); // accel Z calibration
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a sensor_offsets message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param mag_ofs_x magnetometer X offset
+ * @param mag_ofs_y magnetometer Y offset
+ * @param mag_ofs_z magnetometer Z offset
+ * @param mag_declination magnetic declination (radians)
+ * @param raw_press raw pressure from barometer
+ * @param raw_temp raw temperature from barometer
+ * @param gyro_cal_x gyro X calibration
+ * @param gyro_cal_y gyro Y calibration
+ * @param gyro_cal_z gyro Z calibration
+ * @param accel_cal_x accel X calibration
+ * @param accel_cal_y accel Y calibration
+ * @param accel_cal_z accel Z calibration
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_sensor_offsets_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z, float mag_declination, int32_t raw_press, int32_t raw_temp, float gyro_cal_x, float gyro_cal_y, float gyro_cal_z, float accel_cal_x, float accel_cal_y, float accel_cal_z)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SENSOR_OFFSETS;
+
+ i += put_int16_t_by_index(mag_ofs_x, i, msg->payload); // magnetometer X offset
+ i += put_int16_t_by_index(mag_ofs_y, i, msg->payload); // magnetometer Y offset
+ i += put_int16_t_by_index(mag_ofs_z, i, msg->payload); // magnetometer Z offset
+ i += put_float_by_index(mag_declination, i, msg->payload); // magnetic declination (radians)
+ i += put_int32_t_by_index(raw_press, i, msg->payload); // raw pressure from barometer
+ i += put_int32_t_by_index(raw_temp, i, msg->payload); // raw temperature from barometer
+ i += put_float_by_index(gyro_cal_x, i, msg->payload); // gyro X calibration
+ i += put_float_by_index(gyro_cal_y, i, msg->payload); // gyro Y calibration
+ i += put_float_by_index(gyro_cal_z, i, msg->payload); // gyro Z calibration
+ i += put_float_by_index(accel_cal_x, i, msg->payload); // accel X calibration
+ i += put_float_by_index(accel_cal_y, i, msg->payload); // accel Y calibration
+ i += put_float_by_index(accel_cal_z, i, msg->payload); // accel Z calibration
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a sensor_offsets struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param sensor_offsets C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_sensor_offsets_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_sensor_offsets_t* sensor_offsets)
+{
+ return mavlink_msg_sensor_offsets_pack(system_id, component_id, msg, sensor_offsets->mag_ofs_x, sensor_offsets->mag_ofs_y, sensor_offsets->mag_ofs_z, sensor_offsets->mag_declination, sensor_offsets->raw_press, sensor_offsets->raw_temp, sensor_offsets->gyro_cal_x, sensor_offsets->gyro_cal_y, sensor_offsets->gyro_cal_z, sensor_offsets->accel_cal_x, sensor_offsets->accel_cal_y, sensor_offsets->accel_cal_z);
+}
+
+/**
+ * @brief Send a sensor_offsets message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param mag_ofs_x magnetometer X offset
+ * @param mag_ofs_y magnetometer Y offset
+ * @param mag_ofs_z magnetometer Z offset
+ * @param mag_declination magnetic declination (radians)
+ * @param raw_press raw pressure from barometer
+ * @param raw_temp raw temperature from barometer
+ * @param gyro_cal_x gyro X calibration
+ * @param gyro_cal_y gyro Y calibration
+ * @param gyro_cal_z gyro Z calibration
+ * @param accel_cal_x accel X calibration
+ * @param accel_cal_y accel Y calibration
+ * @param accel_cal_z accel Z calibration
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_sensor_offsets_send(mavlink_channel_t chan, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z, float mag_declination, int32_t raw_press, int32_t raw_temp, float gyro_cal_x, float gyro_cal_y, float gyro_cal_z, float accel_cal_x, float accel_cal_y, float accel_cal_z)
+{
+ mavlink_message_t msg;
+ mavlink_msg_sensor_offsets_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, mag_ofs_x, mag_ofs_y, mag_ofs_z, mag_declination, raw_press, raw_temp, gyro_cal_x, gyro_cal_y, gyro_cal_z, accel_cal_x, accel_cal_y, accel_cal_z);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE SENSOR_OFFSETS UNPACKING
+
+/**
+ * @brief Get field mag_ofs_x from sensor_offsets message
+ *
+ * @return magnetometer X offset
+ */
+static inline int16_t mavlink_msg_sensor_offsets_get_mag_ofs_x(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload)[0];
+ r.b[0] = (msg->payload)[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field mag_ofs_y from sensor_offsets message
+ *
+ * @return magnetometer Y offset
+ */
+static inline int16_t mavlink_msg_sensor_offsets_get_mag_ofs_y(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field mag_ofs_z from sensor_offsets message
+ *
+ * @return magnetometer Z offset
+ */
+static inline int16_t mavlink_msg_sensor_offsets_get_mag_ofs_z(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(int16_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field mag_declination from sensor_offsets message
+ *
+ * @return magnetic declination (radians)
+ */
+static inline float mavlink_msg_sensor_offsets_get_mag_declination(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[2] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[1];
+ r.b[1] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[2];
+ r.b[0] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field raw_press from sensor_offsets message
+ *
+ * @return raw pressure from barometer
+ */
+static inline int32_t mavlink_msg_sensor_offsets_get_raw_press(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float))[3];
+ return (int32_t)r.i;
+}
+
+/**
+ * @brief Get field raw_temp from sensor_offsets message
+ *
+ * @return raw temperature from barometer
+ */
+static inline int32_t mavlink_msg_sensor_offsets_get_raw_temp(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t))[0];
+ r.b[2] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t))[1];
+ r.b[1] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t))[2];
+ r.b[0] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t))[3];
+ return (int32_t)r.i;
+}
+
+/**
+ * @brief Get field gyro_cal_x from sensor_offsets message
+ *
+ * @return gyro X calibration
+ */
+static inline float mavlink_msg_sensor_offsets_get_gyro_cal_x(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[0];
+ r.b[2] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[1];
+ r.b[1] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[2];
+ r.b[0] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field gyro_cal_y from sensor_offsets message
+ *
+ * @return gyro Y calibration
+ */
+static inline float mavlink_msg_sensor_offsets_get_gyro_cal_y(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field gyro_cal_z from sensor_offsets message
+ *
+ * @return gyro Z calibration
+ */
+static inline float mavlink_msg_sensor_offsets_get_gyro_cal_z(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field accel_cal_x from sensor_offsets message
+ *
+ * @return accel X calibration
+ */
+static inline float mavlink_msg_sensor_offsets_get_accel_cal_x(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field accel_cal_y from sensor_offsets message
+ *
+ * @return accel Y calibration
+ */
+static inline float mavlink_msg_sensor_offsets_get_accel_cal_y(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field accel_cal_z from sensor_offsets message
+ *
+ * @return accel Z calibration
+ */
+static inline float mavlink_msg_sensor_offsets_get_accel_cal_z(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Decode a sensor_offsets message into a struct
+ *
+ * @param msg The message to decode
+ * @param sensor_offsets C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_sensor_offsets_decode(const mavlink_message_t* msg, mavlink_sensor_offsets_t* sensor_offsets)
+{
+ sensor_offsets->mag_ofs_x = mavlink_msg_sensor_offsets_get_mag_ofs_x(msg);
+ sensor_offsets->mag_ofs_y = mavlink_msg_sensor_offsets_get_mag_ofs_y(msg);
+ sensor_offsets->mag_ofs_z = mavlink_msg_sensor_offsets_get_mag_ofs_z(msg);
+ sensor_offsets->mag_declination = mavlink_msg_sensor_offsets_get_mag_declination(msg);
+ sensor_offsets->raw_press = mavlink_msg_sensor_offsets_get_raw_press(msg);
+ sensor_offsets->raw_temp = mavlink_msg_sensor_offsets_get_raw_temp(msg);
+ sensor_offsets->gyro_cal_x = mavlink_msg_sensor_offsets_get_gyro_cal_x(msg);
+ sensor_offsets->gyro_cal_y = mavlink_msg_sensor_offsets_get_gyro_cal_y(msg);
+ sensor_offsets->gyro_cal_z = mavlink_msg_sensor_offsets_get_gyro_cal_z(msg);
+ sensor_offsets->accel_cal_x = mavlink_msg_sensor_offsets_get_accel_cal_x(msg);
+ sensor_offsets->accel_cal_y = mavlink_msg_sensor_offsets_get_accel_cal_y(msg);
+ sensor_offsets->accel_cal_z = mavlink_msg_sensor_offsets_get_accel_cal_z(msg);
+}
diff --git a/thirdParty/mavlink/include/ardupilotmega/mavlink_msg_set_mag_offsets.h b/thirdParty/mavlink/include/ardupilotmega/mavlink_msg_set_mag_offsets.h
new file mode 100644
index 0000000000000000000000000000000000000000..10dd1a58fd57d9158e18b3949b9d54303081f745
--- /dev/null
+++ b/thirdParty/mavlink/include/ardupilotmega/mavlink_msg_set_mag_offsets.h
@@ -0,0 +1,178 @@
+// MESSAGE SET_MAG_OFFSETS PACKING
+
+#define MAVLINK_MSG_ID_SET_MAG_OFFSETS 151
+
+typedef struct __mavlink_set_mag_offsets_t
+{
+ uint8_t target_system; ///< System ID
+ uint8_t target_component; ///< Component ID
+ int16_t mag_ofs_x; ///< magnetometer X offset
+ int16_t mag_ofs_y; ///< magnetometer Y offset
+ int16_t mag_ofs_z; ///< magnetometer Z offset
+
+} mavlink_set_mag_offsets_t;
+
+
+
+/**
+ * @brief Pack a set_mag_offsets message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param mag_ofs_x magnetometer X offset
+ * @param mag_ofs_y magnetometer Y offset
+ * @param mag_ofs_z magnetometer Z offset
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_set_mag_offsets_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SET_MAG_OFFSETS;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_int16_t_by_index(mag_ofs_x, i, msg->payload); // magnetometer X offset
+ i += put_int16_t_by_index(mag_ofs_y, i, msg->payload); // magnetometer Y offset
+ i += put_int16_t_by_index(mag_ofs_z, i, msg->payload); // magnetometer Z offset
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a set_mag_offsets message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param mag_ofs_x magnetometer X offset
+ * @param mag_ofs_y magnetometer Y offset
+ * @param mag_ofs_z magnetometer Z offset
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_set_mag_offsets_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SET_MAG_OFFSETS;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_int16_t_by_index(mag_ofs_x, i, msg->payload); // magnetometer X offset
+ i += put_int16_t_by_index(mag_ofs_y, i, msg->payload); // magnetometer Y offset
+ i += put_int16_t_by_index(mag_ofs_z, i, msg->payload); // magnetometer Z offset
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a set_mag_offsets struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param set_mag_offsets C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_set_mag_offsets_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_mag_offsets_t* set_mag_offsets)
+{
+ return mavlink_msg_set_mag_offsets_pack(system_id, component_id, msg, set_mag_offsets->target_system, set_mag_offsets->target_component, set_mag_offsets->mag_ofs_x, set_mag_offsets->mag_ofs_y, set_mag_offsets->mag_ofs_z);
+}
+
+/**
+ * @brief Send a set_mag_offsets message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param mag_ofs_x magnetometer X offset
+ * @param mag_ofs_y magnetometer Y offset
+ * @param mag_ofs_z magnetometer Z offset
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_set_mag_offsets_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z)
+{
+ mavlink_message_t msg;
+ mavlink_msg_set_mag_offsets_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, target_system, target_component, mag_ofs_x, mag_ofs_y, mag_ofs_z);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE SET_MAG_OFFSETS UNPACKING
+
+/**
+ * @brief Get field target_system from set_mag_offsets message
+ *
+ * @return System ID
+ */
+static inline uint8_t mavlink_msg_set_mag_offsets_get_target_system(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload)[0];
+}
+
+/**
+ * @brief Get field target_component from set_mag_offsets message
+ *
+ * @return Component ID
+ */
+static inline uint8_t mavlink_msg_set_mag_offsets_get_target_component(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint8_t))[0];
+}
+
+/**
+ * @brief Get field mag_ofs_x from set_mag_offsets message
+ *
+ * @return magnetometer X offset
+ */
+static inline int16_t mavlink_msg_set_mag_offsets_get_mag_ofs_x(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field mag_ofs_y from set_mag_offsets message
+ *
+ * @return magnetometer Y offset
+ */
+static inline int16_t mavlink_msg_set_mag_offsets_get_mag_ofs_y(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field mag_ofs_z from set_mag_offsets message
+ *
+ * @return magnetometer Z offset
+ */
+static inline int16_t mavlink_msg_set_mag_offsets_get_mag_ofs_z(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(int16_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Decode a set_mag_offsets message into a struct
+ *
+ * @param msg The message to decode
+ * @param set_mag_offsets C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_set_mag_offsets_decode(const mavlink_message_t* msg, mavlink_set_mag_offsets_t* set_mag_offsets)
+{
+ set_mag_offsets->target_system = mavlink_msg_set_mag_offsets_get_target_system(msg);
+ set_mag_offsets->target_component = mavlink_msg_set_mag_offsets_get_target_component(msg);
+ set_mag_offsets->mag_ofs_x = mavlink_msg_set_mag_offsets_get_mag_ofs_x(msg);
+ set_mag_offsets->mag_ofs_y = mavlink_msg_set_mag_offsets_get_mag_ofs_y(msg);
+ set_mag_offsets->mag_ofs_z = mavlink_msg_set_mag_offsets_get_mag_ofs_z(msg);
+}
diff --git a/thirdParty/mavlink/include/common/common.h b/thirdParty/mavlink/include/common/common.h
index bf99ef000314ed026055dca19e22cc106f0e59fe..8e0348723e64b6ba0682af65d5323453e194b243 100644
--- a/thirdParty/mavlink/include/common/common.h
+++ b/thirdParty/mavlink/include/common/common.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://qgroundcontrol.org/mavlink/
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Monday, August 22 2011, 15:48 UTC
*/
#ifndef COMMON_H
#define COMMON_H
@@ -55,7 +55,8 @@ enum MAV_CMD
MAV_CMD_DO_REPEAT_RELAY=182, /* Cycle a relay on and off for a desired number of cyles with a desired period. | Relay number | Cycle count | Cycle time (seconds, decimal) | Empty | Empty | Empty | Empty | */
MAV_CMD_DO_SET_SERVO=183, /* Set a servo to a desired PWM value. | Servo number | PWM (microseconds, 1000 to 2000 typical) | Empty | Empty | Empty | Empty | Empty | */
MAV_CMD_DO_REPEAT_SERVO=184, /* Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. | Servo number | PWM (microseconds, 1000 to 2000 typical) | Cycle count | Cycle time (seconds) | Empty | Empty | Empty | */
- MAV_CMD_DO_CONTROL_VIDEO=200, /* Control onboard camera system. | Camera ID (-1 for all) | Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw | Transmission mode: 0: video stream, >0: single images every n seconds (decimal) | Recording: 0: disabled, 1: enabled compressed, 2: enabled raw | Empty | Empty | Empty | */
+ MAV_CMD_DO_CONTROL_VIDEO=200, /* Control onboard camera capturing. | Camera ID (-1 for all) | Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw | Transmission mode: 0: video stream, >0: single images every n seconds (decimal) | Recording: 0: disabled, 1: enabled compressed, 2: enabled raw | Empty | Empty | Empty | */
+ MAV_CMD_DO_SET_ROI=201, /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicles control system to control the vehicle attitude and the attitude of various devices such as cameras. | Region of interest mode. (see MAV_ROI enum) | Waypoint index/ target ID. (see MAV_ROI enum) | ROI index (allows a vehicle to manage multiple cameras etc.) | Empty | x the location of the fixed ROI (see MAV_FRAME) | y | z | */
MAV_CMD_DO_LAST=240, /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration | Empty | Empty | Empty | Empty | Empty | Empty | Empty | */
MAV_CMD_PREFLIGHT_CALIBRATION=241, /* Trigger calibration. This command will be only accepted if in pre-flight mode. | Gyro calibration: 0: no, 1: yes | Magnetometer calibration: 0: no, 1: yes | Ground pressure: 0: no, 1: yes | Radio calibration: 0: no, 1: yes | Empty | Empty | Empty | */
MAV_CMD_PREFLIGHT_STORAGE=245, /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. | Parameter storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM | Mission storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM | Reserved | Reserved | Empty | Empty | Empty | */
@@ -77,13 +78,14 @@ enum MAV_DATA_STREAM
MAV_DATA_STREAM_ENUM_END
};
-/** @brief The ROI (region of interest) for the vehicle. This can be be used by the vehicle for camera/vehicle attitude alignment (see MAV_CMD_NAV_ROI). */
+/** @brief The ROI (region of interest) for the vehicle. This can be be used by the vehicle for camera/vehicle attitude alignment (see MAV_CMD_NAV_ROI). */
enum MAV_ROI
{
- MAV_ROI_WPNEXT=0, /* Point toward next waypoint. | */
- MAV_ROI_WPINDEX=1, /* Point toward given waypoint. | */
- MAV_ROI_LOCATION=2, /* Point toward fixed location. | */
- MAV_ROI_TARGET=3, /* Point toward of given id. | */
+ MAV_ROI_NONE=0, /* No region of interest. | */
+ MAV_ROI_WPNEXT=1, /* Point toward next waypoint. | */
+ MAV_ROI_WPINDEX=2, /* Point toward given waypoint. | */
+ MAV_ROI_LOCATION=3, /* Point toward fixed location. | */
+ MAV_ROI_TARGET=4, /* Point toward of given id. | */
MAV_ROI_ENUM_END
};
@@ -136,18 +138,25 @@ enum MAV_ROI
#include "./mavlink_msg_control_status.h"
#include "./mavlink_msg_safety_set_allowed_area.h"
#include "./mavlink_msg_safety_allowed_area.h"
-#include "./mavlink_msg_attitude_controller_output.h"
-#include "./mavlink_msg_position_controller_output.h"
+#include "./mavlink_msg_set_roll_pitch_yaw_thrust.h"
+#include "./mavlink_msg_set_roll_pitch_yaw_speed_thrust.h"
+#include "./mavlink_msg_roll_pitch_yaw_thrust_setpoint.h"
+#include "./mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint.h"
#include "./mavlink_msg_nav_controller_output.h"
#include "./mavlink_msg_position_target.h"
#include "./mavlink_msg_state_correction.h"
#include "./mavlink_msg_set_altitude.h"
#include "./mavlink_msg_request_data_stream.h"
+#include "./mavlink_msg_hil_state.h"
+#include "./mavlink_msg_hil_controls.h"
#include "./mavlink_msg_manual_control.h"
+#include "./mavlink_msg_rc_channels_override.h"
#include "./mavlink_msg_global_position_int.h"
#include "./mavlink_msg_vfr_hud.h"
#include "./mavlink_msg_command.h"
#include "./mavlink_msg_command_ack.h"
+#include "./mavlink_msg_optical_flow.h"
+#include "./mavlink_msg_object_detection_event.h"
#include "./mavlink_msg_debug_vect.h"
#include "./mavlink_msg_named_value_float.h"
#include "./mavlink_msg_named_value_int.h"
@@ -158,7 +167,7 @@ enum MAV_ROI
// MESSAGE LENGTHS
#undef MAVLINK_MESSAGE_LENGTHS
-#define MAVLINK_MESSAGE_LENGTHS { 3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 0, 0, 0, 0, 0, 5, 5, 26, 16, 36, 5, 6, 0, 0, 21, 0, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51 }
+#define MAVLINK_MESSAGE_LENGTHS { 3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 18, 18, 24, 24, 0, 0, 0, 26, 16, 36, 5, 6, 56, 26, 21, 18, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51 }
#ifdef __cplusplus
}
diff --git a/thirdParty/mavlink/include/common/mavlink.h b/thirdParty/mavlink/include/common/mavlink.h
index 404b970bffead60f0b273e47333bd8f438f488db..86a5baf89ca82ee6d87b81337a492c583787010f 100644
--- a/thirdParty/mavlink/include/common/mavlink.h
+++ b/thirdParty/mavlink/include/common/mavlink.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://pixhawk.ethz.ch/software/mavlink
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Monday, August 22 2011, 15:48 UTC
*/
#ifndef MAVLINK_H
#define MAVLINK_H
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_full_state.h b/thirdParty/mavlink/include/common/mavlink_msg_full_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..ed177e22e2fcf3ab2494211338d711e4b3f2b51c
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_full_state.h
@@ -0,0 +1,428 @@
+// MESSAGE FULL_STATE PACKING
+
+#define MAVLINK_MSG_ID_FULL_STATE 67
+
+typedef struct __mavlink_full_state_t
+{
+ uint64_t usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ float roll; ///< Roll angle (rad)
+ float pitch; ///< Pitch angle (rad)
+ float yaw; ///< Yaw angle (rad)
+ float rollspeed; ///< Roll angular speed (rad/s)
+ float pitchspeed; ///< Pitch angular speed (rad/s)
+ float yawspeed; ///< Yaw angular speed (rad/s)
+ int32_t lat; ///< Latitude, expressed as * 1E7
+ int32_t lon; ///< Longitude, expressed as * 1E7
+ int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters)
+ int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
+ int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
+ int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100
+ int16_t xacc; ///< X acceleration (mg)
+ int16_t yacc; ///< Y acceleration (mg)
+ int16_t zacc; ///< Z acceleration (mg)
+
+} mavlink_full_state_t;
+
+
+
+/**
+ * @brief Pack a full_state message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ * @param roll Roll angle (rad)
+ * @param pitch Pitch angle (rad)
+ * @param yaw Yaw angle (rad)
+ * @param rollspeed Roll angular speed (rad/s)
+ * @param pitchspeed Pitch angular speed (rad/s)
+ * @param yawspeed Yaw angular speed (rad/s)
+ * @param lat Latitude, expressed as * 1E7
+ * @param lon Longitude, expressed as * 1E7
+ * @param alt Altitude in meters, expressed as * 1000 (millimeters)
+ * @param vx Ground X Speed (Latitude), expressed as m/s * 100
+ * @param vy Ground Y Speed (Longitude), expressed as m/s * 100
+ * @param vz Ground Z Speed (Altitude), expressed as m/s * 100
+ * @param xacc X acceleration (mg)
+ * @param yacc Y acceleration (mg)
+ * @param zacc Z acceleration (mg)
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_full_state_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint64_t usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_FULL_STATE;
+
+ i += put_uint64_t_by_index(usec, i, msg->payload); // Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ i += put_float_by_index(roll, i, msg->payload); // Roll angle (rad)
+ i += put_float_by_index(pitch, i, msg->payload); // Pitch angle (rad)
+ i += put_float_by_index(yaw, i, msg->payload); // Yaw angle (rad)
+ i += put_float_by_index(rollspeed, i, msg->payload); // Roll angular speed (rad/s)
+ i += put_float_by_index(pitchspeed, i, msg->payload); // Pitch angular speed (rad/s)
+ i += put_float_by_index(yawspeed, i, msg->payload); // Yaw angular speed (rad/s)
+ i += put_int32_t_by_index(lat, i, msg->payload); // Latitude, expressed as * 1E7
+ i += put_int32_t_by_index(lon, i, msg->payload); // Longitude, expressed as * 1E7
+ i += put_int32_t_by_index(alt, i, msg->payload); // Altitude in meters, expressed as * 1000 (millimeters)
+ i += put_int16_t_by_index(vx, i, msg->payload); // Ground X Speed (Latitude), expressed as m/s * 100
+ i += put_int16_t_by_index(vy, i, msg->payload); // Ground Y Speed (Longitude), expressed as m/s * 100
+ i += put_int16_t_by_index(vz, i, msg->payload); // Ground Z Speed (Altitude), expressed as m/s * 100
+ i += put_int16_t_by_index(xacc, i, msg->payload); // X acceleration (mg)
+ i += put_int16_t_by_index(yacc, i, msg->payload); // Y acceleration (mg)
+ i += put_int16_t_by_index(zacc, i, msg->payload); // Z acceleration (mg)
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a full_state message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ * @param roll Roll angle (rad)
+ * @param pitch Pitch angle (rad)
+ * @param yaw Yaw angle (rad)
+ * @param rollspeed Roll angular speed (rad/s)
+ * @param pitchspeed Pitch angular speed (rad/s)
+ * @param yawspeed Yaw angular speed (rad/s)
+ * @param lat Latitude, expressed as * 1E7
+ * @param lon Longitude, expressed as * 1E7
+ * @param alt Altitude in meters, expressed as * 1000 (millimeters)
+ * @param vx Ground X Speed (Latitude), expressed as m/s * 100
+ * @param vy Ground Y Speed (Longitude), expressed as m/s * 100
+ * @param vz Ground Z Speed (Altitude), expressed as m/s * 100
+ * @param xacc X acceleration (mg)
+ * @param yacc Y acceleration (mg)
+ * @param zacc Z acceleration (mg)
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_full_state_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint64_t usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_FULL_STATE;
+
+ i += put_uint64_t_by_index(usec, i, msg->payload); // Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ i += put_float_by_index(roll, i, msg->payload); // Roll angle (rad)
+ i += put_float_by_index(pitch, i, msg->payload); // Pitch angle (rad)
+ i += put_float_by_index(yaw, i, msg->payload); // Yaw angle (rad)
+ i += put_float_by_index(rollspeed, i, msg->payload); // Roll angular speed (rad/s)
+ i += put_float_by_index(pitchspeed, i, msg->payload); // Pitch angular speed (rad/s)
+ i += put_float_by_index(yawspeed, i, msg->payload); // Yaw angular speed (rad/s)
+ i += put_int32_t_by_index(lat, i, msg->payload); // Latitude, expressed as * 1E7
+ i += put_int32_t_by_index(lon, i, msg->payload); // Longitude, expressed as * 1E7
+ i += put_int32_t_by_index(alt, i, msg->payload); // Altitude in meters, expressed as * 1000 (millimeters)
+ i += put_int16_t_by_index(vx, i, msg->payload); // Ground X Speed (Latitude), expressed as m/s * 100
+ i += put_int16_t_by_index(vy, i, msg->payload); // Ground Y Speed (Longitude), expressed as m/s * 100
+ i += put_int16_t_by_index(vz, i, msg->payload); // Ground Z Speed (Altitude), expressed as m/s * 100
+ i += put_int16_t_by_index(xacc, i, msg->payload); // X acceleration (mg)
+ i += put_int16_t_by_index(yacc, i, msg->payload); // Y acceleration (mg)
+ i += put_int16_t_by_index(zacc, i, msg->payload); // Z acceleration (mg)
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a full_state struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param full_state C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_full_state_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_full_state_t* full_state)
+{
+ return mavlink_msg_full_state_pack(system_id, component_id, msg, full_state->usec, full_state->roll, full_state->pitch, full_state->yaw, full_state->rollspeed, full_state->pitchspeed, full_state->yawspeed, full_state->lat, full_state->lon, full_state->alt, full_state->vx, full_state->vy, full_state->vz, full_state->xacc, full_state->yacc, full_state->zacc);
+}
+
+/**
+ * @brief Send a full_state message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ * @param roll Roll angle (rad)
+ * @param pitch Pitch angle (rad)
+ * @param yaw Yaw angle (rad)
+ * @param rollspeed Roll angular speed (rad/s)
+ * @param pitchspeed Pitch angular speed (rad/s)
+ * @param yawspeed Yaw angular speed (rad/s)
+ * @param lat Latitude, expressed as * 1E7
+ * @param lon Longitude, expressed as * 1E7
+ * @param alt Altitude in meters, expressed as * 1000 (millimeters)
+ * @param vx Ground X Speed (Latitude), expressed as m/s * 100
+ * @param vy Ground Y Speed (Longitude), expressed as m/s * 100
+ * @param vz Ground Z Speed (Altitude), expressed as m/s * 100
+ * @param xacc X acceleration (mg)
+ * @param yacc Y acceleration (mg)
+ * @param zacc Z acceleration (mg)
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_full_state_send(mavlink_channel_t chan, uint64_t usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
+{
+ mavlink_message_t msg;
+ mavlink_msg_full_state_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, usec, roll, pitch, yaw, rollspeed, pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, xacc, yacc, zacc);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE FULL_STATE UNPACKING
+
+/**
+ * @brief Get field usec from full_state message
+ *
+ * @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ */
+static inline uint64_t mavlink_msg_full_state_get_usec(const mavlink_message_t* msg)
+{
+ generic_64bit r;
+ r.b[7] = (msg->payload)[0];
+ r.b[6] = (msg->payload)[1];
+ r.b[5] = (msg->payload)[2];
+ r.b[4] = (msg->payload)[3];
+ r.b[3] = (msg->payload)[4];
+ r.b[2] = (msg->payload)[5];
+ r.b[1] = (msg->payload)[6];
+ r.b[0] = (msg->payload)[7];
+ return (uint64_t)r.ll;
+}
+
+/**
+ * @brief Get field roll from full_state message
+ *
+ * @return Roll angle (rad)
+ */
+static inline float mavlink_msg_full_state_get_roll(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitch from full_state message
+ *
+ * @return Pitch angle (rad)
+ */
+static inline float mavlink_msg_full_state_get_pitch(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yaw from full_state message
+ *
+ * @return Yaw angle (rad)
+ */
+static inline float mavlink_msg_full_state_get_yaw(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field rollspeed from full_state message
+ *
+ * @return Roll angular speed (rad/s)
+ */
+static inline float mavlink_msg_full_state_get_rollspeed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitchspeed from full_state message
+ *
+ * @return Pitch angular speed (rad/s)
+ */
+static inline float mavlink_msg_full_state_get_pitchspeed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yawspeed from full_state message
+ *
+ * @return Yaw angular speed (rad/s)
+ */
+static inline float mavlink_msg_full_state_get_yawspeed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field lat from full_state message
+ *
+ * @return Latitude, expressed as * 1E7
+ */
+static inline int32_t mavlink_msg_full_state_get_lat(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (int32_t)r.i;
+}
+
+/**
+ * @brief Get field lon from full_state message
+ *
+ * @return Longitude, expressed as * 1E7
+ */
+static inline int32_t mavlink_msg_full_state_get_lon(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t))[3];
+ return (int32_t)r.i;
+}
+
+/**
+ * @brief Get field alt from full_state message
+ *
+ * @return Altitude in meters, expressed as * 1000 (millimeters)
+ */
+static inline int32_t mavlink_msg_full_state_get_alt(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[3];
+ return (int32_t)r.i;
+}
+
+/**
+ * @brief Get field vx from full_state message
+ *
+ * @return Ground X Speed (Latitude), expressed as m/s * 100
+ */
+static inline int16_t mavlink_msg_full_state_get_vx(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field vy from full_state message
+ *
+ * @return Ground Y Speed (Longitude), expressed as m/s * 100
+ */
+static inline int16_t mavlink_msg_full_state_get_vy(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field vz from full_state message
+ *
+ * @return Ground Z Speed (Altitude), expressed as m/s * 100
+ */
+static inline int16_t mavlink_msg_full_state_get_vz(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field xacc from full_state message
+ *
+ * @return X acceleration (mg)
+ */
+static inline int16_t mavlink_msg_full_state_get_xacc(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field yacc from full_state message
+ *
+ * @return Y acceleration (mg)
+ */
+static inline int16_t mavlink_msg_full_state_get_yacc(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field zacc from full_state message
+ *
+ * @return Z acceleration (mg)
+ */
+static inline int16_t mavlink_msg_full_state_get_zacc(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Decode a full_state message into a struct
+ *
+ * @param msg The message to decode
+ * @param full_state C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_full_state_decode(const mavlink_message_t* msg, mavlink_full_state_t* full_state)
+{
+ full_state->usec = mavlink_msg_full_state_get_usec(msg);
+ full_state->roll = mavlink_msg_full_state_get_roll(msg);
+ full_state->pitch = mavlink_msg_full_state_get_pitch(msg);
+ full_state->yaw = mavlink_msg_full_state_get_yaw(msg);
+ full_state->rollspeed = mavlink_msg_full_state_get_rollspeed(msg);
+ full_state->pitchspeed = mavlink_msg_full_state_get_pitchspeed(msg);
+ full_state->yawspeed = mavlink_msg_full_state_get_yawspeed(msg);
+ full_state->lat = mavlink_msg_full_state_get_lat(msg);
+ full_state->lon = mavlink_msg_full_state_get_lon(msg);
+ full_state->alt = mavlink_msg_full_state_get_alt(msg);
+ full_state->vx = mavlink_msg_full_state_get_vx(msg);
+ full_state->vy = mavlink_msg_full_state_get_vy(msg);
+ full_state->vz = mavlink_msg_full_state_get_vz(msg);
+ full_state->xacc = mavlink_msg_full_state_get_xacc(msg);
+ full_state->yacc = mavlink_msg_full_state_get_yacc(msg);
+ full_state->zacc = mavlink_msg_full_state_get_zacc(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_hil_controls.h b/thirdParty/mavlink/include/common/mavlink_msg_hil_controls.h
new file mode 100644
index 0000000000000000000000000000000000000000..80f33ebd06a9497d2d3f8678d8a104960d280926
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_hil_controls.h
@@ -0,0 +1,232 @@
+// MESSAGE HIL_CONTROLS PACKING
+
+#define MAVLINK_MSG_ID_HIL_CONTROLS 68
+
+typedef struct __mavlink_hil_controls_t
+{
+ uint64_t time_us; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ float roll_ailerons; ///< Control output -3 .. 1
+ float pitch_elevator; ///< Control output -1 .. 1
+ float yaw_rudder; ///< Control output -1 .. 1
+ float throttle; ///< Throttle 0 .. 1
+ uint8_t mode; ///< System mode (MAV_MODE)
+ uint8_t nav_mode; ///< Navigation mode (MAV_NAV_MODE)
+
+} mavlink_hil_controls_t;
+
+
+
+/**
+ * @brief Pack a hil_controls message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param time_us Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ * @param roll_ailerons Control output -3 .. 1
+ * @param pitch_elevator Control output -1 .. 1
+ * @param yaw_rudder Control output -1 .. 1
+ * @param throttle Throttle 0 .. 1
+ * @param mode System mode (MAV_MODE)
+ * @param nav_mode Navigation mode (MAV_NAV_MODE)
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_hil_controls_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint64_t time_us, float roll_ailerons, float pitch_elevator, float yaw_rudder, float throttle, uint8_t mode, uint8_t nav_mode)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_HIL_CONTROLS;
+
+ i += put_uint64_t_by_index(time_us, i, msg->payload); // Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ i += put_float_by_index(roll_ailerons, i, msg->payload); // Control output -3 .. 1
+ i += put_float_by_index(pitch_elevator, i, msg->payload); // Control output -1 .. 1
+ i += put_float_by_index(yaw_rudder, i, msg->payload); // Control output -1 .. 1
+ i += put_float_by_index(throttle, i, msg->payload); // Throttle 0 .. 1
+ i += put_uint8_t_by_index(mode, i, msg->payload); // System mode (MAV_MODE)
+ i += put_uint8_t_by_index(nav_mode, i, msg->payload); // Navigation mode (MAV_NAV_MODE)
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a hil_controls message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param time_us Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ * @param roll_ailerons Control output -3 .. 1
+ * @param pitch_elevator Control output -1 .. 1
+ * @param yaw_rudder Control output -1 .. 1
+ * @param throttle Throttle 0 .. 1
+ * @param mode System mode (MAV_MODE)
+ * @param nav_mode Navigation mode (MAV_NAV_MODE)
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_hil_controls_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint64_t time_us, float roll_ailerons, float pitch_elevator, float yaw_rudder, float throttle, uint8_t mode, uint8_t nav_mode)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_HIL_CONTROLS;
+
+ i += put_uint64_t_by_index(time_us, i, msg->payload); // Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ i += put_float_by_index(roll_ailerons, i, msg->payload); // Control output -3 .. 1
+ i += put_float_by_index(pitch_elevator, i, msg->payload); // Control output -1 .. 1
+ i += put_float_by_index(yaw_rudder, i, msg->payload); // Control output -1 .. 1
+ i += put_float_by_index(throttle, i, msg->payload); // Throttle 0 .. 1
+ i += put_uint8_t_by_index(mode, i, msg->payload); // System mode (MAV_MODE)
+ i += put_uint8_t_by_index(nav_mode, i, msg->payload); // Navigation mode (MAV_NAV_MODE)
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a hil_controls struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param hil_controls C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_hil_controls_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_controls_t* hil_controls)
+{
+ return mavlink_msg_hil_controls_pack(system_id, component_id, msg, hil_controls->time_us, hil_controls->roll_ailerons, hil_controls->pitch_elevator, hil_controls->yaw_rudder, hil_controls->throttle, hil_controls->mode, hil_controls->nav_mode);
+}
+
+/**
+ * @brief Send a hil_controls message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param time_us Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ * @param roll_ailerons Control output -3 .. 1
+ * @param pitch_elevator Control output -1 .. 1
+ * @param yaw_rudder Control output -1 .. 1
+ * @param throttle Throttle 0 .. 1
+ * @param mode System mode (MAV_MODE)
+ * @param nav_mode Navigation mode (MAV_NAV_MODE)
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_hil_controls_send(mavlink_channel_t chan, uint64_t time_us, float roll_ailerons, float pitch_elevator, float yaw_rudder, float throttle, uint8_t mode, uint8_t nav_mode)
+{
+ mavlink_message_t msg;
+ mavlink_msg_hil_controls_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, time_us, roll_ailerons, pitch_elevator, yaw_rudder, throttle, mode, nav_mode);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE HIL_CONTROLS UNPACKING
+
+/**
+ * @brief Get field time_us from hil_controls message
+ *
+ * @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ */
+static inline uint64_t mavlink_msg_hil_controls_get_time_us(const mavlink_message_t* msg)
+{
+ generic_64bit r;
+ r.b[7] = (msg->payload)[0];
+ r.b[6] = (msg->payload)[1];
+ r.b[5] = (msg->payload)[2];
+ r.b[4] = (msg->payload)[3];
+ r.b[3] = (msg->payload)[4];
+ r.b[2] = (msg->payload)[5];
+ r.b[1] = (msg->payload)[6];
+ r.b[0] = (msg->payload)[7];
+ return (uint64_t)r.ll;
+}
+
+/**
+ * @brief Get field roll_ailerons from hil_controls message
+ *
+ * @return Control output -3 .. 1
+ */
+static inline float mavlink_msg_hil_controls_get_roll_ailerons(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitch_elevator from hil_controls message
+ *
+ * @return Control output -1 .. 1
+ */
+static inline float mavlink_msg_hil_controls_get_pitch_elevator(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yaw_rudder from hil_controls message
+ *
+ * @return Control output -1 .. 1
+ */
+static inline float mavlink_msg_hil_controls_get_yaw_rudder(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field throttle from hil_controls message
+ *
+ * @return Throttle 0 .. 1
+ */
+static inline float mavlink_msg_hil_controls_get_throttle(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field mode from hil_controls message
+ *
+ * @return System mode (MAV_MODE)
+ */
+static inline uint8_t mavlink_msg_hil_controls_get_mode(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+}
+
+/**
+ * @brief Get field nav_mode from hil_controls message
+ *
+ * @return Navigation mode (MAV_NAV_MODE)
+ */
+static inline uint8_t mavlink_msg_hil_controls_get_nav_mode(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(uint8_t))[0];
+}
+
+/**
+ * @brief Decode a hil_controls message into a struct
+ *
+ * @param msg The message to decode
+ * @param hil_controls C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_hil_controls_decode(const mavlink_message_t* msg, mavlink_hil_controls_t* hil_controls)
+{
+ hil_controls->time_us = mavlink_msg_hil_controls_get_time_us(msg);
+ hil_controls->roll_ailerons = mavlink_msg_hil_controls_get_roll_ailerons(msg);
+ hil_controls->pitch_elevator = mavlink_msg_hil_controls_get_pitch_elevator(msg);
+ hil_controls->yaw_rudder = mavlink_msg_hil_controls_get_yaw_rudder(msg);
+ hil_controls->throttle = mavlink_msg_hil_controls_get_throttle(msg);
+ hil_controls->mode = mavlink_msg_hil_controls_get_mode(msg);
+ hil_controls->nav_mode = mavlink_msg_hil_controls_get_nav_mode(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_hil_state.h b/thirdParty/mavlink/include/common/mavlink_msg_hil_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..371cd4ae46255970abd252901ef905bd96ddf9af
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_hil_state.h
@@ -0,0 +1,428 @@
+// MESSAGE HIL_STATE PACKING
+
+#define MAVLINK_MSG_ID_HIL_STATE 67
+
+typedef struct __mavlink_hil_state_t
+{
+ uint64_t usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ float roll; ///< Roll angle (rad)
+ float pitch; ///< Pitch angle (rad)
+ float yaw; ///< Yaw angle (rad)
+ float rollspeed; ///< Roll angular speed (rad/s)
+ float pitchspeed; ///< Pitch angular speed (rad/s)
+ float yawspeed; ///< Yaw angular speed (rad/s)
+ int32_t lat; ///< Latitude, expressed as * 1E7
+ int32_t lon; ///< Longitude, expressed as * 1E7
+ int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters)
+ int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
+ int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
+ int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100
+ int16_t xacc; ///< X acceleration (mg)
+ int16_t yacc; ///< Y acceleration (mg)
+ int16_t zacc; ///< Z acceleration (mg)
+
+} mavlink_hil_state_t;
+
+
+
+/**
+ * @brief Pack a hil_state message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ * @param roll Roll angle (rad)
+ * @param pitch Pitch angle (rad)
+ * @param yaw Yaw angle (rad)
+ * @param rollspeed Roll angular speed (rad/s)
+ * @param pitchspeed Pitch angular speed (rad/s)
+ * @param yawspeed Yaw angular speed (rad/s)
+ * @param lat Latitude, expressed as * 1E7
+ * @param lon Longitude, expressed as * 1E7
+ * @param alt Altitude in meters, expressed as * 1000 (millimeters)
+ * @param vx Ground X Speed (Latitude), expressed as m/s * 100
+ * @param vy Ground Y Speed (Longitude), expressed as m/s * 100
+ * @param vz Ground Z Speed (Altitude), expressed as m/s * 100
+ * @param xacc X acceleration (mg)
+ * @param yacc Y acceleration (mg)
+ * @param zacc Z acceleration (mg)
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_hil_state_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint64_t usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_HIL_STATE;
+
+ i += put_uint64_t_by_index(usec, i, msg->payload); // Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ i += put_float_by_index(roll, i, msg->payload); // Roll angle (rad)
+ i += put_float_by_index(pitch, i, msg->payload); // Pitch angle (rad)
+ i += put_float_by_index(yaw, i, msg->payload); // Yaw angle (rad)
+ i += put_float_by_index(rollspeed, i, msg->payload); // Roll angular speed (rad/s)
+ i += put_float_by_index(pitchspeed, i, msg->payload); // Pitch angular speed (rad/s)
+ i += put_float_by_index(yawspeed, i, msg->payload); // Yaw angular speed (rad/s)
+ i += put_int32_t_by_index(lat, i, msg->payload); // Latitude, expressed as * 1E7
+ i += put_int32_t_by_index(lon, i, msg->payload); // Longitude, expressed as * 1E7
+ i += put_int32_t_by_index(alt, i, msg->payload); // Altitude in meters, expressed as * 1000 (millimeters)
+ i += put_int16_t_by_index(vx, i, msg->payload); // Ground X Speed (Latitude), expressed as m/s * 100
+ i += put_int16_t_by_index(vy, i, msg->payload); // Ground Y Speed (Longitude), expressed as m/s * 100
+ i += put_int16_t_by_index(vz, i, msg->payload); // Ground Z Speed (Altitude), expressed as m/s * 100
+ i += put_int16_t_by_index(xacc, i, msg->payload); // X acceleration (mg)
+ i += put_int16_t_by_index(yacc, i, msg->payload); // Y acceleration (mg)
+ i += put_int16_t_by_index(zacc, i, msg->payload); // Z acceleration (mg)
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a hil_state message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ * @param roll Roll angle (rad)
+ * @param pitch Pitch angle (rad)
+ * @param yaw Yaw angle (rad)
+ * @param rollspeed Roll angular speed (rad/s)
+ * @param pitchspeed Pitch angular speed (rad/s)
+ * @param yawspeed Yaw angular speed (rad/s)
+ * @param lat Latitude, expressed as * 1E7
+ * @param lon Longitude, expressed as * 1E7
+ * @param alt Altitude in meters, expressed as * 1000 (millimeters)
+ * @param vx Ground X Speed (Latitude), expressed as m/s * 100
+ * @param vy Ground Y Speed (Longitude), expressed as m/s * 100
+ * @param vz Ground Z Speed (Altitude), expressed as m/s * 100
+ * @param xacc X acceleration (mg)
+ * @param yacc Y acceleration (mg)
+ * @param zacc Z acceleration (mg)
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_hil_state_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint64_t usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_HIL_STATE;
+
+ i += put_uint64_t_by_index(usec, i, msg->payload); // Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ i += put_float_by_index(roll, i, msg->payload); // Roll angle (rad)
+ i += put_float_by_index(pitch, i, msg->payload); // Pitch angle (rad)
+ i += put_float_by_index(yaw, i, msg->payload); // Yaw angle (rad)
+ i += put_float_by_index(rollspeed, i, msg->payload); // Roll angular speed (rad/s)
+ i += put_float_by_index(pitchspeed, i, msg->payload); // Pitch angular speed (rad/s)
+ i += put_float_by_index(yawspeed, i, msg->payload); // Yaw angular speed (rad/s)
+ i += put_int32_t_by_index(lat, i, msg->payload); // Latitude, expressed as * 1E7
+ i += put_int32_t_by_index(lon, i, msg->payload); // Longitude, expressed as * 1E7
+ i += put_int32_t_by_index(alt, i, msg->payload); // Altitude in meters, expressed as * 1000 (millimeters)
+ i += put_int16_t_by_index(vx, i, msg->payload); // Ground X Speed (Latitude), expressed as m/s * 100
+ i += put_int16_t_by_index(vy, i, msg->payload); // Ground Y Speed (Longitude), expressed as m/s * 100
+ i += put_int16_t_by_index(vz, i, msg->payload); // Ground Z Speed (Altitude), expressed as m/s * 100
+ i += put_int16_t_by_index(xacc, i, msg->payload); // X acceleration (mg)
+ i += put_int16_t_by_index(yacc, i, msg->payload); // Y acceleration (mg)
+ i += put_int16_t_by_index(zacc, i, msg->payload); // Z acceleration (mg)
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a hil_state struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param hil_state C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_hil_state_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_state_t* hil_state)
+{
+ return mavlink_msg_hil_state_pack(system_id, component_id, msg, hil_state->usec, hil_state->roll, hil_state->pitch, hil_state->yaw, hil_state->rollspeed, hil_state->pitchspeed, hil_state->yawspeed, hil_state->lat, hil_state->lon, hil_state->alt, hil_state->vx, hil_state->vy, hil_state->vz, hil_state->xacc, hil_state->yacc, hil_state->zacc);
+}
+
+/**
+ * @brief Send a hil_state message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ * @param roll Roll angle (rad)
+ * @param pitch Pitch angle (rad)
+ * @param yaw Yaw angle (rad)
+ * @param rollspeed Roll angular speed (rad/s)
+ * @param pitchspeed Pitch angular speed (rad/s)
+ * @param yawspeed Yaw angular speed (rad/s)
+ * @param lat Latitude, expressed as * 1E7
+ * @param lon Longitude, expressed as * 1E7
+ * @param alt Altitude in meters, expressed as * 1000 (millimeters)
+ * @param vx Ground X Speed (Latitude), expressed as m/s * 100
+ * @param vy Ground Y Speed (Longitude), expressed as m/s * 100
+ * @param vz Ground Z Speed (Altitude), expressed as m/s * 100
+ * @param xacc X acceleration (mg)
+ * @param yacc Y acceleration (mg)
+ * @param zacc Z acceleration (mg)
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_hil_state_send(mavlink_channel_t chan, uint64_t usec, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, int16_t xacc, int16_t yacc, int16_t zacc)
+{
+ mavlink_message_t msg;
+ mavlink_msg_hil_state_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, usec, roll, pitch, yaw, rollspeed, pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, xacc, yacc, zacc);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE HIL_STATE UNPACKING
+
+/**
+ * @brief Get field usec from hil_state message
+ *
+ * @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ */
+static inline uint64_t mavlink_msg_hil_state_get_usec(const mavlink_message_t* msg)
+{
+ generic_64bit r;
+ r.b[7] = (msg->payload)[0];
+ r.b[6] = (msg->payload)[1];
+ r.b[5] = (msg->payload)[2];
+ r.b[4] = (msg->payload)[3];
+ r.b[3] = (msg->payload)[4];
+ r.b[2] = (msg->payload)[5];
+ r.b[1] = (msg->payload)[6];
+ r.b[0] = (msg->payload)[7];
+ return (uint64_t)r.ll;
+}
+
+/**
+ * @brief Get field roll from hil_state message
+ *
+ * @return Roll angle (rad)
+ */
+static inline float mavlink_msg_hil_state_get_roll(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitch from hil_state message
+ *
+ * @return Pitch angle (rad)
+ */
+static inline float mavlink_msg_hil_state_get_pitch(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yaw from hil_state message
+ *
+ * @return Yaw angle (rad)
+ */
+static inline float mavlink_msg_hil_state_get_yaw(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field rollspeed from hil_state message
+ *
+ * @return Roll angular speed (rad/s)
+ */
+static inline float mavlink_msg_hil_state_get_rollspeed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitchspeed from hil_state message
+ *
+ * @return Pitch angular speed (rad/s)
+ */
+static inline float mavlink_msg_hil_state_get_pitchspeed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yawspeed from hil_state message
+ *
+ * @return Yaw angular speed (rad/s)
+ */
+static inline float mavlink_msg_hil_state_get_yawspeed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field lat from hil_state message
+ *
+ * @return Latitude, expressed as * 1E7
+ */
+static inline int32_t mavlink_msg_hil_state_get_lat(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (int32_t)r.i;
+}
+
+/**
+ * @brief Get field lon from hil_state message
+ *
+ * @return Longitude, expressed as * 1E7
+ */
+static inline int32_t mavlink_msg_hil_state_get_lon(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t))[3];
+ return (int32_t)r.i;
+}
+
+/**
+ * @brief Get field alt from hil_state message
+ *
+ * @return Altitude in meters, expressed as * 1000 (millimeters)
+ */
+static inline int32_t mavlink_msg_hil_state_get_alt(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t))[3];
+ return (int32_t)r.i;
+}
+
+/**
+ * @brief Get field vx from hil_state message
+ *
+ * @return Ground X Speed (Latitude), expressed as m/s * 100
+ */
+static inline int16_t mavlink_msg_hil_state_get_vx(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field vy from hil_state message
+ *
+ * @return Ground Y Speed (Longitude), expressed as m/s * 100
+ */
+static inline int16_t mavlink_msg_hil_state_get_vy(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field vz from hil_state message
+ *
+ * @return Ground Z Speed (Altitude), expressed as m/s * 100
+ */
+static inline int16_t mavlink_msg_hil_state_get_vz(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field xacc from hil_state message
+ *
+ * @return X acceleration (mg)
+ */
+static inline int16_t mavlink_msg_hil_state_get_xacc(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field yacc from hil_state message
+ *
+ * @return Y acceleration (mg)
+ */
+static inline int16_t mavlink_msg_hil_state_get_yacc(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field zacc from hil_state message
+ *
+ * @return Z acceleration (mg)
+ */
+static inline int16_t mavlink_msg_hil_state_get_zacc(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int32_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Decode a hil_state message into a struct
+ *
+ * @param msg The message to decode
+ * @param hil_state C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_hil_state_decode(const mavlink_message_t* msg, mavlink_hil_state_t* hil_state)
+{
+ hil_state->usec = mavlink_msg_hil_state_get_usec(msg);
+ hil_state->roll = mavlink_msg_hil_state_get_roll(msg);
+ hil_state->pitch = mavlink_msg_hil_state_get_pitch(msg);
+ hil_state->yaw = mavlink_msg_hil_state_get_yaw(msg);
+ hil_state->rollspeed = mavlink_msg_hil_state_get_rollspeed(msg);
+ hil_state->pitchspeed = mavlink_msg_hil_state_get_pitchspeed(msg);
+ hil_state->yawspeed = mavlink_msg_hil_state_get_yawspeed(msg);
+ hil_state->lat = mavlink_msg_hil_state_get_lat(msg);
+ hil_state->lon = mavlink_msg_hil_state_get_lon(msg);
+ hil_state->alt = mavlink_msg_hil_state_get_alt(msg);
+ hil_state->vx = mavlink_msg_hil_state_get_vx(msg);
+ hil_state->vy = mavlink_msg_hil_state_get_vy(msg);
+ hil_state->vz = mavlink_msg_hil_state_get_vz(msg);
+ hil_state->xacc = mavlink_msg_hil_state_get_xacc(msg);
+ hil_state->yacc = mavlink_msg_hil_state_get_yacc(msg);
+ hil_state->zacc = mavlink_msg_hil_state_get_zacc(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_object_detection_event.h b/thirdParty/mavlink/include/common/mavlink_msg_object_detection_event.h
new file mode 100644
index 0000000000000000000000000000000000000000..bd45e811ef22de3f4a3e4dbd1de13bcf3d0bf142
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_object_detection_event.h
@@ -0,0 +1,224 @@
+// MESSAGE OBJECT_DETECTION_EVENT PACKING
+
+#define MAVLINK_MSG_ID_OBJECT_DETECTION_EVENT 140
+
+typedef struct __mavlink_object_detection_event_t
+{
+ uint32_t time; ///< Timestamp in milliseconds since system boot
+ uint16_t object_id; ///< Object ID
+ uint8_t type; ///< Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
+ char name[20]; ///< Name of the object as defined by the detector
+ uint8_t quality; ///< Detection quality / confidence. 0: bad, 255: maximum confidence
+ float bearing; ///< Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
+ float distance; ///< Ground distance in meters
+
+} mavlink_object_detection_event_t;
+
+#define MAVLINK_MSG_OBJECT_DETECTION_EVENT_FIELD_NAME_LEN 20
+
+
+/**
+ * @brief Pack a object_detection_event message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param time Timestamp in milliseconds since system boot
+ * @param object_id Object ID
+ * @param type Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
+ * @param name Name of the object as defined by the detector
+ * @param quality Detection quality / confidence. 0: bad, 255: maximum confidence
+ * @param bearing Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
+ * @param distance Ground distance in meters
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_object_detection_event_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint32_t time, uint16_t object_id, uint8_t type, const char* name, uint8_t quality, float bearing, float distance)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_OBJECT_DETECTION_EVENT;
+
+ i += put_uint32_t_by_index(time, i, msg->payload); // Timestamp in milliseconds since system boot
+ i += put_uint16_t_by_index(object_id, i, msg->payload); // Object ID
+ i += put_uint8_t_by_index(type, i, msg->payload); // Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
+ i += put_array_by_index((const int8_t*)name, sizeof(char)*20, i, msg->payload); // Name of the object as defined by the detector
+ i += put_uint8_t_by_index(quality, i, msg->payload); // Detection quality / confidence. 0: bad, 255: maximum confidence
+ i += put_float_by_index(bearing, i, msg->payload); // Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
+ i += put_float_by_index(distance, i, msg->payload); // Ground distance in meters
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a object_detection_event message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param time Timestamp in milliseconds since system boot
+ * @param object_id Object ID
+ * @param type Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
+ * @param name Name of the object as defined by the detector
+ * @param quality Detection quality / confidence. 0: bad, 255: maximum confidence
+ * @param bearing Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
+ * @param distance Ground distance in meters
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_object_detection_event_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint32_t time, uint16_t object_id, uint8_t type, const char* name, uint8_t quality, float bearing, float distance)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_OBJECT_DETECTION_EVENT;
+
+ i += put_uint32_t_by_index(time, i, msg->payload); // Timestamp in milliseconds since system boot
+ i += put_uint16_t_by_index(object_id, i, msg->payload); // Object ID
+ i += put_uint8_t_by_index(type, i, msg->payload); // Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
+ i += put_array_by_index((const int8_t*)name, sizeof(char)*20, i, msg->payload); // Name of the object as defined by the detector
+ i += put_uint8_t_by_index(quality, i, msg->payload); // Detection quality / confidence. 0: bad, 255: maximum confidence
+ i += put_float_by_index(bearing, i, msg->payload); // Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
+ i += put_float_by_index(distance, i, msg->payload); // Ground distance in meters
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a object_detection_event struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param object_detection_event C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_object_detection_event_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_object_detection_event_t* object_detection_event)
+{
+ return mavlink_msg_object_detection_event_pack(system_id, component_id, msg, object_detection_event->time, object_detection_event->object_id, object_detection_event->type, object_detection_event->name, object_detection_event->quality, object_detection_event->bearing, object_detection_event->distance);
+}
+
+/**
+ * @brief Send a object_detection_event message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param time Timestamp in milliseconds since system boot
+ * @param object_id Object ID
+ * @param type Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
+ * @param name Name of the object as defined by the detector
+ * @param quality Detection quality / confidence. 0: bad, 255: maximum confidence
+ * @param bearing Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
+ * @param distance Ground distance in meters
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_object_detection_event_send(mavlink_channel_t chan, uint32_t time, uint16_t object_id, uint8_t type, const char* name, uint8_t quality, float bearing, float distance)
+{
+ mavlink_message_t msg;
+ mavlink_msg_object_detection_event_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, time, object_id, type, name, quality, bearing, distance);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE OBJECT_DETECTION_EVENT UNPACKING
+
+/**
+ * @brief Get field time from object_detection_event message
+ *
+ * @return Timestamp in milliseconds since system boot
+ */
+static inline uint32_t mavlink_msg_object_detection_event_get_time(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload)[0];
+ r.b[2] = (msg->payload)[1];
+ r.b[1] = (msg->payload)[2];
+ r.b[0] = (msg->payload)[3];
+ return (uint32_t)r.i;
+}
+
+/**
+ * @brief Get field object_id from object_detection_event message
+ *
+ * @return Object ID
+ */
+static inline uint16_t mavlink_msg_object_detection_event_get_object_id(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint32_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint32_t))[1];
+ return (uint16_t)r.s;
+}
+
+/**
+ * @brief Get field type from object_detection_event message
+ *
+ * @return Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
+ */
+static inline uint8_t mavlink_msg_object_detection_event_get_type(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint32_t)+sizeof(uint16_t))[0];
+}
+
+/**
+ * @brief Get field name from object_detection_event message
+ *
+ * @return Name of the object as defined by the detector
+ */
+static inline uint16_t mavlink_msg_object_detection_event_get_name(const mavlink_message_t* msg, char* r_data)
+{
+
+ memcpy(r_data, msg->payload+sizeof(uint32_t)+sizeof(uint16_t)+sizeof(uint8_t), sizeof(char)*20);
+ return sizeof(char)*20;
+}
+
+/**
+ * @brief Get field quality from object_detection_event message
+ *
+ * @return Detection quality / confidence. 0: bad, 255: maximum confidence
+ */
+static inline uint8_t mavlink_msg_object_detection_event_get_quality(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint32_t)+sizeof(uint16_t)+sizeof(uint8_t)+sizeof(char)*20)[0];
+}
+
+/**
+ * @brief Get field bearing from object_detection_event message
+ *
+ * @return Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
+ */
+static inline float mavlink_msg_object_detection_event_get_bearing(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint32_t)+sizeof(uint16_t)+sizeof(uint8_t)+sizeof(char)*20+sizeof(uint8_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint32_t)+sizeof(uint16_t)+sizeof(uint8_t)+sizeof(char)*20+sizeof(uint8_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint32_t)+sizeof(uint16_t)+sizeof(uint8_t)+sizeof(char)*20+sizeof(uint8_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint32_t)+sizeof(uint16_t)+sizeof(uint8_t)+sizeof(char)*20+sizeof(uint8_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field distance from object_detection_event message
+ *
+ * @return Ground distance in meters
+ */
+static inline float mavlink_msg_object_detection_event_get_distance(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint32_t)+sizeof(uint16_t)+sizeof(uint8_t)+sizeof(char)*20+sizeof(uint8_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint32_t)+sizeof(uint16_t)+sizeof(uint8_t)+sizeof(char)*20+sizeof(uint8_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint32_t)+sizeof(uint16_t)+sizeof(uint8_t)+sizeof(char)*20+sizeof(uint8_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint32_t)+sizeof(uint16_t)+sizeof(uint8_t)+sizeof(char)*20+sizeof(uint8_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Decode a object_detection_event message into a struct
+ *
+ * @param msg The message to decode
+ * @param object_detection_event C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_object_detection_event_decode(const mavlink_message_t* msg, mavlink_object_detection_event_t* object_detection_event)
+{
+ object_detection_event->time = mavlink_msg_object_detection_event_get_time(msg);
+ object_detection_event->object_id = mavlink_msg_object_detection_event_get_object_id(msg);
+ object_detection_event->type = mavlink_msg_object_detection_event_get_type(msg);
+ mavlink_msg_object_detection_event_get_name(msg, object_detection_event->name);
+ object_detection_event->quality = mavlink_msg_object_detection_event_get_quality(msg);
+ object_detection_event->bearing = mavlink_msg_object_detection_event_get_bearing(msg);
+ object_detection_event->distance = mavlink_msg_object_detection_event_get_distance(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_optical_flow.h b/thirdParty/mavlink/include/common/mavlink_msg_optical_flow.h
new file mode 100644
index 0000000000000000000000000000000000000000..d0acc22ddc39b29155dcbb9ed59aa8586d794311
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_optical_flow.h
@@ -0,0 +1,206 @@
+// MESSAGE OPTICAL_FLOW PACKING
+
+#define MAVLINK_MSG_ID_OPTICAL_FLOW 100
+
+typedef struct __mavlink_optical_flow_t
+{
+ uint64_t time; ///< Timestamp (UNIX)
+ uint8_t sensor_id; ///< Sensor ID
+ int16_t flow_x; ///< Flow in pixels in x-sensor direction
+ int16_t flow_y; ///< Flow in pixels in y-sensor direction
+ uint8_t quality; ///< Optical flow quality / confidence. 0: bad, 255: maximum quality
+ float ground_distance; ///< Ground distance in meters
+
+} mavlink_optical_flow_t;
+
+
+
+/**
+ * @brief Pack a optical_flow message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param time Timestamp (UNIX)
+ * @param sensor_id Sensor ID
+ * @param flow_x Flow in pixels in x-sensor direction
+ * @param flow_y Flow in pixels in y-sensor direction
+ * @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
+ * @param ground_distance Ground distance in meters
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_optical_flow_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint64_t time, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, uint8_t quality, float ground_distance)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_OPTICAL_FLOW;
+
+ i += put_uint64_t_by_index(time, i, msg->payload); // Timestamp (UNIX)
+ i += put_uint8_t_by_index(sensor_id, i, msg->payload); // Sensor ID
+ i += put_int16_t_by_index(flow_x, i, msg->payload); // Flow in pixels in x-sensor direction
+ i += put_int16_t_by_index(flow_y, i, msg->payload); // Flow in pixels in y-sensor direction
+ i += put_uint8_t_by_index(quality, i, msg->payload); // Optical flow quality / confidence. 0: bad, 255: maximum quality
+ i += put_float_by_index(ground_distance, i, msg->payload); // Ground distance in meters
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a optical_flow message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param time Timestamp (UNIX)
+ * @param sensor_id Sensor ID
+ * @param flow_x Flow in pixels in x-sensor direction
+ * @param flow_y Flow in pixels in y-sensor direction
+ * @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
+ * @param ground_distance Ground distance in meters
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_optical_flow_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint64_t time, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, uint8_t quality, float ground_distance)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_OPTICAL_FLOW;
+
+ i += put_uint64_t_by_index(time, i, msg->payload); // Timestamp (UNIX)
+ i += put_uint8_t_by_index(sensor_id, i, msg->payload); // Sensor ID
+ i += put_int16_t_by_index(flow_x, i, msg->payload); // Flow in pixels in x-sensor direction
+ i += put_int16_t_by_index(flow_y, i, msg->payload); // Flow in pixels in y-sensor direction
+ i += put_uint8_t_by_index(quality, i, msg->payload); // Optical flow quality / confidence. 0: bad, 255: maximum quality
+ i += put_float_by_index(ground_distance, i, msg->payload); // Ground distance in meters
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a optical_flow struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param optical_flow C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_optical_flow_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_optical_flow_t* optical_flow)
+{
+ return mavlink_msg_optical_flow_pack(system_id, component_id, msg, optical_flow->time, optical_flow->sensor_id, optical_flow->flow_x, optical_flow->flow_y, optical_flow->quality, optical_flow->ground_distance);
+}
+
+/**
+ * @brief Send a optical_flow message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param time Timestamp (UNIX)
+ * @param sensor_id Sensor ID
+ * @param flow_x Flow in pixels in x-sensor direction
+ * @param flow_y Flow in pixels in y-sensor direction
+ * @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
+ * @param ground_distance Ground distance in meters
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_optical_flow_send(mavlink_channel_t chan, uint64_t time, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, uint8_t quality, float ground_distance)
+{
+ mavlink_message_t msg;
+ mavlink_msg_optical_flow_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, time, sensor_id, flow_x, flow_y, quality, ground_distance);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE OPTICAL_FLOW UNPACKING
+
+/**
+ * @brief Get field time from optical_flow message
+ *
+ * @return Timestamp (UNIX)
+ */
+static inline uint64_t mavlink_msg_optical_flow_get_time(const mavlink_message_t* msg)
+{
+ generic_64bit r;
+ r.b[7] = (msg->payload)[0];
+ r.b[6] = (msg->payload)[1];
+ r.b[5] = (msg->payload)[2];
+ r.b[4] = (msg->payload)[3];
+ r.b[3] = (msg->payload)[4];
+ r.b[2] = (msg->payload)[5];
+ r.b[1] = (msg->payload)[6];
+ r.b[0] = (msg->payload)[7];
+ return (uint64_t)r.ll;
+}
+
+/**
+ * @brief Get field sensor_id from optical_flow message
+ *
+ * @return Sensor ID
+ */
+static inline uint8_t mavlink_msg_optical_flow_get_sensor_id(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint64_t))[0];
+}
+
+/**
+ * @brief Get field flow_x from optical_flow message
+ *
+ * @return Flow in pixels in x-sensor direction
+ */
+static inline int16_t mavlink_msg_optical_flow_get_flow_x(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(uint8_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(uint8_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field flow_y from optical_flow message
+ *
+ * @return Flow in pixels in y-sensor direction
+ */
+static inline int16_t mavlink_msg_optical_flow_get_flow_y(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(uint8_t)+sizeof(int16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(uint8_t)+sizeof(int16_t))[1];
+ return (int16_t)r.s;
+}
+
+/**
+ * @brief Get field quality from optical_flow message
+ *
+ * @return Optical flow quality / confidence. 0: bad, 255: maximum quality
+ */
+static inline uint8_t mavlink_msg_optical_flow_get_quality(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint64_t)+sizeof(uint8_t)+sizeof(int16_t)+sizeof(int16_t))[0];
+}
+
+/**
+ * @brief Get field ground_distance from optical_flow message
+ *
+ * @return Ground distance in meters
+ */
+static inline float mavlink_msg_optical_flow_get_ground_distance(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(uint8_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(uint8_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(uint8_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(uint8_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(uint8_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(uint8_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(uint8_t)+sizeof(int16_t)+sizeof(int16_t)+sizeof(uint8_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Decode a optical_flow message into a struct
+ *
+ * @param msg The message to decode
+ * @param optical_flow C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_optical_flow_decode(const mavlink_message_t* msg, mavlink_optical_flow_t* optical_flow)
+{
+ optical_flow->time = mavlink_msg_optical_flow_get_time(msg);
+ optical_flow->sensor_id = mavlink_msg_optical_flow_get_sensor_id(msg);
+ optical_flow->flow_x = mavlink_msg_optical_flow_get_flow_x(msg);
+ optical_flow->flow_y = mavlink_msg_optical_flow_get_flow_y(msg);
+ optical_flow->quality = mavlink_msg_optical_flow_get_quality(msg);
+ optical_flow->ground_distance = mavlink_msg_optical_flow_get_ground_distance(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_rc_channels_override.h b/thirdParty/mavlink/include/common/mavlink_msg_rc_channels_override.h
new file mode 100644
index 0000000000000000000000000000000000000000..7595857a5e0cfb6f14c61817b24aedbec08e185d
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_rc_channels_override.h
@@ -0,0 +1,278 @@
+// MESSAGE RC_CHANNELS_OVERRIDE PACKING
+
+#define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE 70
+
+typedef struct __mavlink_rc_channels_override_t
+{
+ uint8_t target_system; ///< System ID
+ uint8_t target_component; ///< Component ID
+ uint16_t chan1_raw; ///< RC channel 1 value, in microseconds
+ uint16_t chan2_raw; ///< RC channel 2 value, in microseconds
+ uint16_t chan3_raw; ///< RC channel 3 value, in microseconds
+ uint16_t chan4_raw; ///< RC channel 4 value, in microseconds
+ uint16_t chan5_raw; ///< RC channel 5 value, in microseconds
+ uint16_t chan6_raw; ///< RC channel 6 value, in microseconds
+ uint16_t chan7_raw; ///< RC channel 7 value, in microseconds
+ uint16_t chan8_raw; ///< RC channel 8 value, in microseconds
+
+} mavlink_rc_channels_override_t;
+
+
+
+/**
+ * @brief Pack a rc_channels_override message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param chan1_raw RC channel 1 value, in microseconds
+ * @param chan2_raw RC channel 2 value, in microseconds
+ * @param chan3_raw RC channel 3 value, in microseconds
+ * @param chan4_raw RC channel 4 value, in microseconds
+ * @param chan5_raw RC channel 5 value, in microseconds
+ * @param chan6_raw RC channel 6 value, in microseconds
+ * @param chan7_raw RC channel 7 value, in microseconds
+ * @param chan8_raw RC channel 8 value, in microseconds
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_uint16_t_by_index(chan1_raw, i, msg->payload); // RC channel 1 value, in microseconds
+ i += put_uint16_t_by_index(chan2_raw, i, msg->payload); // RC channel 2 value, in microseconds
+ i += put_uint16_t_by_index(chan3_raw, i, msg->payload); // RC channel 3 value, in microseconds
+ i += put_uint16_t_by_index(chan4_raw, i, msg->payload); // RC channel 4 value, in microseconds
+ i += put_uint16_t_by_index(chan5_raw, i, msg->payload); // RC channel 5 value, in microseconds
+ i += put_uint16_t_by_index(chan6_raw, i, msg->payload); // RC channel 6 value, in microseconds
+ i += put_uint16_t_by_index(chan7_raw, i, msg->payload); // RC channel 7 value, in microseconds
+ i += put_uint16_t_by_index(chan8_raw, i, msg->payload); // RC channel 8 value, in microseconds
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a rc_channels_override message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param chan1_raw RC channel 1 value, in microseconds
+ * @param chan2_raw RC channel 2 value, in microseconds
+ * @param chan3_raw RC channel 3 value, in microseconds
+ * @param chan4_raw RC channel 4 value, in microseconds
+ * @param chan5_raw RC channel 5 value, in microseconds
+ * @param chan6_raw RC channel 6 value, in microseconds
+ * @param chan7_raw RC channel 7 value, in microseconds
+ * @param chan8_raw RC channel 8 value, in microseconds
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_uint16_t_by_index(chan1_raw, i, msg->payload); // RC channel 1 value, in microseconds
+ i += put_uint16_t_by_index(chan2_raw, i, msg->payload); // RC channel 2 value, in microseconds
+ i += put_uint16_t_by_index(chan3_raw, i, msg->payload); // RC channel 3 value, in microseconds
+ i += put_uint16_t_by_index(chan4_raw, i, msg->payload); // RC channel 4 value, in microseconds
+ i += put_uint16_t_by_index(chan5_raw, i, msg->payload); // RC channel 5 value, in microseconds
+ i += put_uint16_t_by_index(chan6_raw, i, msg->payload); // RC channel 6 value, in microseconds
+ i += put_uint16_t_by_index(chan7_raw, i, msg->payload); // RC channel 7 value, in microseconds
+ i += put_uint16_t_by_index(chan8_raw, i, msg->payload); // RC channel 8 value, in microseconds
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a rc_channels_override struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param rc_channels_override C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_rc_channels_override_t* rc_channels_override)
+{
+ return mavlink_msg_rc_channels_override_pack(system_id, component_id, msg, rc_channels_override->target_system, rc_channels_override->target_component, rc_channels_override->chan1_raw, rc_channels_override->chan2_raw, rc_channels_override->chan3_raw, rc_channels_override->chan4_raw, rc_channels_override->chan5_raw, rc_channels_override->chan6_raw, rc_channels_override->chan7_raw, rc_channels_override->chan8_raw);
+}
+
+/**
+ * @brief Send a rc_channels_override message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param chan1_raw RC channel 1 value, in microseconds
+ * @param chan2_raw RC channel 2 value, in microseconds
+ * @param chan3_raw RC channel 3 value, in microseconds
+ * @param chan4_raw RC channel 4 value, in microseconds
+ * @param chan5_raw RC channel 5 value, in microseconds
+ * @param chan6_raw RC channel 6 value, in microseconds
+ * @param chan7_raw RC channel 7 value, in microseconds
+ * @param chan8_raw RC channel 8 value, in microseconds
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_rc_channels_override_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
+{
+ mavlink_message_t msg;
+ mavlink_msg_rc_channels_override_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, target_system, target_component, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE RC_CHANNELS_OVERRIDE UNPACKING
+
+/**
+ * @brief Get field target_system from rc_channels_override message
+ *
+ * @return System ID
+ */
+static inline uint8_t mavlink_msg_rc_channels_override_get_target_system(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload)[0];
+}
+
+/**
+ * @brief Get field target_component from rc_channels_override message
+ *
+ * @return Component ID
+ */
+static inline uint8_t mavlink_msg_rc_channels_override_get_target_component(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint8_t))[0];
+}
+
+/**
+ * @brief Get field chan1_raw from rc_channels_override message
+ *
+ * @return RC channel 1 value, in microseconds
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_get_chan1_raw(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[1];
+ return (uint16_t)r.s;
+}
+
+/**
+ * @brief Get field chan2_raw from rc_channels_override message
+ *
+ * @return RC channel 2 value, in microseconds
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_get_chan2_raw(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t))[1];
+ return (uint16_t)r.s;
+}
+
+/**
+ * @brief Get field chan3_raw from rc_channels_override message
+ *
+ * @return RC channel 3 value, in microseconds
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_get_chan3_raw(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
+ return (uint16_t)r.s;
+}
+
+/**
+ * @brief Get field chan4_raw from rc_channels_override message
+ *
+ * @return RC channel 4 value, in microseconds
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_get_chan4_raw(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
+ return (uint16_t)r.s;
+}
+
+/**
+ * @brief Get field chan5_raw from rc_channels_override message
+ *
+ * @return RC channel 5 value, in microseconds
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_get_chan5_raw(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
+ return (uint16_t)r.s;
+}
+
+/**
+ * @brief Get field chan6_raw from rc_channels_override message
+ *
+ * @return RC channel 6 value, in microseconds
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_get_chan6_raw(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
+ return (uint16_t)r.s;
+}
+
+/**
+ * @brief Get field chan7_raw from rc_channels_override message
+ *
+ * @return RC channel 7 value, in microseconds
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_get_chan7_raw(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
+ return (uint16_t)r.s;
+}
+
+/**
+ * @brief Get field chan8_raw from rc_channels_override message
+ *
+ * @return RC channel 8 value, in microseconds
+ */
+static inline uint16_t mavlink_msg_rc_channels_override_get_chan8_raw(const mavlink_message_t* msg)
+{
+ generic_16bit r;
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
+ return (uint16_t)r.s;
+}
+
+/**
+ * @brief Decode a rc_channels_override message into a struct
+ *
+ * @param msg The message to decode
+ * @param rc_channels_override C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_rc_channels_override_decode(const mavlink_message_t* msg, mavlink_rc_channels_override_t* rc_channels_override)
+{
+ rc_channels_override->target_system = mavlink_msg_rc_channels_override_get_target_system(msg);
+ rc_channels_override->target_component = mavlink_msg_rc_channels_override_get_target_component(msg);
+ rc_channels_override->chan1_raw = mavlink_msg_rc_channels_override_get_chan1_raw(msg);
+ rc_channels_override->chan2_raw = mavlink_msg_rc_channels_override_get_chan2_raw(msg);
+ rc_channels_override->chan3_raw = mavlink_msg_rc_channels_override_get_chan3_raw(msg);
+ rc_channels_override->chan4_raw = mavlink_msg_rc_channels_override_get_chan4_raw(msg);
+ rc_channels_override->chan5_raw = mavlink_msg_rc_channels_override_get_chan5_raw(msg);
+ rc_channels_override->chan6_raw = mavlink_msg_rc_channels_override_get_chan6_raw(msg);
+ rc_channels_override->chan7_raw = mavlink_msg_rc_channels_override_get_chan7_raw(msg);
+ rc_channels_override->chan8_raw = mavlink_msg_rc_channels_override_get_chan8_raw(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_request_data_stream.h b/thirdParty/mavlink/include/common/mavlink_msg_request_data_stream.h
index f390e4e370c69002aac857b86f5dbec9bbc716f8..15ee1a6a5fa39867628fe87ea9b3dd09b28f0d84 100644
--- a/thirdParty/mavlink/include/common/mavlink_msg_request_data_stream.h
+++ b/thirdParty/mavlink/include/common/mavlink_msg_request_data_stream.h
@@ -7,7 +7,7 @@ typedef struct __mavlink_request_data_stream_t
uint8_t target_system; ///< The target requested to send the message stream.
uint8_t target_component; ///< The target requested to send the message stream.
uint8_t req_stream_id; ///< The ID of the requested message type
- uint16_t req_message_rate; ///< The requested interval between two messages of this type
+ uint16_t req_message_rate; ///< Update rate in Hertz
uint8_t start_stop; ///< 1 to start sending, 0 to stop sending.
} mavlink_request_data_stream_t;
@@ -23,7 +23,7 @@ typedef struct __mavlink_request_data_stream_t
* @param target_system The target requested to send the message stream.
* @param target_component The target requested to send the message stream.
* @param req_stream_id The ID of the requested message type
- * @param req_message_rate The requested interval between two messages of this type
+ * @param req_message_rate Update rate in Hertz
* @param start_stop 1 to start sending, 0 to stop sending.
* @return length of the message in bytes (excluding serial stream start sign)
*/
@@ -35,7 +35,7 @@ static inline uint16_t mavlink_msg_request_data_stream_pack(uint8_t system_id, u
i += put_uint8_t_by_index(target_system, i, msg->payload); // The target requested to send the message stream.
i += put_uint8_t_by_index(target_component, i, msg->payload); // The target requested to send the message stream.
i += put_uint8_t_by_index(req_stream_id, i, msg->payload); // The ID of the requested message type
- i += put_uint16_t_by_index(req_message_rate, i, msg->payload); // The requested interval between two messages of this type
+ i += put_uint16_t_by_index(req_message_rate, i, msg->payload); // Update rate in Hertz
i += put_uint8_t_by_index(start_stop, i, msg->payload); // 1 to start sending, 0 to stop sending.
return mavlink_finalize_message(msg, system_id, component_id, i);
@@ -50,7 +50,7 @@ static inline uint16_t mavlink_msg_request_data_stream_pack(uint8_t system_id, u
* @param target_system The target requested to send the message stream.
* @param target_component The target requested to send the message stream.
* @param req_stream_id The ID of the requested message type
- * @param req_message_rate The requested interval between two messages of this type
+ * @param req_message_rate Update rate in Hertz
* @param start_stop 1 to start sending, 0 to stop sending.
* @return length of the message in bytes (excluding serial stream start sign)
*/
@@ -62,7 +62,7 @@ static inline uint16_t mavlink_msg_request_data_stream_pack_chan(uint8_t system_
i += put_uint8_t_by_index(target_system, i, msg->payload); // The target requested to send the message stream.
i += put_uint8_t_by_index(target_component, i, msg->payload); // The target requested to send the message stream.
i += put_uint8_t_by_index(req_stream_id, i, msg->payload); // The ID of the requested message type
- i += put_uint16_t_by_index(req_message_rate, i, msg->payload); // The requested interval between two messages of this type
+ i += put_uint16_t_by_index(req_message_rate, i, msg->payload); // Update rate in Hertz
i += put_uint8_t_by_index(start_stop, i, msg->payload); // 1 to start sending, 0 to stop sending.
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
@@ -88,7 +88,7 @@ static inline uint16_t mavlink_msg_request_data_stream_encode(uint8_t system_id,
* @param target_system The target requested to send the message stream.
* @param target_component The target requested to send the message stream.
* @param req_stream_id The ID of the requested message type
- * @param req_message_rate The requested interval between two messages of this type
+ * @param req_message_rate Update rate in Hertz
* @param start_stop 1 to start sending, 0 to stop sending.
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
@@ -136,7 +136,7 @@ static inline uint8_t mavlink_msg_request_data_stream_get_req_stream_id(const ma
/**
* @brief Get field req_message_rate from request_data_stream message
*
- * @return The requested interval between two messages of this type
+ * @return Update rate in Hertz
*/
static inline uint16_t mavlink_msg_request_data_stream_get_req_message_rate(const mavlink_message_t* msg)
{
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint.h b/thirdParty/mavlink/include/common/mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac7a85de3bfe3691f6894af34b8cd23e2da1f8e8
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint.h
@@ -0,0 +1,198 @@
+// MESSAGE ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT PACKING
+
+#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT 58
+
+typedef struct __mavlink_roll_pitch_yaw_speed_thrust_setpoint_t
+{
+ uint64_t time_us; ///< Timestamp in micro seconds since unix epoch
+ float roll_speed; ///< Desired roll angular speed in rad/s
+ float pitch_speed; ///< Desired pitch angular speed in rad/s
+ float yaw_speed; ///< Desired yaw angular speed in rad/s
+ float thrust; ///< Collective thrust, normalized to 0 .. 1
+
+} mavlink_roll_pitch_yaw_speed_thrust_setpoint_t;
+
+
+
+/**
+ * @brief Pack a roll_pitch_yaw_speed_thrust_setpoint message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param time_us Timestamp in micro seconds since unix epoch
+ * @param roll_speed Desired roll angular speed in rad/s
+ * @param pitch_speed Desired pitch angular speed in rad/s
+ * @param yaw_speed Desired yaw angular speed in rad/s
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint64_t time_us, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT;
+
+ i += put_uint64_t_by_index(time_us, i, msg->payload); // Timestamp in micro seconds since unix epoch
+ i += put_float_by_index(roll_speed, i, msg->payload); // Desired roll angular speed in rad/s
+ i += put_float_by_index(pitch_speed, i, msg->payload); // Desired pitch angular speed in rad/s
+ i += put_float_by_index(yaw_speed, i, msg->payload); // Desired yaw angular speed in rad/s
+ i += put_float_by_index(thrust, i, msg->payload); // Collective thrust, normalized to 0 .. 1
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a roll_pitch_yaw_speed_thrust_setpoint message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param time_us Timestamp in micro seconds since unix epoch
+ * @param roll_speed Desired roll angular speed in rad/s
+ * @param pitch_speed Desired pitch angular speed in rad/s
+ * @param yaw_speed Desired yaw angular speed in rad/s
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint64_t time_us, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT;
+
+ i += put_uint64_t_by_index(time_us, i, msg->payload); // Timestamp in micro seconds since unix epoch
+ i += put_float_by_index(roll_speed, i, msg->payload); // Desired roll angular speed in rad/s
+ i += put_float_by_index(pitch_speed, i, msg->payload); // Desired pitch angular speed in rad/s
+ i += put_float_by_index(yaw_speed, i, msg->payload); // Desired yaw angular speed in rad/s
+ i += put_float_by_index(thrust, i, msg->payload); // Collective thrust, normalized to 0 .. 1
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a roll_pitch_yaw_speed_thrust_setpoint struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param roll_pitch_yaw_speed_thrust_setpoint C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_roll_pitch_yaw_speed_thrust_setpoint_t* roll_pitch_yaw_speed_thrust_setpoint)
+{
+ return mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack(system_id, component_id, msg, roll_pitch_yaw_speed_thrust_setpoint->time_us, roll_pitch_yaw_speed_thrust_setpoint->roll_speed, roll_pitch_yaw_speed_thrust_setpoint->pitch_speed, roll_pitch_yaw_speed_thrust_setpoint->yaw_speed, roll_pitch_yaw_speed_thrust_setpoint->thrust);
+}
+
+/**
+ * @brief Send a roll_pitch_yaw_speed_thrust_setpoint message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param time_us Timestamp in micro seconds since unix epoch
+ * @param roll_speed Desired roll angular speed in rad/s
+ * @param pitch_speed Desired pitch angular speed in rad/s
+ * @param yaw_speed Desired yaw angular speed in rad/s
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_send(mavlink_channel_t chan, uint64_t time_us, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
+{
+ mavlink_message_t msg;
+ mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, time_us, roll_speed, pitch_speed, yaw_speed, thrust);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE ROLL_PITCH_YAW_SPEED_THRUST_SETPOINT UNPACKING
+
+/**
+ * @brief Get field time_us from roll_pitch_yaw_speed_thrust_setpoint message
+ *
+ * @return Timestamp in micro seconds since unix epoch
+ */
+static inline uint64_t mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_time_us(const mavlink_message_t* msg)
+{
+ generic_64bit r;
+ r.b[7] = (msg->payload)[0];
+ r.b[6] = (msg->payload)[1];
+ r.b[5] = (msg->payload)[2];
+ r.b[4] = (msg->payload)[3];
+ r.b[3] = (msg->payload)[4];
+ r.b[2] = (msg->payload)[5];
+ r.b[1] = (msg->payload)[6];
+ r.b[0] = (msg->payload)[7];
+ return (uint64_t)r.ll;
+}
+
+/**
+ * @brief Get field roll_speed from roll_pitch_yaw_speed_thrust_setpoint message
+ *
+ * @return Desired roll angular speed in rad/s
+ */
+static inline float mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_roll_speed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitch_speed from roll_pitch_yaw_speed_thrust_setpoint message
+ *
+ * @return Desired pitch angular speed in rad/s
+ */
+static inline float mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_pitch_speed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yaw_speed from roll_pitch_yaw_speed_thrust_setpoint message
+ *
+ * @return Desired yaw angular speed in rad/s
+ */
+static inline float mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_yaw_speed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field thrust from roll_pitch_yaw_speed_thrust_setpoint message
+ *
+ * @return Collective thrust, normalized to 0 .. 1
+ */
+static inline float mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_thrust(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Decode a roll_pitch_yaw_speed_thrust_setpoint message into a struct
+ *
+ * @param msg The message to decode
+ * @param roll_pitch_yaw_speed_thrust_setpoint C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_decode(const mavlink_message_t* msg, mavlink_roll_pitch_yaw_speed_thrust_setpoint_t* roll_pitch_yaw_speed_thrust_setpoint)
+{
+ roll_pitch_yaw_speed_thrust_setpoint->time_us = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_time_us(msg);
+ roll_pitch_yaw_speed_thrust_setpoint->roll_speed = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_roll_speed(msg);
+ roll_pitch_yaw_speed_thrust_setpoint->pitch_speed = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_pitch_speed(msg);
+ roll_pitch_yaw_speed_thrust_setpoint->yaw_speed = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_yaw_speed(msg);
+ roll_pitch_yaw_speed_thrust_setpoint->thrust = mavlink_msg_roll_pitch_yaw_speed_thrust_setpoint_get_thrust(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_roll_pitch_yaw_thrust_setpoint.h b/thirdParty/mavlink/include/common/mavlink_msg_roll_pitch_yaw_thrust_setpoint.h
new file mode 100644
index 0000000000000000000000000000000000000000..cc944642748d251f3f9c976a2d1d1550cc816019
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_roll_pitch_yaw_thrust_setpoint.h
@@ -0,0 +1,198 @@
+// MESSAGE ROLL_PITCH_YAW_THRUST_SETPOINT PACKING
+
+#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT 57
+
+typedef struct __mavlink_roll_pitch_yaw_thrust_setpoint_t
+{
+ uint64_t time_us; ///< Timestamp in micro seconds since unix epoch
+ float roll; ///< Desired roll angle in radians
+ float pitch; ///< Desired pitch angle in radians
+ float yaw; ///< Desired yaw angle in radians
+ float thrust; ///< Collective thrust, normalized to 0 .. 1
+
+} mavlink_roll_pitch_yaw_thrust_setpoint_t;
+
+
+
+/**
+ * @brief Pack a roll_pitch_yaw_thrust_setpoint message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param time_us Timestamp in micro seconds since unix epoch
+ * @param roll Desired roll angle in radians
+ * @param pitch Desired pitch angle in radians
+ * @param yaw Desired yaw angle in radians
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint64_t time_us, float roll, float pitch, float yaw, float thrust)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT;
+
+ i += put_uint64_t_by_index(time_us, i, msg->payload); // Timestamp in micro seconds since unix epoch
+ i += put_float_by_index(roll, i, msg->payload); // Desired roll angle in radians
+ i += put_float_by_index(pitch, i, msg->payload); // Desired pitch angle in radians
+ i += put_float_by_index(yaw, i, msg->payload); // Desired yaw angle in radians
+ i += put_float_by_index(thrust, i, msg->payload); // Collective thrust, normalized to 0 .. 1
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a roll_pitch_yaw_thrust_setpoint message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param time_us Timestamp in micro seconds since unix epoch
+ * @param roll Desired roll angle in radians
+ * @param pitch Desired pitch angle in radians
+ * @param yaw Desired yaw angle in radians
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint64_t time_us, float roll, float pitch, float yaw, float thrust)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_ROLL_PITCH_YAW_THRUST_SETPOINT;
+
+ i += put_uint64_t_by_index(time_us, i, msg->payload); // Timestamp in micro seconds since unix epoch
+ i += put_float_by_index(roll, i, msg->payload); // Desired roll angle in radians
+ i += put_float_by_index(pitch, i, msg->payload); // Desired pitch angle in radians
+ i += put_float_by_index(yaw, i, msg->payload); // Desired yaw angle in radians
+ i += put_float_by_index(thrust, i, msg->payload); // Collective thrust, normalized to 0 .. 1
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a roll_pitch_yaw_thrust_setpoint struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param roll_pitch_yaw_thrust_setpoint C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_roll_pitch_yaw_thrust_setpoint_t* roll_pitch_yaw_thrust_setpoint)
+{
+ return mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack(system_id, component_id, msg, roll_pitch_yaw_thrust_setpoint->time_us, roll_pitch_yaw_thrust_setpoint->roll, roll_pitch_yaw_thrust_setpoint->pitch, roll_pitch_yaw_thrust_setpoint->yaw, roll_pitch_yaw_thrust_setpoint->thrust);
+}
+
+/**
+ * @brief Send a roll_pitch_yaw_thrust_setpoint message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param time_us Timestamp in micro seconds since unix epoch
+ * @param roll Desired roll angle in radians
+ * @param pitch Desired pitch angle in radians
+ * @param yaw Desired yaw angle in radians
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_roll_pitch_yaw_thrust_setpoint_send(mavlink_channel_t chan, uint64_t time_us, float roll, float pitch, float yaw, float thrust)
+{
+ mavlink_message_t msg;
+ mavlink_msg_roll_pitch_yaw_thrust_setpoint_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, time_us, roll, pitch, yaw, thrust);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE ROLL_PITCH_YAW_THRUST_SETPOINT UNPACKING
+
+/**
+ * @brief Get field time_us from roll_pitch_yaw_thrust_setpoint message
+ *
+ * @return Timestamp in micro seconds since unix epoch
+ */
+static inline uint64_t mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_time_us(const mavlink_message_t* msg)
+{
+ generic_64bit r;
+ r.b[7] = (msg->payload)[0];
+ r.b[6] = (msg->payload)[1];
+ r.b[5] = (msg->payload)[2];
+ r.b[4] = (msg->payload)[3];
+ r.b[3] = (msg->payload)[4];
+ r.b[2] = (msg->payload)[5];
+ r.b[1] = (msg->payload)[6];
+ r.b[0] = (msg->payload)[7];
+ return (uint64_t)r.ll;
+}
+
+/**
+ * @brief Get field roll from roll_pitch_yaw_thrust_setpoint message
+ *
+ * @return Desired roll angle in radians
+ */
+static inline float mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_roll(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitch from roll_pitch_yaw_thrust_setpoint message
+ *
+ * @return Desired pitch angle in radians
+ */
+static inline float mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_pitch(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yaw from roll_pitch_yaw_thrust_setpoint message
+ *
+ * @return Desired yaw angle in radians
+ */
+static inline float mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_yaw(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field thrust from roll_pitch_yaw_thrust_setpoint message
+ *
+ * @return Collective thrust, normalized to 0 .. 1
+ */
+static inline float mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_thrust(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Decode a roll_pitch_yaw_thrust_setpoint message into a struct
+ *
+ * @param msg The message to decode
+ * @param roll_pitch_yaw_thrust_setpoint C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_roll_pitch_yaw_thrust_setpoint_decode(const mavlink_message_t* msg, mavlink_roll_pitch_yaw_thrust_setpoint_t* roll_pitch_yaw_thrust_setpoint)
+{
+ roll_pitch_yaw_thrust_setpoint->time_us = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_time_us(msg);
+ roll_pitch_yaw_thrust_setpoint->roll = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_roll(msg);
+ roll_pitch_yaw_thrust_setpoint->pitch = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_pitch(msg);
+ roll_pitch_yaw_thrust_setpoint->yaw = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_yaw(msg);
+ roll_pitch_yaw_thrust_setpoint->thrust = mavlink_msg_roll_pitch_yaw_thrust_setpoint_get_thrust(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw.h b/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw.h
new file mode 100644
index 0000000000000000000000000000000000000000..1cc68dff921cd42edf3eb0a7a383a9821637087a
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw.h
@@ -0,0 +1,184 @@
+// MESSAGE SET_ROLL_PITCH_YAW PACKING
+
+#define MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW 55
+
+typedef struct __mavlink_set_roll_pitch_yaw_t
+{
+ uint8_t target_system; ///< System ID
+ uint8_t target_component; ///< Component ID
+ float roll; ///< Desired roll angle in radians
+ float pitch; ///< Desired pitch angle in radians
+ float yaw; ///< Desired yaw angle in radians
+
+} mavlink_set_roll_pitch_yaw_t;
+
+
+
+/**
+ * @brief Pack a set_roll_pitch_yaw message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll Desired roll angle in radians
+ * @param pitch Desired pitch angle in radians
+ * @param yaw Desired yaw angle in radians
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, float roll, float pitch, float yaw)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_float_by_index(roll, i, msg->payload); // Desired roll angle in radians
+ i += put_float_by_index(pitch, i, msg->payload); // Desired pitch angle in radians
+ i += put_float_by_index(yaw, i, msg->payload); // Desired yaw angle in radians
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a set_roll_pitch_yaw message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll Desired roll angle in radians
+ * @param pitch Desired pitch angle in radians
+ * @param yaw Desired yaw angle in radians
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, float roll, float pitch, float yaw)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_float_by_index(roll, i, msg->payload); // Desired roll angle in radians
+ i += put_float_by_index(pitch, i, msg->payload); // Desired pitch angle in radians
+ i += put_float_by_index(yaw, i, msg->payload); // Desired yaw angle in radians
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a set_roll_pitch_yaw struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param set_roll_pitch_yaw C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_roll_pitch_yaw_t* set_roll_pitch_yaw)
+{
+ return mavlink_msg_set_roll_pitch_yaw_pack(system_id, component_id, msg, set_roll_pitch_yaw->target_system, set_roll_pitch_yaw->target_component, set_roll_pitch_yaw->roll, set_roll_pitch_yaw->pitch, set_roll_pitch_yaw->yaw);
+}
+
+/**
+ * @brief Send a set_roll_pitch_yaw message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll Desired roll angle in radians
+ * @param pitch Desired pitch angle in radians
+ * @param yaw Desired yaw angle in radians
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_set_roll_pitch_yaw_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, float roll, float pitch, float yaw)
+{
+ mavlink_message_t msg;
+ mavlink_msg_set_roll_pitch_yaw_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, target_system, target_component, roll, pitch, yaw);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE SET_ROLL_PITCH_YAW UNPACKING
+
+/**
+ * @brief Get field target_system from set_roll_pitch_yaw message
+ *
+ * @return System ID
+ */
+static inline uint8_t mavlink_msg_set_roll_pitch_yaw_get_target_system(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload)[0];
+}
+
+/**
+ * @brief Get field target_component from set_roll_pitch_yaw message
+ *
+ * @return Component ID
+ */
+static inline uint8_t mavlink_msg_set_roll_pitch_yaw_get_target_component(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint8_t))[0];
+}
+
+/**
+ * @brief Get field roll from set_roll_pitch_yaw message
+ *
+ * @return Desired roll angle in radians
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_get_roll(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitch from set_roll_pitch_yaw message
+ *
+ * @return Desired pitch angle in radians
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_get_pitch(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yaw from set_roll_pitch_yaw message
+ *
+ * @return Desired yaw angle in radians
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_get_yaw(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Decode a set_roll_pitch_yaw message into a struct
+ *
+ * @param msg The message to decode
+ * @param set_roll_pitch_yaw C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_set_roll_pitch_yaw_decode(const mavlink_message_t* msg, mavlink_set_roll_pitch_yaw_t* set_roll_pitch_yaw)
+{
+ set_roll_pitch_yaw->target_system = mavlink_msg_set_roll_pitch_yaw_get_target_system(msg);
+ set_roll_pitch_yaw->target_component = mavlink_msg_set_roll_pitch_yaw_get_target_component(msg);
+ set_roll_pitch_yaw->roll = mavlink_msg_set_roll_pitch_yaw_get_roll(msg);
+ set_roll_pitch_yaw->pitch = mavlink_msg_set_roll_pitch_yaw_get_pitch(msg);
+ set_roll_pitch_yaw->yaw = mavlink_msg_set_roll_pitch_yaw_get_yaw(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw_speed.h b/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw_speed.h
new file mode 100644
index 0000000000000000000000000000000000000000..7855daf765a2e176d7020e1d23295e9351c22083
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw_speed.h
@@ -0,0 +1,184 @@
+// MESSAGE SET_ROLL_PITCH_YAW_SPEED PACKING
+
+#define MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED 56
+
+typedef struct __mavlink_set_roll_pitch_yaw_speed_t
+{
+ uint8_t target_system; ///< System ID
+ uint8_t target_component; ///< Component ID
+ float roll_speed; ///< Desired roll angular speed in rad/s
+ float pitch_speed; ///< Desired pitch angular speed in rad/s
+ float yaw_speed; ///< Desired yaw angular speed in rad/s
+
+} mavlink_set_roll_pitch_yaw_speed_t;
+
+
+
+/**
+ * @brief Pack a set_roll_pitch_yaw_speed message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll_speed Desired roll angular speed in rad/s
+ * @param pitch_speed Desired pitch angular speed in rad/s
+ * @param yaw_speed Desired yaw angular speed in rad/s
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_speed_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, float roll_speed, float pitch_speed, float yaw_speed)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_float_by_index(roll_speed, i, msg->payload); // Desired roll angular speed in rad/s
+ i += put_float_by_index(pitch_speed, i, msg->payload); // Desired pitch angular speed in rad/s
+ i += put_float_by_index(yaw_speed, i, msg->payload); // Desired yaw angular speed in rad/s
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a set_roll_pitch_yaw_speed message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll_speed Desired roll angular speed in rad/s
+ * @param pitch_speed Desired pitch angular speed in rad/s
+ * @param yaw_speed Desired yaw angular speed in rad/s
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_speed_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, float roll_speed, float pitch_speed, float yaw_speed)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_float_by_index(roll_speed, i, msg->payload); // Desired roll angular speed in rad/s
+ i += put_float_by_index(pitch_speed, i, msg->payload); // Desired pitch angular speed in rad/s
+ i += put_float_by_index(yaw_speed, i, msg->payload); // Desired yaw angular speed in rad/s
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a set_roll_pitch_yaw_speed struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param set_roll_pitch_yaw_speed C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_speed_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_roll_pitch_yaw_speed_t* set_roll_pitch_yaw_speed)
+{
+ return mavlink_msg_set_roll_pitch_yaw_speed_pack(system_id, component_id, msg, set_roll_pitch_yaw_speed->target_system, set_roll_pitch_yaw_speed->target_component, set_roll_pitch_yaw_speed->roll_speed, set_roll_pitch_yaw_speed->pitch_speed, set_roll_pitch_yaw_speed->yaw_speed);
+}
+
+/**
+ * @brief Send a set_roll_pitch_yaw_speed message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll_speed Desired roll angular speed in rad/s
+ * @param pitch_speed Desired pitch angular speed in rad/s
+ * @param yaw_speed Desired yaw angular speed in rad/s
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_set_roll_pitch_yaw_speed_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, float roll_speed, float pitch_speed, float yaw_speed)
+{
+ mavlink_message_t msg;
+ mavlink_msg_set_roll_pitch_yaw_speed_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, target_system, target_component, roll_speed, pitch_speed, yaw_speed);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE SET_ROLL_PITCH_YAW_SPEED UNPACKING
+
+/**
+ * @brief Get field target_system from set_roll_pitch_yaw_speed message
+ *
+ * @return System ID
+ */
+static inline uint8_t mavlink_msg_set_roll_pitch_yaw_speed_get_target_system(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload)[0];
+}
+
+/**
+ * @brief Get field target_component from set_roll_pitch_yaw_speed message
+ *
+ * @return Component ID
+ */
+static inline uint8_t mavlink_msg_set_roll_pitch_yaw_speed_get_target_component(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint8_t))[0];
+}
+
+/**
+ * @brief Get field roll_speed from set_roll_pitch_yaw_speed message
+ *
+ * @return Desired roll angular speed in rad/s
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_speed_get_roll_speed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitch_speed from set_roll_pitch_yaw_speed message
+ *
+ * @return Desired pitch angular speed in rad/s
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_speed_get_pitch_speed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yaw_speed from set_roll_pitch_yaw_speed message
+ *
+ * @return Desired yaw angular speed in rad/s
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_speed_get_yaw_speed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Decode a set_roll_pitch_yaw_speed message into a struct
+ *
+ * @param msg The message to decode
+ * @param set_roll_pitch_yaw_speed C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_set_roll_pitch_yaw_speed_decode(const mavlink_message_t* msg, mavlink_set_roll_pitch_yaw_speed_t* set_roll_pitch_yaw_speed)
+{
+ set_roll_pitch_yaw_speed->target_system = mavlink_msg_set_roll_pitch_yaw_speed_get_target_system(msg);
+ set_roll_pitch_yaw_speed->target_component = mavlink_msg_set_roll_pitch_yaw_speed_get_target_component(msg);
+ set_roll_pitch_yaw_speed->roll_speed = mavlink_msg_set_roll_pitch_yaw_speed_get_roll_speed(msg);
+ set_roll_pitch_yaw_speed->pitch_speed = mavlink_msg_set_roll_pitch_yaw_speed_get_pitch_speed(msg);
+ set_roll_pitch_yaw_speed->yaw_speed = mavlink_msg_set_roll_pitch_yaw_speed_get_yaw_speed(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw_speed_thrust.h b/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw_speed_thrust.h
new file mode 100644
index 0000000000000000000000000000000000000000..dd12ea4cb09bc882873096c2ecb606019c2e3f31
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw_speed_thrust.h
@@ -0,0 +1,206 @@
+// MESSAGE SET_ROLL_PITCH_YAW_SPEED_THRUST PACKING
+
+#define MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED_THRUST 56
+
+typedef struct __mavlink_set_roll_pitch_yaw_speed_thrust_t
+{
+ uint8_t target_system; ///< System ID
+ uint8_t target_component; ///< Component ID
+ float roll_speed; ///< Desired roll angular speed in rad/s
+ float pitch_speed; ///< Desired pitch angular speed in rad/s
+ float yaw_speed; ///< Desired yaw angular speed in rad/s
+ float thrust; ///< Collective thrust, normalized to 0 .. 1
+
+} mavlink_set_roll_pitch_yaw_speed_thrust_t;
+
+
+
+/**
+ * @brief Pack a set_roll_pitch_yaw_speed_thrust message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll_speed Desired roll angular speed in rad/s
+ * @param pitch_speed Desired pitch angular speed in rad/s
+ * @param yaw_speed Desired yaw angular speed in rad/s
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_speed_thrust_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED_THRUST;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_float_by_index(roll_speed, i, msg->payload); // Desired roll angular speed in rad/s
+ i += put_float_by_index(pitch_speed, i, msg->payload); // Desired pitch angular speed in rad/s
+ i += put_float_by_index(yaw_speed, i, msg->payload); // Desired yaw angular speed in rad/s
+ i += put_float_by_index(thrust, i, msg->payload); // Collective thrust, normalized to 0 .. 1
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a set_roll_pitch_yaw_speed_thrust message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll_speed Desired roll angular speed in rad/s
+ * @param pitch_speed Desired pitch angular speed in rad/s
+ * @param yaw_speed Desired yaw angular speed in rad/s
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_speed_thrust_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_SPEED_THRUST;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_float_by_index(roll_speed, i, msg->payload); // Desired roll angular speed in rad/s
+ i += put_float_by_index(pitch_speed, i, msg->payload); // Desired pitch angular speed in rad/s
+ i += put_float_by_index(yaw_speed, i, msg->payload); // Desired yaw angular speed in rad/s
+ i += put_float_by_index(thrust, i, msg->payload); // Collective thrust, normalized to 0 .. 1
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a set_roll_pitch_yaw_speed_thrust struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param set_roll_pitch_yaw_speed_thrust C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_speed_thrust_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_roll_pitch_yaw_speed_thrust_t* set_roll_pitch_yaw_speed_thrust)
+{
+ return mavlink_msg_set_roll_pitch_yaw_speed_thrust_pack(system_id, component_id, msg, set_roll_pitch_yaw_speed_thrust->target_system, set_roll_pitch_yaw_speed_thrust->target_component, set_roll_pitch_yaw_speed_thrust->roll_speed, set_roll_pitch_yaw_speed_thrust->pitch_speed, set_roll_pitch_yaw_speed_thrust->yaw_speed, set_roll_pitch_yaw_speed_thrust->thrust);
+}
+
+/**
+ * @brief Send a set_roll_pitch_yaw_speed_thrust message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll_speed Desired roll angular speed in rad/s
+ * @param pitch_speed Desired pitch angular speed in rad/s
+ * @param yaw_speed Desired yaw angular speed in rad/s
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_set_roll_pitch_yaw_speed_thrust_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, float roll_speed, float pitch_speed, float yaw_speed, float thrust)
+{
+ mavlink_message_t msg;
+ mavlink_msg_set_roll_pitch_yaw_speed_thrust_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, target_system, target_component, roll_speed, pitch_speed, yaw_speed, thrust);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE SET_ROLL_PITCH_YAW_SPEED_THRUST UNPACKING
+
+/**
+ * @brief Get field target_system from set_roll_pitch_yaw_speed_thrust message
+ *
+ * @return System ID
+ */
+static inline uint8_t mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_target_system(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload)[0];
+}
+
+/**
+ * @brief Get field target_component from set_roll_pitch_yaw_speed_thrust message
+ *
+ * @return Component ID
+ */
+static inline uint8_t mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_target_component(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint8_t))[0];
+}
+
+/**
+ * @brief Get field roll_speed from set_roll_pitch_yaw_speed_thrust message
+ *
+ * @return Desired roll angular speed in rad/s
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_roll_speed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitch_speed from set_roll_pitch_yaw_speed_thrust message
+ *
+ * @return Desired pitch angular speed in rad/s
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_pitch_speed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yaw_speed from set_roll_pitch_yaw_speed_thrust message
+ *
+ * @return Desired yaw angular speed in rad/s
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_yaw_speed(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field thrust from set_roll_pitch_yaw_speed_thrust message
+ *
+ * @return Collective thrust, normalized to 0 .. 1
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_thrust(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Decode a set_roll_pitch_yaw_speed_thrust message into a struct
+ *
+ * @param msg The message to decode
+ * @param set_roll_pitch_yaw_speed_thrust C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_set_roll_pitch_yaw_speed_thrust_decode(const mavlink_message_t* msg, mavlink_set_roll_pitch_yaw_speed_thrust_t* set_roll_pitch_yaw_speed_thrust)
+{
+ set_roll_pitch_yaw_speed_thrust->target_system = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_target_system(msg);
+ set_roll_pitch_yaw_speed_thrust->target_component = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_target_component(msg);
+ set_roll_pitch_yaw_speed_thrust->roll_speed = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_roll_speed(msg);
+ set_roll_pitch_yaw_speed_thrust->pitch_speed = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_pitch_speed(msg);
+ set_roll_pitch_yaw_speed_thrust->yaw_speed = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_yaw_speed(msg);
+ set_roll_pitch_yaw_speed_thrust->thrust = mavlink_msg_set_roll_pitch_yaw_speed_thrust_get_thrust(msg);
+}
diff --git a/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw_thrust.h b/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw_thrust.h
new file mode 100644
index 0000000000000000000000000000000000000000..7bf7d26247de458a5c10f7600da0358d7924e659
--- /dev/null
+++ b/thirdParty/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw_thrust.h
@@ -0,0 +1,206 @@
+// MESSAGE SET_ROLL_PITCH_YAW_THRUST PACKING
+
+#define MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_THRUST 55
+
+typedef struct __mavlink_set_roll_pitch_yaw_thrust_t
+{
+ uint8_t target_system; ///< System ID
+ uint8_t target_component; ///< Component ID
+ float roll; ///< Desired roll angle in radians
+ float pitch; ///< Desired pitch angle in radians
+ float yaw; ///< Desired yaw angle in radians
+ float thrust; ///< Collective thrust, normalized to 0 .. 1
+
+} mavlink_set_roll_pitch_yaw_thrust_t;
+
+
+
+/**
+ * @brief Pack a set_roll_pitch_yaw_thrust message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll Desired roll angle in radians
+ * @param pitch Desired pitch angle in radians
+ * @param yaw Desired yaw angle in radians
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_thrust_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, float roll, float pitch, float yaw, float thrust)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_THRUST;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_float_by_index(roll, i, msg->payload); // Desired roll angle in radians
+ i += put_float_by_index(pitch, i, msg->payload); // Desired pitch angle in radians
+ i += put_float_by_index(yaw, i, msg->payload); // Desired yaw angle in radians
+ i += put_float_by_index(thrust, i, msg->payload); // Collective thrust, normalized to 0 .. 1
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a set_roll_pitch_yaw_thrust message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll Desired roll angle in radians
+ * @param pitch Desired pitch angle in radians
+ * @param yaw Desired yaw angle in radians
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_thrust_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, float roll, float pitch, float yaw, float thrust)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_SET_ROLL_PITCH_YAW_THRUST;
+
+ i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
+ i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
+ i += put_float_by_index(roll, i, msg->payload); // Desired roll angle in radians
+ i += put_float_by_index(pitch, i, msg->payload); // Desired pitch angle in radians
+ i += put_float_by_index(yaw, i, msg->payload); // Desired yaw angle in radians
+ i += put_float_by_index(thrust, i, msg->payload); // Collective thrust, normalized to 0 .. 1
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a set_roll_pitch_yaw_thrust struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param set_roll_pitch_yaw_thrust C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_set_roll_pitch_yaw_thrust_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_set_roll_pitch_yaw_thrust_t* set_roll_pitch_yaw_thrust)
+{
+ return mavlink_msg_set_roll_pitch_yaw_thrust_pack(system_id, component_id, msg, set_roll_pitch_yaw_thrust->target_system, set_roll_pitch_yaw_thrust->target_component, set_roll_pitch_yaw_thrust->roll, set_roll_pitch_yaw_thrust->pitch, set_roll_pitch_yaw_thrust->yaw, set_roll_pitch_yaw_thrust->thrust);
+}
+
+/**
+ * @brief Send a set_roll_pitch_yaw_thrust message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param target_system System ID
+ * @param target_component Component ID
+ * @param roll Desired roll angle in radians
+ * @param pitch Desired pitch angle in radians
+ * @param yaw Desired yaw angle in radians
+ * @param thrust Collective thrust, normalized to 0 .. 1
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_set_roll_pitch_yaw_thrust_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, float roll, float pitch, float yaw, float thrust)
+{
+ mavlink_message_t msg;
+ mavlink_msg_set_roll_pitch_yaw_thrust_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, target_system, target_component, roll, pitch, yaw, thrust);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE SET_ROLL_PITCH_YAW_THRUST UNPACKING
+
+/**
+ * @brief Get field target_system from set_roll_pitch_yaw_thrust message
+ *
+ * @return System ID
+ */
+static inline uint8_t mavlink_msg_set_roll_pitch_yaw_thrust_get_target_system(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload)[0];
+}
+
+/**
+ * @brief Get field target_component from set_roll_pitch_yaw_thrust message
+ *
+ * @return Component ID
+ */
+static inline uint8_t mavlink_msg_set_roll_pitch_yaw_thrust_get_target_component(const mavlink_message_t* msg)
+{
+ return (uint8_t)(msg->payload+sizeof(uint8_t))[0];
+}
+
+/**
+ * @brief Get field roll from set_roll_pitch_yaw_thrust message
+ *
+ * @return Desired roll angle in radians
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_thrust_get_roll(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitch from set_roll_pitch_yaw_thrust message
+ *
+ * @return Desired pitch angle in radians
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_thrust_get_pitch(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yaw from set_roll_pitch_yaw_thrust message
+ *
+ * @return Desired yaw angle in radians
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_thrust_get_yaw(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field thrust from set_roll_pitch_yaw_thrust message
+ *
+ * @return Collective thrust, normalized to 0 .. 1
+ */
+static inline float mavlink_msg_set_roll_pitch_yaw_thrust_get_thrust(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Decode a set_roll_pitch_yaw_thrust message into a struct
+ *
+ * @param msg The message to decode
+ * @param set_roll_pitch_yaw_thrust C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_set_roll_pitch_yaw_thrust_decode(const mavlink_message_t* msg, mavlink_set_roll_pitch_yaw_thrust_t* set_roll_pitch_yaw_thrust)
+{
+ set_roll_pitch_yaw_thrust->target_system = mavlink_msg_set_roll_pitch_yaw_thrust_get_target_system(msg);
+ set_roll_pitch_yaw_thrust->target_component = mavlink_msg_set_roll_pitch_yaw_thrust_get_target_component(msg);
+ set_roll_pitch_yaw_thrust->roll = mavlink_msg_set_roll_pitch_yaw_thrust_get_roll(msg);
+ set_roll_pitch_yaw_thrust->pitch = mavlink_msg_set_roll_pitch_yaw_thrust_get_pitch(msg);
+ set_roll_pitch_yaw_thrust->yaw = mavlink_msg_set_roll_pitch_yaw_thrust_get_yaw(msg);
+ set_roll_pitch_yaw_thrust->thrust = mavlink_msg_set_roll_pitch_yaw_thrust_get_thrust(msg);
+}
diff --git a/thirdParty/mavlink/include/minimal/mavlink.h b/thirdParty/mavlink/include/minimal/mavlink.h
index 45a5e9566a8f66618fc3b88cc4469b032ebabc7b..38389146abe8b01e562eacc67c2e200690b4dde6 100644
--- a/thirdParty/mavlink/include/minimal/mavlink.h
+++ b/thirdParty/mavlink/include/minimal/mavlink.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://pixhawk.ethz.ch/software/mavlink
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Friday, August 5 2011, 07:37 UTC
*/
#ifndef MAVLINK_H
#define MAVLINK_H
diff --git a/thirdParty/mavlink/include/minimal/minimal.h b/thirdParty/mavlink/include/minimal/minimal.h
index 61cd3fe22be39ed8f8bdaaf855398f3d7cce25d2..ee09135a68cf8baf23eaa915b6791e0b1168d99c 100644
--- a/thirdParty/mavlink/include/minimal/minimal.h
+++ b/thirdParty/mavlink/include/minimal/minimal.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://qgroundcontrol.org/mavlink/
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Friday, August 5 2011, 07:37 UTC
*/
#ifndef MINIMAL_H
#define MINIMAL_H
diff --git a/thirdParty/mavlink/include/pixhawk/mavlink.h b/thirdParty/mavlink/include/pixhawk/mavlink.h
index 16a37599e1fa218650bf065dbd66ec620892162c..57a763b36723d0002ed3fc496cbfea74d5f5e5e7 100644
--- a/thirdParty/mavlink/include/pixhawk/mavlink.h
+++ b/thirdParty/mavlink/include/pixhawk/mavlink.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://pixhawk.ethz.ch/software/mavlink
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Wednesday, August 17 2011, 06:03 UTC
*/
#ifndef MAVLINK_H
#define MAVLINK_H
diff --git a/thirdParty/mavlink/include/pixhawk/mavlink_msg_visual_odometry.h b/thirdParty/mavlink/include/pixhawk/mavlink_msg_visual_odometry.h
new file mode 100644
index 0000000000000000000000000000000000000000..0fd504c1ff9e9ea7d597ed0ac200744c8fdd9959
--- /dev/null
+++ b/thirdParty/mavlink/include/pixhawk/mavlink_msg_visual_odometry.h
@@ -0,0 +1,268 @@
+// MESSAGE VISUAL_ODOMETRY PACKING
+
+#define MAVLINK_MSG_ID_VISUAL_ODOMETRY 180
+
+typedef struct __mavlink_visual_odometry_t
+{
+ uint64_t frame1_time_us; ///< Time at which frame 1 was captured (in microseconds since unix epoch)
+ uint64_t frame2_time_us; ///< Time at which frame 2 was captured (in microseconds since unix epoch)
+ float x; ///< Relative X position
+ float y; ///< Relative Y position
+ float z; ///< Relative Z position
+ float roll; ///< Relative roll angle in rad
+ float pitch; ///< Relative pitch angle in rad
+ float yaw; ///< Relative yaw angle in rad
+
+} mavlink_visual_odometry_t;
+
+
+
+/**
+ * @brief Pack a visual_odometry message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ *
+ * @param frame1_time_us Time at which frame 1 was captured (in microseconds since unix epoch)
+ * @param frame2_time_us Time at which frame 2 was captured (in microseconds since unix epoch)
+ * @param x Relative X position
+ * @param y Relative Y position
+ * @param z Relative Z position
+ * @param roll Relative roll angle in rad
+ * @param pitch Relative pitch angle in rad
+ * @param yaw Relative yaw angle in rad
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_visual_odometry_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint64_t frame1_time_us, uint64_t frame2_time_us, float x, float y, float z, float roll, float pitch, float yaw)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_VISUAL_ODOMETRY;
+
+ i += put_uint64_t_by_index(frame1_time_us, i, msg->payload); // Time at which frame 1 was captured (in microseconds since unix epoch)
+ i += put_uint64_t_by_index(frame2_time_us, i, msg->payload); // Time at which frame 2 was captured (in microseconds since unix epoch)
+ i += put_float_by_index(x, i, msg->payload); // Relative X position
+ i += put_float_by_index(y, i, msg->payload); // Relative Y position
+ i += put_float_by_index(z, i, msg->payload); // Relative Z position
+ i += put_float_by_index(roll, i, msg->payload); // Relative roll angle in rad
+ i += put_float_by_index(pitch, i, msg->payload); // Relative pitch angle in rad
+ i += put_float_by_index(yaw, i, msg->payload); // Relative yaw angle in rad
+
+ return mavlink_finalize_message(msg, system_id, component_id, i);
+}
+
+/**
+ * @brief Pack a visual_odometry message
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param chan The MAVLink channel this message was sent over
+ * @param msg The MAVLink message to compress the data into
+ * @param frame1_time_us Time at which frame 1 was captured (in microseconds since unix epoch)
+ * @param frame2_time_us Time at which frame 2 was captured (in microseconds since unix epoch)
+ * @param x Relative X position
+ * @param y Relative Y position
+ * @param z Relative Z position
+ * @param roll Relative roll angle in rad
+ * @param pitch Relative pitch angle in rad
+ * @param yaw Relative yaw angle in rad
+ * @return length of the message in bytes (excluding serial stream start sign)
+ */
+static inline uint16_t mavlink_msg_visual_odometry_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint64_t frame1_time_us, uint64_t frame2_time_us, float x, float y, float z, float roll, float pitch, float yaw)
+{
+ uint16_t i = 0;
+ msg->msgid = MAVLINK_MSG_ID_VISUAL_ODOMETRY;
+
+ i += put_uint64_t_by_index(frame1_time_us, i, msg->payload); // Time at which frame 1 was captured (in microseconds since unix epoch)
+ i += put_uint64_t_by_index(frame2_time_us, i, msg->payload); // Time at which frame 2 was captured (in microseconds since unix epoch)
+ i += put_float_by_index(x, i, msg->payload); // Relative X position
+ i += put_float_by_index(y, i, msg->payload); // Relative Y position
+ i += put_float_by_index(z, i, msg->payload); // Relative Z position
+ i += put_float_by_index(roll, i, msg->payload); // Relative roll angle in rad
+ i += put_float_by_index(pitch, i, msg->payload); // Relative pitch angle in rad
+ i += put_float_by_index(yaw, i, msg->payload); // Relative yaw angle in rad
+
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
+}
+
+/**
+ * @brief Encode a visual_odometry struct into a message
+ *
+ * @param system_id ID of this system
+ * @param component_id ID of this component (e.g. 200 for IMU)
+ * @param msg The MAVLink message to compress the data into
+ * @param visual_odometry C-struct to read the message contents from
+ */
+static inline uint16_t mavlink_msg_visual_odometry_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_visual_odometry_t* visual_odometry)
+{
+ return mavlink_msg_visual_odometry_pack(system_id, component_id, msg, visual_odometry->frame1_time_us, visual_odometry->frame2_time_us, visual_odometry->x, visual_odometry->y, visual_odometry->z, visual_odometry->roll, visual_odometry->pitch, visual_odometry->yaw);
+}
+
+/**
+ * @brief Send a visual_odometry message
+ * @param chan MAVLink channel to send the message
+ *
+ * @param frame1_time_us Time at which frame 1 was captured (in microseconds since unix epoch)
+ * @param frame2_time_us Time at which frame 2 was captured (in microseconds since unix epoch)
+ * @param x Relative X position
+ * @param y Relative Y position
+ * @param z Relative Z position
+ * @param roll Relative roll angle in rad
+ * @param pitch Relative pitch angle in rad
+ * @param yaw Relative yaw angle in rad
+ */
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
+
+static inline void mavlink_msg_visual_odometry_send(mavlink_channel_t chan, uint64_t frame1_time_us, uint64_t frame2_time_us, float x, float y, float z, float roll, float pitch, float yaw)
+{
+ mavlink_message_t msg;
+ mavlink_msg_visual_odometry_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, frame1_time_us, frame2_time_us, x, y, z, roll, pitch, yaw);
+ mavlink_send_uart(chan, &msg);
+}
+
+#endif
+// MESSAGE VISUAL_ODOMETRY UNPACKING
+
+/**
+ * @brief Get field frame1_time_us from visual_odometry message
+ *
+ * @return Time at which frame 1 was captured (in microseconds since unix epoch)
+ */
+static inline uint64_t mavlink_msg_visual_odometry_get_frame1_time_us(const mavlink_message_t* msg)
+{
+ generic_64bit r;
+ r.b[7] = (msg->payload)[0];
+ r.b[6] = (msg->payload)[1];
+ r.b[5] = (msg->payload)[2];
+ r.b[4] = (msg->payload)[3];
+ r.b[3] = (msg->payload)[4];
+ r.b[2] = (msg->payload)[5];
+ r.b[1] = (msg->payload)[6];
+ r.b[0] = (msg->payload)[7];
+ return (uint64_t)r.ll;
+}
+
+/**
+ * @brief Get field frame2_time_us from visual_odometry message
+ *
+ * @return Time at which frame 2 was captured (in microseconds since unix epoch)
+ */
+static inline uint64_t mavlink_msg_visual_odometry_get_frame2_time_us(const mavlink_message_t* msg)
+{
+ generic_64bit r;
+ r.b[7] = (msg->payload+sizeof(uint64_t))[0];
+ r.b[6] = (msg->payload+sizeof(uint64_t))[1];
+ r.b[5] = (msg->payload+sizeof(uint64_t))[2];
+ r.b[4] = (msg->payload+sizeof(uint64_t))[3];
+ r.b[3] = (msg->payload+sizeof(uint64_t))[4];
+ r.b[2] = (msg->payload+sizeof(uint64_t))[5];
+ r.b[1] = (msg->payload+sizeof(uint64_t))[6];
+ r.b[0] = (msg->payload+sizeof(uint64_t))[7];
+ return (uint64_t)r.ll;
+}
+
+/**
+ * @brief Get field x from visual_odometry message
+ *
+ * @return Relative X position
+ */
+static inline float mavlink_msg_visual_odometry_get_x(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field y from visual_odometry message
+ *
+ * @return Relative Y position
+ */
+static inline float mavlink_msg_visual_odometry_get_y(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field z from visual_odometry message
+ *
+ * @return Relative Z position
+ */
+static inline float mavlink_msg_visual_odometry_get_z(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field roll from visual_odometry message
+ *
+ * @return Relative roll angle in rad
+ */
+static inline float mavlink_msg_visual_odometry_get_roll(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field pitch from visual_odometry message
+ *
+ * @return Relative pitch angle in rad
+ */
+static inline float mavlink_msg_visual_odometry_get_pitch(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Get field yaw from visual_odometry message
+ *
+ * @return Relative yaw angle in rad
+ */
+static inline float mavlink_msg_visual_odometry_get_yaw(const mavlink_message_t* msg)
+{
+ generic_32bit r;
+ r.b[3] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0];
+ r.b[2] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[1];
+ r.b[1] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[2];
+ r.b[0] = (msg->payload+sizeof(uint64_t)+sizeof(uint64_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[3];
+ return (float)r.f;
+}
+
+/**
+ * @brief Decode a visual_odometry message into a struct
+ *
+ * @param msg The message to decode
+ * @param visual_odometry C-struct to decode the message contents into
+ */
+static inline void mavlink_msg_visual_odometry_decode(const mavlink_message_t* msg, mavlink_visual_odometry_t* visual_odometry)
+{
+ visual_odometry->frame1_time_us = mavlink_msg_visual_odometry_get_frame1_time_us(msg);
+ visual_odometry->frame2_time_us = mavlink_msg_visual_odometry_get_frame2_time_us(msg);
+ visual_odometry->x = mavlink_msg_visual_odometry_get_x(msg);
+ visual_odometry->y = mavlink_msg_visual_odometry_get_y(msg);
+ visual_odometry->z = mavlink_msg_visual_odometry_get_z(msg);
+ visual_odometry->roll = mavlink_msg_visual_odometry_get_roll(msg);
+ visual_odometry->pitch = mavlink_msg_visual_odometry_get_pitch(msg);
+ visual_odometry->yaw = mavlink_msg_visual_odometry_get_yaw(msg);
+}
diff --git a/thirdParty/mavlink/include/pixhawk/pixhawk.h b/thirdParty/mavlink/include/pixhawk/pixhawk.h
index 30474d09cb8c1268d12d14fe373d79f0f06551a4..5907478c2bbd9a1aa449f72da46b39ab44ae1d13 100644
--- a/thirdParty/mavlink/include/pixhawk/pixhawk.h
+++ b/thirdParty/mavlink/include/pixhawk/pixhawk.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://qgroundcontrol.org/mavlink/
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Wednesday, August 17 2011, 06:03 UTC
*/
#ifndef PIXHAWK_H
#define PIXHAWK_H
@@ -66,12 +66,13 @@ enum DATA_TYPES
#include "./mavlink_msg_data_transmission_handshake.h"
#include "./mavlink_msg_encapsulated_data.h"
#include "./mavlink_msg_brief_feature.h"
+#include "./mavlink_msg_visual_odometry.h"
// MESSAGE LENGTHS
#undef MAVLINK_MESSAGE_LENGTHS
-#define MAVLINK_MESSAGE_LENGTHS { 3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 0, 0, 0, 0, 0, 5, 5, 26, 16, 36, 5, 6, 0, 0, 21, 0, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 52, 1, 92, 0, 0, 0, 0, 0, 0, 0, 32, 32, 20, 0, 0, 0, 0, 0, 0, 20, 18, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 12, 0, 0, 0, 0, 0, 0, 0, 4, 255, 12, 6, 18, 0, 0, 0, 0, 0, 106, 42, 54, 0, 0, 0, 0, 0, 0, 0, 8, 255, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51 }
+#define MAVLINK_MESSAGE_LENGTHS { 3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 18, 18, 24, 24, 0, 0, 0, 26, 16, 36, 5, 6, 56, 26, 21, 18, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 52, 1, 92, 0, 0, 0, 0, 0, 0, 0, 32, 32, 20, 0, 0, 0, 0, 0, 0, 20, 18, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 12, 0, 0, 0, 0, 0, 0, 0, 4, 255, 12, 6, 18, 0, 0, 0, 0, 0, 106, 42, 54, 0, 0, 0, 0, 0, 0, 0, 8, 255, 53, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51 }
#ifdef __cplusplus
}
diff --git a/thirdParty/mavlink/include/slugs/mavlink.h b/thirdParty/mavlink/include/slugs/mavlink.h
index bf0e146b4c4ac71ac936d8deb85044d42555ee1c..29ce7ed5554b80cf15e4d041ed91ecf44217de84 100644
--- a/thirdParty/mavlink/include/slugs/mavlink.h
+++ b/thirdParty/mavlink/include/slugs/mavlink.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://pixhawk.ethz.ch/software/mavlink
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Friday, August 5 2011, 07:37 UTC
*/
#ifndef MAVLINK_H
#define MAVLINK_H
diff --git a/thirdParty/mavlink/include/slugs/slugs.h b/thirdParty/mavlink/include/slugs/slugs.h
index b8a6ff330ac6767501f59b0c042cd7b9966b3ab3..b04cb7922f08e9aa1733bbd5f934f9be18496b6f 100644
--- a/thirdParty/mavlink/include/slugs/slugs.h
+++ b/thirdParty/mavlink/include/slugs/slugs.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://qgroundcontrol.org/mavlink/
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Friday, August 5 2011, 07:37 UTC
*/
#ifndef SLUGS_H
#define SLUGS_H
@@ -48,7 +48,7 @@ extern "C" {
// MESSAGE LENGTHS
#undef MAVLINK_MESSAGE_LENGTHS
-#define MAVLINK_MESSAGE_LENGTHS { 3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 0, 0, 0, 0, 0, 5, 5, 26, 16, 36, 5, 6, 0, 0, 21, 0, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 10, 24, 18, 0, 0, 30, 24, 0, 7, 13, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51 }
+#define MAVLINK_MESSAGE_LENGTHS { 3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 14, 14, 0, 0, 0, 5, 5, 26, 16, 36, 5, 6, 56, 0, 21, 18, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 10, 24, 18, 0, 0, 30, 24, 0, 7, 13, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51 }
#ifdef __cplusplus
}
diff --git a/thirdParty/mavlink/include/ualberta/mavlink.h b/thirdParty/mavlink/include/ualberta/mavlink.h
index 30b060f630050f4b68a710e97ca0c3eed2ca0e9b..e12f74a8df8d6811ffda3cbec7ed6dc2f040dbae 100644
--- a/thirdParty/mavlink/include/ualberta/mavlink.h
+++ b/thirdParty/mavlink/include/ualberta/mavlink.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://pixhawk.ethz.ch/software/mavlink
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Friday, August 5 2011, 07:37 UTC
*/
#ifndef MAVLINK_H
#define MAVLINK_H
diff --git a/thirdParty/mavlink/include/ualberta/ualberta.h b/thirdParty/mavlink/include/ualberta/ualberta.h
index b492ff62d65eead6b12bd73363dcbb4b22791ae2..be77cc2e5d7e6b898d2ec61f8f1760fa65a9c575 100644
--- a/thirdParty/mavlink/include/ualberta/ualberta.h
+++ b/thirdParty/mavlink/include/ualberta/ualberta.h
@@ -1,7 +1,7 @@
/** @file
* @brief MAVLink comm protocol.
* @see http://qgroundcontrol.org/mavlink/
- * Generated on Wednesday, July 27 2011, 14:17 UTC
+ * Generated on Friday, August 5 2011, 07:37 UTC
*/
#ifndef UALBERTA_H
#define UALBERTA_H
@@ -71,7 +71,7 @@ enum UALBERTA_PILOT_MODE
// MESSAGE LENGTHS
#undef MAVLINK_MESSAGE_LENGTHS
-#define MAVLINK_MESSAGE_LENGTHS { 3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 0, 0, 0, 0, 0, 5, 5, 26, 16, 36, 5, 6, 0, 0, 21, 0, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51 }
+#define MAVLINK_MESSAGE_LENGTHS { 3, 4, 8, 14, 8, 28, 3, 32, 0, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 19, 2, 23, 21, 0, 37, 26, 101, 26, 16, 32, 32, 37, 32, 11, 17, 17, 16, 18, 36, 4, 4, 2, 2, 4, 2, 2, 3, 14, 12, 18, 16, 8, 27, 25, 14, 14, 0, 0, 0, 5, 5, 26, 16, 36, 5, 6, 56, 0, 21, 18, 0, 0, 18, 20, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 14, 14, 51 }
#ifdef __cplusplus
}
diff --git a/thirdParty/mavlink/message_definitions/ardupilotmega.xml b/thirdParty/mavlink/message_definitions/ardupilotmega.xml
index 39d96eab515cf9fb19b6fdf0bf167e369be00a50..d7d6aaacd414de6f984013295fea2e3910d95bea 100644
--- a/thirdParty/mavlink/message_definitions/ardupilotmega.xml
+++ b/thirdParty/mavlink/message_definitions/ardupilotmega.xml
@@ -1,6 +1,39 @@
-
+
- common.xml
-
-
+ common.xml
+
+
+
+ Offsets and calibrations values for hardware
+ sensors. This makes it easier to debug the calibration process.
+ magnetometer X offset
+ magnetometer Y offset
+ magnetometer Z offset
+ magnetic declination (radians)
+ raw pressure from barometer
+ raw temperature from barometer
+ gyro X calibration
+ gyro Y calibration
+ gyro Z calibration
+ accel X calibration
+ accel Y calibration
+ accel Z calibration
+
+
+
+ set the magnetometer offsets
+ System ID
+ Component ID
+ magnetometer X offset
+ magnetometer Y offset
+ magnetometer Z offset
+
+
+
diff --git a/thirdParty/mavlink/message_definitions/common.xml b/thirdParty/mavlink/message_definitions/common.xml
index 5df9ba827ee9112b0755dd4ece6918f48a71bbb7..dd4ea84430da5a7ceed5ae92bdfaaff54621d75c 100644
--- a/thirdParty/mavlink/message_definitions/common.xml
+++ b/thirdParty/mavlink/message_definitions/common.xml
@@ -1,892 +1,941 @@
-
+
-2
-
-
-
- Commands to be executed by the MAV. They can be executed on user request,
+ 2
+
+
+ Commands to be executed by the MAV. They can be executed on user request,
or as part of a mission script. If the action is used in a mission, the parameter mapping
to the waypoint/mission message is as follows:
Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what
ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data.
-
- Navigate to waypoint.
- Hold time in decimal seconds. (ignored by fixed wing, time to stay at waypoint for rotary wing)
- Acceptance radius in meters (if the sphere with this radius is hit, the waypoint counts as reached)
- 0 to pass through the WP, if > 0 radius in meters to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.
- Desired yaw angle at waypoint (rotary wing)
- Latitude
- Longitude
- Altitude
-
-
- Loiter around this waypoint an unlimited amount of time
- Empty
- Empty
- Radius around waypoint, in meters. If positive loiter clockwise, else counter-clockwise
- Desired yaw angle.
- Latitude
- Longitude
- Altitude
-
-
- Loiter around this waypoint for X turns
- Turns
- Empty
- Radius around waypoint, in meters. If positive loiter clockwise, else counter-clockwise
- Desired yaw angle.
- Latitude
- Longitude
- Altitude
-
-
- Loiter around this waypoint for X seconds
- Seconds (decimal)
- Empty
- Radius around waypoint, in meters. If positive loiter clockwise, else counter-clockwise
- Desired yaw angle.
- Latitude
- Longitude
- Altitude
-
-
- Return to launch location
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Land at location
- Empty
- Empty
- Empty
- Desired yaw angle.
- Latitude
- Longitude
- Altitude
-
-
- Takeoff from ground / hand
- Minimum pitch (if airspeed sensor present), desired pitch without sensor
- Empty
- Empty
- Yaw angle (if magnetometer present), ignored without magnetometer
- Latitude
- Longitude
- Altitude
-
-
-
- Sets the region of interest (ROI) for a sensor set or the
+
+ Navigate to waypoint.
+ Hold time in decimal seconds. (ignored by fixed wing, time to stay at waypoint for rotary wing)
+ Acceptance radius in meters (if the sphere with this radius is hit, the waypoint counts as reached)
+ 0 to pass through the WP, if > 0 radius in meters to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.
+ Desired yaw angle at waypoint (rotary wing)
+ Latitude
+ Longitude
+ Altitude
+
+
+ Loiter around this waypoint an unlimited amount of time
+ Empty
+ Empty
+ Radius around waypoint, in meters. If positive loiter clockwise, else counter-clockwise
+ Desired yaw angle.
+ Latitude
+ Longitude
+ Altitude
+
+
+ Loiter around this waypoint for X turns
+ Turns
+ Empty
+ Radius around waypoint, in meters. If positive loiter clockwise, else counter-clockwise
+ Desired yaw angle.
+ Latitude
+ Longitude
+ Altitude
+
+
+ Loiter around this waypoint for X seconds
+ Seconds (decimal)
+ Empty
+ Radius around waypoint, in meters. If positive loiter clockwise, else counter-clockwise
+ Desired yaw angle.
+ Latitude
+ Longitude
+ Altitude
+
+
+ Return to launch location
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Land at location
+ Empty
+ Empty
+ Empty
+ Desired yaw angle.
+ Latitude
+ Longitude
+ Altitude
+
+
+ Takeoff from ground / hand
+ Minimum pitch (if airspeed sensor present), desired pitch without sensor
+ Empty
+ Empty
+ Yaw angle (if magnetometer present), ignored without magnetometer
+ Latitude
+ Longitude
+ Altitude
+
+
+ Sets the region of interest (ROI) for a sensor set or the
vehicle itself. This can then be used by the vehicles control
system to control the vehicle attitude and the attitude of various
sensors such as cameras.
- Region of intereset mode. (see MAV_ROI enum)
- Waypoint index/ target ID. (see MAV_ROI enum)
- ROI index (allows a vehicle to manage multiple ROI's)
- Empty
- x the location of the fixed ROI (see MAV_FRAME)
- y
- z
-
-
-
- Control autonomous path planning on the MAV.
- 0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning
- 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid
- Empty
- Yaw angle at goal, in compass degrees, [0..360]
- Latitude/X of goal
- Longitude/Y of goal
- Altitude/Z of goal
-
-
- NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Delay mission state machine.
- Delay in seconds (decimal)
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Ascend/descend at rate. Delay mission state machine until desired altitude reached.
- Descent / Ascend rate (m/s)
- Empty
- Empty
- Empty
- Empty
- Empty
- Finish Altitude
-
-
- Delay mission state machine until within desired distance of next NAV point.
- Distance (meters)
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Reach a certain target angle.
- target angle: [0-360], 0 is north
- speed during yaw change:[deg per second]
- direction: negative: counter clockwise, positive: clockwise [-1,1]
- relative offset or absolute angle: [ 1,0]
- Empty
- Empty
- Empty
-
-
- NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Set system mode.
- Mode, as defined by ENUM MAV_MODE
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Jump to the desired command in the mission list. Repeat this action only the specified number of times
- Sequence number
- Repeat count
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Change speed and/or throttle set points.
- Speed type (0=Airspeed, 1=Ground Speed)
- Speed (m/s, -1 indicates no change)
- Throttle ( Percent, -1 indicates no change)
- Empty
- Empty
- Empty
- Empty
-
-
- Changes the home location either to the current location or a specified location.
- Use current (1=use current location, 0=use specified location)
- Empty
- Empty
- Empty
- Latitude
- Longitude
- Altitude
-
-
- Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter.
- Parameter number
- Parameter value
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Set a relay to a condition.
- Relay number
- Setting (1=on, 0=off, others possible depending on system hardware)
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Cycle a relay on and off for a desired number of cyles with a desired period.
- Relay number
- Cycle count
- Cycle time (seconds, decimal)
- Empty
- Empty
- Empty
- Empty
-
-
- Set a servo to a desired PWM value.
- Servo number
- PWM (microseconds, 1000 to 2000 typical)
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period.
- Servo number
- PWM (microseconds, 1000 to 2000 typical)
- Cycle count
- Cycle time (seconds)
- Empty
- Empty
- Empty
-
-
- Control onboard camera system.
- Camera ID (-1 for all)
- Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw
- Transmission mode: 0: video stream, >0: single images every n seconds (decimal)
- Recording: 0: disabled, 1: enabled compressed, 2: enabled raw
- Empty
- Empty
- Empty
-
-
- NOP - This command is only used to mark the upper limit of the DO commands in the enumeration
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
- Empty
-
-
- Trigger calibration. This command will be only accepted if in pre-flight mode.
- Gyro calibration: 0: no, 1: yes
- Magnetometer calibration: 0: no, 1: yes
- Ground pressure: 0: no, 1: yes
- Radio calibration: 0: no, 1: yes
- Empty
- Empty
- Empty
-
-
- Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode.
- Parameter storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM
- Mission storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM
- Reserved
- Reserved
- Empty
- Empty
- Empty
-
-
-
- Data stream IDs. A data stream is not a fixed set of messages, but rather a
+ Region of intereset mode. (see MAV_ROI enum)
+ Waypoint index/ target ID. (see MAV_ROI enum)
+ ROI index (allows a vehicle to manage multiple ROI's)
+ Empty
+ x the location of the fixed ROI (see MAV_FRAME)
+ y
+ z
+
+
+ Control autonomous path planning on the MAV.
+ 0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning
+ 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid
+ Empty
+ Yaw angle at goal, in compass degrees, [0..360]
+ Latitude/X of goal
+ Longitude/Y of goal
+ Altitude/Z of goal
+
+
+ NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Delay mission state machine.
+ Delay in seconds (decimal)
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Ascend/descend at rate. Delay mission state machine until desired altitude reached.
+ Descent / Ascend rate (m/s)
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Finish Altitude
+
+
+ Delay mission state machine until within desired distance of next NAV point.
+ Distance (meters)
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Reach a certain target angle.
+ target angle: [0-360], 0 is north
+ speed during yaw change:[deg per second]
+ direction: negative: counter clockwise, positive: clockwise [-1,1]
+ relative offset or absolute angle: [ 1,0]
+ Empty
+ Empty
+ Empty
+
+
+ NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Set system mode.
+ Mode, as defined by ENUM MAV_MODE
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Jump to the desired command in the mission list. Repeat this action only the specified number of times
+ Sequence number
+ Repeat count
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Change speed and/or throttle set points.
+ Speed type (0=Airspeed, 1=Ground Speed)
+ Speed (m/s, -1 indicates no change)
+ Throttle ( Percent, -1 indicates no change)
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Changes the home location either to the current location or a specified location.
+ Use current (1=use current location, 0=use specified location)
+ Empty
+ Empty
+ Empty
+ Latitude
+ Longitude
+ Altitude
+
+
+ Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter.
+ Parameter number
+ Parameter value
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Set a relay to a condition.
+ Relay number
+ Setting (1=on, 0=off, others possible depending on system hardware)
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Cycle a relay on and off for a desired number of cyles with a desired period.
+ Relay number
+ Cycle count
+ Cycle time (seconds, decimal)
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Set a servo to a desired PWM value.
+ Servo number
+ PWM (microseconds, 1000 to 2000 typical)
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period.
+ Servo number
+ PWM (microseconds, 1000 to 2000 typical)
+ Cycle count
+ Cycle time (seconds)
+ Empty
+ Empty
+ Empty
+
+
+ Control onboard camera capturing.
+ Camera ID (-1 for all)
+ Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw
+ Transmission mode: 0: video stream, >0: single images every n seconds (decimal)
+ Recording: 0: disabled, 1: enabled compressed, 2: enabled raw
+ Empty
+ Empty
+ Empty
+
+
+ Sets the region of interest (ROI) for a sensor set or the
+ vehicle itself. This can then be used by the vehicles control
+ system to control the vehicle attitude and the attitude of various
+ devices such as cameras.
+
+ Region of interest mode. (see MAV_ROI enum)
+ Waypoint index/ target ID. (see MAV_ROI enum)
+ ROI index (allows a vehicle to manage multiple cameras etc.)
+ Empty
+ x the location of the fixed ROI (see MAV_FRAME)
+ y
+ z
+
+
+ NOP - This command is only used to mark the upper limit of the DO commands in the enumeration
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+ Empty
+
+
+ Trigger calibration. This command will be only accepted if in pre-flight mode.
+ Gyro calibration: 0: no, 1: yes
+ Magnetometer calibration: 0: no, 1: yes
+ Ground pressure: 0: no, 1: yes
+ Radio calibration: 0: no, 1: yes
+ Empty
+ Empty
+ Empty
+
+
+ Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode.
+ Parameter storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM
+ Mission storage: 0: READ FROM FLASH/EEPROM, 1: WRITE CURRENT TO FLASH/EEPROM
+ Reserved
+ Reserved
+ Empty
+ Empty
+ Empty
+
+
+
+ Data stream IDs. A data stream is not a fixed set of messages, but rather a
recommendation to the autopilot software. Individual autopilots may or may not obey
the recommended messages.
- Enable all data streams
- Enable IMU_RAW, GPS_RAW, GPS_STATUS packets.
- Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS
- Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW
- Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT.
- Enable LOCAL_POSITION, GLOBAL_POSITION/GLOBAL_POSITION_INT messages.
- Dependent on the autopilot
- Dependent on the autopilot
- Dependent on the autopilot
-
-
-
- The ROI (region of interest) for the vehicle. This can be
- be used by the vehicle for camera/vehicle attitude alignment (see
- MAV_CMD_NAV_ROI).
-
- Point toward next waypoint.
- Point toward given waypoint.
- Point toward fixed location.
- Point toward of given id.
-
-
-
-
-
-
- The heartbeat message shows that a system is present and responding. The type of the MAV and Autopilot hardware allow the receiving system to treat further messages from this system appropriate (e.g. by laying out the user interface based on the autopilot).
- Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
- Type of the Autopilot: 0: Generic, 1: PIXHAWK, 2: SLUGS, 3: Ardupilot (up to 15 types), defined in MAV_AUTOPILOT_TYPE ENUM
- MAVLink version
-
-
-
- The boot message indicates that a system is starting. The onboard software version allows to keep track of onboard soft/firmware revisions.
- The onboard software version
-
-
-
- The system time is the time of the master clock, typically the computer clock of the main onboard computer.
- Timestamp of the master clock in microseconds since UNIX epoch.
-
-
-
- A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections.
- PING sequence
- 0: request ping from all receiving systems, if greater than 0: message is a ping response and number is the system id of the requesting system
- 0: request ping from all receiving components, if greater than 0: message is a ping response and number is the system id of the requesting system
- Unix timestamp in microseconds
-
-
-
- UTC date and time from GPS module
- GPS UTC date ddmmyy
- GPS UTC time hhmmss
-
-
-
- Request to control this MAV
- System the GCS requests control for
- 0: request control of this MAV, 1: Release control of this MAV
- 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
- Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
-
-
-
- Accept / deny control of this MAV
- ID of the GCS this message
- 0: request control of this MAV, 1: Release control of this MAV
- 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
-
-
-
- Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety.
- key
-
-
-
- This message acknowledges an action. IMPORTANT: The acknowledgement can be also negative, e.g. the MAV rejects a reset message because it is in-flight. The action ids are defined in ENUM MAV_ACTION in mavlink/include/mavlink_types.h
- The action id
- 0: Action DENIED, 1: Action executed
-
-
-
- An action message allows to execute a certain onboard action. These include liftoff, land, storing parameters too EEPROM, shutddown, etc. The action ids are defined in ENUM MAV_ACTION in mavlink/include/mavlink_types.h
- The system executing the action
- The component executing the action
- The action id
-
-
-
- Set the system mode, as defined by enum MAV_MODE in mavlink/include/mavlink_types.h. There is no target component id as the mode is by definition for the overall aircraft, not only for one component.
- The system setting the mode
- The new mode
-
-
-
- Set the system navigation mode, as defined by enum MAV_NAV_MODE in mavlink/include/mavlink_types.h. The navigation mode applies to the whole aircraft and thus all components.
- The system setting the mode
- The new navigation mode
-
-
-
- Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -> value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also http://qgroundcontrol.org/parameter_interface for a full documentation of QGroundControl and IMU code.
- System ID
- Component ID
- Onboard parameter id
- Parameter index. Send -1 to use the param ID field as identifier
-
-
-
- Request all parameters of this component. After his request, all parameters are emitted.
- System ID
- Component ID
-
-
-
- Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout.
- Onboard parameter id
- Onboard parameter value
- Total number of onboard parameters
- Index of this onboard parameter
-
-
-
- Set a parameter value TEMPORARILY to RAM. It will be reset to default on system reboot. Send the ACTION MAV_ACTION_STORAGE_WRITE to PERMANENTLY write the RAM contents to EEPROM. IMPORTANT: The receiving component should acknowledge the new parameter value by sending a param_value message to all communication partners. This will also ensure that multiple GCS all have an up-to-date list of all parameters. If the sending GCS did not receive a PARAM_VALUE message within its timeout time, it should re-send the PARAM_SET message.
- System ID
- Component ID
- Onboard parameter id
- Onboard parameter value
-
-
-
- The global position, as returned by the Global Positioning System (GPS). This is
+
+ Enable all data streams
+
+
+ Enable IMU_RAW, GPS_RAW, GPS_STATUS packets.
+
+
+ Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS
+
+
+ Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW
+
+
+ Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT.
+
+
+ Enable LOCAL_POSITION, GLOBAL_POSITION/GLOBAL_POSITION_INT messages.
+
+
+ Dependent on the autopilot
+
+
+ Dependent on the autopilot
+
+
+ Dependent on the autopilot
+
+
+
+ The ROI (region of interest) for the vehicle. This can be
+ be used by the vehicle for camera/vehicle attitude alignment (see
+ MAV_CMD_NAV_ROI).
+
+
+ No region of interest.
+
+
+ Point toward next waypoint.
+
+
+ Point toward given waypoint.
+
+
+ Point toward fixed location.
+
+
+ Point toward of given id.
+
+
+
+
+
+ The heartbeat message shows that a system is present and responding. The type of the MAV and Autopilot hardware allow the receiving system to treat further messages from this system appropriate (e.g. by laying out the user interface based on the autopilot).
+ Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
+ Type of the Autopilot: 0: Generic, 1: PIXHAWK, 2: SLUGS, 3: Ardupilot (up to 15 types), defined in MAV_AUTOPILOT_TYPE ENUM
+ MAVLink version
+
+
+ The boot message indicates that a system is starting. The onboard software version allows to keep track of onboard soft/firmware revisions.
+ The onboard software version
+
+
+ The system time is the time of the master clock, typically the computer clock of the main onboard computer.
+ Timestamp of the master clock in microseconds since UNIX epoch.
+
+
+ A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections.
+ PING sequence
+ 0: request ping from all receiving systems, if greater than 0: message is a ping response and number is the system id of the requesting system
+ 0: request ping from all receiving components, if greater than 0: message is a ping response and number is the system id of the requesting system
+ Unix timestamp in microseconds
+
+
+ UTC date and time from GPS module
+ GPS UTC date ddmmyy
+ GPS UTC time hhmmss
+
+
+ Request to control this MAV
+ System the GCS requests control for
+ 0: request control of this MAV, 1: Release control of this MAV
+ 0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch.
+ Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and "!?,.-"
+
+
+ Accept / deny control of this MAV
+ ID of the GCS this message
+ 0: request control of this MAV, 1: Release control of this MAV
+ 0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control
+
+
+ Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety.
+ key
+
+
+ This message acknowledges an action. IMPORTANT: The acknowledgement can be also negative, e.g. the MAV rejects a reset message because it is in-flight. The action ids are defined in ENUM MAV_ACTION in mavlink/include/mavlink_types.h
+ The action id
+ 0: Action DENIED, 1: Action executed
+
+
+ An action message allows to execute a certain onboard action. These include liftoff, land, storing parameters too EEPROM, shutddown, etc. The action ids are defined in ENUM MAV_ACTION in mavlink/include/mavlink_types.h
+ The system executing the action
+ The component executing the action
+ The action id
+
+
+ Set the system mode, as defined by enum MAV_MODE in mavlink/include/mavlink_types.h. There is no target component id as the mode is by definition for the overall aircraft, not only for one component.
+ The system setting the mode
+ The new mode
+
+
+ Set the system navigation mode, as defined by enum MAV_NAV_MODE in mavlink/include/mavlink_types.h. The navigation mode applies to the whole aircraft and thus all components.
+ The system setting the mode
+ The new navigation mode
+
+
+ Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -> value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also http://qgroundcontrol.org/parameter_interface for a full documentation of QGroundControl and IMU code.
+ System ID
+ Component ID
+ Onboard parameter id
+ Parameter index. Send -1 to use the param ID field as identifier
+
+
+ Request all parameters of this component. After his request, all parameters are emitted.
+ System ID
+ Component ID
+
+
+ Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout.
+ Onboard parameter id
+ Onboard parameter value
+ Total number of onboard parameters
+ Index of this onboard parameter
+
+
+ Set a parameter value TEMPORARILY to RAM. It will be reset to default on system reboot. Send the ACTION MAV_ACTION_STORAGE_WRITE to PERMANENTLY write the RAM contents to EEPROM. IMPORTANT: The receiving component should acknowledge the new parameter value by sending a param_value message to all communication partners. This will also ensure that multiple GCS all have an up-to-date list of all parameters. If the sending GCS did not receive a PARAM_VALUE message within its timeout time, it should re-send the PARAM_SET message.
+ System ID
+ Component ID
+ Onboard parameter id
+ Onboard parameter value
+
+
+ The global position, as returned by the Global Positioning System (GPS). This is
NOT the global position estimate of the sytem, but rather a RAW sensor value. See message GLOBAL_POSITION for the global position estimate. Coordinate frame is right-handed, Z-axis up (GPS frame)
- Timestamp (microseconds since UNIX epoch or microseconds since system boot)
- 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
- Latitude in 1E7 degrees
- Longitude in 1E7 degrees
- Altitude in 1E3 meters (millimeters)
- GPS HDOP
- GPS VDOP
- GPS ground speed (m/s)
- Compass heading in degrees, 0..360 degrees
-
-
-
- The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units
- Timestamp (microseconds since UNIX epoch or microseconds since system boot)
- X acceleration (mg)
- Y acceleration (mg)
- Z acceleration (mg)
- Angular speed around X axis (millirad /sec)
- Angular speed around Y axis (millirad /sec)
- Angular speed around Z axis (millirad /sec)
- X Magnetic field (milli tesla)
- Y Magnetic field (milli tesla)
- Z Magnetic field (milli tesla)
-
-
-
- The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION for the global position estimate. This message can contain information for up to 20 satellites.
- Number of satellites visible
- Global satellite ID
- 0: Satellite not used, 1: used for localization
- Elevation (0: right on top of receiver, 90: on the horizon) of satellite
- Direction of satellite, 0: 0 deg, 255: 360 deg.
- Signal to noise ratio of satellite
-
-
-
- The RAW IMU readings for the usual 9DOF sensor setup. This message should always contain the true raw values without any scaling to allow data capture and system debugging.
- Timestamp (microseconds since UNIX epoch or microseconds since system boot)
- X acceleration (raw)
- Y acceleration (raw)
- Z acceleration (raw)
- Angular speed around X axis (raw)
- Angular speed around Y axis (raw)
- Angular speed around Z axis (raw)
- X Magnetic field (raw)
- Y Magnetic field (raw)
- Z Magnetic field (raw)
-
-
-
- The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values.
- Timestamp (microseconds since UNIX epoch or microseconds since system boot)
- Absolute pressure (raw)
- Differential pressure 1 (raw)
- Differential pressure 2 (raw)
- Raw Temperature measurement (raw)
-
-
-
- The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field.
- Timestamp (microseconds since UNIX epoch or microseconds since system boot)
- Absolute pressure (hectopascal)
- Differential pressure 1 (hectopascal)
- Temperature measurement (0.01 degrees celsius)
-
-
-
-
- The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right).
- Timestamp (microseconds since UNIX epoch or microseconds since system boot)
- Roll angle (rad)
- Pitch angle (rad)
- Yaw angle (rad)
- Roll angular speed (rad/s)
- Pitch angular speed (rad/s)
- Yaw angular speed (rad/s)
-
-
-
- The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame)
- Timestamp (microseconds since UNIX epoch or microseconds since system boot)
- X Position
- Y Position
- Z Position
- X Speed
- Y Speed
- Z Speed
-
-
-
-
- The filtered global position (e.g. fused GPS and accelerometers). Coordinate frame is right-handed, Z-axis up (GPS frame)
- Timestamp (microseconds since unix epoch)
- Latitude, in degrees
- Longitude, in degrees
- Absolute altitude, in meters
- X Speed (in Latitude direction, positive: going north)
- Y Speed (in Longitude direction, positive: going east)
- Z Speed (in Altitude direction, positive: going up)
-
-
-
- The global position, as returned by the Global Positioning System (GPS). This is
+ Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
+ Latitude in 1E7 degrees
+ Longitude in 1E7 degrees
+ Altitude in 1E3 meters (millimeters)
+ GPS HDOP
+ GPS VDOP
+ GPS ground speed (m/s)
+ Compass heading in degrees, 0..360 degrees
+
+
+ The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units
+ Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ X acceleration (mg)
+ Y acceleration (mg)
+ Z acceleration (mg)
+ Angular speed around X axis (millirad /sec)
+ Angular speed around Y axis (millirad /sec)
+ Angular speed around Z axis (millirad /sec)
+ X Magnetic field (milli tesla)
+ Y Magnetic field (milli tesla)
+ Z Magnetic field (milli tesla)
+
+
+ The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION for the global position estimate. This message can contain information for up to 20 satellites.
+ Number of satellites visible
+ Global satellite ID
+ 0: Satellite not used, 1: used for localization
+ Elevation (0: right on top of receiver, 90: on the horizon) of satellite
+ Direction of satellite, 0: 0 deg, 255: 360 deg.
+ Signal to noise ratio of satellite
+
+
+ The RAW IMU readings for the usual 9DOF sensor setup. This message should always contain the true raw values without any scaling to allow data capture and system debugging.
+ Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ X acceleration (raw)
+ Y acceleration (raw)
+ Z acceleration (raw)
+ Angular speed around X axis (raw)
+ Angular speed around Y axis (raw)
+ Angular speed around Z axis (raw)
+ X Magnetic field (raw)
+ Y Magnetic field (raw)
+ Z Magnetic field (raw)
+
+
+ The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values.
+ Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ Absolute pressure (raw)
+ Differential pressure 1 (raw)
+ Differential pressure 2 (raw)
+ Raw Temperature measurement (raw)
+
+
+ The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field.
+ Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ Absolute pressure (hectopascal)
+ Differential pressure 1 (hectopascal)
+ Temperature measurement (0.01 degrees celsius)
+
+
+ The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right).
+ Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ Roll angle (rad)
+ Pitch angle (rad)
+ Yaw angle (rad)
+ Roll angular speed (rad/s)
+ Pitch angular speed (rad/s)
+ Yaw angular speed (rad/s)
+
+
+ The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame)
+ Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ X Position
+ Y Position
+ Z Position
+ X Speed
+ Y Speed
+ Z Speed
+
+
+ The filtered global position (e.g. fused GPS and accelerometers). Coordinate frame is right-handed, Z-axis up (GPS frame)
+ Timestamp (microseconds since unix epoch)
+ Latitude, in degrees
+ Longitude, in degrees
+ Absolute altitude, in meters
+ X Speed (in Latitude direction, positive: going north)
+ Y Speed (in Longitude direction, positive: going east)
+ Z Speed (in Altitude direction, positive: going up)
+
+
+ The global position, as returned by the Global Positioning System (GPS). This is
NOT the global position estimate of the sytem, but rather a RAW sensor value. See message GLOBAL_POSITION for the global position estimate. Coordinate frame is right-handed, Z-axis up (GPS frame)
- Timestamp (microseconds since UNIX epoch or microseconds since system boot)
- 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
- Latitude in degrees
- Longitude in degrees
- Altitude in meters
- GPS HDOP
- GPS VDOP
- GPS ground speed
- Compass heading in degrees, 0..360 degrees
-
-
-
- The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows wether the system is currently active or not and if an emergency occured. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occured it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout.
- System mode, see MAV_MODE ENUM in mavlink/include/mavlink_types.h
- Navigation mode, see MAV_NAV_MODE ENUM
- System status flag, see MAV_STATUS ENUM
- Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000
- Battery voltage, in millivolts (1 = 1 millivolt)
- Remaining battery energy: (0%: 0, 100%: 1000)
- Dropped packets (packets that were corrupted on reception on the MAV)
-
-
-
- The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.
- RC channel 1 value, in microseconds
- RC channel 2 value, in microseconds
- RC channel 3 value, in microseconds
- RC channel 4 value, in microseconds
- RC channel 5 value, in microseconds
- RC channel 6 value, in microseconds
- RC channel 7 value, in microseconds
- RC channel 8 value, in microseconds
- Receive signal strength indicator, 0: 0%, 255: 100%
-
-
-
- The scaled values of the RC channels received. (-100%) -10000, (0%) 0, (100%) 10000
- RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
- RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
- RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
- RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
- RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
- RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
- RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
- RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
- Receive signal strength indicator, 0: 0%, 255: 100%
-
-
-
- The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.
- Servo output 1 value, in microseconds
- Servo output 2 value, in microseconds
- Servo output 3 value, in microseconds
- Servo output 4 value, in microseconds
- Servo output 5 value, in microseconds
- Servo output 6 value, in microseconds
- Servo output 7 value, in microseconds
- Servo output 8 value, in microseconds
-
-
-
- Message encoding a waypoint. This message is emitted to announce
+ Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
+ Latitude in degrees
+ Longitude in degrees
+ Altitude in meters
+ GPS HDOP
+ GPS VDOP
+ GPS ground speed
+ Compass heading in degrees, 0..360 degrees
+
+
+ The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows wether the system is currently active or not and if an emergency occured. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occured it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout.
+ System mode, see MAV_MODE ENUM in mavlink/include/mavlink_types.h
+ Navigation mode, see MAV_NAV_MODE ENUM
+ System status flag, see MAV_STATUS ENUM
+ Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000
+ Battery voltage, in millivolts (1 = 1 millivolt)
+ Remaining battery energy: (0%: 0, 100%: 1000)
+ Dropped packets (packets that were corrupted on reception on the MAV)
+
+
+ The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.
+ RC channel 1 value, in microseconds
+ RC channel 2 value, in microseconds
+ RC channel 3 value, in microseconds
+ RC channel 4 value, in microseconds
+ RC channel 5 value, in microseconds
+ RC channel 6 value, in microseconds
+ RC channel 7 value, in microseconds
+ RC channel 8 value, in microseconds
+ Receive signal strength indicator, 0: 0%, 255: 100%
+
+
+ The scaled values of the RC channels received. (-100%) -10000, (0%) 0, (100%) 10000
+ RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
+ RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
+ RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
+ RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
+ RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
+ RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
+ RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
+ RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000
+ Receive signal strength indicator, 0: 0%, 255: 100%
+
+
+ The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.
+ Servo output 1 value, in microseconds
+ Servo output 2 value, in microseconds
+ Servo output 3 value, in microseconds
+ Servo output 4 value, in microseconds
+ Servo output 5 value, in microseconds
+ Servo output 6 value, in microseconds
+ Servo output 7 value, in microseconds
+ Servo output 8 value, in microseconds
+
+
+ Message encoding a waypoint. This message is emitted to announce
the presence of a waypoint and to set a waypoint on the system. The waypoint can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed, global frame is Z-up, right handed
- System ID
- Component ID
- Sequence
- The coordinate system of the waypoint. see MAV_FRAME in mavlink_types.h
- The scheduled action for the waypoint. see MAV_COMMAND in common.xml MAVLink specs
- false:0, true:1
- autocontinue to next wp
- PARAM1 / For NAV command waypoints: Radius in which the waypoint is accepted as reached, in meters
- PARAM2 / For NAV command waypoints: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
- PARAM3 / For LOITER command waypoints: Orbit to circle around the waypoint, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
- PARAM4 / For NAV and LOITER command waypoints: Yaw orientation in degrees, [0..360] 0 = NORTH
- PARAM5 / local: x position, global: latitude
- PARAM6 / y position: global: longitude
- PARAM7 / z position: global: altitude
-
-
-
- Request the information of the waypoint with the sequence number seq. The response of the system to this message should be a WAYPOINT message.
- System ID
- Component ID
- Sequence
-
-
-
- Set the waypoint with sequence number seq as current waypoint. This means that the MAV will continue to this waypoint on the shortest path (not following the waypoints in-between).
- System ID
- Component ID
- Sequence
-
-
-
- Message that announces the sequence number of the current active waypoint. The MAV will fly towards this waypoint.
- Sequence
-
-
-
- Request the overall list of waypoints from the system/component.
- System ID
- Component ID
-
-
-
- This message is emitted as response to WAYPOINT_REQUEST_LIST by the MAV. The GCS can then request the individual waypoints based on the knowledge of the total number of waypoints.
- System ID
- Component ID
- Number of Waypoints in the Sequence
-
-
-
- Delete all waypoints at once.
- System ID
- Component ID
-
-
-
- A certain waypoint has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint.
- Sequence
-
-
-
- Ack message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero).
- System ID
- Component ID
- 0: OK, 1: Error
-
-
-
- As local waypoints exist, the global waypoint reference allows to transform between the local coordinate frame and the global (GPS) coordinate frame. This can be necessary when e.g. in- and outdoor settings are connected and the MAV should move from in- to outdoor.
- System ID
- Component ID
- global position * 1E7
- global position * 1E7
- global position * 1000
-
-
-
- Once the MAV sets a new GPS-Local correspondence, this message announces the origin (0,0,0) position
- Latitude (WGS84), expressed as * 1E7
- Longitude (WGS84), expressed as * 1E7
- Altitude(WGS84), expressed as * 1000
-
-
-
- Set the setpoint for a local position controller. This is the position in local coordinates the MAV should fly to. This message is sent by the path/waypoint planner to the onboard position controller. As some MAVs have a degree of freedom in yaw (e.g. all helicopters/quadrotors), the desired yaw angle is part of the message.
- System ID
- Component ID
- x position
- y position
- z position
- Desired yaw angle
-
-
-
- Transmit the current local setpoint of the controller to other MAVs (collision avoidance) and to the GCS.
- x position
- y position
- z position
- Desired yaw angle
-
-
-
- Position fix: 0: lost, 2: 2D position fix, 3: 3D position fix
- Vision position fix: 0: lost, 1: 2D local position hold, 2: 2D global position fix, 3: 3D global position fix
- GPS position fix: 0: no reception, 1: Minimum 1 satellite, but no position fix, 2: 2D position fix, 3: 3D position fix
- Attitude estimation health: 0: poor, 255: excellent
- 0: Attitude control disabled, 1: enabled
- 0: X, Y position control disabled, 1: enabled
- 0: Z position control disabled, 1: enabled
- 0: Yaw angle control disabled, 1: enabled
-
-
-
- Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations.
- System ID
- Component ID
- Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
- x position 1 / Latitude 1
- y position 1 / Longitude 1
- z position 1 / Altitude 1
- x position 2 / Latitude 2
- y position 2 / Longitude 2
- z position 2 / Altitude 2
-
-
-
- Read out the safety zone the MAV currently assumes.
- Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
- x position 1 / Latitude 1
- y position 1 / Longitude 1
- z position 1 / Altitude 1
- x position 2 / Latitude 2
- y position 2 / Longitude 2
- z position 2 / Altitude 2
-
-
-
- The output of the attitude controller. This output is the control response the controller currently generates and the attitude the MAV would take if it is under control of the attitude controller. The primary use of this message is to check the response and signs of the controller before the actual flight.
- 1: enabled, 0: disabled
- Attitude roll: -128: -100%, 127: +100%
- Attitude pitch: -128: -100%, 127: +100%
- Attitude yaw: -128: -100%, 127: +100%
- Attitude thrust: -128: -100%, 127: +100%
-
-
-
- The output of the position controller. The primary use of this message is to check the response and signs of the controller before the actual flight.
- 1: enabled, 0: disabled
- Position x: -128: -100%, 127: +100%
- Position y: -128: -100%, 127: +100%
- Position z: -128: -100%, 127: +100%
- Position yaw: -128: -100%, 127: +100%
-
-
-
- Outputs of the APM navigation controller. The primary use of this message is to check the response and signs
+ System ID
+ Component ID
+ Sequence
+ The coordinate system of the waypoint. see MAV_FRAME in mavlink_types.h
+ The scheduled action for the waypoint. see MAV_COMMAND in common.xml MAVLink specs
+ false:0, true:1
+ autocontinue to next wp
+ PARAM1 / For NAV command waypoints: Radius in which the waypoint is accepted as reached, in meters
+ PARAM2 / For NAV command waypoints: Time that the MAV should stay inside the PARAM1 radius before advancing, in milliseconds
+ PARAM3 / For LOITER command waypoints: Orbit to circle around the waypoint, in meters. If positive the orbit direction should be clockwise, if negative the orbit direction should be counter-clockwise.
+ PARAM4 / For NAV and LOITER command waypoints: Yaw orientation in degrees, [0..360] 0 = NORTH
+ PARAM5 / local: x position, global: latitude
+ PARAM6 / y position: global: longitude
+ PARAM7 / z position: global: altitude
+
+
+ Request the information of the waypoint with the sequence number seq. The response of the system to this message should be a WAYPOINT message.
+ System ID
+ Component ID
+ Sequence
+
+
+ Set the waypoint with sequence number seq as current waypoint. This means that the MAV will continue to this waypoint on the shortest path (not following the waypoints in-between).
+ System ID
+ Component ID
+ Sequence
+
+
+ Message that announces the sequence number of the current active waypoint. The MAV will fly towards this waypoint.
+ Sequence
+
+
+ Request the overall list of waypoints from the system/component.
+ System ID
+ Component ID
+
+
+ This message is emitted as response to WAYPOINT_REQUEST_LIST by the MAV. The GCS can then request the individual waypoints based on the knowledge of the total number of waypoints.
+ System ID
+ Component ID
+ Number of Waypoints in the Sequence
+
+
+ Delete all waypoints at once.
+ System ID
+ Component ID
+
+
+ A certain waypoint has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint.
+ Sequence
+
+
+ Ack message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero).
+ System ID
+ Component ID
+ 0: OK, 1: Error
+
+
+ As local waypoints exist, the global waypoint reference allows to transform between the local coordinate frame and the global (GPS) coordinate frame. This can be necessary when e.g. in- and outdoor settings are connected and the MAV should move from in- to outdoor.
+ System ID
+ Component ID
+ global position * 1E7
+ global position * 1E7
+ global position * 1000
+
+
+ Once the MAV sets a new GPS-Local correspondence, this message announces the origin (0,0,0) position
+ Latitude (WGS84), expressed as * 1E7
+ Longitude (WGS84), expressed as * 1E7
+ Altitude(WGS84), expressed as * 1000
+
+
+ Set the setpoint for a local position controller. This is the position in local coordinates the MAV should fly to. This message is sent by the path/waypoint planner to the onboard position controller. As some MAVs have a degree of freedom in yaw (e.g. all helicopters/quadrotors), the desired yaw angle is part of the message.
+ System ID
+ Component ID
+ x position
+ y position
+ z position
+ Desired yaw angle
+
+
+ Transmit the current local setpoint of the controller to other MAVs (collision avoidance) and to the GCS.
+ x position
+ y position
+ z position
+ Desired yaw angle
+
+
+ Position fix: 0: lost, 2: 2D position fix, 3: 3D position fix
+ Vision position fix: 0: lost, 1: 2D local position hold, 2: 2D global position fix, 3: 3D global position fix
+ GPS position fix: 0: no reception, 1: Minimum 1 satellite, but no position fix, 2: 2D position fix, 3: 3D position fix
+ Attitude estimation health: 0: poor, 255: excellent
+ 0: Attitude control disabled, 1: enabled
+ 0: X, Y position control disabled, 1: enabled
+ 0: Z position control disabled, 1: enabled
+ 0: Yaw angle control disabled, 1: enabled
+
+
+ Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations.
+ System ID
+ Component ID
+ Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
+ x position 1 / Latitude 1
+ y position 1 / Longitude 1
+ z position 1 / Altitude 1
+ x position 2 / Latitude 2
+ y position 2 / Longitude 2
+ z position 2 / Altitude 2
+
+
+ Read out the safety zone the MAV currently assumes.
+ Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down.
+ x position 1 / Latitude 1
+ y position 1 / Longitude 1
+ z position 1 / Altitude 1
+ x position 2 / Latitude 2
+ y position 2 / Longitude 2
+ z position 2 / Altitude 2
+
+
+ Set roll, pitch and yaw.
+ System ID
+ Component ID
+ Desired roll angle in radians
+ Desired pitch angle in radians
+ Desired yaw angle in radians
+ Collective thrust, normalized to 0 .. 1
+
+
+ Set roll, pitch and yaw.
+ System ID
+ Component ID
+ Desired roll angular speed in rad/s
+ Desired pitch angular speed in rad/s
+ Desired yaw angular speed in rad/s
+ Collective thrust, normalized to 0 .. 1
+
+
+ Setpoint in roll, pitch, yaw currently active on the system.
+ Timestamp in micro seconds since unix epoch
+ Desired roll angle in radians
+ Desired pitch angle in radians
+ Desired yaw angle in radians
+ Collective thrust, normalized to 0 .. 1
+
+
+ Setpoint in rollspeed, pitchspeed, yawspeed currently active on the system.
+ Timestamp in micro seconds since unix epoch
+ Desired roll angular speed in rad/s
+ Desired pitch angular speed in rad/s
+ Desired yaw angular speed in rad/s
+ Collective thrust, normalized to 0 .. 1
+
+
+ Outputs of the APM navigation controller. The primary use of this message is to check the response and signs
of the controller before actual flight and to assist with tuning controller parameters
- Current desired roll in degrees
- Current desired pitch in degrees
- Current desired heading in degrees
- Bearing to current waypoint/target in degrees
- Distance to active waypoint in meters
- Current altitude error in meters
- Current airspeed error in meters/second
- Current crosstrack error on x-y plane in meters
-
-
-
- The goal position of the system. This position is the input to any navigation or path planning algorithm and does NOT represent the current controller setpoint.
- x position
- y position
- z position
- yaw orientation in radians, 0 = NORTH
-
-
-
- Corrects the systems state by adding an error correction term to the position and velocity, and by rotating the attitude by a correction angle.
- x position error
- y position error
- z position error
- roll error (radians)
- pitch error (radians)
- yaw error (radians)
- x velocity
- y velocity
- z velocity
-
-
-
- The system setting the altitude
- The new altitude in meters
-
-
-
- The target requested to send the message stream.
- The target requested to send the message stream.
- The ID of the requested message type
- The requested interval between two messages of this type
- 1 to start sending, 0 to stop sending.
-
-
-
- The system to be controlled
- roll
- pitch
- yaw
- thrust
- roll control enabled auto:0, manual:1
- pitch auto:0, manual:1
- yaw auto:0, manual:1
- thrust auto:0, manual:1
-
-
-
- The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up)
- Latitude, expressed as * 1E7
- Longitude, expressed as * 1E7
- Altitude in meters, expressed as * 1000 (millimeters)
- Ground X Speed (Latitude), expressed as m/s * 100
- Ground Y Speed (Longitude), expressed as m/s * 100
- Ground Z Speed (Altitude), expressed as m/s * 100
-
-
-
- Metrics typically displayed on a HUD for fixed wing aircraft
- Current airspeed in m/s
- Current ground speed in m/s
- Current heading in degrees, in compass units (0..360, 0=north)
- Current throttle setting in integer percent, 0 to 100
- Current altitude (MSL), in meters
- Current climb rate in meters/second
-
-
-
- Send a command with up to four parameters to the MAV
- System which should execute the command
- Component which should execute the command, 0 for all components
- Command ID, as defined by MAV_CMD enum.
- 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
- Parameter 1, as defined by MAV_CMD enum.
- Parameter 2, as defined by MAV_CMD enum.
- Parameter 3, as defined by MAV_CMD enum.
- Parameter 4, as defined by MAV_CMD enum.
-
-
-
- Report status of a command. Includes feedback wether the command was executed
- Current airspeed in m/s
- 1: Action ACCEPTED and EXECUTED, 1: Action TEMPORARY REJECTED/DENIED, 2: Action PERMANENTLY DENIED, 3: Action UNKNOWN/UNSUPPORTED, 4: Requesting CONFIRMATION
-
-
-
-
-
-
-
-
- Name
- Timestamp
- x
- y
- z
-
-
-
- Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output.
- Name of the debug variable
- Floating point value
-
-
-
- Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output.
- Name of the debug variable
- Signed integer value
-
-
-
- Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz).
- Severity of status, 0 = info message, 255 = critical fault
- Status text message, without null termination character
-
-
-
- Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N.
- index of debug variable
- DEBUG value
-
-
-
+ Current desired roll in degrees
+ Current desired pitch in degrees
+ Current desired heading in degrees
+ Bearing to current waypoint/target in degrees
+ Distance to active waypoint in meters
+ Current altitude error in meters
+ Current airspeed error in meters/second
+ Current crosstrack error on x-y plane in meters
+
+
+ The goal position of the system. This position is the input to any navigation or path planning algorithm and does NOT represent the current controller setpoint.
+ x position
+ y position
+ z position
+ yaw orientation in radians, 0 = NORTH
+
+
+ Corrects the systems state by adding an error correction term to the position and velocity, and by rotating the attitude by a correction angle.
+ x position error
+ y position error
+ z position error
+ roll error (radians)
+ pitch error (radians)
+ yaw error (radians)
+ x velocity
+ y velocity
+ z velocity
+
+
+ The system setting the altitude
+ The new altitude in meters
+
+
+ The target requested to send the message stream.
+ The target requested to send the message stream.
+ The ID of the requested message type
+ Update rate in Hertz
+ 1 to start sending, 0 to stop sending.
+
+
+ This packet is useful for high throughput
+ applications such as hardware in the loop simulations.
+
+ Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ Roll angle (rad)
+ Pitch angle (rad)
+ Yaw angle (rad)
+ Roll angular speed (rad/s)
+ Pitch angular speed (rad/s)
+ Yaw angular speed (rad/s)
+ Latitude, expressed as * 1E7
+ Longitude, expressed as * 1E7
+ Altitude in meters, expressed as * 1000 (millimeters)
+ Ground X Speed (Latitude), expressed as m/s * 100
+ Ground Y Speed (Longitude), expressed as m/s * 100
+ Ground Z Speed (Altitude), expressed as m/s * 100
+ X acceleration (mg)
+ Y acceleration (mg)
+ Z acceleration (mg)
+
+
+ Hardware in the loop control outputs
+ Timestamp (microseconds since UNIX epoch or microseconds since system boot)
+ Control output -3 .. 1
+ Control output -1 .. 1
+ Control output -1 .. 1
+ Throttle 0 .. 1
+ System mode (MAV_MODE)
+ Navigation mode (MAV_NAV_MODE)
+
+
+ The system to be controlled
+ roll
+ pitch
+ yaw
+ thrust
+ roll control enabled auto:0, manual:1
+ pitch auto:0, manual:1
+ yaw auto:0, manual:1
+ thrust auto:0, manual:1
+
+
+ The RAW values of the RC channels sent to the MAV to override info received from the RC radio. A value of -1 means no change to that channel. A value of 0 means control of that channel should be released back to the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.
+ System ID
+ Component ID
+ RC channel 1 value, in microseconds
+ RC channel 2 value, in microseconds
+ RC channel 3 value, in microseconds
+ RC channel 4 value, in microseconds
+ RC channel 5 value, in microseconds
+ RC channel 6 value, in microseconds
+ RC channel 7 value, in microseconds
+ RC channel 8 value, in microseconds
+
+
+ The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up)
+ Latitude, expressed as * 1E7
+ Longitude, expressed as * 1E7
+ Altitude in meters, expressed as * 1000 (millimeters)
+ Ground X Speed (Latitude), expressed as m/s * 100
+ Ground Y Speed (Longitude), expressed as m/s * 100
+ Ground Z Speed (Altitude), expressed as m/s * 100
+
+
+ Metrics typically displayed on a HUD for fixed wing aircraft
+ Current airspeed in m/s
+ Current ground speed in m/s
+ Current heading in degrees, in compass units (0..360, 0=north)
+ Current throttle setting in integer percent, 0 to 100
+ Current altitude (MSL), in meters
+ Current climb rate in meters/second
+
+
+ Send a command with up to four parameters to the MAV
+ System which should execute the command
+ Component which should execute the command, 0 for all components
+ Command ID, as defined by MAV_CMD enum.
+ 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
+ Parameter 1, as defined by MAV_CMD enum.
+ Parameter 2, as defined by MAV_CMD enum.
+ Parameter 3, as defined by MAV_CMD enum.
+ Parameter 4, as defined by MAV_CMD enum.
+
+
+ Report status of a command. Includes feedback wether the command was executed
+ Current airspeed in m/s
+ 1: Action ACCEPTED and EXECUTED, 1: Action TEMPORARY REJECTED/DENIED, 2: Action PERMANENTLY DENIED, 3: Action UNKNOWN/UNSUPPORTED, 4: Requesting CONFIRMATION
+
+
+ Optical flow from a flow sensor (e.g. optical mouse sensor)
+ Timestamp (UNIX)
+ Sensor ID
+ Flow in pixels in x-sensor direction
+ Flow in pixels in y-sensor direction
+ Optical flow quality / confidence. 0: bad, 255: maximum quality
+ Ground distance in meters
+
+
+ Object has been detected
+ Timestamp in milliseconds since system boot
+ Object ID
+ Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
+ Name of the object as defined by the detector
+ Detection quality / confidence. 0: bad, 255: maximum confidence
+ Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
+ Ground distance in meters
+
+
+
+ Name
+ Timestamp
+ x
+ y
+ z
+
+
+ Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output.
+ Name of the debug variable
+ Floating point value
+
+
+ Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output.
+ Name of the debug variable
+ Signed integer value
+
+
+ Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz).
+ Severity of status, 0 = info message, 255 = critical fault
+ Status text message, without null termination character
+
+
+ Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N.
+ index of debug variable
+ DEBUG value
+
+
diff --git a/thirdParty/mavlink/message_definitions/minimal.xml b/thirdParty/mavlink/message_definitions/minimal.xml
index 16d26831e165d7c8ff3410cbab22accfd34311ca..5b41a4909090112233c5b91d1fa3067d7ffbdcbf 100644
--- a/thirdParty/mavlink/message_definitions/minimal.xml
+++ b/thirdParty/mavlink/message_definitions/minimal.xml
@@ -1,13 +1,13 @@
- 2
-
-
-
- The heartbeat message shows that a system is present and responding. The type of the MAV and Autopilot hardware allow the receiving system to treat further messages from this system appropriate (e.g. by laying out the user interface based on the autopilot).
- Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
- Type of the Autopilot: 0: Generic, 1: PIXHAWK, 2: SLUGS, 3: Ardupilot (up to 15 types), defined in MAV_AUTOPILOT_TYPE ENUM
- MAVLink version
-
-
+ 2
+
+
+
+ The heartbeat message shows that a system is present and responding. The type of the MAV and Autopilot hardware allow the receiving system to treat further messages from this system appropriate (e.g. by laying out the user interface based on the autopilot).
+ Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
+ Type of the Autopilot: 0: Generic, 1: PIXHAWK, 2: SLUGS, 3: Ardupilot (up to 15 types), defined in MAV_AUTOPILOT_TYPE ENUM
+ MAVLink version
+
+
diff --git a/thirdParty/mavlink/message_definitions/pixhawk.xml b/thirdParty/mavlink/message_definitions/pixhawk.xml
index e2a99a738b666758d65670e47de52f181422b5ac..7bed667831bbd9a119ceda537f25dfdd12d7db33 100644
--- a/thirdParty/mavlink/message_definitions/pixhawk.xml
+++ b/thirdParty/mavlink/message_definitions/pixhawk.xml
@@ -1,262 +1,276 @@
-common.xml
+ common.xml
+
+
+
+ Content Types for data transmission handshake
+
+
+
+
+
+
+
+
+
+
+
+ The system to be controlled
+ roll
+ pitch
+ yaw
+ thrust
+ roll control enabled auto:0, manual:1
+ pitch auto:0, manual:1
+ yaw auto:0, manual:1
+ thrust auto:0, manual:1
+
+
+
+ Camera id
+ Camera mode: 0 = auto, 1 = manual
+ Trigger pin, 0-3 for PtGrey FireFly
+ Shutter interval, in microseconds
+ Exposure time, in microseconds
+ Camera gain
+
+
+
+ Timestamp
+ IMU seq
+ Roll angle in rad
+ Pitch angle in rad
+ Yaw angle in rad
+ Local frame Z coordinate (height over ground)
+ GPS X coordinate
+ GPS Y coordinate
+ Global frame altitude
+ Ground truth X
+ Ground truth Y
+ Ground truth Z
+
+
+
+ 0 to disable, 1 to enable
+
+
+
+ Camera id
+ Camera # (starts with 0)
+ Timestamp
+ Until which timestamp this buffer will stay valid
+ The image sequence number
+ Position of the image in the buffer, starts with 0
+ Image width
+ Image height
+ Image depth
+ Image channels
+ Shared memory area key
+ Exposure time, in microseconds
+ Camera gain
+ Roll angle in rad
+ Pitch angle in rad
+ Yaw angle in rad
+ Local frame Z coordinate (height over ground)
+ GPS X coordinate
+ GPS Y coordinate
+ Global frame altitude
+ Ground truth X
+ Ground truth Y
+ Ground truth Z
+
+
+
+ Timestamp (milliseconds)
+ Global X position
+ Global Y position
+ Global Z position
+ Roll angle in rad
+ Pitch angle in rad
+ Yaw angle in rad
+
+
+
+ Timestamp (milliseconds)
+ Global X position
+ Global Y position
+ Global Z position
+ Roll angle in rad
+ Pitch angle in rad
+ Yaw angle in rad
+
+
+
+ Timestamp (milliseconds)
+ Global X speed
+ Global Y speed
+ Global Z speed
+
+
+
+ Message sent to the MAV to set a new position as reference for the controller
+ System ID
+ Component ID
+ ID of waypoint, 0 for plain position
+ x position
+ y position
+ z position
+ yaw orientation in radians, 0 = NORTH
+
+
+
+ Message sent to the MAV to set a new offset from the currently controlled position
+ System ID
+ Component ID
+ x position offset
+ y position offset
+ z position offset
+ yaw orientation offset in radians, 0 = NORTH
+
+
+
+
+ ID of waypoint, 0 for plain position
+ x position
+ y position
+ z position
+ yaw orientation in radians, 0 = NORTH
+
+
+
+ ID
+ x position
+ y position
+ z position
+ roll orientation
+ pitch orientation
+ yaw orientation
+
+
+
+ ADC1 (J405 ADC3, LPC2148 AD0.6)
+ ADC2 (J405 ADC5, LPC2148 AD0.2)
+ ADC3 (J405 ADC6, LPC2148 AD0.1)
+ ADC4 (J405 ADC7, LPC2148 AD1.3)
+ Battery voltage
+ Temperature (degrees celcius)
+ Barometric pressure (hecto Pascal)
+
+
+
+ Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000
+ Number of I2C errors since startup
+ Number of I2C errors since startup
+ Number of I2C errors since startup
+ Number of I2C errors since startup
+ Number of I2C errors since startup
+
+
+
+ Watchdog ID
+ Number of processes
+
+
+
+ Watchdog ID
+ Process ID
+ Process name
+ Process arguments
+ Timeout (seconds)
+
+
+
+ Watchdog ID
+ Process ID
+ Is running / finished / suspended / crashed
+ Is muted
+ PID
+ Number of crashes
+
+
+
+ Target system ID
+ Watchdog ID
+ Process ID
+ Command ID
+
+
+
+ 0: Pattern, 1: Letter
+ Confidence of detection
+ Pattern file name
+ Accepted as true detection, 0 no, 1 yes
+
+
+
+ Notifies the operator about a point of interest (POI). This can be anything detected by the
+ system. This generic message is intented to help interfacing to generic visualizations and to display
+ the POI on a map.
+
+ 0: Notice, 1: Warning, 2: Critical, 3: Emergency, 4: Debug
+ 0: blue, 1: yellow, 2: red, 3: orange, 4: green, 5: magenta
+ 0: global, 1:local
+ 0: no timeout, >1: timeout in seconds
+ X Position
+ Y Position
+ Z Position
+ POI name
+
+
+
+ Notifies the operator about the connection of two point of interests (POI). This can be anything detected by the
+ system. This generic message is intented to help interfacing to generic visualizations and to display
+ the POI on a map.
+
+ 0: Notice, 1: Warning, 2: Critical, 3: Emergency, 4: Debug
+ 0: blue, 1: yellow, 2: red, 3: orange, 4: green, 5: magenta
+ 0: global, 1:local
+ 0: no timeout, >1: timeout in seconds
+ X1 Position
+ Y1 Position
+ Z1 Position
+ X2 Position
+ Y2 Position
+ Z2 Position
+ POI connection name
+
+
+
+ type of requested/acknowledged data (as defined in ENUM DATA_TYPES in mavlink/include/mavlink_types.h)
+ total data size in bytes (set on ACK only)
+ number of packets beeing sent (set on ACK only)
+ payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)
+ JPEG quality out of [1,100]
+
+
+
+ sequence number (starting with 0 on every transmission)
+ image data bytes
+
+
+
+ x position in m
+ y position in m
+ z position in m
+ Orientation assignment 0: false, 1:true
+ Size in pixels
+ Orientation
+ Descriptor
+ Harris operator response at this location
+
-
-
- Content Types for data transmission handshake
-
-
-
-
-
-
-
-
-
-
-
- The system to be controlled
- roll
- pitch
- yaw
- thrust
- roll control enabled auto:0, manual:1
- pitch auto:0, manual:1
- yaw auto:0, manual:1
- thrust auto:0, manual:1
-
-
-
- Camera id
- Camera mode: 0 = auto, 1 = manual
- Trigger pin, 0-3 for PtGrey FireFly
- Shutter interval, in microseconds
- Exposure time, in microseconds
- Camera gain
-
-
-
- Timestamp
- IMU seq
- Roll angle in rad
- Pitch angle in rad
- Yaw angle in rad
- Local frame Z coordinate (height over ground)
- GPS X coordinate
- GPS Y coordinate
- Global frame altitude
- Ground truth X
- Ground truth Y
- Ground truth Z
-
-
-
- 0 to disable, 1 to enable
-
-
-
- Camera id
- Camera # (starts with 0)
- Timestamp
- Until which timestamp this buffer will stay valid
- The image sequence number
- Position of the image in the buffer, starts with 0
- Image width
- Image height
- Image depth
- Image channels
- Shared memory area key
- Exposure time, in microseconds
- Camera gain
- Roll angle in rad
- Pitch angle in rad
- Yaw angle in rad
- Local frame Z coordinate (height over ground)
- GPS X coordinate
- GPS Y coordinate
- Global frame altitude
- Ground truth X
- Ground truth Y
- Ground truth Z
-
-
-
- Timestamp (milliseconds)
- Global X position
- Global Y position
- Global Z position
- Roll angle in rad
- Pitch angle in rad
- Yaw angle in rad
-
-
-
- Timestamp (milliseconds)
- Global X position
- Global Y position
- Global Z position
- Roll angle in rad
- Pitch angle in rad
- Yaw angle in rad
-
-
-
- Timestamp (milliseconds)
- Global X speed
- Global Y speed
- Global Z speed
-
-
-
- Message sent to the MAV to set a new position as reference for the controller
- System ID
- Component ID
- ID of waypoint, 0 for plain position
- x position
- y position
- z position
- yaw orientation in radians, 0 = NORTH
-
-
-
- Message sent to the MAV to set a new offset from the currently controlled position
- System ID
- Component ID
- x position offset
- y position offset
- z position offset
- yaw orientation offset in radians, 0 = NORTH
-
-
-
-
- ID of waypoint, 0 for plain position
- x position
- y position
- z position
- yaw orientation in radians, 0 = NORTH
-
-
-
- ID
- x position
- y position
- z position
- roll orientation
- pitch orientation
- yaw orientation
-
-
-
- ADC1 (J405 ADC3, LPC2148 AD0.6)
- ADC2 (J405 ADC5, LPC2148 AD0.2)
- ADC3 (J405 ADC6, LPC2148 AD0.1)
- ADC4 (J405 ADC7, LPC2148 AD1.3)
- Battery voltage
- Temperature (degrees celcius)
- Barometric pressure (hecto Pascal)
-
-
-
- Maximum usage in percent of the mainloop time, (0%: 0, 100%: 1000) should be always below 1000
- Number of I2C errors since startup
-Number of I2C errors since startup
- Number of I2C errors since startup
-Number of I2C errors since startup
- Number of I2C errors since startup
-
-
-
- Watchdog ID
- Number of processes
-
-
-
- Watchdog ID
- Process ID
- Process name
- Process arguments
- Timeout (seconds)
-
-
-
- Watchdog ID
- Process ID
- Is running / finished / suspended / crashed
- Is muted
- PID
- Number of crashes
-
-
-
- Target system ID
- Watchdog ID
- Process ID
- Command ID
-
-
-
- 0: Pattern, 1: Letter
- Confidence of detection
- Pattern file name
- Accepted as true detection, 0 no, 1 yes
-
-
-
- Notifies the operator about a point of interest (POI). This can be anything detected by the
- system. This generic message is intented to help interfacing to generic visualizations and to display
- the POI on a map.
- 0: Notice, 1: Warning, 2: Critical, 3: Emergency, 4: Debug
- 0: blue, 1: yellow, 2: red, 3: orange, 4: green, 5: magenta
- 0: global, 1:local
- 0: no timeout, >1: timeout in seconds
- X Position
- Y Position
- Z Position
- POI name
-
-
-
- Notifies the operator about the connection of two point of interests (POI). This can be anything detected by the
- system. This generic message is intented to help interfacing to generic visualizations and to display
- the POI on a map.
- 0: Notice, 1: Warning, 2: Critical, 3: Emergency, 4: Debug
- 0: blue, 1: yellow, 2: red, 3: orange, 4: green, 5: magenta
- 0: global, 1:local
- 0: no timeout, >1: timeout in seconds
- X1 Position
- Y1 Position
- Z1 Position
- X2 Position
- Y2 Position
- Z2 Position
- POI connection name
-
-
-
- type of requested/acknowledged data (as defined in ENUM DATA_TYPES in mavlink/include/mavlink_types.h)
- total data size in bytes (set on ACK only)
- number of packets beeing sent (set on ACK only)
- payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)
- JPEG quality out of [1,100]
-
-
-
- sequence number (starting with 0 on every transmission)
- image data bytes
-
-
-
- x position in m
- y position in m
- z position in m
- Orientation assignment 0: false, 1:true
- Size in pixels
- Orientation
- Descriptor
- Harris operator response at this location
-
-
-
+
+ Visual odometry estimate describing relative pose between two frames
+ Time at which frame 1 was captured (in microseconds since unix epoch)
+ Time at which frame 2 was captured (in microseconds since unix epoch)
+ Relative X position
+ Relative Y position
+ Relative Z position
+ Relative roll angle in rad
+ Relative pitch angle in rad
+ Relative yaw angle in rad
+
+
+
diff --git a/thirdParty/mavlink/message_definitions/slugs.xml b/thirdParty/mavlink/message_definitions/slugs.xml
index 6de0697fef69a78cafeb856f9b4569bb4ae14925..f8644c5c4be7e497178d892e9c15c25ba3c5131c 100644
--- a/thirdParty/mavlink/message_definitions/slugs.xml
+++ b/thirdParty/mavlink/message_definitions/slugs.xml
@@ -1,8 +1,8 @@
-common.xml
-
-
-
-
-
-
- Sensor and DSC control loads.
- Sensor DSC Load
- Control DSC Load
- Battery Voltage in millivolts
-
-
-
- Air data for altitude and airspeed computation.
- Dynamic pressure (Pa)
- Static pressure (Pa)
- Board temperature
-
-
-
- Accelerometer and gyro biases.
- Accelerometer X bias (m/s)
- Accelerometer Y bias (m/s)
- Accelerometer Z bias (m/s)
- Gyro X bias (rad/s)
- Gyro Y bias (rad/s)
- Gyro Z bias (rad/s)
-
-
-
- Configurable diagnostic messages.
- Diagnostic float 1
- Diagnostic float 2
- Diagnostic float 3
- Diagnostic short 1
- Diagnostic short 2
- Diagnostic short 3
-
-
-
- Data used in the navigation algorithm.
- Measured Airspeed prior to the Nav Filter
- Commanded Roll
- Commanded Pitch
- Commanded Turn rate
- Y component of the body acceleration
- Total Distance to Run on this leg of Navigation
- Remaining distance to Run on this leg of Navigation
- Origin WP
- Destination WP
-
-
-
- Configurable data log probes to be used inside Simulink
- Log value 1
- Log value 2
- Log value 3
- Log value 4
- Log value 5
- Log value 6
-
-
-
- Pilot console PWM messges.
- Year reported by Gps
- Month reported by Gps
- Day reported by Gps
- Hour reported by Gps
- Min reported by Gps
- Sec reported by Gps
- Visible sattelites reported by Gps
-
-
- Mid Level commands sent from the GS to the autopilot. These are only sent when being opperated in mid-level commands mode from the ground; for periodic report of these commands generated from the autopilot see message XXXX.
- The system setting the commands
- Commanded Airspeed
- Log value 2
- Log value 3
-
-
-
-This message configures the Selective Passthrough mode. it allows to select which control surfaces the Pilot can control from his console. It is implemented as a bitfield as follows:
- Position Bit Code
- =================================
- 15-8 Reserved
- 7 dt_pass 128
- 6 dla_pass 64
- 5 dra_pass 32
- 4 dr_pass 16
- 3 dle_pass 8
- 2 dre_pass 4
- 1 dlf_pass 2
- 0 drf_pass 1
- Where Bit 15 is the MSb. 0 = AP has control of the surface; 1 = Pilot Console has control of the surface.
- The system setting the commands
- Bitfield containing the PT configuration
-
-
-
-
- Action messages focused on the SLUGS AP.
- The system reporting the action
- Action ID. See apDefinitions.h in the SLUGS /clib directory for the ID names
- Value associated with the action
-
-
-
-
\ No newline at end of file
+
+
+
+ Sensor and DSC control loads.
+ Sensor DSC Load
+ Control DSC Load
+ Battery Voltage in millivolts
+
+
+
+ Air data for altitude and airspeed computation.
+ Dynamic pressure (Pa)
+ Static pressure (Pa)
+ Board temperature
+
+
+
+ Accelerometer and gyro biases.
+ Accelerometer X bias (m/s)
+ Accelerometer Y bias (m/s)
+ Accelerometer Z bias (m/s)
+ Gyro X bias (rad/s)
+ Gyro Y bias (rad/s)
+ Gyro Z bias (rad/s)
+
+
+
+ Configurable diagnostic messages.
+ Diagnostic float 1
+ Diagnostic float 2
+ Diagnostic float 3
+ Diagnostic short 1
+ Diagnostic short 2
+ Diagnostic short 3
+
+
+
+ Data used in the navigation algorithm.
+ Measured Airspeed prior to the Nav Filter
+ Commanded Roll
+ Commanded Pitch
+ Commanded Turn rate
+ Y component of the body acceleration
+ Total Distance to Run on this leg of Navigation
+ Remaining distance to Run on this leg of Navigation
+ Origin WP
+ Destination WP
+
+
+
+ Configurable data log probes to be used inside Simulink
+ Log value 1
+ Log value 2
+ Log value 3
+ Log value 4
+ Log value 5
+ Log value 6
+
+
+
+ Pilot console PWM messges.
+ Year reported by Gps
+ Month reported by Gps
+ Day reported by Gps
+ Hour reported by Gps
+ Min reported by Gps
+ Sec reported by Gps
+ Visible sattelites reported by Gps
+
+
+
+ Mid Level commands sent from the GS to the autopilot. These are only sent when being opperated in mid-level commands mode from the ground; for periodic report of these commands generated from the autopilot see message XXXX.
+ The system setting the commands
+ Commanded Airspeed
+ Log value 2
+ Log value 3
+
+
+
+
+ This message configures the Selective Passthrough mode. it allows to select which control surfaces the Pilot can control from his console. It is implemented as a bitfield as follows:
+ Position Bit Code
+ =================================
+ 15-8 Reserved
+ 7 dt_pass 128
+ 6 dla_pass 64
+ 5 dra_pass 32
+ 4 dr_pass 16
+ 3 dle_pass 8
+ 2 dre_pass 4
+ 1 dlf_pass 2
+ 0 drf_pass 1
+ Where Bit 15 is the MSb. 0 = AP has control of the surface; 1 = Pilot Console has control of the surface.
+ The system setting the commands
+ Bitfield containing the PT configuration
+
+
+
+
+
+ Action messages focused on the SLUGS AP.
+ The system reporting the action
+ Action ID. See apDefinitions.h in the SLUGS /clib directory for the ID names
+ Value associated with the action
+
+
+
+
diff --git a/thirdParty/mavlink/message_definitions/ualberta.xml b/thirdParty/mavlink/message_definitions/ualberta.xml
index eaa9d99844835df716665ef893d0bbcac5d47445..5e53e141e9f018e943abfd25bc1f58c0a0091574 100644
--- a/thirdParty/mavlink/message_definitions/ualberta.xml
+++ b/thirdParty/mavlink/message_definitions/ualberta.xml
@@ -1,54 +1,54 @@
- common.xml
-
-
- Available autopilot modes for ualberta uav
- Raw input pulse widts sent to output
- Inputs are normalized using calibration, the converted back to raw pulse widths for output
- dfsdfs
- dfsfds
- dfsdfsdfs
-
-
- Navigation filter mode
-
- AHRS mode
- INS/GPS initialization mode
- INS/GPS mode
-
-
- Mode currently commanded by pilot
- sdf
- dfs
- Rotomotion mode
-
-
-
-
- Accelerometer and Gyro biases from the navigation filter
- Timestamp (microseconds)
- b_f[0]
- b_f[1]
- b_f[2]
- b_f[0]
- b_f[1]
- b_f[2]
-
-
- Complete set of calibration parameters for the radio
- Aileron setpoints: left, center, right
- Elevator setpoints: nose down, center, nose up
- Rudder setpoints: nose left, center, nose right
- Tail gyro mode/gain setpoints: heading hold, rate mode
- Pitch curve setpoints (every 25%)
- Throttle curve setpoints (every 25%)
-
-
- System status specific to ualberta uav
- System mode, see UALBERTA_AUTOPILOT_MODE ENUM
- Navigation mode, see UALBERTA_NAV_MODE ENUM
- Pilot mode, see UALBERTA_PILOT_MODE
-
-
+ common.xml
+
+
+ Available autopilot modes for ualberta uav
+ Raw input pulse widts sent to output
+ Inputs are normalized using calibration, the converted back to raw pulse widths for output
+ dfsdfs
+ dfsfds
+ dfsdfsdfs
+
+
+ Navigation filter mode
+
+ AHRS mode
+ INS/GPS initialization mode
+ INS/GPS mode
+
+
+ Mode currently commanded by pilot
+ sdf
+ dfs
+ Rotomotion mode
+
+
+
+
+ Accelerometer and Gyro biases from the navigation filter
+ Timestamp (microseconds)
+ b_f[0]
+ b_f[1]
+ b_f[2]
+ b_f[0]
+ b_f[1]
+ b_f[2]
+
+
+ Complete set of calibration parameters for the radio
+ Aileron setpoints: left, center, right
+ Elevator setpoints: nose down, center, nose up
+ Rudder setpoints: nose left, center, nose right
+ Tail gyro mode/gain setpoints: heading hold, rate mode
+ Pitch curve setpoints (every 25%)
+ Throttle curve setpoints (every 25%)
+
+
+ System status specific to ualberta uav
+ System mode, see UALBERTA_AUTOPILOT_MODE ENUM
+ Navigation mode, see UALBERTA_NAV_MODE ENUM
+ Pilot mode, see UALBERTA_PILOT_MODE
+
+
diff --git a/thirdParty/mavlink/missionlib/testing/.gitignore b/thirdParty/mavlink/missionlib/testing/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..0776965a63b239ff52dbd7c2afe5aaa7db6c2262
--- /dev/null
+++ b/thirdParty/mavlink/missionlib/testing/.gitignore
@@ -0,0 +1,3 @@
+*.o
+udptest
+build
diff --git a/thirdParty/mavlink/missionlib/testing/main.c b/thirdParty/mavlink/missionlib/testing/main.c
new file mode 100644
index 0000000000000000000000000000000000000000..0bec1155ad5e73a5bdd765f71399e88bc0c59754
--- /dev/null
+++ b/thirdParty/mavlink/missionlib/testing/main.c
@@ -0,0 +1,276 @@
+/*******************************************************************************
+
+ Copyright (C) 2011 Lorenz Meier lm ( a t ) inf.ethz.ch
+ and Bryan Godbolt godbolt ( a t ) ualberta.ca
+
+ adapted from example written by Bryan Godbolt godbolt ( a t ) ualberta.ca
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+ ****************************************************************************/
+/*
+ This program sends some data to qgroundcontrol using the mavlink protocol. The sent packets
+ cause qgroundcontrol to respond with heartbeats. Any settings or custom commands sent from
+ qgroundcontrol are printed by this program along with the heartbeats.
+
+
+ I compiled this program sucessfully on Ubuntu 10.04 with the following command
+
+ gcc -I ../../pixhawk/mavlink/include -o udp-server udp.c
+
+ the rt library is needed for the clock_gettime on linux
+ */
+/* These headers are for QNX, but should all be standard on unix/linux */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#if (defined __QNX__) | (defined __QNXNTO__)
+/* QNX specific headers */
+#include
+#else
+/* Linux / MacOS POSIX timer headers */
+#include
+#include
+#include
+#endif
+
+/* 0: Include MAVLink types */
+#include <../mavlink_types.h>
+
+/* 1: Define mavlink system storage */
+mavlink_system_t mavlink_system;
+
+/* 2: Include actual protocol, REQUIRES mavlink_system */
+#include
+
+/* 3: Define waypoint helper functions */
+void mavlink_wpm_send_message(mavlink_message_t* msg);
+void mavlink_wpm_send_gcs_string(const char* string);
+uint64_t mavlink_wpm_get_system_timestamp();
+
+/* 4: Include waypoint protocol */
+#include "waypoints.h"
+mavlink_wpm_storage wpm;
+
+
+#define BUFFER_LENGTH 2041 // minimum buffer size that can be used with qnx (I don't know why)
+
+char help[] = "--help";
+
+
+char target_ip[100];
+
+float position[6] = {};
+int sock;
+struct sockaddr_in gcAddr;
+struct sockaddr_in locAddr;
+uint8_t buf[BUFFER_LENGTH];
+ssize_t recsize;
+socklen_t fromlen;
+int bytes_sent;
+mavlink_message_t msg;
+uint16_t len;
+int i = 0;
+unsigned int temp = 0;
+
+uint64_t microsSinceEpoch();
+
+
+
+
+/* Provide the interface functions for the waypoint manager */
+
+/*
+ * @brief Sends a MAVLink message over UDP
+ */
+void mavlink_wpm_send_message(mavlink_message_t* msg)
+{
+ uint8_t buf[MAVLINK_MAX_PACKET_LEN];
+ uint16_t len = mavlink_msg_to_send_buffer(buf, msg);
+ uint16_t bytes_sent = sendto(sock, buf, len, 0, (struct sockaddr*)&gcAddr, sizeof (struct sockaddr_in));
+
+ printf("SENT %d bytes", bytes_sent);
+}
+
+void mavlink_wpm_send_gcs_string(const char* string)
+{
+ printf("%s",string);
+}
+
+uint64_t mavlink_wpm_get_system_timestamp()
+{
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return ((uint64_t)tv.tv_sec) * 1000000 + tv.tv_usec;
+}
+
+
+
+int main(int argc, char* argv[])
+{
+ // Initialize MAVLink
+ mavlink_wpm_init(&wpm);
+ mavlink_system.sysid = 1;
+ mavlink_system.compid = MAV_COMP_ID_WAYPOINTPLANNER;
+
+
+
+ // Create socket
+ sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+
+ // Check if --help flag was used
+ if ((argc == 2) && (strcmp(argv[1], help) == 0))
+ {
+ printf("\n");
+ printf("\tUsage:\n\n");
+ printf("\t");
+ printf("%s", argv[0]);
+ printf(" \n");
+ printf("\tDefault for localhost: udp-server 127.0.0.1\n\n");
+ exit(EXIT_FAILURE);
+ }
+
+
+ // Change the target ip if parameter was given
+ strcpy(target_ip, "127.0.0.1");
+ if (argc == 2)
+ {
+ strcpy(target_ip, argv[1]);
+ }
+
+
+ memset(&locAddr, 0, sizeof(locAddr));
+ locAddr.sin_family = AF_INET;
+ locAddr.sin_addr.s_addr = INADDR_ANY;
+ locAddr.sin_port = htons(14551);
+
+ /* Bind the socket to port 14551 - necessary to receive packets from qgroundcontrol */
+ if (-1 == bind(sock,(struct sockaddr *)&locAddr, sizeof(struct sockaddr)))
+ {
+ perror("error bind failed");
+ close(sock);
+ exit(EXIT_FAILURE);
+ }
+
+ /* Attempt to make it non blocking */
+ if (fcntl(sock, F_SETFL, O_NONBLOCK | FASYNC) < 0)
+ {
+ fprintf(stderr, "error setting nonblocking: %s\n", strerror(errno));
+ close(sock);
+ exit(EXIT_FAILURE);
+ }
+
+
+ memset(&gcAddr, 0, sizeof(gcAddr));
+ gcAddr.sin_family = AF_INET;
+ gcAddr.sin_addr.s_addr = inet_addr(target_ip);
+ gcAddr.sin_port = htons(14550);
+
+
+ printf("MAVLINK MISSION LIBRARY EXAMPLE PROCESS INITIALIZATION DONE, RUNNING..\n");
+
+
+ for (;;)
+ {
+
+ /*Send Heartbeat */
+ mavlink_msg_heartbeat_pack(mavlink_system.sysid, 200, &msg, MAV_HELICOPTER, MAV_CLASS_GENERIC);
+ len = mavlink_msg_to_send_buffer(buf, &msg);
+ bytes_sent = sendto(sock, buf, len, 0, (struct sockaddr*)&gcAddr, sizeof(struct sockaddr_in));
+
+ /* Send Status */
+ mavlink_msg_sys_status_pack(1, 200, &msg, MAV_MODE_GUIDED, MAV_NAV_HOLD, MAV_STATE_ACTIVE, 500, 7500, 0, 0);
+ len = mavlink_msg_to_send_buffer(buf, &msg);
+ bytes_sent = sendto(sock, buf, len, 0, (struct sockaddr*)&gcAddr, sizeof (struct sockaddr_in));
+
+ /* Send Local Position */
+ mavlink_msg_local_position_pack(mavlink_system.sysid, 200, &msg, microsSinceEpoch(),
+ position[0], position[1], position[2],
+ position[3], position[4], position[5]);
+ len = mavlink_msg_to_send_buffer(buf, &msg);
+ bytes_sent = sendto(sock, buf, len, 0, (struct sockaddr*)&gcAddr, sizeof(struct sockaddr_in));
+
+ /* Send attitude */
+ mavlink_msg_attitude_pack(mavlink_system.sysid, 200, &msg, microsSinceEpoch(), 1.2, 1.7, 3.14, 0.01, 0.02, 0.03);
+ len = mavlink_msg_to_send_buffer(buf, &msg);
+ bytes_sent = sendto(sock, buf, len, 0, (struct sockaddr*)&gcAddr, sizeof(struct sockaddr_in));
+
+
+ memset(buf, 0, BUFFER_LENGTH);
+ recsize = recvfrom(sock, (void *)buf, BUFFER_LENGTH, 0, (struct sockaddr *)&gcAddr, &fromlen);
+ if (recsize > 0)
+ {
+ // Something received - print out all bytes and parse packet
+ mavlink_message_t msg;
+ mavlink_status_t status;
+
+ printf("Bytes Received: %d\nDatagram: ", (int)recsize);
+ for (i = 0; i < recsize; ++i)
+ {
+ temp = buf[i];
+ printf("%02x ", (unsigned char)temp);
+ if (mavlink_parse_char(MAVLINK_COMM_0, buf[i], &msg, &status))
+ {
+ // Packet received
+ printf("\nReceived packet: SYS: %d, COMP: %d, LEN: %d, MSG ID: %d\n", msg.sysid, msg.compid, msg.len, msg.msgid);
+
+ // Handle packet with waypoint component
+ mavlink_wpm_message_handler(&msg);
+
+ // Handle packet with parameter component
+ }
+ }
+ printf("\n");
+ }
+ memset(buf, 0, BUFFER_LENGTH);
+ usleep(50000); // Sleep one second
+ }
+}
+
+
+/* QNX timer version */
+#if (defined __QNX__) | (defined __QNXNTO__)
+uint64_t microsSinceEpoch()
+{
+
+ struct timespec time;
+
+ uint64_t micros = 0;
+
+ clock_gettime(CLOCK_REALTIME, &time);
+ micros = (uint64_t)time.tv_sec * 100000 + time.tv_nsec/1000;
+
+ return micros;
+}
+#else
+uint64_t microsSinceEpoch()
+{
+
+ struct timeval tv;
+
+ uint64_t micros = 0;
+
+ gettimeofday(&tv, NULL);
+ micros = ((uint64_t)tv.tv_sec) * 1000000 + tv.tv_usec;
+
+ return micros;
+}
+#endif
\ No newline at end of file
diff --git a/thirdParty/mavlink/missionlib/testing/udptest.xcodeproj/.gitignore b/thirdParty/mavlink/missionlib/testing/udptest.xcodeproj/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..d82a5e47def52cce2467649612ca36ad79f40a63
--- /dev/null
+++ b/thirdParty/mavlink/missionlib/testing/udptest.xcodeproj/.gitignore
@@ -0,0 +1,2 @@
+*.mode1v3
+*.pbxuser
diff --git a/thirdParty/mavlink/missionlib/testing/udptest.xcodeproj/project.pbxproj b/thirdParty/mavlink/missionlib/testing/udptest.xcodeproj/project.pbxproj
new file mode 100644
index 0000000000000000000000000000000000000000..ba27d2f32eed92413f59df2f43dc17a6830706f7
--- /dev/null
+++ b/thirdParty/mavlink/missionlib/testing/udptest.xcodeproj/project.pbxproj
@@ -0,0 +1,217 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 34E8AFDB13F5064C001100AA /* waypoints.c in Sources */ = {isa = PBXBuildFile; fileRef = 34E8AFDA13F5064C001100AA /* waypoints.c */; };
+ 8DD76FAC0486AB0100D96B5E /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.c */; settings = {ATTRIBUTES = (); }; };
+ 8DD76FB00486AB0100D96B5E /* udptest.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6A0FF2C0290799A04C91782 /* udptest.1 */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 8DD76FAF0486AB0100D96B5E /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 8;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ 8DD76FB00486AB0100D96B5E /* udptest.1 in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 08FB7796FE84155DC02AAC07 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; };
+ 34E8AFDA13F5064C001100AA /* waypoints.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = waypoints.c; path = ../waypoints.c; sourceTree = SOURCE_ROOT; };
+ 34E8AFDC13F50659001100AA /* waypoints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = waypoints.h; path = ../waypoints.h; sourceTree = SOURCE_ROOT; };
+ 8DD76FB20486AB0100D96B5E /* udptest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = udptest; sourceTree = BUILT_PRODUCTS_DIR; };
+ C6A0FF2C0290799A04C91782 /* udptest.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = udptest.1; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8DD76FAD0486AB0100D96B5E /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 08FB7794FE84155DC02AAC07 /* udptest */ = {
+ isa = PBXGroup;
+ children = (
+ 34E8AFDC13F50659001100AA /* waypoints.h */,
+ 08FB7795FE84155DC02AAC07 /* Source */,
+ C6A0FF2B0290797F04C91782 /* Documentation */,
+ 1AB674ADFE9D54B511CA2CBB /* Products */,
+ );
+ name = udptest;
+ sourceTree = "";
+ };
+ 08FB7795FE84155DC02AAC07 /* Source */ = {
+ isa = PBXGroup;
+ children = (
+ 34E8AFDA13F5064C001100AA /* waypoints.c */,
+ 08FB7796FE84155DC02AAC07 /* main.c */,
+ );
+ name = Source;
+ sourceTree = "";
+ };
+ 1AB674ADFE9D54B511CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8DD76FB20486AB0100D96B5E /* udptest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ C6A0FF2B0290797F04C91782 /* Documentation */ = {
+ isa = PBXGroup;
+ children = (
+ C6A0FF2C0290799A04C91782 /* udptest.1 */,
+ );
+ name = Documentation;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8DD76FA90486AB0100D96B5E /* udptest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "udptest" */;
+ buildPhases = (
+ 8DD76FAB0486AB0100D96B5E /* Sources */,
+ 8DD76FAD0486AB0100D96B5E /* Frameworks */,
+ 8DD76FAF0486AB0100D96B5E /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = udptest;
+ productInstallPath = "$(HOME)/bin";
+ productName = udptest;
+ productReference = 8DD76FB20486AB0100D96B5E /* udptest */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 08FB7793FE84155DC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "udptest" */;
+ compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = 08FB7794FE84155DC02AAC07 /* udptest */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8DD76FA90486AB0100D96B5E /* udptest */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8DD76FAB0486AB0100D96B5E /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8DD76FAC0486AB0100D96B5E /* main.c in Sources */,
+ 34E8AFDB13F5064C001100AA /* waypoints.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 1DEB928608733DD80010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INSTALL_PATH = /usr/local/bin;
+ PRODUCT_NAME = udptest;
+ };
+ name = Debug;
+ };
+ 1DEB928708733DD80010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_MODEL_TUNING = G5;
+ INSTALL_PATH = /usr/local/bin;
+ PRODUCT_NAME = udptest;
+ };
+ name = Release;
+ };
+ 1DEB928A08733DD80010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = ../../include/common/;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ };
+ name = Debug;
+ };
+ 1DEB928B08733DD80010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "udptest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB928608733DD80010E9CD /* Debug */,
+ 1DEB928708733DD80010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "udptest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB928A08733DD80010E9CD /* Debug */,
+ 1DEB928B08733DD80010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}
diff --git a/thirdParty/mavlink/missionlib/waypoints.c b/thirdParty/mavlink/missionlib/waypoints.c
new file mode 100644
index 0000000000000000000000000000000000000000..a7b8ee5f5ca0aa43be983ab1f1c1eaadaa616ee4
--- /dev/null
+++ b/thirdParty/mavlink/missionlib/waypoints.c
@@ -0,0 +1,1044 @@
+/*******************************************************************************
+
+ Copyright (C) 2011 Lorenz Meier lm ( a t ) inf.ethz.ch
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+ ****************************************************************************/
+
+#include "waypoints.h"
+#include
+
+bool debug = true;
+bool verbose = true;
+
+extern mavlink_system_t mavlink_system;
+extern mavlink_wpm_storage wpm;
+
+extern void mavlink_wpm_send_message(mavlink_message_t* msg);
+extern void mavlink_wpm_send_gcs_string(const char* string);
+extern uint64_t mavlink_wpm_get_system_timestamp();
+
+
+#define MAVLINK_WPM_NO_PRINTF
+
+void mavlink_wpm_init(mavlink_wpm_storage* state)
+{
+ // Set all waypoints to zero
+
+ // Set count to zero
+ state->size = 0;
+ state->max_size = MAVLINK_WPM_MAX_WP_COUNT;
+ state->current_state = MAVLINK_WPM_STATE_IDLE;
+ state->current_partner_sysid = 0;
+ state->current_partner_compid = 0;
+ state->timestamp_lastaction = 0;
+ state->timestamp_last_send_setpoint = 0;
+ state->timeout = MAVLINK_WPM_PROTOCOL_TIMEOUT_DEFAULT;
+ state->delay_setpoint = MAVLINK_WPM_SETPOINT_DELAY_DEFAULT;
+ state->idle = false; ///< indicates if the system is following the waypoints or is waiting
+ state->current_active_wp_id = -1; ///< id of current waypoint
+ state->yaw_reached = false; ///< boolean for yaw attitude reached
+ state->pos_reached = false; ///< boolean for position reached
+ state->timestamp_lastoutside_orbit = 0;///< timestamp when the MAV was last outside the orbit or had the wrong yaw value
+ state->timestamp_firstinside_orbit = 0;///< timestamp when the MAV was the first time after a waypoint change inside the orbit and had the correct yaw value
+
+}
+
+/*
+ * @brief Sends an waypoint ack message
+ */
+void mavlink_wpm_send_waypoint_ack(uint8_t sysid, uint8_t compid, uint8_t type)
+{
+ mavlink_message_t msg;
+ mavlink_waypoint_ack_t wpa;
+
+ wpa.target_system = wpm.current_partner_sysid;
+ wpa.target_component = wpm.current_partner_compid;
+ wpa.type = type;
+
+ mavlink_msg_waypoint_ack_encode(mavlink_system.sysid, mavlink_system.compid, &msg, &wpa);
+ mavlink_wpm_send_message(&msg);
+
+ // FIXME TIMING usleep(paramClient->getParamValue("PROTOCOLDELAY"));
+
+ if (MAVLINK_WPM_TEXT_FEEDBACK)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("Sent waypoint ACK");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Sent waypoint ack (%u) to ID %u\n", wpa.type, wpa.target_system);
+#endif
+ mavlink_wpm_send_gcs_string("Sent waypoint ACK");
+ }
+}
+
+/*
+ * @brief Broadcasts the new target waypoint and directs the MAV to fly there
+ *
+ * This function broadcasts its new active waypoint sequence number and
+ * sends a message to the controller, advising it to fly to the coordinates
+ * of the waypoint with a given orientation
+ *
+ * @param seq The waypoint sequence number the MAV should fly to.
+ */
+void mavlink_wpm_send_waypoint_current(uint16_t seq)
+{
+ if(seq < wpm.size)
+ {
+ mavlink_waypoint_t *cur = &(wpm.waypoints[seq]);
+
+ mavlink_message_t msg;
+ mavlink_waypoint_current_t wpc;
+
+ wpc.seq = cur->seq;
+
+ mavlink_msg_waypoint_current_encode(mavlink_system.sysid, mavlink_system.compid, &msg, &wpc);
+ mavlink_wpm_send_message(&msg);
+
+ // FIXME TIMING usleep(paramClient->getParamValue("PROTOCOLDELAY"));
+
+ if (MAVLINK_WPM_TEXT_FEEDBACK) mavlink_wpm_send_gcs_string("Broadcasted new current waypoint\n"); //// printf("Broadcasted new current waypoint %u\n", wpc.seq);
+ }
+ else
+ {
+ if (MAVLINK_WPM_TEXT_FEEDBACK) mavlink_wpm_send_gcs_string("ERROR: index out of bounds\n");
+ }
+}
+
+/*
+ * @brief Directs the MAV to fly to a position
+ *
+ * Sends a message to the controller, advising it to fly to the coordinates
+ * of the waypoint with a given orientation
+ *
+ * @param seq The waypoint sequence number the MAV should fly to.
+ */
+void mavlink_wpm_send_setpoint(uint16_t seq)
+{
+ if(seq < wpm.size)
+ {
+ mavlink_waypoint_t *cur = &(wpm.waypoints[seq]);
+
+ mavlink_message_t msg;
+ mavlink_local_position_setpoint_set_t position_control_set_point;
+
+ // Send new NED or ENU setpoint to onbaord autopilot
+ if (cur->frame == MAV_FRAME_LOCAL_NED || cur->frame == MAV_FRAME_LOCAL_ENU)
+ {
+ position_control_set_point.target_system = mavlink_system.sysid;
+ position_control_set_point.target_component = MAV_COMP_ID_IMU;
+ position_control_set_point.x = cur->x;
+ position_control_set_point.y = cur->y;
+ position_control_set_point.z = cur->z;
+ position_control_set_point.yaw = cur->param4;
+
+ mavlink_msg_local_position_setpoint_set_encode(mavlink_system.sysid, mavlink_system.compid, &msg, &position_control_set_point);
+ mavlink_wpm_send_message(&msg);
+
+ // FIXME TIMING usleep(paramClient->getParamValue("PROTOCOLDELAY"));
+ }
+ else
+ {
+ if (MAVLINK_WPM_TEXT_FEEDBACK) mavlink_wpm_send_gcs_string("No new setpoint set because of invalid coordinate frame of waypoint");//// if (verbose) // printf("No new set point sent to IMU because the new waypoint %u had no local coordinates\n", cur->seq);
+ }
+
+ wpm.timestamp_last_send_setpoint = mavlink_wpm_get_system_timestamp();
+ }
+ else
+ {
+ if (MAVLINK_WPM_TEXT_FEEDBACK) mavlink_wpm_send_gcs_string("ERROR: Waypoint index out of bounds\n"); //// if (verbose) // printf("ERROR: index out of bounds\n");
+ }
+}
+
+void mavlink_wpm_send_waypoint_count(uint8_t sysid, uint8_t compid, uint16_t count)
+{
+ mavlink_message_t msg;
+ mavlink_waypoint_count_t wpc;
+
+ wpc.target_system = wpm.current_partner_sysid;
+ wpc.target_component = wpm.current_partner_compid;
+ wpc.count = count;
+
+ mavlink_msg_waypoint_count_encode(mavlink_system.sysid, mavlink_system.compid, &msg, &wpc);
+ mavlink_wpm_send_message(&msg);
+
+ if (MAVLINK_WPM_TEXT_FEEDBACK) mavlink_wpm_send_gcs_string("Sent waypoint count"); //// if (verbose) // printf("Sent waypoint count (%u) to ID %u\n", wpc.count, wpc.target_system);
+
+ // FIXME TIMING usleep(paramClient->getParamValue("PROTOCOLDELAY"));
+}
+
+void mavlink_wpm_send_waypoint(uint8_t sysid, uint8_t compid, uint16_t seq)
+{
+ if (seq < wpm.size)
+ {
+ mavlink_message_t msg;
+ mavlink_waypoint_t *wp = &(wpm.waypoints[seq]);
+ wp->target_system = wpm.current_partner_sysid;
+ wp->target_component = wpm.current_partner_compid;
+ mavlink_msg_waypoint_encode(mavlink_system.sysid, mavlink_system.compid, &msg, wp);
+ mavlink_wpm_send_message(&msg);
+ if (MAVLINK_WPM_TEXT_FEEDBACK) mavlink_wpm_send_gcs_string("Sent waypoint"); //// if (verbose) // printf("Sent waypoint %u to ID %u\n", wp->seq, wp->target_system);
+
+ // FIXME TIMING usleep(paramClient->getParamValue("PROTOCOLDELAY"));
+ }
+ else
+ {
+ if (MAVLINK_WPM_TEXT_FEEDBACK) mavlink_wpm_send_gcs_string("ERROR: Waypoint index out of bounds\n");
+ }
+}
+
+void mavlink_wpm_send_waypoint_request(uint8_t sysid, uint8_t compid, uint16_t seq)
+{
+ if (seq < wpm.max_size)
+ {
+ mavlink_message_t msg;
+ mavlink_waypoint_request_t wpr;
+ wpr.target_system = wpm.current_partner_sysid;
+ wpr.target_component = wpm.current_partner_compid;
+ wpr.seq = seq;
+ mavlink_msg_waypoint_request_encode(mavlink_system.sysid, mavlink_system.compid, &msg, &wpr);
+ mavlink_wpm_send_message(&msg);
+ if (MAVLINK_WPM_TEXT_FEEDBACK) mavlink_wpm_send_gcs_string("Sent waypoint request"); //// if (verbose) // printf("Sent waypoint request %u to ID %u\n", wpr.seq, wpr.target_system);
+
+ // FIXME TIMING usleep(paramClient->getParamValue("PROTOCOLDELAY"));
+ }
+ else
+ {
+ if (MAVLINK_WPM_TEXT_FEEDBACK) mavlink_wpm_send_gcs_string("ERROR: Waypoint index exceeds list capacity\n");
+ }
+}
+
+/*
+ * @brief emits a message that a waypoint reached
+ *
+ * This function broadcasts a message that a waypoint is reached.
+ *
+ * @param seq The waypoint sequence number the MAV has reached.
+ */
+void mavlink_wpm_send_waypoint_reached(uint16_t seq)
+{
+ mavlink_message_t msg;
+ mavlink_waypoint_reached_t wp_reached;
+
+ wp_reached.seq = seq;
+
+ mavlink_msg_waypoint_reached_encode(mavlink_system.sysid, mavlink_system.compid, &msg, &wp_reached);
+ mavlink_wpm_send_message(&msg);
+
+ if (MAVLINK_WPM_TEXT_FEEDBACK) mavlink_wpm_send_gcs_string("Sent waypoint reached message"); //// if (verbose) // printf("Sent waypoint %u reached message\n", wp_reached.seq);
+
+ // FIXME TIMING usleep(paramClient->getParamValue("PROTOCOLDELAY"));
+}
+
+//float mavlink_wpm_distance_to_segment(uint16_t seq, float x, float y, float z)
+//{
+// if (seq < wpm.size)
+// {
+// mavlink_waypoint_t *cur = waypoints->at(seq);
+//
+// const PxVector3 A(cur->x, cur->y, cur->z);
+// const PxVector3 C(x, y, z);
+//
+// // seq not the second last waypoint
+// if ((uint16_t)(seq+1) < wpm.size)
+// {
+// mavlink_waypoint_t *next = waypoints->at(seq+1);
+// const PxVector3 B(next->x, next->y, next->z);
+// const float r = (B-A).dot(C-A) / (B-A).lengthSquared();
+// if (r >= 0 && r <= 1)
+// {
+// const PxVector3 P(A + r*(B-A));
+// return (P-C).length();
+// }
+// else if (r < 0.f)
+// {
+// return (C-A).length();
+// }
+// else
+// {
+// return (C-B).length();
+// }
+// }
+// else
+// {
+// return (C-A).length();
+// }
+// }
+// else
+// {
+// // if (verbose) // printf("ERROR: index out of bounds\n");
+// }
+// return -1.f;
+//}
+
+float mavlink_wpm_distance_to_point(uint16_t seq, float x, float y, float z)
+{
+ // if (seq < wpm.size)
+ // {
+ // mavlink_waypoint_t *cur = waypoints->at(seq);
+ //
+ // const PxVector3 A(cur->x, cur->y, cur->z);
+ // const PxVector3 C(x, y, z);
+ //
+ // return (C-A).length();
+ // }
+ // else
+ // {
+ // // if (verbose) // printf("ERROR: index out of bounds\n");
+ // }
+ return -1.f;
+}
+
+
+void mavlink_wpm_message_handler(const mavlink_message_t* msg)
+{
+ // Handle param messages
+ //paramClient->handleMAVLinkPacket(msg);
+
+ //check for timed-out operations
+ uint64_t now = mavlink_wpm_get_system_timestamp();
+ if (now-wpm.timestamp_lastaction > wpm.timeout && wpm.current_state != MAVLINK_WPM_STATE_IDLE)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("Operation timeout switching -> IDLE");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Last operation (state=%u) timed out, changing state to MAVLINK_WPM_STATE_IDLE\n", wpm.current_state);
+#endif
+ wpm.current_state = MAVLINK_WPM_STATE_IDLE;
+ wpm.current_count = 0;
+ wpm.current_partner_sysid = 0;
+ wpm.current_partner_compid = 0;
+ wpm.current_wp_id = -1;
+
+ if(wpm.size == 0)
+ {
+ wpm.current_active_wp_id = -1;
+ }
+ }
+
+ if(now-wpm.timestamp_last_send_setpoint > wpm.delay_setpoint && wpm.current_active_wp_id < wpm.size)
+ {
+ mavlink_wpm_send_setpoint(wpm.current_active_wp_id);
+ }
+
+ switch(msg->msgid)
+ {
+ case MAVLINK_MSG_ID_ATTITUDE:
+ {
+ if(msg->sysid == mavlink_system.sysid && wpm.current_active_wp_id < wpm.size)
+ {
+ mavlink_waypoint_t *wp = &(wpm.waypoints[wpm.current_active_wp_id]);
+ if(wp->frame == MAV_FRAME_LOCAL_ENU || wp->frame == MAV_FRAME_LOCAL_NED)
+ {
+ mavlink_attitude_t att;
+ mavlink_msg_attitude_decode(msg, &att);
+ float yaw_tolerance = wpm.accept_range_yaw;
+ //compare current yaw
+ if (att.yaw - yaw_tolerance >= 0.0f && att.yaw + yaw_tolerance < 2.f*M_PI)
+ {
+ if (att.yaw - yaw_tolerance <= wp->param4 && att.yaw + yaw_tolerance >= wp->param4)
+ wpm.yaw_reached = true;
+ }
+ else if(att.yaw - yaw_tolerance < 0.0f)
+ {
+ float lowerBound = 360.0f + att.yaw - yaw_tolerance;
+ if (lowerBound < wp->param4 || wp->param4 < att.yaw + yaw_tolerance)
+ wpm.yaw_reached = true;
+ }
+ else
+ {
+ float upperBound = att.yaw + yaw_tolerance - 2.f*M_PI;
+ if (att.yaw - yaw_tolerance < wp->param4 || wp->param4 < upperBound)
+ wpm.yaw_reached = true;
+ }
+ }
+ }
+ break;
+ }
+
+ case MAVLINK_MSG_ID_LOCAL_POSITION:
+ {
+ if(msg->sysid == mavlink_system.sysid && wpm.current_active_wp_id < wpm.size)
+ {
+ mavlink_waypoint_t *wp = &(wpm.waypoints[wpm.current_active_wp_id]);
+
+ if(wp->frame == MAV_FRAME_LOCAL_ENU || MAV_FRAME_LOCAL_NED)
+ {
+ mavlink_local_position_t pos;
+ mavlink_msg_local_position_decode(msg, &pos);
+ //// if (debug) // printf("Received new position: x: %f | y: %f | z: %f\n", pos.x, pos.y, pos.z);
+
+ wpm.pos_reached = false;
+
+ // compare current position (given in message) with current waypoint
+ float orbit = wp->param1;
+
+ float dist;
+ if (wp->param2 == 0)
+ {
+ // FIXME segment distance
+ //dist = mavlink_wpm_distance_to_segment(current_active_wp_id, pos.x, pos.y, pos.z);
+ }
+ else
+ {
+ dist = mavlink_wpm_distance_to_point(wpm.current_active_wp_id, pos.x, pos.y, pos.z);
+ }
+
+ if (dist >= 0.f && dist <= orbit && wpm.yaw_reached)
+ {
+ wpm.pos_reached = true;
+ }
+ }
+ }
+ break;
+ }
+
+ // case MAVLINK_MSG_ID_CMD: // special action from ground station
+ // {
+ // mavlink_cmd_t action;
+ // mavlink_msg_cmd_decode(msg, &action);
+ // if(action.target == mavlink_system.sysid)
+ // {
+ // // if (verbose) std::cerr << "Waypoint: received message with action " << action.action << std::endl;
+ // switch (action.action)
+ // {
+ // // case MAV_ACTION_LAUNCH:
+ // // // if (verbose) std::cerr << "Launch received" << std::endl;
+ // // current_active_wp_id = 0;
+ // // if (wpm.size>0)
+ // // {
+ // // setActive(waypoints[current_active_wp_id]);
+ // // }
+ // // else
+ // // // if (verbose) std::cerr << "No launch, waypointList empty" << std::endl;
+ // // break;
+ //
+ // // case MAV_ACTION_CONTINUE:
+ // // // if (verbose) std::c
+ // // err << "Continue received" << std::endl;
+ // // idle = false;
+ // // setActive(waypoints[current_active_wp_id]);
+ // // break;
+ //
+ // // case MAV_ACTION_HALT:
+ // // // if (verbose) std::cerr << "Halt received" << std::endl;
+ // // idle = true;
+ // // break;
+ //
+ // // default:
+ // // // if (verbose) std::cerr << "Unknown action received with id " << action.action << ", no action taken" << std::endl;
+ // // break;
+ // }
+ // }
+ // break;
+ // }
+
+ case MAVLINK_MSG_ID_WAYPOINT_ACK:
+ {
+ mavlink_waypoint_ack_t wpa;
+ mavlink_msg_waypoint_ack_decode(msg, &wpa);
+
+ if((msg->sysid == wpm.current_partner_sysid && msg->compid == wpm.current_partner_compid) && (wpa.target_system == mavlink_system.sysid /*&& wpa.target_component == mavlink_system.compid*/))
+ {
+ wpm.timestamp_lastaction = now;
+
+ if (wpm.current_state == MAVLINK_WPM_STATE_SENDLIST || wpm.current_state == MAVLINK_WPM_STATE_SENDLIST_SENDWPS)
+ {
+ if (wpm.current_wp_id == wpm.size-1)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("Got last WP ACK state -> IDLE");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Received ACK after having sent last waypoint, going to state MAVLINK_WPM_STATE_IDLE\n");
+#endif
+ wpm.current_state = MAVLINK_WPM_STATE_IDLE;
+ wpm.current_wp_id = 0;
+ }
+ }
+ }
+ else
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: curr partner id mismatch");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("IGNORED WAYPOINT COMMAND BECAUSE TARGET SYSTEM AND COMPONENT OR COMM PARTNER ID MISMATCH\n");
+#endif
+ }
+ break;
+ }
+
+ case MAVLINK_MSG_ID_WAYPOINT_SET_CURRENT:
+ {
+ mavlink_waypoint_set_current_t wpc;
+ mavlink_msg_waypoint_set_current_decode(msg, &wpc);
+
+ if(wpc.target_system == mavlink_system.sysid /*&& wpc.target_component == mavlink_system.compid*/)
+ {
+ wpm.timestamp_lastaction = now;
+
+ if (wpm.current_state == MAVLINK_WPM_STATE_IDLE)
+ {
+ if (wpc.seq < wpm.size)
+ {
+ // if (verbose) // printf("Received MAVLINK_MSG_ID_WAYPOINT_SET_CURRENT\n");
+ wpm.current_active_wp_id = wpc.seq;
+ uint32_t i;
+ for(i = 0; i < wpm.size; i++)
+ {
+ if (i == wpm.current_active_wp_id)
+ {
+ wpm.waypoints[i].current = true;
+ }
+ else
+ {
+ wpm.waypoints[i].current = false;
+ }
+ }
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("NEW WP SET");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("New current waypoint %u\n", wpm.current_active_wp_id);
+#endif
+ wpm.yaw_reached = false;
+ wpm.pos_reached = false;
+ mavlink_wpm_send_waypoint_current(wpm.current_active_wp_id);
+ mavlink_wpm_send_setpoint(wpm.current_active_wp_id);
+ wpm.timestamp_firstinside_orbit = 0;
+ }
+ else
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("IGN WP CURR CMD: Not in list");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignored MAVLINK_MSG_ID_WAYPOINT_SET_CURRENT: Index out of bounds\n");
+#endif
+ }
+ }
+ else
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("IGN WP CURR CMD: Busy");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("IGNORED WAYPOINT COMMAND BECAUSE NOT IN IDLE STATE\n");
+#endif
+ }
+ }
+ else
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: target id mismatch");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("IGNORED WAYPOINT COMMAND BECAUSE TARGET SYSTEM AND COMPONENT OR COMM PARTNER ID MISMATCH\n");
+#endif
+ }
+ break;
+ }
+
+ case MAVLINK_MSG_ID_WAYPOINT_REQUEST_LIST:
+ {
+ mavlink_waypoint_request_list_t wprl;
+ mavlink_msg_waypoint_request_list_decode(msg, &wprl);
+ if(wprl.target_system == mavlink_system.sysid /*&& wprl.target_component == mavlink_system.compid*/)
+ {
+ wpm.timestamp_lastaction = now;
+
+ if (wpm.current_state == MAVLINK_WPM_STATE_IDLE || wpm.current_state == MAVLINK_WPM_STATE_SENDLIST)
+ {
+ if (wpm.size > 0)
+ {
+ if (verbose && wpm.current_state == MAVLINK_WPM_STATE_IDLE) // printf("Got MAVLINK_MSG_ID_WAYPOINT_REQUEST_LIST from %u changing state to MAVLINK_WPM_STATE_SENDLIST\n", msg->sysid);
+ if (verbose && wpm.current_state == MAVLINK_WPM_STATE_SENDLIST) // printf("Got MAVLINK_MSG_ID_WAYPOINT_REQUEST_LIST again from %u staying in state MAVLINK_WPM_STATE_SENDLIST\n", msg->sysid);
+ wpm.current_state = MAVLINK_WPM_STATE_SENDLIST;
+ wpm.current_wp_id = 0;
+ wpm.current_partner_sysid = msg->sysid;
+ wpm.current_partner_compid = msg->compid;
+ }
+ else
+ {
+ // if (verbose) // printf("Got MAVLINK_MSG_ID_WAYPOINT_REQUEST_LIST from %u but have no waypoints, staying in \n", msg->sysid);
+ }
+ wpm.current_count = wpm.size;
+ mavlink_wpm_send_waypoint_count(msg->sysid,msg->compid, wpm.current_count);
+ }
+ else
+ {
+ // if (verbose) // printf("Ignored MAVLINK_MSG_ID_WAYPOINT_REQUEST_LIST because i'm doing something else already (state=%i).\n", wpm.current_state);
+ }
+ }
+ else
+ {
+ // if (verbose) // printf("IGNORED WAYPOINT COMMAND BECAUSE TARGET SYSTEM AND COMPONENT MISMATCH\n");
+ }
+
+ break;
+ }
+
+ case MAVLINK_MSG_ID_WAYPOINT_REQUEST:
+ {
+ mavlink_waypoint_request_t wpr;
+ mavlink_msg_waypoint_request_decode(msg, &wpr);
+ if(msg->sysid == wpm.current_partner_sysid && msg->compid == wpm.current_partner_compid && wpr.target_system == mavlink_system.sysid /*&& wpr.target_component == mavlink_system.compid*/)
+ {
+ wpm.timestamp_lastaction = now;
+
+ //ensure that we are in the correct state and that the first request has id 0 and the following requests have either the last id (re-send last waypoint) or last_id+1 (next waypoint)
+ if ((wpm.current_state == MAVLINK_WPM_STATE_SENDLIST && wpr.seq == 0) || (wpm.current_state == MAVLINK_WPM_STATE_SENDLIST_SENDWPS && (wpr.seq == wpm.current_wp_id || wpr.seq == wpm.current_wp_id + 1) && wpr.seq < wpm.size))
+ {
+ if (wpm.current_state == MAVLINK_WPM_STATE_SENDLIST)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("GOT WP REQ, state -> SEND");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Got MAVLINK_MSG_ID_WAYPOINT_REQUEST of waypoint %u from %u changing state to MAVLINK_WPM_STATE_SENDLIST_SENDWPS\n", wpr.seq, msg->sysid);
+#endif
+ }
+ if (wpm.current_state == MAVLINK_WPM_STATE_SENDLIST_SENDWPS && wpr.seq == wpm.current_wp_id + 1)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("GOT 2nd WP REQ");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Got MAVLINK_MSG_ID_WAYPOINT_REQUEST of waypoint %u from %u staying in state MAVLINK_WPM_STATE_SENDLIST_SENDWPS\n", wpr.seq, msg->sysid);
+#endif
+ }
+ if (wpm.current_state == MAVLINK_WPM_STATE_SENDLIST_SENDWPS && wpr.seq == wpm.current_wp_id)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("GOT 2nd WP REQ");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Got MAVLINK_MSG_ID_WAYPOINT_REQUEST of waypoint %u (again) from %u staying in state MAVLINK_WPM_STATE_SENDLIST_SENDWPS\n", wpr.seq, msg->sysid);
+#endif
+ }
+
+ wpm.current_state = MAVLINK_WPM_STATE_SENDLIST_SENDWPS;
+ wpm.current_wp_id = wpr.seq;
+ mavlink_wpm_send_waypoint(wpm.current_partner_sysid, wpm.current_partner_compid, wpr.seq);
+ }
+ else
+ {
+ // if (verbose)
+ {
+ if (!(wpm.current_state == MAVLINK_WPM_STATE_SENDLIST || wpm.current_state == MAVLINK_WPM_STATE_SENDLIST_SENDWPS))
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: Busy");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignored MAVLINK_MSG_ID_WAYPOINT_REQUEST because i'm doing something else already (state=%i).\n", wpm.current_state);
+#endif
+ break;
+ }
+ else if (wpm.current_state == MAVLINK_WPM_STATE_SENDLIST)
+ {
+ if (wpr.seq != 0)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: First id != 0");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignored MAVLINK_MSG_ID_WAYPOINT_REQUEST because the first requested waypoint ID (%u) was not 0.\n", wpr.seq);
+#endif
+ }
+ }
+ else if (wpm.current_state == MAVLINK_WPM_STATE_SENDLIST_SENDWPS)
+ {
+ if (wpr.seq != wpm.current_wp_id && wpr.seq != wpm.current_wp_id + 1)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: Req. WP was unexpected");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignored MAVLINK_MSG_ID_WAYPOINT_REQUEST because the requested waypoint ID (%u) was not the expected (%u or %u).\n", wpr.seq, wpm.current_wp_id, wpm.current_wp_id+1);
+#endif
+ }
+ else if (wpr.seq >= wpm.size)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: Req. WP not in list");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignored MAVLINK_MSG_ID_WAYPOINT_REQUEST because the requested waypoint ID (%u) was out of bounds.\n", wpr.seq);
+#endif
+ }
+ }
+ else
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: ?");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignored MAVLINK_MSG_ID_WAYPOINT_REQUEST - FIXME: missed error description\n");
+#endif
+ }
+ }
+ }
+ }
+ else
+ {
+ //we we're target but already communicating with someone else
+ if((wpr.target_system == mavlink_system.sysid /*&& wpr.target_component == mavlink_system.compid*/) && !(msg->sysid == wpm.current_partner_sysid && msg->compid == wpm.current_partner_compid))
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: Busy");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignored MAVLINK_MSG_ID_WAYPOINT_REQUEST from ID %u because i'm already talking to ID %u.\n", msg->sysid, wpm.current_partner_sysid);
+#endif
+ }
+ else
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: target id mismatch");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("IGNORED WAYPOINT COMMAND BECAUSE TARGET SYSTEM AND COMPONENT OR COMM PARTNER ID MISMATCH\n");
+#endif
+ }
+
+ }
+ break;
+ }
+
+ case MAVLINK_MSG_ID_WAYPOINT_COUNT:
+ {
+ mavlink_waypoint_count_t wpc;
+ mavlink_msg_waypoint_count_decode(msg, &wpc);
+ if(wpc.target_system == mavlink_system.sysid/* && wpc.target_component == mavlink_system.compid*/)
+ {
+ wpm.timestamp_lastaction = now;
+
+ if (wpm.current_state == MAVLINK_WPM_STATE_IDLE || (wpm.current_state == MAVLINK_WPM_STATE_GETLIST && wpm.current_wp_id == 0))
+ {
+ if (wpc.count > 0)
+ {
+ if (wpm.current_state == MAVLINK_WPM_STATE_IDLE)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("WP CMD OK: state -> GETLIST");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Got MAVLINK_MSG_ID_WAYPOINT_COUNT (%u) from %u changing state to MAVLINK_WPM_STATE_GETLIST\n", wpc.count, msg->sysid);
+#endif
+ }
+ if (wpm.current_state == MAVLINK_WPM_STATE_GETLIST)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("WP CMD OK AGAIN");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Got MAVLINK_MSG_ID_WAYPOINT_COUNT (%u) again from %u\n", wpc.count, msg->sysid);
+#endif
+ }
+
+ wpm.current_state = MAVLINK_WPM_STATE_GETLIST;
+ wpm.current_wp_id = 0;
+ wpm.current_partner_sysid = msg->sysid;
+ wpm.current_partner_compid = msg->compid;
+ wpm.current_count = wpc.count;
+
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("CLR RCV BUF: READY");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("clearing receive buffer and readying for receiving waypoints\n");
+#endif
+ wpm.rcv_size = 0;
+ //while(waypoints_receive_buffer->size() > 0)
+ // {
+ // delete waypoints_receive_buffer->back();
+ // waypoints_receive_buffer->pop_back();
+ // }
+
+ mavlink_wpm_send_waypoint_request(wpm.current_partner_sysid, wpm.current_partner_compid, wpm.current_wp_id);
+ }
+ else if (wpc.count == 0)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("COUNT 0");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("got waypoint count of 0, clearing waypoint list and staying in state MAVLINK_WPM_STATE_IDLE\n");
+#endif
+ wpm.rcv_size = 0;
+ //while(waypoints_receive_buffer->size() > 0)
+ // {
+ // delete waypoints->back();
+ // waypoints->pop_back();
+ // }
+ wpm.current_active_wp_id = -1;
+ wpm.yaw_reached = false;
+ wpm.pos_reached = false;
+ break;
+
+ }
+ else
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("IGN WP CMD");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignoring MAVLINK_MSG_ID_WAYPOINT_COUNT from %u with count of %u\n", msg->sysid, wpc.count);
+#endif
+ }
+ }
+ else
+ {
+ if (!(wpm.current_state == MAVLINK_WPM_STATE_IDLE || wpm.current_state == MAVLINK_WPM_STATE_GETLIST))
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: Busy");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignored MAVLINK_MSG_ID_WAYPOINT_COUNT because i'm doing something else already (state=%i).\n", wpm.current_state);
+#endif
+ }
+ else if (wpm.current_state == MAVLINK_WPM_STATE_GETLIST && wpm.current_wp_id != 0)
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: Busy");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignored MAVLINK_MSG_ID_WAYPOINT_COUNT because i'm already receiving waypoint %u.\n", wpm.current_wp_id);
+#endif
+ }
+ else
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: ?");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("Ignored MAVLINK_MSG_ID_WAYPOINT_COUNT - FIXME: missed error description\n");
+#endif
+ }
+ }
+ }
+ else
+ {
+#ifdef MAVLINK_WPM_NO_PRINTF
+ mavlink_wpm_send_gcs_string("REJ. WP CMD: target id mismatch");
+#else
+ if (MAVLINK_WPM_VERBOSE) printf("IGNORED WAYPOINT COMMAND BECAUSE TARGET SYSTEM AND COMPONENT OR COMM PARTNER ID MISMATCH\n");
+#endif
+ }
+
+ }
+ break;
+
+ case MAVLINK_MSG_ID_WAYPOINT:
+ {
+ mavlink_waypoint_t wp;
+ mavlink_msg_waypoint_decode(msg, &wp);
+
+ // if (verbose) // printf("GOT WAYPOINT!");
+
+ if((msg->sysid == wpm.current_partner_sysid && msg->compid == wpm.current_partner_compid) && (wp.target_system == mavlink_system.sysid /*&& wp.target_component == mavlink_system.compid*/))
+ {
+ wpm.timestamp_lastaction = now;
+
+ //ensure that we are in the correct state and that the first waypoint has id 0 and the following waypoints have the correct ids
+ if ((wpm.current_state == MAVLINK_WPM_STATE_GETLIST && wp.seq == 0) || (wpm.current_state == MAVLINK_WPM_STATE_GETLIST_GETWPS && wp.seq == wpm.current_wp_id && wp.seq < wpm.current_count))
+ {
+ if (verbose && wpm.current_state == MAVLINK_WPM_STATE_GETLIST) // printf("Got MAVLINK_MSG_ID_WAYPOINT %u from %u changing state to MAVLINK_WPM_STATE_GETLIST_GETWPS\n", wp.seq, msg->sysid);
+ if (verbose && wpm.current_state == MAVLINK_WPM_STATE_GETLIST_GETWPS && wp.seq == wpm.current_wp_id) // printf("Got MAVLINK_MSG_ID_WAYPOINT %u from %u\n", wp.seq, msg->sysid);
+ if (verbose && wpm.current_state == MAVLINK_WPM_STATE_GETLIST_GETWPS && wp.seq-1 == wpm.current_wp_id) // printf("Got MAVLINK_MSG_ID_WAYPOINT %u (again) from %u\n", wp.seq, msg->sysid);
+
+ wpm.current_state = MAVLINK_WPM_STATE_GETLIST_GETWPS;
+ mavlink_waypoint_t* newwp = &(wpm.rcv_waypoints[wp.seq]);
+ memcpy(newwp, &wp, sizeof(mavlink_waypoint_t));
+
+ wpm.current_wp_id = wp.seq + 1;
+
+ // if (verbose) // printf ("Added new waypoint to list. X= %f\t Y= %f\t Z= %f\t Yaw= %f\n", newwp->x, newwp->y, newwp->z, newwp->param4);
+
+ if(wpm.current_wp_id == wpm.current_count && wpm.current_state == MAVLINK_WPM_STATE_GETLIST_GETWPS)
+ {
+ // if (verbose) // printf("Got all %u waypoints, changing state to MAVLINK_WPM_STATE_IDLE\n", wpm.current_count);
+
+ mavlink_wpm_send_waypoint_ack(wpm.current_partner_sysid, wpm.current_partner_compid, 0);
+
+ if (wpm.current_active_wp_id > wpm.rcv_size-1)
+ {
+ wpm.current_active_wp_id = wpm.rcv_size-1;
+ }
+
+ // switch the waypoints list
+ // FIXME CHECK!!!
+ for (int i = 0; i < wpm.current_count; ++i)
+ {
+ wpm.waypoints[i] = wpm.rcv_waypoints[i];
+ }
+ wpm.size = wpm.current_count;
+
+ //get the new current waypoint
+ uint32_t i;
+ for(i = 0; i < wpm.size; i++)
+ {
+ if (wpm.waypoints[i].current == 1)
+ {
+ wpm.current_active_wp_id = i;
+ //// if (verbose) // printf("New current waypoint %u\n", current_active_wp_id);
+ wpm.yaw_reached = false;
+ wpm.pos_reached = false;
+ mavlink_wpm_send_waypoint_current(wpm.current_active_wp_id);
+ mavlink_wpm_send_setpoint(wpm.current_active_wp_id);
+ wpm.timestamp_firstinside_orbit = 0;
+ break;
+ }
+ }
+
+ if (i == wpm.size)
+ {
+ wpm.current_active_wp_id = -1;
+ wpm.yaw_reached = false;
+ wpm.pos_reached = false;
+ wpm.timestamp_firstinside_orbit = 0;
+ }
+
+ wpm.current_state = MAVLINK_WPM_STATE_IDLE;
+ }
+ else
+ {
+ mavlink_wpm_send_waypoint_request(wpm.current_partner_sysid, wpm.current_partner_compid, wpm.current_wp_id);
+ }
+ }
+ else
+ {
+ if (wpm.current_state == MAVLINK_WPM_STATE_IDLE)
+ {
+ //we're done receiving waypoints, answer with ack.
+ mavlink_wpm_send_waypoint_ack(wpm.current_partner_sysid, wpm.current_partner_compid, 0);
+ // printf("Received MAVLINK_MSG_ID_WAYPOINT while state=MAVLINK_WPM_STATE_IDLE, answered with WAYPOINT_ACK.\n");
+ }
+ // if (verbose)
+ {
+ if (!(wpm.current_state == MAVLINK_WPM_STATE_GETLIST || wpm.current_state == MAVLINK_WPM_STATE_GETLIST_GETWPS))
+ {
+ // printf("Ignored MAVLINK_MSG_ID_WAYPOINT %u because i'm doing something else already (state=%i).\n", wp.seq, wpm.current_state);
+ break;
+ }
+ else if (wpm.current_state == MAVLINK_WPM_STATE_GETLIST)
+ {
+ if(!(wp.seq == 0))
+ {
+ // printf("Ignored MAVLINK_MSG_ID_WAYPOINT because the first waypoint ID (%u) was not 0.\n", wp.seq);
+ }
+ else
+ {
+ // printf("Ignored MAVLINK_MSG_ID_WAYPOINT %u - FIXME: missed error description\n", wp.seq);
+ }
+ }
+ else if (wpm.current_state == MAVLINK_WPM_STATE_GETLIST_GETWPS)
+ {
+ if (!(wp.seq == wpm.current_wp_id))
+ {
+ // printf("Ignored MAVLINK_MSG_ID_WAYPOINT because the waypoint ID (%u) was not the expected %u.\n", wp.seq, wpm.current_wp_id);
+ }
+ else if (!(wp.seq < wpm.current_count))
+ {
+ // printf("Ignored MAVLINK_MSG_ID_WAYPOINT because the waypoint ID (%u) was out of bounds.\n", wp.seq);
+ }
+ else
+ {
+ // printf("Ignored MAVLINK_MSG_ID_WAYPOINT %u - FIXME: missed error description\n", wp.seq);
+ }
+ }
+ else
+ {
+ // printf("Ignored MAVLINK_MSG_ID_WAYPOINT %u - FIXME: missed error description\n", wp.seq);
+ }
+ }
+ }
+ }
+ else
+ {
+ //we we're target but already communicating with someone else
+ if((wp.target_system == mavlink_system.sysid /*&& wp.target_component == mavlink_system.compid*/) && !(msg->sysid == wpm.current_partner_sysid && msg->compid == wpm.current_partner_compid) && wpm.current_state != MAVLINK_WPM_STATE_IDLE)
+ {
+ // if (verbose) // printf("Ignored MAVLINK_MSG_ID_WAYPOINT %u from ID %u because i'm already talking to ID %u.\n", wp.seq, msg->sysid, wpm.current_partner_sysid);
+ }
+ else if(wp.target_system == mavlink_system.sysid /* && wp.target_component == mavlink_system.compid*/)
+ {
+ // if (verbose) // printf("Ignored MAVLINK_MSG_ID_WAYPOINT %u from ID %u because i have no idea what to do with it\n", wp.seq, msg->sysid);
+ }
+ }
+ break;
+ }
+
+ case MAVLINK_MSG_ID_WAYPOINT_CLEAR_ALL:
+ {
+ mavlink_waypoint_clear_all_t wpca;
+ mavlink_msg_waypoint_clear_all_decode(msg, &wpca);
+
+ if(wpca.target_system == mavlink_system.sysid /*&& wpca.target_component == mavlink_system.compid */ && wpm.current_state == MAVLINK_WPM_STATE_IDLE)
+ {
+ wpm.timestamp_lastaction = now;
+
+ // if (verbose) // printf("Got MAVLINK_MSG_ID_WAYPOINT_CLEAR_LIST from %u deleting all waypoints\n", msg->sysid);
+ // Delete all waypoints
+ wpm.size = 0;
+ wpm.current_active_wp_id = -1;
+ wpm.yaw_reached = false;
+ wpm.pos_reached = false;
+ }
+ else if (wpca.target_system == mavlink_system.sysid /*&& wpca.target_component == mavlink_system.compid */ && wpm.current_state != MAVLINK_WPM_STATE_IDLE)
+ {
+ // if (verbose) // printf("Ignored MAVLINK_MSG_ID_WAYPOINT_CLEAR_LIST from %u because i'm doing something else already (state=%i).\n", msg->sysid, wpm.current_state);
+ }
+ break;
+ }
+
+ default:
+ {
+ // if (debug) // printf("Waypoint: received message of unknown type");
+ break;
+ }
+ }
+
+ //check if the current waypoint was reached
+ if (wpm.pos_reached /*wpm.yaw_reached &&*/ && !wpm.idle)
+ {
+ if (wpm.current_active_wp_id < wpm.size)
+ {
+ mavlink_waypoint_t *cur_wp = &(wpm.waypoints[wpm.current_active_wp_id]);
+
+ if (wpm.timestamp_firstinside_orbit == 0)
+ {
+ // Announce that last waypoint was reached
+ // if (verbose) // printf("*** Reached waypoint %u ***\n", cur_wp->seq);
+ mavlink_wpm_send_waypoint_reached(cur_wp->seq);
+ wpm.timestamp_firstinside_orbit = now;
+ }
+
+ // check if the MAV was long enough inside the waypoint orbit
+ //if (now-timestamp_lastoutside_orbit > (cur_wp->hold_time*1000))
+ if(now-wpm.timestamp_firstinside_orbit >= cur_wp->param2*1000)
+ {
+ if (cur_wp->autocontinue)
+ {
+ cur_wp->current = 0;
+ if (wpm.current_active_wp_id == wpm.size - 1 && wpm.size > 1)
+ {
+ //the last waypoint was reached, if auto continue is
+ //activated restart the waypoint list from the beginning
+ wpm.current_active_wp_id = 1;
+ }
+ else
+ {
+ if ((uint16_t)(wpm.current_active_wp_id + 1) < wpm.size)
+ wpm.current_active_wp_id++;
+ }
+
+ // Fly to next waypoint
+ wpm.timestamp_firstinside_orbit = 0;
+ mavlink_wpm_send_waypoint_current(wpm.current_active_wp_id);
+ mavlink_wpm_send_setpoint(wpm.current_active_wp_id);
+ wpm.waypoints[wpm.current_active_wp_id].current = true;
+ wpm.pos_reached = false;
+ wpm.yaw_reached = false;
+ // if (verbose) // printf("Set new waypoint (%u)\n", wpm.current_active_wp_id);
+ }
+ }
+ }
+ }
+ else
+ {
+ wpm.timestamp_lastoutside_orbit = now;
+ }
+}
+
diff --git a/thirdParty/mavlink/missionlib/waypoints.h b/thirdParty/mavlink/missionlib/waypoints.h
new file mode 100644
index 0000000000000000000000000000000000000000..4bc32a14a4368cf68e2dd69b60b027c8a93f4e65
--- /dev/null
+++ b/thirdParty/mavlink/missionlib/waypoints.h
@@ -0,0 +1,91 @@
+/*******************************************************************************
+
+ Copyright (C) 2011 Lorenz Meier lm ( a t ) inf.ethz.ch
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+ ****************************************************************************/
+
+/* This assumes you have the mavlink headers on your include path
+ or in the same folder as this source file */
+#include
+#include
+
+// FIXME XXX - TO BE MOVED TO XML
+enum MAVLINK_WPM_STATES
+{
+ MAVLINK_WPM_STATE_IDLE = 0,
+ MAVLINK_WPM_STATE_SENDLIST,
+ MAVLINK_WPM_STATE_SENDLIST_SENDWPS,
+ MAVLINK_WPM_STATE_GETLIST,
+ MAVLINK_WPM_STATE_GETLIST_GETWPS,
+ MAVLINK_WPM_STATE_GETLIST_GOTALL,
+ MAVLINK_WPM_STATE_ENUM_END
+};
+
+enum MAVLINK_WPM_CODES
+{
+ MAVLINK_WPM_CODE_OK = 0,
+ MAVLINK_WPM_CODE_ERR_WAYPOINT_ACTION_NOT_SUPPORTED,
+ MAVLINK_WPM_CODE_ERR_WAYPOINT_FRAME_NOT_SUPPORTED,
+ MAVLINK_WPM_CODE_ERR_WAYPOINT_OUT_OF_BOUNDS,
+ MAVLINK_WPM_CODE_ERR_WAYPOINT_MAX_NUMBER_EXCEEDED,
+ MAVLINK_WPM_CODE_ENUM_END
+};
+
+
+/* WAYPOINT MANAGER - MISSION LIB */
+
+#define MAVLINK_WPM_MAX_WP_COUNT 100
+#define MAVLINK_WPM_CONFIG_IN_FLIGHT_UPDATE ///< Enable double buffer and in-flight updates
+#define MAVLINK_WPM_TEXT_FEEDBACK 1 ///< Report back status information as text
+#define MAVLINK_WPM_SYSTEM_ID 1
+#define MAVLINK_WPM_COMPONENT_ID 1
+#define MAVLINK_WPM_PROTOCOL_TIMEOUT_DEFAULT 2000000
+#define MAVLINK_WPM_SETPOINT_DELAY_DEFAULT 1000000
+#define MAVLINK_WPM_PROTOCOL_DELAY_DEFAULT 40
+
+
+struct mavlink_wpm_storage {
+ mavlink_waypoint_t waypoints[MAVLINK_WPM_MAX_WP_COUNT]; ///< Currently active waypoints
+#ifdef MAVLINK_WPM_CONFIG_IN_FLIGHT_UPDATE
+ mavlink_waypoint_t rcv_waypoints[MAVLINK_WPM_MAX_WP_COUNT]; ///< Receive buffer for next waypoints
+#endif
+ uint16_t size;
+ uint16_t max_size;
+ uint16_t rcv_size;
+ enum MAVLINK_WPM_STATES current_state;
+ uint16_t current_wp_id; ///< Waypoint in current transmission
+ uint16_t current_active_wp_id; ///< Waypoint the system is currently heading towards
+ uint16_t current_count;
+ uint8_t current_partner_sysid;
+ uint8_t current_partner_compid;
+ uint64_t timestamp_lastaction;
+ uint64_t timestamp_last_send_setpoint;
+ uint64_t timestamp_firstinside_orbit;
+ uint64_t timestamp_lastoutside_orbit;
+ uint32_t timeout;
+ uint32_t delay_setpoint;
+ float accept_range_yaw;
+ float accept_range_distance;
+ bool yaw_reached;
+ bool pos_reached;
+ bool idle;
+};
+
+typedef struct mavlink_wpm_storage mavlink_wpm_storage;
+
+void mavlink_wpm_init(mavlink_wpm_storage* state);
+
+void mavlink_wpm_message_handler(const mavlink_message_t* msg);
\ No newline at end of file