|
@@ -19,11 +19,13 @@ typedef struct __mavlink_vk_formation_leader_t {
|
|
int16_t z_dist; /*< [cm] distance between drones in z axis*/
|
|
int16_t z_dist; /*< [cm] distance between drones in z axis*/
|
|
uint16_t rect_col_num; /*< columns number of rectangle formation*/
|
|
uint16_t rect_col_num; /*< columns number of rectangle formation*/
|
|
uint8_t formation_type; /*< formation type*/
|
|
uint8_t formation_type; /*< formation type*/
|
|
|
|
+ uint8_t formation_heading; /*< [deg] if nan, use yaw as formation
|
|
|
|
+ heading*/
|
|
} mavlink_vk_formation_leader_t;
|
|
} mavlink_vk_formation_leader_t;
|
|
|
|
|
|
-#define MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN 45
|
|
|
|
|
|
+#define MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN 46
|
|
#define MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN 45
|
|
#define MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN 45
|
|
-#define MAVLINK_MSG_ID_53004_LEN 45
|
|
|
|
|
|
+#define MAVLINK_MSG_ID_53004_LEN 46
|
|
#define MAVLINK_MSG_ID_53004_MIN_LEN 45
|
|
#define MAVLINK_MSG_ID_53004_MIN_LEN 45
|
|
|
|
|
|
#define MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC 219
|
|
#define MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC 219
|
|
@@ -35,7 +37,7 @@ typedef struct __mavlink_vk_formation_leader_t {
|
|
#define MAVLINK_MESSAGE_INFO_VK_FORMATION_LEADER { \
|
|
#define MAVLINK_MESSAGE_INFO_VK_FORMATION_LEADER { \
|
|
53004, \
|
|
53004, \
|
|
"VK_FORMATION_LEADER", \
|
|
"VK_FORMATION_LEADER", \
|
|
- 14, \
|
|
|
|
|
|
+ 15, \
|
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_formation_leader_t, timestamp) }, \
|
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_formation_leader_t, timestamp) }, \
|
|
{ "state", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_vk_formation_leader_t, state) }, \
|
|
{ "state", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_vk_formation_leader_t, state) }, \
|
|
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_formation_leader_t, lat) }, \
|
|
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_formation_leader_t, lat) }, \
|
|
@@ -50,12 +52,13 @@ typedef struct __mavlink_vk_formation_leader_t {
|
|
{ "y_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_vk_formation_leader_t, y_dist) }, \
|
|
{ "y_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_vk_formation_leader_t, y_dist) }, \
|
|
{ "z_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_vk_formation_leader_t, z_dist) }, \
|
|
{ "z_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_vk_formation_leader_t, z_dist) }, \
|
|
{ "rect_col_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_vk_formation_leader_t, rect_col_num) }, \
|
|
{ "rect_col_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_vk_formation_leader_t, rect_col_num) }, \
|
|
|
|
+ { "formation_heading", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_vk_formation_leader_t, formation_heading) }, \
|
|
} \
|
|
} \
|
|
}
|
|
}
|
|
#else
|
|
#else
|
|
#define MAVLINK_MESSAGE_INFO_VK_FORMATION_LEADER { \
|
|
#define MAVLINK_MESSAGE_INFO_VK_FORMATION_LEADER { \
|
|
"VK_FORMATION_LEADER", \
|
|
"VK_FORMATION_LEADER", \
|
|
- 14, \
|
|
|
|
|
|
+ 15, \
|
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_formation_leader_t, timestamp) }, \
|
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_formation_leader_t, timestamp) }, \
|
|
{ "state", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_vk_formation_leader_t, state) }, \
|
|
{ "state", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_vk_formation_leader_t, state) }, \
|
|
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_formation_leader_t, lat) }, \
|
|
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_formation_leader_t, lat) }, \
|
|
@@ -70,6 +73,7 @@ typedef struct __mavlink_vk_formation_leader_t {
|
|
{ "y_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_vk_formation_leader_t, y_dist) }, \
|
|
{ "y_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_vk_formation_leader_t, y_dist) }, \
|
|
{ "z_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_vk_formation_leader_t, z_dist) }, \
|
|
{ "z_dist", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_vk_formation_leader_t, z_dist) }, \
|
|
{ "rect_col_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_vk_formation_leader_t, rect_col_num) }, \
|
|
{ "rect_col_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_vk_formation_leader_t, rect_col_num) }, \
|
|
|
|
+ { "formation_heading", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_vk_formation_leader_t, formation_heading) }, \
|
|
} \
|
|
} \
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
@@ -94,10 +98,12 @@ typedef struct __mavlink_vk_formation_leader_t {
|
|
* @param y_dist [cm] distance between drones in y axis
|
|
* @param y_dist [cm] distance between drones in y axis
|
|
* @param z_dist [cm] distance between drones in z axis
|
|
* @param z_dist [cm] distance between drones in z axis
|
|
* @param rect_col_num columns number of rectangle formation
|
|
* @param rect_col_num columns number of rectangle formation
|
|
|
|
+ * @param formation_heading [deg] if nan, use yaw as formation
|
|
|
|
+ heading
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
- uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num)
|
|
|
|
|
|
+ uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, uint8_t formation_heading)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
@@ -115,6 +121,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack(uint8_t system_id, u
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
|
|
+ _mav_put_uint8_t(buf, 45, formation_heading);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
#else
|
|
#else
|
|
@@ -133,6 +140,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack(uint8_t system_id, u
|
|
packet.z_dist = z_dist;
|
|
packet.z_dist = z_dist;
|
|
packet.rect_col_num = rect_col_num;
|
|
packet.rect_col_num = rect_col_num;
|
|
packet.formation_type = formation_type;
|
|
packet.formation_type = formation_type;
|
|
|
|
+ packet.formation_heading = formation_heading;
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
#endif
|
|
#endif
|
|
@@ -162,10 +170,12 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack(uint8_t system_id, u
|
|
* @param y_dist [cm] distance between drones in y axis
|
|
* @param y_dist [cm] distance between drones in y axis
|
|
* @param z_dist [cm] distance between drones in z axis
|
|
* @param z_dist [cm] distance between drones in z axis
|
|
* @param rect_col_num columns number of rectangle formation
|
|
* @param rect_col_num columns number of rectangle formation
|
|
|
|
+ * @param formation_heading [deg] if nan, use yaw as formation
|
|
|
|
+ heading
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
- uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num)
|
|
|
|
|
|
+ uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, uint8_t formation_heading)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
@@ -183,6 +193,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack_status(uint8_t syste
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
|
|
+ _mav_put_uint8_t(buf, 45, formation_heading);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
#else
|
|
#else
|
|
@@ -201,6 +212,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack_status(uint8_t syste
|
|
packet.z_dist = z_dist;
|
|
packet.z_dist = z_dist;
|
|
packet.rect_col_num = rect_col_num;
|
|
packet.rect_col_num = rect_col_num;
|
|
packet.formation_type = formation_type;
|
|
packet.formation_type = formation_type;
|
|
|
|
+ packet.formation_heading = formation_heading;
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
#endif
|
|
#endif
|
|
@@ -233,11 +245,13 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack_status(uint8_t syste
|
|
* @param y_dist [cm] distance between drones in y axis
|
|
* @param y_dist [cm] distance between drones in y axis
|
|
* @param z_dist [cm] distance between drones in z axis
|
|
* @param z_dist [cm] distance between drones in z axis
|
|
* @param rect_col_num columns number of rectangle formation
|
|
* @param rect_col_num columns number of rectangle formation
|
|
|
|
+ * @param formation_heading [deg] if nan, use yaw as formation
|
|
|
|
+ heading
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
* @return length of the message in bytes (excluding serial stream start sign)
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
mavlink_message_t* msg,
|
|
mavlink_message_t* msg,
|
|
- uint32_t timestamp,uint32_t state,int32_t lat,int32_t lon,float msl,float ve,float vn,float vu,float yaw,uint8_t formation_type,int16_t x_dist,int16_t y_dist,int16_t z_dist,uint16_t rect_col_num)
|
|
|
|
|
|
+ uint32_t timestamp,uint32_t state,int32_t lat,int32_t lon,float msl,float ve,float vn,float vu,float yaw,uint8_t formation_type,int16_t x_dist,int16_t y_dist,int16_t z_dist,uint16_t rect_col_num,uint8_t formation_heading)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
@@ -255,6 +269,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack_chan(uint8_t system_
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
|
|
+ _mav_put_uint8_t(buf, 45, formation_heading);
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
#else
|
|
#else
|
|
@@ -273,6 +288,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack_chan(uint8_t system_
|
|
packet.z_dist = z_dist;
|
|
packet.z_dist = z_dist;
|
|
packet.rect_col_num = rect_col_num;
|
|
packet.rect_col_num = rect_col_num;
|
|
packet.formation_type = formation_type;
|
|
packet.formation_type = formation_type;
|
|
|
|
+ packet.formation_heading = formation_heading;
|
|
|
|
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
#endif
|
|
#endif
|
|
@@ -291,7 +307,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_pack_chan(uint8_t system_
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_formation_leader_t* vk_formation_leader)
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_formation_leader_t* vk_formation_leader)
|
|
{
|
|
{
|
|
- return mavlink_msg_vk_formation_leader_pack(system_id, component_id, msg, vk_formation_leader->timestamp, vk_formation_leader->state, vk_formation_leader->lat, vk_formation_leader->lon, vk_formation_leader->msl, vk_formation_leader->ve, vk_formation_leader->vn, vk_formation_leader->vu, vk_formation_leader->yaw, vk_formation_leader->formation_type, vk_formation_leader->x_dist, vk_formation_leader->y_dist, vk_formation_leader->z_dist, vk_formation_leader->rect_col_num);
|
|
|
|
|
|
+ return mavlink_msg_vk_formation_leader_pack(system_id, component_id, msg, vk_formation_leader->timestamp, vk_formation_leader->state, vk_formation_leader->lat, vk_formation_leader->lon, vk_formation_leader->msl, vk_formation_leader->ve, vk_formation_leader->vn, vk_formation_leader->vu, vk_formation_leader->yaw, vk_formation_leader->formation_type, vk_formation_leader->x_dist, vk_formation_leader->y_dist, vk_formation_leader->z_dist, vk_formation_leader->rect_col_num, vk_formation_leader->formation_heading);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -305,7 +321,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_encode(uint8_t system_id,
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_formation_leader_t* vk_formation_leader)
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_formation_leader_t* vk_formation_leader)
|
|
{
|
|
{
|
|
- return mavlink_msg_vk_formation_leader_pack_chan(system_id, component_id, chan, msg, vk_formation_leader->timestamp, vk_formation_leader->state, vk_formation_leader->lat, vk_formation_leader->lon, vk_formation_leader->msl, vk_formation_leader->ve, vk_formation_leader->vn, vk_formation_leader->vu, vk_formation_leader->yaw, vk_formation_leader->formation_type, vk_formation_leader->x_dist, vk_formation_leader->y_dist, vk_formation_leader->z_dist, vk_formation_leader->rect_col_num);
|
|
|
|
|
|
+ return mavlink_msg_vk_formation_leader_pack_chan(system_id, component_id, chan, msg, vk_formation_leader->timestamp, vk_formation_leader->state, vk_formation_leader->lat, vk_formation_leader->lon, vk_formation_leader->msl, vk_formation_leader->ve, vk_formation_leader->vn, vk_formation_leader->vu, vk_formation_leader->yaw, vk_formation_leader->formation_type, vk_formation_leader->x_dist, vk_formation_leader->y_dist, vk_formation_leader->z_dist, vk_formation_leader->rect_col_num, vk_formation_leader->formation_heading);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -319,7 +335,7 @@ static inline uint16_t mavlink_msg_vk_formation_leader_encode_chan(uint8_t syste
|
|
*/
|
|
*/
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_formation_leader_t* vk_formation_leader)
|
|
static inline uint16_t mavlink_msg_vk_formation_leader_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_formation_leader_t* vk_formation_leader)
|
|
{
|
|
{
|
|
- return mavlink_msg_vk_formation_leader_pack_status(system_id, component_id, _status, msg, vk_formation_leader->timestamp, vk_formation_leader->state, vk_formation_leader->lat, vk_formation_leader->lon, vk_formation_leader->msl, vk_formation_leader->ve, vk_formation_leader->vn, vk_formation_leader->vu, vk_formation_leader->yaw, vk_formation_leader->formation_type, vk_formation_leader->x_dist, vk_formation_leader->y_dist, vk_formation_leader->z_dist, vk_formation_leader->rect_col_num);
|
|
|
|
|
|
+ return mavlink_msg_vk_formation_leader_pack_status(system_id, component_id, _status, msg, vk_formation_leader->timestamp, vk_formation_leader->state, vk_formation_leader->lat, vk_formation_leader->lon, vk_formation_leader->msl, vk_formation_leader->ve, vk_formation_leader->vn, vk_formation_leader->vu, vk_formation_leader->yaw, vk_formation_leader->formation_type, vk_formation_leader->x_dist, vk_formation_leader->y_dist, vk_formation_leader->z_dist, vk_formation_leader->rect_col_num, vk_formation_leader->formation_heading);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -340,10 +356,12 @@ static inline uint16_t mavlink_msg_vk_formation_leader_encode_status(uint8_t sys
|
|
* @param y_dist [cm] distance between drones in y axis
|
|
* @param y_dist [cm] distance between drones in y axis
|
|
* @param z_dist [cm] distance between drones in z axis
|
|
* @param z_dist [cm] distance between drones in z axis
|
|
* @param rect_col_num columns number of rectangle formation
|
|
* @param rect_col_num columns number of rectangle formation
|
|
|
|
+ * @param formation_heading [deg] if nan, use yaw as formation
|
|
|
|
+ heading
|
|
*/
|
|
*/
|
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
|
|
|
|
-static inline void mavlink_msg_vk_formation_leader_send(mavlink_channel_t chan, uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num)
|
|
|
|
|
|
+static inline void mavlink_msg_vk_formation_leader_send(mavlink_channel_t chan, uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, uint8_t formation_heading)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
char buf[MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN];
|
|
@@ -361,6 +379,7 @@ static inline void mavlink_msg_vk_formation_leader_send(mavlink_channel_t chan,
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
|
|
+ _mav_put_uint8_t(buf, 45, formation_heading);
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
#else
|
|
#else
|
|
@@ -379,6 +398,7 @@ static inline void mavlink_msg_vk_formation_leader_send(mavlink_channel_t chan,
|
|
packet.z_dist = z_dist;
|
|
packet.z_dist = z_dist;
|
|
packet.rect_col_num = rect_col_num;
|
|
packet.rect_col_num = rect_col_num;
|
|
packet.formation_type = formation_type;
|
|
packet.formation_type = formation_type;
|
|
|
|
+ packet.formation_heading = formation_heading;
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, (const char *)&packet, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, (const char *)&packet, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
#endif
|
|
#endif
|
|
@@ -392,7 +412,7 @@ static inline void mavlink_msg_vk_formation_leader_send(mavlink_channel_t chan,
|
|
static inline void mavlink_msg_vk_formation_leader_send_struct(mavlink_channel_t chan, const mavlink_vk_formation_leader_t* vk_formation_leader)
|
|
static inline void mavlink_msg_vk_formation_leader_send_struct(mavlink_channel_t chan, const mavlink_vk_formation_leader_t* vk_formation_leader)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
- mavlink_msg_vk_formation_leader_send(chan, vk_formation_leader->timestamp, vk_formation_leader->state, vk_formation_leader->lat, vk_formation_leader->lon, vk_formation_leader->msl, vk_formation_leader->ve, vk_formation_leader->vn, vk_formation_leader->vu, vk_formation_leader->yaw, vk_formation_leader->formation_type, vk_formation_leader->x_dist, vk_formation_leader->y_dist, vk_formation_leader->z_dist, vk_formation_leader->rect_col_num);
|
|
|
|
|
|
+ mavlink_msg_vk_formation_leader_send(chan, vk_formation_leader->timestamp, vk_formation_leader->state, vk_formation_leader->lat, vk_formation_leader->lon, vk_formation_leader->msl, vk_formation_leader->ve, vk_formation_leader->vn, vk_formation_leader->vu, vk_formation_leader->yaw, vk_formation_leader->formation_type, vk_formation_leader->x_dist, vk_formation_leader->y_dist, vk_formation_leader->z_dist, vk_formation_leader->rect_col_num, vk_formation_leader->formation_heading);
|
|
#else
|
|
#else
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, (const char *)vk_formation_leader, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, (const char *)vk_formation_leader, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
#endif
|
|
#endif
|
|
@@ -406,7 +426,7 @@ static inline void mavlink_msg_vk_formation_leader_send_struct(mavlink_channel_t
|
|
is usually the receive buffer for the channel, and allows a reply to an
|
|
is usually the receive buffer for the channel, and allows a reply to an
|
|
incoming message with minimum stack space usage.
|
|
incoming message with minimum stack space usage.
|
|
*/
|
|
*/
|
|
-static inline void mavlink_msg_vk_formation_leader_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num)
|
|
|
|
|
|
+static inline void mavlink_msg_vk_formation_leader_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t timestamp, uint32_t state, int32_t lat, int32_t lon, float msl, float ve, float vn, float vu, float yaw, uint8_t formation_type, int16_t x_dist, int16_t y_dist, int16_t z_dist, uint16_t rect_col_num, uint8_t formation_heading)
|
|
{
|
|
{
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
char *buf = (char *)msgbuf;
|
|
char *buf = (char *)msgbuf;
|
|
@@ -424,6 +444,7 @@ static inline void mavlink_msg_vk_formation_leader_send_buf(mavlink_message_t *m
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
_mav_put_int16_t(buf, 40, z_dist);
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
_mav_put_uint16_t(buf, 42, rect_col_num);
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
_mav_put_uint8_t(buf, 44, formation_type);
|
|
|
|
+ _mav_put_uint8_t(buf, 45, formation_heading);
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, buf, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
#else
|
|
#else
|
|
@@ -442,6 +463,7 @@ static inline void mavlink_msg_vk_formation_leader_send_buf(mavlink_message_t *m
|
|
packet->z_dist = z_dist;
|
|
packet->z_dist = z_dist;
|
|
packet->rect_col_num = rect_col_num;
|
|
packet->rect_col_num = rect_col_num;
|
|
packet->formation_type = formation_type;
|
|
packet->formation_type = formation_type;
|
|
|
|
+ packet->formation_heading = formation_heading;
|
|
|
|
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, (const char *)packet, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FORMATION_LEADER, (const char *)packet, MAVLINK_MSG_ID_VK_FORMATION_LEADER_MIN_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN, MAVLINK_MSG_ID_VK_FORMATION_LEADER_CRC);
|
|
#endif
|
|
#endif
|
|
@@ -593,6 +615,17 @@ static inline uint16_t mavlink_msg_vk_formation_leader_get_rect_col_num(const ma
|
|
return _MAV_RETURN_uint16_t(msg, 42);
|
|
return _MAV_RETURN_uint16_t(msg, 42);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * @brief Get field formation_heading from vk_formation_leader message
|
|
|
|
+ *
|
|
|
|
+ * @return [deg] if nan, use yaw as formation
|
|
|
|
+ heading
|
|
|
|
+ */
|
|
|
|
+static inline uint8_t mavlink_msg_vk_formation_leader_get_formation_heading(const mavlink_message_t* msg)
|
|
|
|
+{
|
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 45);
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @brief Decode a vk_formation_leader message into a struct
|
|
* @brief Decode a vk_formation_leader message into a struct
|
|
*
|
|
*
|
|
@@ -616,6 +649,7 @@ static inline void mavlink_msg_vk_formation_leader_decode(const mavlink_message_
|
|
vk_formation_leader->z_dist = mavlink_msg_vk_formation_leader_get_z_dist(msg);
|
|
vk_formation_leader->z_dist = mavlink_msg_vk_formation_leader_get_z_dist(msg);
|
|
vk_formation_leader->rect_col_num = mavlink_msg_vk_formation_leader_get_rect_col_num(msg);
|
|
vk_formation_leader->rect_col_num = mavlink_msg_vk_formation_leader_get_rect_col_num(msg);
|
|
vk_formation_leader->formation_type = mavlink_msg_vk_formation_leader_get_formation_type(msg);
|
|
vk_formation_leader->formation_type = mavlink_msg_vk_formation_leader_get_formation_type(msg);
|
|
|
|
+ vk_formation_leader->formation_heading = mavlink_msg_vk_formation_leader_get_formation_heading(msg);
|
|
#else
|
|
#else
|
|
uint8_t len = msg->len < MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN? msg->len : MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN;
|
|
uint8_t len = msg->len < MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN? msg->len : MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN;
|
|
memset(vk_formation_leader, 0, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|
|
memset(vk_formation_leader, 0, MAVLINK_MSG_ID_VK_FORMATION_LEADER_LEN);
|