|
|
@@ -0,0 +1,706 @@
|
|
|
+#pragma once
|
|
|
+// MESSAGE VK_EXT_VISION_FUSION PACKING
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_EXT_VISION_FUSION 53111
|
|
|
+
|
|
|
+
|
|
|
+typedef struct __mavlink_vk_ext_vision_fusion_t {
|
|
|
+ uint32_t timestamp; /*< [ms] timestamp from system boot*/
|
|
|
+ float pos_frd[3]; /*< [m] position in vision frd frame*/
|
|
|
+ float vel_frd[3]; /*< [m/s] velocity in vision frd frame*/
|
|
|
+ float Q_g[4]; /*< attitude quaternion by FRD_NED */
|
|
|
+ int32_t lat; /*< latitidue*/
|
|
|
+ int32_t lon; /*< longitude*/
|
|
|
+ float alt_amsl; /*< amsl latitidue*/
|
|
|
+ float hR; /*< relative altitude*/
|
|
|
+ float vel_ned[3]; /*< [m/s] velocity in NED frame*/
|
|
|
+ float bias_acc[3]; /*< [m/s/s] acceleration bias in body XYZ*/
|
|
|
+ float bias_gyr[3]; /*< [rad/s] gyroscope bias in body XYZ*/
|
|
|
+ float cov_att[3]; /*< [rad] attitude covariance*/
|
|
|
+ float cov_pos[3]; /*< [m] position covariance*/
|
|
|
+ float cov_vel[3]; /*< [m/s] */
|
|
|
+ uint8_t unhealthy; /*< unhealthy flag*/
|
|
|
+ uint8_t flag; /*< work status flag*/
|
|
|
+ uint8_t reset_cnt; /*< reset count*/
|
|
|
+} mavlink_vk_ext_vision_fusion_t;
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN 135
|
|
|
+#define MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_MIN_LEN 135
|
|
|
+#define MAVLINK_MSG_ID_53111_LEN 135
|
|
|
+#define MAVLINK_MSG_ID_53111_MIN_LEN 135
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_CRC 188
|
|
|
+#define MAVLINK_MSG_ID_53111_CRC 188
|
|
|
+
|
|
|
+#define MAVLINK_MSG_VK_EXT_VISION_FUSION_FIELD_POS_FRD_LEN 3
|
|
|
+#define MAVLINK_MSG_VK_EXT_VISION_FUSION_FIELD_VEL_FRD_LEN 3
|
|
|
+#define MAVLINK_MSG_VK_EXT_VISION_FUSION_FIELD_Q_G_LEN 4
|
|
|
+#define MAVLINK_MSG_VK_EXT_VISION_FUSION_FIELD_VEL_NED_LEN 3
|
|
|
+#define MAVLINK_MSG_VK_EXT_VISION_FUSION_FIELD_BIAS_ACC_LEN 3
|
|
|
+#define MAVLINK_MSG_VK_EXT_VISION_FUSION_FIELD_BIAS_GYR_LEN 3
|
|
|
+#define MAVLINK_MSG_VK_EXT_VISION_FUSION_FIELD_COV_ATT_LEN 3
|
|
|
+#define MAVLINK_MSG_VK_EXT_VISION_FUSION_FIELD_COV_POS_LEN 3
|
|
|
+#define MAVLINK_MSG_VK_EXT_VISION_FUSION_FIELD_COV_VEL_LEN 3
|
|
|
+
|
|
|
+#if MAVLINK_COMMAND_24BIT
|
|
|
+#define MAVLINK_MESSAGE_INFO_VK_EXT_VISION_FUSION { \
|
|
|
+ 53111, \
|
|
|
+ "VK_EXT_VISION_FUSION", \
|
|
|
+ 17, \
|
|
|
+ { { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_ext_vision_fusion_t, timestamp) }, \
|
|
|
+ { "pos_frd", NULL, MAVLINK_TYPE_FLOAT, 3, 4, offsetof(mavlink_vk_ext_vision_fusion_t, pos_frd) }, \
|
|
|
+ { "vel_frd", NULL, MAVLINK_TYPE_FLOAT, 3, 16, offsetof(mavlink_vk_ext_vision_fusion_t, vel_frd) }, \
|
|
|
+ { "Q_g", NULL, MAVLINK_TYPE_FLOAT, 4, 28, offsetof(mavlink_vk_ext_vision_fusion_t, Q_g) }, \
|
|
|
+ { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 44, offsetof(mavlink_vk_ext_vision_fusion_t, lat) }, \
|
|
|
+ { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 48, offsetof(mavlink_vk_ext_vision_fusion_t, lon) }, \
|
|
|
+ { "alt_amsl", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_vk_ext_vision_fusion_t, alt_amsl) }, \
|
|
|
+ { "hR", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_vk_ext_vision_fusion_t, hR) }, \
|
|
|
+ { "vel_ned", NULL, MAVLINK_TYPE_FLOAT, 3, 60, offsetof(mavlink_vk_ext_vision_fusion_t, vel_ned) }, \
|
|
|
+ { "bias_acc", NULL, MAVLINK_TYPE_FLOAT, 3, 72, offsetof(mavlink_vk_ext_vision_fusion_t, bias_acc) }, \
|
|
|
+ { "bias_gyr", NULL, MAVLINK_TYPE_FLOAT, 3, 84, offsetof(mavlink_vk_ext_vision_fusion_t, bias_gyr) }, \
|
|
|
+ { "cov_att", NULL, MAVLINK_TYPE_FLOAT, 3, 96, offsetof(mavlink_vk_ext_vision_fusion_t, cov_att) }, \
|
|
|
+ { "cov_pos", NULL, MAVLINK_TYPE_FLOAT, 3, 108, offsetof(mavlink_vk_ext_vision_fusion_t, cov_pos) }, \
|
|
|
+ { "cov_vel", NULL, MAVLINK_TYPE_FLOAT, 3, 120, offsetof(mavlink_vk_ext_vision_fusion_t, cov_vel) }, \
|
|
|
+ { "unhealthy", NULL, MAVLINK_TYPE_UINT8_T, 0, 132, offsetof(mavlink_vk_ext_vision_fusion_t, unhealthy) }, \
|
|
|
+ { "flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 133, offsetof(mavlink_vk_ext_vision_fusion_t, flag) }, \
|
|
|
+ { "reset_cnt", NULL, MAVLINK_TYPE_UINT8_T, 0, 134, offsetof(mavlink_vk_ext_vision_fusion_t, reset_cnt) }, \
|
|
|
+ } \
|
|
|
+}
|
|
|
+#else
|
|
|
+#define MAVLINK_MESSAGE_INFO_VK_EXT_VISION_FUSION { \
|
|
|
+ "VK_EXT_VISION_FUSION", \
|
|
|
+ 17, \
|
|
|
+ { { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_ext_vision_fusion_t, timestamp) }, \
|
|
|
+ { "pos_frd", NULL, MAVLINK_TYPE_FLOAT, 3, 4, offsetof(mavlink_vk_ext_vision_fusion_t, pos_frd) }, \
|
|
|
+ { "vel_frd", NULL, MAVLINK_TYPE_FLOAT, 3, 16, offsetof(mavlink_vk_ext_vision_fusion_t, vel_frd) }, \
|
|
|
+ { "Q_g", NULL, MAVLINK_TYPE_FLOAT, 4, 28, offsetof(mavlink_vk_ext_vision_fusion_t, Q_g) }, \
|
|
|
+ { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 44, offsetof(mavlink_vk_ext_vision_fusion_t, lat) }, \
|
|
|
+ { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 48, offsetof(mavlink_vk_ext_vision_fusion_t, lon) }, \
|
|
|
+ { "alt_amsl", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_vk_ext_vision_fusion_t, alt_amsl) }, \
|
|
|
+ { "hR", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_vk_ext_vision_fusion_t, hR) }, \
|
|
|
+ { "vel_ned", NULL, MAVLINK_TYPE_FLOAT, 3, 60, offsetof(mavlink_vk_ext_vision_fusion_t, vel_ned) }, \
|
|
|
+ { "bias_acc", NULL, MAVLINK_TYPE_FLOAT, 3, 72, offsetof(mavlink_vk_ext_vision_fusion_t, bias_acc) }, \
|
|
|
+ { "bias_gyr", NULL, MAVLINK_TYPE_FLOAT, 3, 84, offsetof(mavlink_vk_ext_vision_fusion_t, bias_gyr) }, \
|
|
|
+ { "cov_att", NULL, MAVLINK_TYPE_FLOAT, 3, 96, offsetof(mavlink_vk_ext_vision_fusion_t, cov_att) }, \
|
|
|
+ { "cov_pos", NULL, MAVLINK_TYPE_FLOAT, 3, 108, offsetof(mavlink_vk_ext_vision_fusion_t, cov_pos) }, \
|
|
|
+ { "cov_vel", NULL, MAVLINK_TYPE_FLOAT, 3, 120, offsetof(mavlink_vk_ext_vision_fusion_t, cov_vel) }, \
|
|
|
+ { "unhealthy", NULL, MAVLINK_TYPE_UINT8_T, 0, 132, offsetof(mavlink_vk_ext_vision_fusion_t, unhealthy) }, \
|
|
|
+ { "flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 133, offsetof(mavlink_vk_ext_vision_fusion_t, flag) }, \
|
|
|
+ { "reset_cnt", NULL, MAVLINK_TYPE_UINT8_T, 0, 134, offsetof(mavlink_vk_ext_vision_fusion_t, reset_cnt) }, \
|
|
|
+ } \
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_ext_vision_fusion 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 timestamp [ms] timestamp from system boot
|
|
|
+ * @param pos_frd [m] position in vision frd frame
|
|
|
+ * @param vel_frd [m/s] velocity in vision frd frame
|
|
|
+ * @param Q_g attitude quaternion by FRD_NED
|
|
|
+ * @param lat latitidue
|
|
|
+ * @param lon longitude
|
|
|
+ * @param alt_amsl amsl latitidue
|
|
|
+ * @param hR relative altitude
|
|
|
+ * @param vel_ned [m/s] velocity in NED frame
|
|
|
+ * @param bias_acc [m/s/s] acceleration bias in body XYZ
|
|
|
+ * @param bias_gyr [rad/s] gyroscope bias in body XYZ
|
|
|
+ * @param cov_att [rad] attitude covariance
|
|
|
+ * @param cov_pos [m] position covariance
|
|
|
+ * @param cov_vel [m/s]
|
|
|
+ * @param unhealthy unhealthy flag
|
|
|
+ * @param flag work status flag
|
|
|
+ * @param reset_cnt reset count
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
|
+ uint32_t timestamp, const float *pos_frd, const float *vel_frd, const float *Q_g, int32_t lat, int32_t lon, float alt_amsl, float hR, const float *vel_ned, const float *bias_acc, const float *bias_gyr, const float *cov_att, const float *cov_pos, const float *cov_vel, uint8_t unhealthy, uint8_t flag, uint8_t reset_cnt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_int32_t(buf, 44, lat);
|
|
|
+ _mav_put_int32_t(buf, 48, lon);
|
|
|
+ _mav_put_float(buf, 52, alt_amsl);
|
|
|
+ _mav_put_float(buf, 56, hR);
|
|
|
+ _mav_put_uint8_t(buf, 132, unhealthy);
|
|
|
+ _mav_put_uint8_t(buf, 133, flag);
|
|
|
+ _mav_put_uint8_t(buf, 134, reset_cnt);
|
|
|
+ _mav_put_float_array(buf, 4, pos_frd, 3);
|
|
|
+ _mav_put_float_array(buf, 16, vel_frd, 3);
|
|
|
+ _mav_put_float_array(buf, 28, Q_g, 4);
|
|
|
+ _mav_put_float_array(buf, 60, vel_ned, 3);
|
|
|
+ _mav_put_float_array(buf, 72, bias_acc, 3);
|
|
|
+ _mav_put_float_array(buf, 84, bias_gyr, 3);
|
|
|
+ _mav_put_float_array(buf, 96, cov_att, 3);
|
|
|
+ _mav_put_float_array(buf, 108, cov_pos, 3);
|
|
|
+ _mav_put_float_array(buf, 120, cov_vel, 3);
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_ext_vision_fusion_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.alt_amsl = alt_amsl;
|
|
|
+ packet.hR = hR;
|
|
|
+ packet.unhealthy = unhealthy;
|
|
|
+ packet.flag = flag;
|
|
|
+ packet.reset_cnt = reset_cnt;
|
|
|
+ mav_array_memcpy(packet.pos_frd, pos_frd, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.vel_frd, vel_frd, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.Q_g, Q_g, sizeof(float)*4);
|
|
|
+ mav_array_memcpy(packet.vel_ned, vel_ned, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.bias_acc, bias_acc, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.bias_gyr, bias_gyr, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_att, cov_att, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_pos, cov_pos, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_vel, cov_vel, sizeof(float)*3);
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_EXT_VISION_FUSION;
|
|
|
+ return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_MIN_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_CRC);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_ext_vision_fusion message
|
|
|
+ * @param system_id ID of this system
|
|
|
+ * @param component_id ID of this component (e.g. 200 for IMU)
|
|
|
+ * @param status MAVLink status structure
|
|
|
+ * @param msg The MAVLink message to compress the data into
|
|
|
+ *
|
|
|
+ * @param timestamp [ms] timestamp from system boot
|
|
|
+ * @param pos_frd [m] position in vision frd frame
|
|
|
+ * @param vel_frd [m/s] velocity in vision frd frame
|
|
|
+ * @param Q_g attitude quaternion by FRD_NED
|
|
|
+ * @param lat latitidue
|
|
|
+ * @param lon longitude
|
|
|
+ * @param alt_amsl amsl latitidue
|
|
|
+ * @param hR relative altitude
|
|
|
+ * @param vel_ned [m/s] velocity in NED frame
|
|
|
+ * @param bias_acc [m/s/s] acceleration bias in body XYZ
|
|
|
+ * @param bias_gyr [rad/s] gyroscope bias in body XYZ
|
|
|
+ * @param cov_att [rad] attitude covariance
|
|
|
+ * @param cov_pos [m] position covariance
|
|
|
+ * @param cov_vel [m/s]
|
|
|
+ * @param unhealthy unhealthy flag
|
|
|
+ * @param flag work status flag
|
|
|
+ * @param reset_cnt reset count
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
|
+ uint32_t timestamp, const float *pos_frd, const float *vel_frd, const float *Q_g, int32_t lat, int32_t lon, float alt_amsl, float hR, const float *vel_ned, const float *bias_acc, const float *bias_gyr, const float *cov_att, const float *cov_pos, const float *cov_vel, uint8_t unhealthy, uint8_t flag, uint8_t reset_cnt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_int32_t(buf, 44, lat);
|
|
|
+ _mav_put_int32_t(buf, 48, lon);
|
|
|
+ _mav_put_float(buf, 52, alt_amsl);
|
|
|
+ _mav_put_float(buf, 56, hR);
|
|
|
+ _mav_put_uint8_t(buf, 132, unhealthy);
|
|
|
+ _mav_put_uint8_t(buf, 133, flag);
|
|
|
+ _mav_put_uint8_t(buf, 134, reset_cnt);
|
|
|
+ _mav_put_float_array(buf, 4, pos_frd, 3);
|
|
|
+ _mav_put_float_array(buf, 16, vel_frd, 3);
|
|
|
+ _mav_put_float_array(buf, 28, Q_g, 4);
|
|
|
+ _mav_put_float_array(buf, 60, vel_ned, 3);
|
|
|
+ _mav_put_float_array(buf, 72, bias_acc, 3);
|
|
|
+ _mav_put_float_array(buf, 84, bias_gyr, 3);
|
|
|
+ _mav_put_float_array(buf, 96, cov_att, 3);
|
|
|
+ _mav_put_float_array(buf, 108, cov_pos, 3);
|
|
|
+ _mav_put_float_array(buf, 120, cov_vel, 3);
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_ext_vision_fusion_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.alt_amsl = alt_amsl;
|
|
|
+ packet.hR = hR;
|
|
|
+ packet.unhealthy = unhealthy;
|
|
|
+ packet.flag = flag;
|
|
|
+ packet.reset_cnt = reset_cnt;
|
|
|
+ mav_array_memcpy(packet.pos_frd, pos_frd, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.vel_frd, vel_frd, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.Q_g, Q_g, sizeof(float)*4);
|
|
|
+ mav_array_memcpy(packet.vel_ned, vel_ned, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.bias_acc, bias_acc, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.bias_gyr, bias_gyr, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_att, cov_att, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_pos, cov_pos, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_vel, cov_vel, sizeof(float)*3);
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_EXT_VISION_FUSION;
|
|
|
+#if MAVLINK_CRC_EXTRA
|
|
|
+ return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_MIN_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_CRC);
|
|
|
+#else
|
|
|
+ return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_MIN_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_ext_vision_fusion message on a channel
|
|
|
+ * @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 will be sent over
|
|
|
+ * @param msg The MAVLink message to compress the data into
|
|
|
+ * @param timestamp [ms] timestamp from system boot
|
|
|
+ * @param pos_frd [m] position in vision frd frame
|
|
|
+ * @param vel_frd [m/s] velocity in vision frd frame
|
|
|
+ * @param Q_g attitude quaternion by FRD_NED
|
|
|
+ * @param lat latitidue
|
|
|
+ * @param lon longitude
|
|
|
+ * @param alt_amsl amsl latitidue
|
|
|
+ * @param hR relative altitude
|
|
|
+ * @param vel_ned [m/s] velocity in NED frame
|
|
|
+ * @param bias_acc [m/s/s] acceleration bias in body XYZ
|
|
|
+ * @param bias_gyr [rad/s] gyroscope bias in body XYZ
|
|
|
+ * @param cov_att [rad] attitude covariance
|
|
|
+ * @param cov_pos [m] position covariance
|
|
|
+ * @param cov_vel [m/s]
|
|
|
+ * @param unhealthy unhealthy flag
|
|
|
+ * @param flag work status flag
|
|
|
+ * @param reset_cnt reset count
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
|
+ mavlink_message_t* msg,
|
|
|
+ uint32_t timestamp,const float *pos_frd,const float *vel_frd,const float *Q_g,int32_t lat,int32_t lon,float alt_amsl,float hR,const float *vel_ned,const float *bias_acc,const float *bias_gyr,const float *cov_att,const float *cov_pos,const float *cov_vel,uint8_t unhealthy,uint8_t flag,uint8_t reset_cnt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_int32_t(buf, 44, lat);
|
|
|
+ _mav_put_int32_t(buf, 48, lon);
|
|
|
+ _mav_put_float(buf, 52, alt_amsl);
|
|
|
+ _mav_put_float(buf, 56, hR);
|
|
|
+ _mav_put_uint8_t(buf, 132, unhealthy);
|
|
|
+ _mav_put_uint8_t(buf, 133, flag);
|
|
|
+ _mav_put_uint8_t(buf, 134, reset_cnt);
|
|
|
+ _mav_put_float_array(buf, 4, pos_frd, 3);
|
|
|
+ _mav_put_float_array(buf, 16, vel_frd, 3);
|
|
|
+ _mav_put_float_array(buf, 28, Q_g, 4);
|
|
|
+ _mav_put_float_array(buf, 60, vel_ned, 3);
|
|
|
+ _mav_put_float_array(buf, 72, bias_acc, 3);
|
|
|
+ _mav_put_float_array(buf, 84, bias_gyr, 3);
|
|
|
+ _mav_put_float_array(buf, 96, cov_att, 3);
|
|
|
+ _mav_put_float_array(buf, 108, cov_pos, 3);
|
|
|
+ _mav_put_float_array(buf, 120, cov_vel, 3);
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_ext_vision_fusion_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.alt_amsl = alt_amsl;
|
|
|
+ packet.hR = hR;
|
|
|
+ packet.unhealthy = unhealthy;
|
|
|
+ packet.flag = flag;
|
|
|
+ packet.reset_cnt = reset_cnt;
|
|
|
+ mav_array_memcpy(packet.pos_frd, pos_frd, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.vel_frd, vel_frd, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.Q_g, Q_g, sizeof(float)*4);
|
|
|
+ mav_array_memcpy(packet.vel_ned, vel_ned, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.bias_acc, bias_acc, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.bias_gyr, bias_gyr, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_att, cov_att, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_pos, cov_pos, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_vel, cov_vel, sizeof(float)*3);
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_EXT_VISION_FUSION;
|
|
|
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_MIN_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_CRC);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_ext_vision_fusion struct
|
|
|
+ *
|
|
|
+ * @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 vk_ext_vision_fusion C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_ext_vision_fusion_t* vk_ext_vision_fusion)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_ext_vision_fusion_pack(system_id, component_id, msg, vk_ext_vision_fusion->timestamp, vk_ext_vision_fusion->pos_frd, vk_ext_vision_fusion->vel_frd, vk_ext_vision_fusion->Q_g, vk_ext_vision_fusion->lat, vk_ext_vision_fusion->lon, vk_ext_vision_fusion->alt_amsl, vk_ext_vision_fusion->hR, vk_ext_vision_fusion->vel_ned, vk_ext_vision_fusion->bias_acc, vk_ext_vision_fusion->bias_gyr, vk_ext_vision_fusion->cov_att, vk_ext_vision_fusion->cov_pos, vk_ext_vision_fusion->cov_vel, vk_ext_vision_fusion->unhealthy, vk_ext_vision_fusion->flag, vk_ext_vision_fusion->reset_cnt);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_ext_vision_fusion struct on a channel
|
|
|
+ *
|
|
|
+ * @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 will be sent over
|
|
|
+ * @param msg The MAVLink message to compress the data into
|
|
|
+ * @param vk_ext_vision_fusion C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_ext_vision_fusion_t* vk_ext_vision_fusion)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_ext_vision_fusion_pack_chan(system_id, component_id, chan, msg, vk_ext_vision_fusion->timestamp, vk_ext_vision_fusion->pos_frd, vk_ext_vision_fusion->vel_frd, vk_ext_vision_fusion->Q_g, vk_ext_vision_fusion->lat, vk_ext_vision_fusion->lon, vk_ext_vision_fusion->alt_amsl, vk_ext_vision_fusion->hR, vk_ext_vision_fusion->vel_ned, vk_ext_vision_fusion->bias_acc, vk_ext_vision_fusion->bias_gyr, vk_ext_vision_fusion->cov_att, vk_ext_vision_fusion->cov_pos, vk_ext_vision_fusion->cov_vel, vk_ext_vision_fusion->unhealthy, vk_ext_vision_fusion->flag, vk_ext_vision_fusion->reset_cnt);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_ext_vision_fusion struct with provided status structure
|
|
|
+ *
|
|
|
+ * @param system_id ID of this system
|
|
|
+ * @param component_id ID of this component (e.g. 200 for IMU)
|
|
|
+ * @param status MAVLink status structure
|
|
|
+ * @param msg The MAVLink message to compress the data into
|
|
|
+ * @param vk_ext_vision_fusion C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_ext_vision_fusion_t* vk_ext_vision_fusion)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_ext_vision_fusion_pack_status(system_id, component_id, _status, msg, vk_ext_vision_fusion->timestamp, vk_ext_vision_fusion->pos_frd, vk_ext_vision_fusion->vel_frd, vk_ext_vision_fusion->Q_g, vk_ext_vision_fusion->lat, vk_ext_vision_fusion->lon, vk_ext_vision_fusion->alt_amsl, vk_ext_vision_fusion->hR, vk_ext_vision_fusion->vel_ned, vk_ext_vision_fusion->bias_acc, vk_ext_vision_fusion->bias_gyr, vk_ext_vision_fusion->cov_att, vk_ext_vision_fusion->cov_pos, vk_ext_vision_fusion->cov_vel, vk_ext_vision_fusion->unhealthy, vk_ext_vision_fusion->flag, vk_ext_vision_fusion->reset_cnt);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Send a vk_ext_vision_fusion message
|
|
|
+ * @param chan MAVLink channel to send the message
|
|
|
+ *
|
|
|
+ * @param timestamp [ms] timestamp from system boot
|
|
|
+ * @param pos_frd [m] position in vision frd frame
|
|
|
+ * @param vel_frd [m/s] velocity in vision frd frame
|
|
|
+ * @param Q_g attitude quaternion by FRD_NED
|
|
|
+ * @param lat latitidue
|
|
|
+ * @param lon longitude
|
|
|
+ * @param alt_amsl amsl latitidue
|
|
|
+ * @param hR relative altitude
|
|
|
+ * @param vel_ned [m/s] velocity in NED frame
|
|
|
+ * @param bias_acc [m/s/s] acceleration bias in body XYZ
|
|
|
+ * @param bias_gyr [rad/s] gyroscope bias in body XYZ
|
|
|
+ * @param cov_att [rad] attitude covariance
|
|
|
+ * @param cov_pos [m] position covariance
|
|
|
+ * @param cov_vel [m/s]
|
|
|
+ * @param unhealthy unhealthy flag
|
|
|
+ * @param flag work status flag
|
|
|
+ * @param reset_cnt reset count
|
|
|
+ */
|
|
|
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
|
+
|
|
|
+static inline void mavlink_msg_vk_ext_vision_fusion_send(mavlink_channel_t chan, uint32_t timestamp, const float *pos_frd, const float *vel_frd, const float *Q_g, int32_t lat, int32_t lon, float alt_amsl, float hR, const float *vel_ned, const float *bias_acc, const float *bias_gyr, const float *cov_att, const float *cov_pos, const float *cov_vel, uint8_t unhealthy, uint8_t flag, uint8_t reset_cnt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_int32_t(buf, 44, lat);
|
|
|
+ _mav_put_int32_t(buf, 48, lon);
|
|
|
+ _mav_put_float(buf, 52, alt_amsl);
|
|
|
+ _mav_put_float(buf, 56, hR);
|
|
|
+ _mav_put_uint8_t(buf, 132, unhealthy);
|
|
|
+ _mav_put_uint8_t(buf, 133, flag);
|
|
|
+ _mav_put_uint8_t(buf, 134, reset_cnt);
|
|
|
+ _mav_put_float_array(buf, 4, pos_frd, 3);
|
|
|
+ _mav_put_float_array(buf, 16, vel_frd, 3);
|
|
|
+ _mav_put_float_array(buf, 28, Q_g, 4);
|
|
|
+ _mav_put_float_array(buf, 60, vel_ned, 3);
|
|
|
+ _mav_put_float_array(buf, 72, bias_acc, 3);
|
|
|
+ _mav_put_float_array(buf, 84, bias_gyr, 3);
|
|
|
+ _mav_put_float_array(buf, 96, cov_att, 3);
|
|
|
+ _mav_put_float_array(buf, 108, cov_pos, 3);
|
|
|
+ _mav_put_float_array(buf, 120, cov_vel, 3);
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION, buf, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_MIN_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_CRC);
|
|
|
+#else
|
|
|
+ mavlink_vk_ext_vision_fusion_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.alt_amsl = alt_amsl;
|
|
|
+ packet.hR = hR;
|
|
|
+ packet.unhealthy = unhealthy;
|
|
|
+ packet.flag = flag;
|
|
|
+ packet.reset_cnt = reset_cnt;
|
|
|
+ mav_array_memcpy(packet.pos_frd, pos_frd, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.vel_frd, vel_frd, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.Q_g, Q_g, sizeof(float)*4);
|
|
|
+ mav_array_memcpy(packet.vel_ned, vel_ned, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.bias_acc, bias_acc, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.bias_gyr, bias_gyr, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_att, cov_att, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_pos, cov_pos, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet.cov_vel, cov_vel, sizeof(float)*3);
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION, (const char *)&packet, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_MIN_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Send a vk_ext_vision_fusion message
|
|
|
+ * @param chan MAVLink channel to send the message
|
|
|
+ * @param struct The MAVLink struct to serialize
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vk_ext_vision_fusion_send_struct(mavlink_channel_t chan, const mavlink_vk_ext_vision_fusion_t* vk_ext_vision_fusion)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ mavlink_msg_vk_ext_vision_fusion_send(chan, vk_ext_vision_fusion->timestamp, vk_ext_vision_fusion->pos_frd, vk_ext_vision_fusion->vel_frd, vk_ext_vision_fusion->Q_g, vk_ext_vision_fusion->lat, vk_ext_vision_fusion->lon, vk_ext_vision_fusion->alt_amsl, vk_ext_vision_fusion->hR, vk_ext_vision_fusion->vel_ned, vk_ext_vision_fusion->bias_acc, vk_ext_vision_fusion->bias_gyr, vk_ext_vision_fusion->cov_att, vk_ext_vision_fusion->cov_pos, vk_ext_vision_fusion->cov_vel, vk_ext_vision_fusion->unhealthy, vk_ext_vision_fusion->flag, vk_ext_vision_fusion->reset_cnt);
|
|
|
+#else
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION, (const char *)vk_ext_vision_fusion, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_MIN_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+#if MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
|
|
|
+/*
|
|
|
+ This variant of _send() can be used to save stack space by re-using
|
|
|
+ memory from the receive buffer. The caller provides a
|
|
|
+ mavlink_message_t which is the size of a full mavlink message. This
|
|
|
+ is usually the receive buffer for the channel, and allows a reply to an
|
|
|
+ incoming message with minimum stack space usage.
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vk_ext_vision_fusion_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t timestamp, const float *pos_frd, const float *vel_frd, const float *Q_g, int32_t lat, int32_t lon, float alt_amsl, float hR, const float *vel_ned, const float *bias_acc, const float *bias_gyr, const float *cov_att, const float *cov_pos, const float *cov_vel, uint8_t unhealthy, uint8_t flag, uint8_t reset_cnt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char *buf = (char *)msgbuf;
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_int32_t(buf, 44, lat);
|
|
|
+ _mav_put_int32_t(buf, 48, lon);
|
|
|
+ _mav_put_float(buf, 52, alt_amsl);
|
|
|
+ _mav_put_float(buf, 56, hR);
|
|
|
+ _mav_put_uint8_t(buf, 132, unhealthy);
|
|
|
+ _mav_put_uint8_t(buf, 133, flag);
|
|
|
+ _mav_put_uint8_t(buf, 134, reset_cnt);
|
|
|
+ _mav_put_float_array(buf, 4, pos_frd, 3);
|
|
|
+ _mav_put_float_array(buf, 16, vel_frd, 3);
|
|
|
+ _mav_put_float_array(buf, 28, Q_g, 4);
|
|
|
+ _mav_put_float_array(buf, 60, vel_ned, 3);
|
|
|
+ _mav_put_float_array(buf, 72, bias_acc, 3);
|
|
|
+ _mav_put_float_array(buf, 84, bias_gyr, 3);
|
|
|
+ _mav_put_float_array(buf, 96, cov_att, 3);
|
|
|
+ _mav_put_float_array(buf, 108, cov_pos, 3);
|
|
|
+ _mav_put_float_array(buf, 120, cov_vel, 3);
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION, buf, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_MIN_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_CRC);
|
|
|
+#else
|
|
|
+ mavlink_vk_ext_vision_fusion_t *packet = (mavlink_vk_ext_vision_fusion_t *)msgbuf;
|
|
|
+ packet->timestamp = timestamp;
|
|
|
+ packet->lat = lat;
|
|
|
+ packet->lon = lon;
|
|
|
+ packet->alt_amsl = alt_amsl;
|
|
|
+ packet->hR = hR;
|
|
|
+ packet->unhealthy = unhealthy;
|
|
|
+ packet->flag = flag;
|
|
|
+ packet->reset_cnt = reset_cnt;
|
|
|
+ mav_array_memcpy(packet->pos_frd, pos_frd, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet->vel_frd, vel_frd, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet->Q_g, Q_g, sizeof(float)*4);
|
|
|
+ mav_array_memcpy(packet->vel_ned, vel_ned, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet->bias_acc, bias_acc, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet->bias_gyr, bias_gyr, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet->cov_att, cov_att, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet->cov_pos, cov_pos, sizeof(float)*3);
|
|
|
+ mav_array_memcpy(packet->cov_vel, cov_vel, sizeof(float)*3);
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION, (const char *)packet, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_MIN_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+#endif
|
|
|
+
|
|
|
+// MESSAGE VK_EXT_VISION_FUSION UNPACKING
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field timestamp from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return [ms] timestamp from system boot
|
|
|
+ */
|
|
|
+static inline uint32_t mavlink_msg_vk_ext_vision_fusion_get_timestamp(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint32_t(msg, 0);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field pos_frd from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return [m] position in vision frd frame
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_get_pos_frd(const mavlink_message_t* msg, float *pos_frd)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float_array(msg, pos_frd, 3, 4);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field vel_frd from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return [m/s] velocity in vision frd frame
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_get_vel_frd(const mavlink_message_t* msg, float *vel_frd)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float_array(msg, vel_frd, 3, 16);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field Q_g from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return attitude quaternion by FRD_NED
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_get_Q_g(const mavlink_message_t* msg, float *Q_g)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float_array(msg, Q_g, 4, 28);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field lat from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return latitidue
|
|
|
+ */
|
|
|
+static inline int32_t mavlink_msg_vk_ext_vision_fusion_get_lat(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int32_t(msg, 44);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field lon from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return longitude
|
|
|
+ */
|
|
|
+static inline int32_t mavlink_msg_vk_ext_vision_fusion_get_lon(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int32_t(msg, 48);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field alt_amsl from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return amsl latitidue
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_ext_vision_fusion_get_alt_amsl(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 52);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field hR from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return relative altitude
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_ext_vision_fusion_get_hR(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 56);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field vel_ned from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return [m/s] velocity in NED frame
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_get_vel_ned(const mavlink_message_t* msg, float *vel_ned)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float_array(msg, vel_ned, 3, 60);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field bias_acc from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return [m/s/s] acceleration bias in body XYZ
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_get_bias_acc(const mavlink_message_t* msg, float *bias_acc)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float_array(msg, bias_acc, 3, 72);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field bias_gyr from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return [rad/s] gyroscope bias in body XYZ
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_get_bias_gyr(const mavlink_message_t* msg, float *bias_gyr)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float_array(msg, bias_gyr, 3, 84);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field cov_att from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return [rad] attitude covariance
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_get_cov_att(const mavlink_message_t* msg, float *cov_att)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float_array(msg, cov_att, 3, 96);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field cov_pos from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return [m] position covariance
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_get_cov_pos(const mavlink_message_t* msg, float *cov_pos)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float_array(msg, cov_pos, 3, 108);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field cov_vel from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return [m/s]
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_ext_vision_fusion_get_cov_vel(const mavlink_message_t* msg, float *cov_vel)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float_array(msg, cov_vel, 3, 120);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field unhealthy from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return unhealthy flag
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vk_ext_vision_fusion_get_unhealthy(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 132);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field flag from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return work status flag
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vk_ext_vision_fusion_get_flag(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 133);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field reset_cnt from vk_ext_vision_fusion message
|
|
|
+ *
|
|
|
+ * @return reset count
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vk_ext_vision_fusion_get_reset_cnt(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 134);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Decode a vk_ext_vision_fusion message into a struct
|
|
|
+ *
|
|
|
+ * @param msg The message to decode
|
|
|
+ * @param vk_ext_vision_fusion C-struct to decode the message contents into
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vk_ext_vision_fusion_decode(const mavlink_message_t* msg, mavlink_vk_ext_vision_fusion_t* vk_ext_vision_fusion)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ vk_ext_vision_fusion->timestamp = mavlink_msg_vk_ext_vision_fusion_get_timestamp(msg);
|
|
|
+ mavlink_msg_vk_ext_vision_fusion_get_pos_frd(msg, vk_ext_vision_fusion->pos_frd);
|
|
|
+ mavlink_msg_vk_ext_vision_fusion_get_vel_frd(msg, vk_ext_vision_fusion->vel_frd);
|
|
|
+ mavlink_msg_vk_ext_vision_fusion_get_Q_g(msg, vk_ext_vision_fusion->Q_g);
|
|
|
+ vk_ext_vision_fusion->lat = mavlink_msg_vk_ext_vision_fusion_get_lat(msg);
|
|
|
+ vk_ext_vision_fusion->lon = mavlink_msg_vk_ext_vision_fusion_get_lon(msg);
|
|
|
+ vk_ext_vision_fusion->alt_amsl = mavlink_msg_vk_ext_vision_fusion_get_alt_amsl(msg);
|
|
|
+ vk_ext_vision_fusion->hR = mavlink_msg_vk_ext_vision_fusion_get_hR(msg);
|
|
|
+ mavlink_msg_vk_ext_vision_fusion_get_vel_ned(msg, vk_ext_vision_fusion->vel_ned);
|
|
|
+ mavlink_msg_vk_ext_vision_fusion_get_bias_acc(msg, vk_ext_vision_fusion->bias_acc);
|
|
|
+ mavlink_msg_vk_ext_vision_fusion_get_bias_gyr(msg, vk_ext_vision_fusion->bias_gyr);
|
|
|
+ mavlink_msg_vk_ext_vision_fusion_get_cov_att(msg, vk_ext_vision_fusion->cov_att);
|
|
|
+ mavlink_msg_vk_ext_vision_fusion_get_cov_pos(msg, vk_ext_vision_fusion->cov_pos);
|
|
|
+ mavlink_msg_vk_ext_vision_fusion_get_cov_vel(msg, vk_ext_vision_fusion->cov_vel);
|
|
|
+ vk_ext_vision_fusion->unhealthy = mavlink_msg_vk_ext_vision_fusion_get_unhealthy(msg);
|
|
|
+ vk_ext_vision_fusion->flag = mavlink_msg_vk_ext_vision_fusion_get_flag(msg);
|
|
|
+ vk_ext_vision_fusion->reset_cnt = mavlink_msg_vk_ext_vision_fusion_get_reset_cnt(msg);
|
|
|
+#else
|
|
|
+ uint8_t len = msg->len < MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN? msg->len : MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN;
|
|
|
+ memset(vk_ext_vision_fusion, 0, MAVLINK_MSG_ID_VK_EXT_VISION_FUSION_LEN);
|
|
|
+ memcpy(vk_ext_vision_fusion, _MAV_PAYLOAD(msg), len);
|
|
|
+#endif
|
|
|
+}
|