|
@@ -0,0 +1,596 @@
|
|
|
+#pragma once
|
|
|
+// MESSAGE VK_RTK_BASE_PVT PACKING
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_RTK_BASE_PVT 53024
|
|
|
+
|
|
|
+
|
|
|
+typedef struct __mavlink_vk_rtk_base_pvt_t {
|
|
|
+ uint32_t timestamp; /*< [ms] timestamp from system boot*/
|
|
|
+ int32_t lon; /*< [degE7] solved longitude*/
|
|
|
+ int32_t lat; /*< [degE7] solved latitude*/
|
|
|
+ float msl; /*< [m] solved latitude*/
|
|
|
+ float ve; /*< [m/s] solved east speed*/
|
|
|
+ float vn; /*< [m/s] solved north speed*/
|
|
|
+ float vu; /*< [m/s] solved up speed*/
|
|
|
+ float heading; /*< [deg] yaw angle*/
|
|
|
+ float pitch; /*< [deg] pitch angle*/
|
|
|
+ uint8_t p_sat_num; /*< position satellite number*/
|
|
|
+ uint8_t h_sat_num; /*< heading satellite number*/
|
|
|
+ uint8_t p_type; /*< heading satellite number*/
|
|
|
+ uint8_t h_type; /*< heading satellite number*/
|
|
|
+} mavlink_vk_rtk_base_pvt_t;
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN 40
|
|
|
+#define MAVLINK_MSG_ID_VK_RTK_BASE_PVT_MIN_LEN 40
|
|
|
+#define MAVLINK_MSG_ID_53024_LEN 40
|
|
|
+#define MAVLINK_MSG_ID_53024_MIN_LEN 40
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_RTK_BASE_PVT_CRC 87
|
|
|
+#define MAVLINK_MSG_ID_53024_CRC 87
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+#if MAVLINK_COMMAND_24BIT
|
|
|
+#define MAVLINK_MESSAGE_INFO_VK_RTK_BASE_PVT { \
|
|
|
+ 53024, \
|
|
|
+ "VK_RTK_BASE_PVT", \
|
|
|
+ 13, \
|
|
|
+ { { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_rtk_base_pvt_t, timestamp) }, \
|
|
|
+ { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_vk_rtk_base_pvt_t, lon) }, \
|
|
|
+ { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_rtk_base_pvt_t, lat) }, \
|
|
|
+ { "msl", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vk_rtk_base_pvt_t, msl) }, \
|
|
|
+ { "ve", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vk_rtk_base_pvt_t, ve) }, \
|
|
|
+ { "vn", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vk_rtk_base_pvt_t, vn) }, \
|
|
|
+ { "vu", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_vk_rtk_base_pvt_t, vu) }, \
|
|
|
+ { "heading", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_vk_rtk_base_pvt_t, heading) }, \
|
|
|
+ { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_vk_rtk_base_pvt_t, pitch) }, \
|
|
|
+ { "p_sat_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_vk_rtk_base_pvt_t, p_sat_num) }, \
|
|
|
+ { "h_sat_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_vk_rtk_base_pvt_t, h_sat_num) }, \
|
|
|
+ { "p_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 38, offsetof(mavlink_vk_rtk_base_pvt_t, p_type) }, \
|
|
|
+ { "h_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 39, offsetof(mavlink_vk_rtk_base_pvt_t, h_type) }, \
|
|
|
+ } \
|
|
|
+}
|
|
|
+#else
|
|
|
+#define MAVLINK_MESSAGE_INFO_VK_RTK_BASE_PVT { \
|
|
|
+ "VK_RTK_BASE_PVT", \
|
|
|
+ 13, \
|
|
|
+ { { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_rtk_base_pvt_t, timestamp) }, \
|
|
|
+ { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_vk_rtk_base_pvt_t, lon) }, \
|
|
|
+ { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_rtk_base_pvt_t, lat) }, \
|
|
|
+ { "msl", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vk_rtk_base_pvt_t, msl) }, \
|
|
|
+ { "ve", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vk_rtk_base_pvt_t, ve) }, \
|
|
|
+ { "vn", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vk_rtk_base_pvt_t, vn) }, \
|
|
|
+ { "vu", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_vk_rtk_base_pvt_t, vu) }, \
|
|
|
+ { "heading", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_vk_rtk_base_pvt_t, heading) }, \
|
|
|
+ { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_vk_rtk_base_pvt_t, pitch) }, \
|
|
|
+ { "p_sat_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_vk_rtk_base_pvt_t, p_sat_num) }, \
|
|
|
+ { "h_sat_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_vk_rtk_base_pvt_t, h_sat_num) }, \
|
|
|
+ { "p_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 38, offsetof(mavlink_vk_rtk_base_pvt_t, p_type) }, \
|
|
|
+ { "h_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 39, offsetof(mavlink_vk_rtk_base_pvt_t, h_type) }, \
|
|
|
+ } \
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_rtk_base_pvt 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 lon [degE7] solved longitude
|
|
|
+ * @param lat [degE7] solved latitude
|
|
|
+ * @param msl [m] solved latitude
|
|
|
+ * @param ve [m/s] solved east speed
|
|
|
+ * @param vn [m/s] solved north speed
|
|
|
+ * @param vu [m/s] solved up speed
|
|
|
+ * @param heading [deg] yaw angle
|
|
|
+ * @param pitch [deg] pitch angle
|
|
|
+ * @param p_sat_num position satellite number
|
|
|
+ * @param h_sat_num heading satellite number
|
|
|
+ * @param p_type heading satellite number
|
|
|
+ * @param h_type heading satellite number
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_rtk_base_pvt_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
|
+ uint32_t timestamp, int32_t lon, int32_t lat, float msl, float ve, float vn, float vu, float heading, float pitch, uint8_t p_sat_num, uint8_t h_sat_num, uint8_t p_type, uint8_t h_type)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_int32_t(buf, 4, lon);
|
|
|
+ _mav_put_int32_t(buf, 8, lat);
|
|
|
+ _mav_put_float(buf, 12, msl);
|
|
|
+ _mav_put_float(buf, 16, ve);
|
|
|
+ _mav_put_float(buf, 20, vn);
|
|
|
+ _mav_put_float(buf, 24, vu);
|
|
|
+ _mav_put_float(buf, 28, heading);
|
|
|
+ _mav_put_float(buf, 32, pitch);
|
|
|
+ _mav_put_uint8_t(buf, 36, p_sat_num);
|
|
|
+ _mav_put_uint8_t(buf, 37, h_sat_num);
|
|
|
+ _mav_put_uint8_t(buf, 38, p_type);
|
|
|
+ _mav_put_uint8_t(buf, 39, h_type);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_rtk_base_pvt_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.msl = msl;
|
|
|
+ packet.ve = ve;
|
|
|
+ packet.vn = vn;
|
|
|
+ packet.vu = vu;
|
|
|
+ packet.heading = heading;
|
|
|
+ packet.pitch = pitch;
|
|
|
+ packet.p_sat_num = p_sat_num;
|
|
|
+ packet.h_sat_num = h_sat_num;
|
|
|
+ packet.p_type = p_type;
|
|
|
+ packet.h_type = h_type;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_RTK_BASE_PVT;
|
|
|
+ return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_MIN_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_CRC);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_rtk_base_pvt 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 lon [degE7] solved longitude
|
|
|
+ * @param lat [degE7] solved latitude
|
|
|
+ * @param msl [m] solved latitude
|
|
|
+ * @param ve [m/s] solved east speed
|
|
|
+ * @param vn [m/s] solved north speed
|
|
|
+ * @param vu [m/s] solved up speed
|
|
|
+ * @param heading [deg] yaw angle
|
|
|
+ * @param pitch [deg] pitch angle
|
|
|
+ * @param p_sat_num position satellite number
|
|
|
+ * @param h_sat_num heading satellite number
|
|
|
+ * @param p_type heading satellite number
|
|
|
+ * @param h_type heading satellite number
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_rtk_base_pvt_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
|
+ uint32_t timestamp, int32_t lon, int32_t lat, float msl, float ve, float vn, float vu, float heading, float pitch, uint8_t p_sat_num, uint8_t h_sat_num, uint8_t p_type, uint8_t h_type)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_int32_t(buf, 4, lon);
|
|
|
+ _mav_put_int32_t(buf, 8, lat);
|
|
|
+ _mav_put_float(buf, 12, msl);
|
|
|
+ _mav_put_float(buf, 16, ve);
|
|
|
+ _mav_put_float(buf, 20, vn);
|
|
|
+ _mav_put_float(buf, 24, vu);
|
|
|
+ _mav_put_float(buf, 28, heading);
|
|
|
+ _mav_put_float(buf, 32, pitch);
|
|
|
+ _mav_put_uint8_t(buf, 36, p_sat_num);
|
|
|
+ _mav_put_uint8_t(buf, 37, h_sat_num);
|
|
|
+ _mav_put_uint8_t(buf, 38, p_type);
|
|
|
+ _mav_put_uint8_t(buf, 39, h_type);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_rtk_base_pvt_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.msl = msl;
|
|
|
+ packet.ve = ve;
|
|
|
+ packet.vn = vn;
|
|
|
+ packet.vu = vu;
|
|
|
+ packet.heading = heading;
|
|
|
+ packet.pitch = pitch;
|
|
|
+ packet.p_sat_num = p_sat_num;
|
|
|
+ packet.h_sat_num = h_sat_num;
|
|
|
+ packet.p_type = p_type;
|
|
|
+ packet.h_type = h_type;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_RTK_BASE_PVT;
|
|
|
+#if MAVLINK_CRC_EXTRA
|
|
|
+ return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_MIN_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_CRC);
|
|
|
+#else
|
|
|
+ return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_MIN_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_rtk_base_pvt 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 lon [degE7] solved longitude
|
|
|
+ * @param lat [degE7] solved latitude
|
|
|
+ * @param msl [m] solved latitude
|
|
|
+ * @param ve [m/s] solved east speed
|
|
|
+ * @param vn [m/s] solved north speed
|
|
|
+ * @param vu [m/s] solved up speed
|
|
|
+ * @param heading [deg] yaw angle
|
|
|
+ * @param pitch [deg] pitch angle
|
|
|
+ * @param p_sat_num position satellite number
|
|
|
+ * @param h_sat_num heading satellite number
|
|
|
+ * @param p_type heading satellite number
|
|
|
+ * @param h_type heading satellite number
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_rtk_base_pvt_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
|
+ mavlink_message_t* msg,
|
|
|
+ uint32_t timestamp,int32_t lon,int32_t lat,float msl,float ve,float vn,float vu,float heading,float pitch,uint8_t p_sat_num,uint8_t h_sat_num,uint8_t p_type,uint8_t h_type)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_int32_t(buf, 4, lon);
|
|
|
+ _mav_put_int32_t(buf, 8, lat);
|
|
|
+ _mav_put_float(buf, 12, msl);
|
|
|
+ _mav_put_float(buf, 16, ve);
|
|
|
+ _mav_put_float(buf, 20, vn);
|
|
|
+ _mav_put_float(buf, 24, vu);
|
|
|
+ _mav_put_float(buf, 28, heading);
|
|
|
+ _mav_put_float(buf, 32, pitch);
|
|
|
+ _mav_put_uint8_t(buf, 36, p_sat_num);
|
|
|
+ _mav_put_uint8_t(buf, 37, h_sat_num);
|
|
|
+ _mav_put_uint8_t(buf, 38, p_type);
|
|
|
+ _mav_put_uint8_t(buf, 39, h_type);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_rtk_base_pvt_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.msl = msl;
|
|
|
+ packet.ve = ve;
|
|
|
+ packet.vn = vn;
|
|
|
+ packet.vu = vu;
|
|
|
+ packet.heading = heading;
|
|
|
+ packet.pitch = pitch;
|
|
|
+ packet.p_sat_num = p_sat_num;
|
|
|
+ packet.h_sat_num = h_sat_num;
|
|
|
+ packet.p_type = p_type;
|
|
|
+ packet.h_type = h_type;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_RTK_BASE_PVT;
|
|
|
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_MIN_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_CRC);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_rtk_base_pvt 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_rtk_base_pvt C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_rtk_base_pvt_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_rtk_base_pvt_t* vk_rtk_base_pvt)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_rtk_base_pvt_pack(system_id, component_id, msg, vk_rtk_base_pvt->timestamp, vk_rtk_base_pvt->lon, vk_rtk_base_pvt->lat, vk_rtk_base_pvt->msl, vk_rtk_base_pvt->ve, vk_rtk_base_pvt->vn, vk_rtk_base_pvt->vu, vk_rtk_base_pvt->heading, vk_rtk_base_pvt->pitch, vk_rtk_base_pvt->p_sat_num, vk_rtk_base_pvt->h_sat_num, vk_rtk_base_pvt->p_type, vk_rtk_base_pvt->h_type);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_rtk_base_pvt 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_rtk_base_pvt C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_rtk_base_pvt_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_rtk_base_pvt_t* vk_rtk_base_pvt)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_rtk_base_pvt_pack_chan(system_id, component_id, chan, msg, vk_rtk_base_pvt->timestamp, vk_rtk_base_pvt->lon, vk_rtk_base_pvt->lat, vk_rtk_base_pvt->msl, vk_rtk_base_pvt->ve, vk_rtk_base_pvt->vn, vk_rtk_base_pvt->vu, vk_rtk_base_pvt->heading, vk_rtk_base_pvt->pitch, vk_rtk_base_pvt->p_sat_num, vk_rtk_base_pvt->h_sat_num, vk_rtk_base_pvt->p_type, vk_rtk_base_pvt->h_type);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_rtk_base_pvt 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_rtk_base_pvt C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_rtk_base_pvt_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_rtk_base_pvt_t* vk_rtk_base_pvt)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_rtk_base_pvt_pack_status(system_id, component_id, _status, msg, vk_rtk_base_pvt->timestamp, vk_rtk_base_pvt->lon, vk_rtk_base_pvt->lat, vk_rtk_base_pvt->msl, vk_rtk_base_pvt->ve, vk_rtk_base_pvt->vn, vk_rtk_base_pvt->vu, vk_rtk_base_pvt->heading, vk_rtk_base_pvt->pitch, vk_rtk_base_pvt->p_sat_num, vk_rtk_base_pvt->h_sat_num, vk_rtk_base_pvt->p_type, vk_rtk_base_pvt->h_type);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Send a vk_rtk_base_pvt message
|
|
|
+ * @param chan MAVLink channel to send the message
|
|
|
+ *
|
|
|
+ * @param timestamp [ms] timestamp from system boot
|
|
|
+ * @param lon [degE7] solved longitude
|
|
|
+ * @param lat [degE7] solved latitude
|
|
|
+ * @param msl [m] solved latitude
|
|
|
+ * @param ve [m/s] solved east speed
|
|
|
+ * @param vn [m/s] solved north speed
|
|
|
+ * @param vu [m/s] solved up speed
|
|
|
+ * @param heading [deg] yaw angle
|
|
|
+ * @param pitch [deg] pitch angle
|
|
|
+ * @param p_sat_num position satellite number
|
|
|
+ * @param h_sat_num heading satellite number
|
|
|
+ * @param p_type heading satellite number
|
|
|
+ * @param h_type heading satellite number
|
|
|
+ */
|
|
|
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
|
+
|
|
|
+static inline void mavlink_msg_vk_rtk_base_pvt_send(mavlink_channel_t chan, uint32_t timestamp, int32_t lon, int32_t lat, float msl, float ve, float vn, float vu, float heading, float pitch, uint8_t p_sat_num, uint8_t h_sat_num, uint8_t p_type, uint8_t h_type)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_int32_t(buf, 4, lon);
|
|
|
+ _mav_put_int32_t(buf, 8, lat);
|
|
|
+ _mav_put_float(buf, 12, msl);
|
|
|
+ _mav_put_float(buf, 16, ve);
|
|
|
+ _mav_put_float(buf, 20, vn);
|
|
|
+ _mav_put_float(buf, 24, vu);
|
|
|
+ _mav_put_float(buf, 28, heading);
|
|
|
+ _mav_put_float(buf, 32, pitch);
|
|
|
+ _mav_put_uint8_t(buf, 36, p_sat_num);
|
|
|
+ _mav_put_uint8_t(buf, 37, h_sat_num);
|
|
|
+ _mav_put_uint8_t(buf, 38, p_type);
|
|
|
+ _mav_put_uint8_t(buf, 39, h_type);
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_RTK_BASE_PVT, buf, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_MIN_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_CRC);
|
|
|
+#else
|
|
|
+ mavlink_vk_rtk_base_pvt_t packet;
|
|
|
+ packet.timestamp = timestamp;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.msl = msl;
|
|
|
+ packet.ve = ve;
|
|
|
+ packet.vn = vn;
|
|
|
+ packet.vu = vu;
|
|
|
+ packet.heading = heading;
|
|
|
+ packet.pitch = pitch;
|
|
|
+ packet.p_sat_num = p_sat_num;
|
|
|
+ packet.h_sat_num = h_sat_num;
|
|
|
+ packet.p_type = p_type;
|
|
|
+ packet.h_type = h_type;
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_RTK_BASE_PVT, (const char *)&packet, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_MIN_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Send a vk_rtk_base_pvt message
|
|
|
+ * @param chan MAVLink channel to send the message
|
|
|
+ * @param struct The MAVLink struct to serialize
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vk_rtk_base_pvt_send_struct(mavlink_channel_t chan, const mavlink_vk_rtk_base_pvt_t* vk_rtk_base_pvt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ mavlink_msg_vk_rtk_base_pvt_send(chan, vk_rtk_base_pvt->timestamp, vk_rtk_base_pvt->lon, vk_rtk_base_pvt->lat, vk_rtk_base_pvt->msl, vk_rtk_base_pvt->ve, vk_rtk_base_pvt->vn, vk_rtk_base_pvt->vu, vk_rtk_base_pvt->heading, vk_rtk_base_pvt->pitch, vk_rtk_base_pvt->p_sat_num, vk_rtk_base_pvt->h_sat_num, vk_rtk_base_pvt->p_type, vk_rtk_base_pvt->h_type);
|
|
|
+#else
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_RTK_BASE_PVT, (const char *)vk_rtk_base_pvt, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_MIN_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+#if MAVLINK_MSG_ID_VK_RTK_BASE_PVT_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_rtk_base_pvt_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t timestamp, int32_t lon, int32_t lat, float msl, float ve, float vn, float vu, float heading, float pitch, uint8_t p_sat_num, uint8_t h_sat_num, uint8_t p_type, uint8_t h_type)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char *buf = (char *)msgbuf;
|
|
|
+ _mav_put_uint32_t(buf, 0, timestamp);
|
|
|
+ _mav_put_int32_t(buf, 4, lon);
|
|
|
+ _mav_put_int32_t(buf, 8, lat);
|
|
|
+ _mav_put_float(buf, 12, msl);
|
|
|
+ _mav_put_float(buf, 16, ve);
|
|
|
+ _mav_put_float(buf, 20, vn);
|
|
|
+ _mav_put_float(buf, 24, vu);
|
|
|
+ _mav_put_float(buf, 28, heading);
|
|
|
+ _mav_put_float(buf, 32, pitch);
|
|
|
+ _mav_put_uint8_t(buf, 36, p_sat_num);
|
|
|
+ _mav_put_uint8_t(buf, 37, h_sat_num);
|
|
|
+ _mav_put_uint8_t(buf, 38, p_type);
|
|
|
+ _mav_put_uint8_t(buf, 39, h_type);
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_RTK_BASE_PVT, buf, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_MIN_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_CRC);
|
|
|
+#else
|
|
|
+ mavlink_vk_rtk_base_pvt_t *packet = (mavlink_vk_rtk_base_pvt_t *)msgbuf;
|
|
|
+ packet->timestamp = timestamp;
|
|
|
+ packet->lon = lon;
|
|
|
+ packet->lat = lat;
|
|
|
+ packet->msl = msl;
|
|
|
+ packet->ve = ve;
|
|
|
+ packet->vn = vn;
|
|
|
+ packet->vu = vu;
|
|
|
+ packet->heading = heading;
|
|
|
+ packet->pitch = pitch;
|
|
|
+ packet->p_sat_num = p_sat_num;
|
|
|
+ packet->h_sat_num = h_sat_num;
|
|
|
+ packet->p_type = p_type;
|
|
|
+ packet->h_type = h_type;
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_RTK_BASE_PVT, (const char *)packet, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_MIN_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+#endif
|
|
|
+
|
|
|
+// MESSAGE VK_RTK_BASE_PVT UNPACKING
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field timestamp from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return [ms] timestamp from system boot
|
|
|
+ */
|
|
|
+static inline uint32_t mavlink_msg_vk_rtk_base_pvt_get_timestamp(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint32_t(msg, 0);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field lon from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return [degE7] solved longitude
|
|
|
+ */
|
|
|
+static inline int32_t mavlink_msg_vk_rtk_base_pvt_get_lon(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int32_t(msg, 4);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field lat from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return [degE7] solved latitude
|
|
|
+ */
|
|
|
+static inline int32_t mavlink_msg_vk_rtk_base_pvt_get_lat(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int32_t(msg, 8);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field msl from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return [m] solved latitude
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_rtk_base_pvt_get_msl(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 12);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field ve from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return [m/s] solved east speed
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_rtk_base_pvt_get_ve(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 16);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field vn from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return [m/s] solved north speed
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_rtk_base_pvt_get_vn(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 20);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field vu from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return [m/s] solved up speed
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_rtk_base_pvt_get_vu(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 24);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field heading from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return [deg] yaw angle
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_rtk_base_pvt_get_heading(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 28);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field pitch from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return [deg] pitch angle
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_rtk_base_pvt_get_pitch(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 32);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field p_sat_num from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return position satellite number
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vk_rtk_base_pvt_get_p_sat_num(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 36);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field h_sat_num from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return heading satellite number
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vk_rtk_base_pvt_get_h_sat_num(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 37);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field p_type from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return heading satellite number
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vk_rtk_base_pvt_get_p_type(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 38);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field h_type from vk_rtk_base_pvt message
|
|
|
+ *
|
|
|
+ * @return heading satellite number
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vk_rtk_base_pvt_get_h_type(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 39);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Decode a vk_rtk_base_pvt message into a struct
|
|
|
+ *
|
|
|
+ * @param msg The message to decode
|
|
|
+ * @param vk_rtk_base_pvt C-struct to decode the message contents into
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vk_rtk_base_pvt_decode(const mavlink_message_t* msg, mavlink_vk_rtk_base_pvt_t* vk_rtk_base_pvt)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ vk_rtk_base_pvt->timestamp = mavlink_msg_vk_rtk_base_pvt_get_timestamp(msg);
|
|
|
+ vk_rtk_base_pvt->lon = mavlink_msg_vk_rtk_base_pvt_get_lon(msg);
|
|
|
+ vk_rtk_base_pvt->lat = mavlink_msg_vk_rtk_base_pvt_get_lat(msg);
|
|
|
+ vk_rtk_base_pvt->msl = mavlink_msg_vk_rtk_base_pvt_get_msl(msg);
|
|
|
+ vk_rtk_base_pvt->ve = mavlink_msg_vk_rtk_base_pvt_get_ve(msg);
|
|
|
+ vk_rtk_base_pvt->vn = mavlink_msg_vk_rtk_base_pvt_get_vn(msg);
|
|
|
+ vk_rtk_base_pvt->vu = mavlink_msg_vk_rtk_base_pvt_get_vu(msg);
|
|
|
+ vk_rtk_base_pvt->heading = mavlink_msg_vk_rtk_base_pvt_get_heading(msg);
|
|
|
+ vk_rtk_base_pvt->pitch = mavlink_msg_vk_rtk_base_pvt_get_pitch(msg);
|
|
|
+ vk_rtk_base_pvt->p_sat_num = mavlink_msg_vk_rtk_base_pvt_get_p_sat_num(msg);
|
|
|
+ vk_rtk_base_pvt->h_sat_num = mavlink_msg_vk_rtk_base_pvt_get_h_sat_num(msg);
|
|
|
+ vk_rtk_base_pvt->p_type = mavlink_msg_vk_rtk_base_pvt_get_p_type(msg);
|
|
|
+ vk_rtk_base_pvt->h_type = mavlink_msg_vk_rtk_base_pvt_get_h_type(msg);
|
|
|
+#else
|
|
|
+ uint8_t len = msg->len < MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN? msg->len : MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN;
|
|
|
+ memset(vk_rtk_base_pvt, 0, MAVLINK_MSG_ID_VK_RTK_BASE_PVT_LEN);
|
|
|
+ memcpy(vk_rtk_base_pvt, _MAV_PAYLOAD(msg), len);
|
|
|
+#endif
|
|
|
+}
|