|
|
@@ -0,0 +1,428 @@
|
|
|
+#pragma once
|
|
|
+// MESSAGE VKFLY_LIDAR_TARGET_GLOBLA_POSITION PACKING
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION 53900
|
|
|
+
|
|
|
+
|
|
|
+typedef struct __mavlink_vkfly_lidar_target_globla_position_t {
|
|
|
+ int32_t longitude; /*< [degE7] radar target longitude*/
|
|
|
+ int32_t latitude; /*< [degE7] radar target latitdue*/
|
|
|
+ float amsl; /*< [m] radar target amsl altitude*/
|
|
|
+ float ve; /*< [m/s] radar target amsl altitude*/
|
|
|
+ float vn; /*< [m/s] radar target amsl altitude*/
|
|
|
+ float vu; /*< [m/s] radar target amsl altitude*/
|
|
|
+ uint8_t flag; /*< radar target location status*/
|
|
|
+} mavlink_vkfly_lidar_target_globla_position_t;
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN 25
|
|
|
+#define MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_MIN_LEN 25
|
|
|
+#define MAVLINK_MSG_ID_53900_LEN 25
|
|
|
+#define MAVLINK_MSG_ID_53900_MIN_LEN 25
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_CRC 189
|
|
|
+#define MAVLINK_MSG_ID_53900_CRC 189
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+#if MAVLINK_COMMAND_24BIT
|
|
|
+#define MAVLINK_MESSAGE_INFO_VKFLY_LIDAR_TARGET_GLOBLA_POSITION { \
|
|
|
+ 53900, \
|
|
|
+ "VKFLY_LIDAR_TARGET_GLOBLA_POSITION", \
|
|
|
+ 7, \
|
|
|
+ { { "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_vkfly_lidar_target_globla_position_t, longitude) }, \
|
|
|
+ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_vkfly_lidar_target_globla_position_t, latitude) }, \
|
|
|
+ { "amsl", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vkfly_lidar_target_globla_position_t, amsl) }, \
|
|
|
+ { "ve", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vkfly_lidar_target_globla_position_t, ve) }, \
|
|
|
+ { "vn", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vkfly_lidar_target_globla_position_t, vn) }, \
|
|
|
+ { "vu", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vkfly_lidar_target_globla_position_t, vu) }, \
|
|
|
+ { "flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_vkfly_lidar_target_globla_position_t, flag) }, \
|
|
|
+ } \
|
|
|
+}
|
|
|
+#else
|
|
|
+#define MAVLINK_MESSAGE_INFO_VKFLY_LIDAR_TARGET_GLOBLA_POSITION { \
|
|
|
+ "VKFLY_LIDAR_TARGET_GLOBLA_POSITION", \
|
|
|
+ 7, \
|
|
|
+ { { "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_vkfly_lidar_target_globla_position_t, longitude) }, \
|
|
|
+ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_vkfly_lidar_target_globla_position_t, latitude) }, \
|
|
|
+ { "amsl", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vkfly_lidar_target_globla_position_t, amsl) }, \
|
|
|
+ { "ve", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vkfly_lidar_target_globla_position_t, ve) }, \
|
|
|
+ { "vn", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vkfly_lidar_target_globla_position_t, vn) }, \
|
|
|
+ { "vu", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vkfly_lidar_target_globla_position_t, vu) }, \
|
|
|
+ { "flag", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_vkfly_lidar_target_globla_position_t, flag) }, \
|
|
|
+ } \
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vkfly_lidar_target_globla_position 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 longitude [degE7] radar target longitude
|
|
|
+ * @param latitude [degE7] radar target latitdue
|
|
|
+ * @param amsl [m] radar target amsl altitude
|
|
|
+ * @param ve [m/s] radar target amsl altitude
|
|
|
+ * @param vn [m/s] radar target amsl altitude
|
|
|
+ * @param vu [m/s] radar target amsl altitude
|
|
|
+ * @param flag radar target location status
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vkfly_lidar_target_globla_position_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
|
+ int32_t longitude, int32_t latitude, float amsl, float ve, float vn, float vu, uint8_t flag)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN];
|
|
|
+ _mav_put_int32_t(buf, 0, longitude);
|
|
|
+ _mav_put_int32_t(buf, 4, latitude);
|
|
|
+ _mav_put_float(buf, 8, amsl);
|
|
|
+ _mav_put_float(buf, 12, ve);
|
|
|
+ _mav_put_float(buf, 16, vn);
|
|
|
+ _mav_put_float(buf, 20, vu);
|
|
|
+ _mav_put_uint8_t(buf, 24, flag);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vkfly_lidar_target_globla_position_t packet;
|
|
|
+ packet.longitude = longitude;
|
|
|
+ packet.latitude = latitude;
|
|
|
+ packet.amsl = amsl;
|
|
|
+ packet.ve = ve;
|
|
|
+ packet.vn = vn;
|
|
|
+ packet.vu = vu;
|
|
|
+ packet.flag = flag;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION;
|
|
|
+ return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_MIN_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_CRC);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vkfly_lidar_target_globla_position 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 longitude [degE7] radar target longitude
|
|
|
+ * @param latitude [degE7] radar target latitdue
|
|
|
+ * @param amsl [m] radar target amsl altitude
|
|
|
+ * @param ve [m/s] radar target amsl altitude
|
|
|
+ * @param vn [m/s] radar target amsl altitude
|
|
|
+ * @param vu [m/s] radar target amsl altitude
|
|
|
+ * @param flag radar target location status
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vkfly_lidar_target_globla_position_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
|
+ int32_t longitude, int32_t latitude, float amsl, float ve, float vn, float vu, uint8_t flag)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN];
|
|
|
+ _mav_put_int32_t(buf, 0, longitude);
|
|
|
+ _mav_put_int32_t(buf, 4, latitude);
|
|
|
+ _mav_put_float(buf, 8, amsl);
|
|
|
+ _mav_put_float(buf, 12, ve);
|
|
|
+ _mav_put_float(buf, 16, vn);
|
|
|
+ _mav_put_float(buf, 20, vu);
|
|
|
+ _mav_put_uint8_t(buf, 24, flag);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vkfly_lidar_target_globla_position_t packet;
|
|
|
+ packet.longitude = longitude;
|
|
|
+ packet.latitude = latitude;
|
|
|
+ packet.amsl = amsl;
|
|
|
+ packet.ve = ve;
|
|
|
+ packet.vn = vn;
|
|
|
+ packet.vu = vu;
|
|
|
+ packet.flag = flag;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION;
|
|
|
+#if MAVLINK_CRC_EXTRA
|
|
|
+ return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_MIN_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_CRC);
|
|
|
+#else
|
|
|
+ return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_MIN_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vkfly_lidar_target_globla_position 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 longitude [degE7] radar target longitude
|
|
|
+ * @param latitude [degE7] radar target latitdue
|
|
|
+ * @param amsl [m] radar target amsl altitude
|
|
|
+ * @param ve [m/s] radar target amsl altitude
|
|
|
+ * @param vn [m/s] radar target amsl altitude
|
|
|
+ * @param vu [m/s] radar target amsl altitude
|
|
|
+ * @param flag radar target location status
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vkfly_lidar_target_globla_position_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
|
+ mavlink_message_t* msg,
|
|
|
+ int32_t longitude,int32_t latitude,float amsl,float ve,float vn,float vu,uint8_t flag)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN];
|
|
|
+ _mav_put_int32_t(buf, 0, longitude);
|
|
|
+ _mav_put_int32_t(buf, 4, latitude);
|
|
|
+ _mav_put_float(buf, 8, amsl);
|
|
|
+ _mav_put_float(buf, 12, ve);
|
|
|
+ _mav_put_float(buf, 16, vn);
|
|
|
+ _mav_put_float(buf, 20, vu);
|
|
|
+ _mav_put_uint8_t(buf, 24, flag);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vkfly_lidar_target_globla_position_t packet;
|
|
|
+ packet.longitude = longitude;
|
|
|
+ packet.latitude = latitude;
|
|
|
+ packet.amsl = amsl;
|
|
|
+ packet.ve = ve;
|
|
|
+ packet.vn = vn;
|
|
|
+ packet.vu = vu;
|
|
|
+ packet.flag = flag;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION;
|
|
|
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_MIN_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_CRC);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vkfly_lidar_target_globla_position 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 vkfly_lidar_target_globla_position C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vkfly_lidar_target_globla_position_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vkfly_lidar_target_globla_position_t* vkfly_lidar_target_globla_position)
|
|
|
+{
|
|
|
+ return mavlink_msg_vkfly_lidar_target_globla_position_pack(system_id, component_id, msg, vkfly_lidar_target_globla_position->longitude, vkfly_lidar_target_globla_position->latitude, vkfly_lidar_target_globla_position->amsl, vkfly_lidar_target_globla_position->ve, vkfly_lidar_target_globla_position->vn, vkfly_lidar_target_globla_position->vu, vkfly_lidar_target_globla_position->flag);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vkfly_lidar_target_globla_position 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 vkfly_lidar_target_globla_position C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vkfly_lidar_target_globla_position_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vkfly_lidar_target_globla_position_t* vkfly_lidar_target_globla_position)
|
|
|
+{
|
|
|
+ return mavlink_msg_vkfly_lidar_target_globla_position_pack_chan(system_id, component_id, chan, msg, vkfly_lidar_target_globla_position->longitude, vkfly_lidar_target_globla_position->latitude, vkfly_lidar_target_globla_position->amsl, vkfly_lidar_target_globla_position->ve, vkfly_lidar_target_globla_position->vn, vkfly_lidar_target_globla_position->vu, vkfly_lidar_target_globla_position->flag);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vkfly_lidar_target_globla_position 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 vkfly_lidar_target_globla_position C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vkfly_lidar_target_globla_position_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vkfly_lidar_target_globla_position_t* vkfly_lidar_target_globla_position)
|
|
|
+{
|
|
|
+ return mavlink_msg_vkfly_lidar_target_globla_position_pack_status(system_id, component_id, _status, msg, vkfly_lidar_target_globla_position->longitude, vkfly_lidar_target_globla_position->latitude, vkfly_lidar_target_globla_position->amsl, vkfly_lidar_target_globla_position->ve, vkfly_lidar_target_globla_position->vn, vkfly_lidar_target_globla_position->vu, vkfly_lidar_target_globla_position->flag);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Send a vkfly_lidar_target_globla_position message
|
|
|
+ * @param chan MAVLink channel to send the message
|
|
|
+ *
|
|
|
+ * @param longitude [degE7] radar target longitude
|
|
|
+ * @param latitude [degE7] radar target latitdue
|
|
|
+ * @param amsl [m] radar target amsl altitude
|
|
|
+ * @param ve [m/s] radar target amsl altitude
|
|
|
+ * @param vn [m/s] radar target amsl altitude
|
|
|
+ * @param vu [m/s] radar target amsl altitude
|
|
|
+ * @param flag radar target location status
|
|
|
+ */
|
|
|
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
|
+
|
|
|
+static inline void mavlink_msg_vkfly_lidar_target_globla_position_send(mavlink_channel_t chan, int32_t longitude, int32_t latitude, float amsl, float ve, float vn, float vu, uint8_t flag)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN];
|
|
|
+ _mav_put_int32_t(buf, 0, longitude);
|
|
|
+ _mav_put_int32_t(buf, 4, latitude);
|
|
|
+ _mav_put_float(buf, 8, amsl);
|
|
|
+ _mav_put_float(buf, 12, ve);
|
|
|
+ _mav_put_float(buf, 16, vn);
|
|
|
+ _mav_put_float(buf, 20, vu);
|
|
|
+ _mav_put_uint8_t(buf, 24, flag);
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION, buf, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_MIN_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_CRC);
|
|
|
+#else
|
|
|
+ mavlink_vkfly_lidar_target_globla_position_t packet;
|
|
|
+ packet.longitude = longitude;
|
|
|
+ packet.latitude = latitude;
|
|
|
+ packet.amsl = amsl;
|
|
|
+ packet.ve = ve;
|
|
|
+ packet.vn = vn;
|
|
|
+ packet.vu = vu;
|
|
|
+ packet.flag = flag;
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION, (const char *)&packet, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_MIN_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Send a vkfly_lidar_target_globla_position message
|
|
|
+ * @param chan MAVLink channel to send the message
|
|
|
+ * @param struct The MAVLink struct to serialize
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vkfly_lidar_target_globla_position_send_struct(mavlink_channel_t chan, const mavlink_vkfly_lidar_target_globla_position_t* vkfly_lidar_target_globla_position)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ mavlink_msg_vkfly_lidar_target_globla_position_send(chan, vkfly_lidar_target_globla_position->longitude, vkfly_lidar_target_globla_position->latitude, vkfly_lidar_target_globla_position->amsl, vkfly_lidar_target_globla_position->ve, vkfly_lidar_target_globla_position->vn, vkfly_lidar_target_globla_position->vu, vkfly_lidar_target_globla_position->flag);
|
|
|
+#else
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION, (const char *)vkfly_lidar_target_globla_position, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_MIN_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+#if MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_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_vkfly_lidar_target_globla_position_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, int32_t longitude, int32_t latitude, float amsl, float ve, float vn, float vu, uint8_t flag)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char *buf = (char *)msgbuf;
|
|
|
+ _mav_put_int32_t(buf, 0, longitude);
|
|
|
+ _mav_put_int32_t(buf, 4, latitude);
|
|
|
+ _mav_put_float(buf, 8, amsl);
|
|
|
+ _mav_put_float(buf, 12, ve);
|
|
|
+ _mav_put_float(buf, 16, vn);
|
|
|
+ _mav_put_float(buf, 20, vu);
|
|
|
+ _mav_put_uint8_t(buf, 24, flag);
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION, buf, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_MIN_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_CRC);
|
|
|
+#else
|
|
|
+ mavlink_vkfly_lidar_target_globla_position_t *packet = (mavlink_vkfly_lidar_target_globla_position_t *)msgbuf;
|
|
|
+ packet->longitude = longitude;
|
|
|
+ packet->latitude = latitude;
|
|
|
+ packet->amsl = amsl;
|
|
|
+ packet->ve = ve;
|
|
|
+ packet->vn = vn;
|
|
|
+ packet->vu = vu;
|
|
|
+ packet->flag = flag;
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION, (const char *)packet, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_MIN_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+#endif
|
|
|
+
|
|
|
+// MESSAGE VKFLY_LIDAR_TARGET_GLOBLA_POSITION UNPACKING
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field longitude from vkfly_lidar_target_globla_position message
|
|
|
+ *
|
|
|
+ * @return [degE7] radar target longitude
|
|
|
+ */
|
|
|
+static inline int32_t mavlink_msg_vkfly_lidar_target_globla_position_get_longitude(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int32_t(msg, 0);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field latitude from vkfly_lidar_target_globla_position message
|
|
|
+ *
|
|
|
+ * @return [degE7] radar target latitdue
|
|
|
+ */
|
|
|
+static inline int32_t mavlink_msg_vkfly_lidar_target_globla_position_get_latitude(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int32_t(msg, 4);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field amsl from vkfly_lidar_target_globla_position message
|
|
|
+ *
|
|
|
+ * @return [m] radar target amsl altitude
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vkfly_lidar_target_globla_position_get_amsl(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 8);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field ve from vkfly_lidar_target_globla_position message
|
|
|
+ *
|
|
|
+ * @return [m/s] radar target amsl altitude
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vkfly_lidar_target_globla_position_get_ve(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 12);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field vn from vkfly_lidar_target_globla_position message
|
|
|
+ *
|
|
|
+ * @return [m/s] radar target amsl altitude
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vkfly_lidar_target_globla_position_get_vn(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 16);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field vu from vkfly_lidar_target_globla_position message
|
|
|
+ *
|
|
|
+ * @return [m/s] radar target amsl altitude
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vkfly_lidar_target_globla_position_get_vu(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 20);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field flag from vkfly_lidar_target_globla_position message
|
|
|
+ *
|
|
|
+ * @return radar target location status
|
|
|
+ */
|
|
|
+static inline uint8_t mavlink_msg_vkfly_lidar_target_globla_position_get_flag(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint8_t(msg, 24);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Decode a vkfly_lidar_target_globla_position message into a struct
|
|
|
+ *
|
|
|
+ * @param msg The message to decode
|
|
|
+ * @param vkfly_lidar_target_globla_position C-struct to decode the message contents into
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vkfly_lidar_target_globla_position_decode(const mavlink_message_t* msg, mavlink_vkfly_lidar_target_globla_position_t* vkfly_lidar_target_globla_position)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ vkfly_lidar_target_globla_position->longitude = mavlink_msg_vkfly_lidar_target_globla_position_get_longitude(msg);
|
|
|
+ vkfly_lidar_target_globla_position->latitude = mavlink_msg_vkfly_lidar_target_globla_position_get_latitude(msg);
|
|
|
+ vkfly_lidar_target_globla_position->amsl = mavlink_msg_vkfly_lidar_target_globla_position_get_amsl(msg);
|
|
|
+ vkfly_lidar_target_globla_position->ve = mavlink_msg_vkfly_lidar_target_globla_position_get_ve(msg);
|
|
|
+ vkfly_lidar_target_globla_position->vn = mavlink_msg_vkfly_lidar_target_globla_position_get_vn(msg);
|
|
|
+ vkfly_lidar_target_globla_position->vu = mavlink_msg_vkfly_lidar_target_globla_position_get_vu(msg);
|
|
|
+ vkfly_lidar_target_globla_position->flag = mavlink_msg_vkfly_lidar_target_globla_position_get_flag(msg);
|
|
|
+#else
|
|
|
+ uint8_t len = msg->len < MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN? msg->len : MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN;
|
|
|
+ memset(vkfly_lidar_target_globla_position, 0, MAVLINK_MSG_ID_VKFLY_LIDAR_TARGET_GLOBLA_POSITION_LEN);
|
|
|
+ memcpy(vkfly_lidar_target_globla_position, _MAV_PAYLOAD(msg), len);
|
|
|
+#endif
|
|
|
+}
|