|
|
@@ -0,0 +1,708 @@
|
|
|
+#pragma once
|
|
|
+// MESSAGE VK_ATTITUDE_GLOBAL_POSITION_INT PACKING
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT 53301
|
|
|
+
|
|
|
+
|
|
|
+typedef struct __mavlink_vk_attitude_global_position_int_t {
|
|
|
+ uint32_t time_boot_ms; /*< [ms] Timestamp (time since system boot).*/
|
|
|
+ float roll; /*< [rad] Roll angle (-pi..+pi)*/
|
|
|
+ float pitch; /*< [rad] Pitch angle (-pi..+pi)*/
|
|
|
+ float yaw; /*< [rad] Yaw angle (-pi..+pi)*/
|
|
|
+ float rollspeed; /*< [rad/s] Roll angular speed*/
|
|
|
+ float pitchspeed; /*< [rad/s] Pitch angular speed*/
|
|
|
+ float yawspeed; /*< [rad/s] Yaw angular speed*/
|
|
|
+ int32_t lat; /*< [degE7] Latitude, expressed*/
|
|
|
+ int32_t lon; /*< [degE7] Longitude, expressed*/
|
|
|
+ int32_t alt; /*< [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.*/
|
|
|
+ int32_t relative_alt; /*< [mm] Altitude above ground*/
|
|
|
+ int16_t vx; /*< [cm/s] Ground X Speed (Latitude, positive north)*/
|
|
|
+ int16_t vy; /*< [cm/s] Ground Y Speed (Longitude, positive east)*/
|
|
|
+ int16_t vz; /*< [cm/s] Ground Z Speed (Altitude, positive down)*/
|
|
|
+ int16_t ax; /*< [cm/s^2] Ground X acceleration (Latitude, positive north)*/
|
|
|
+ int16_t ay; /*< [cm/s^2] Ground Y acceleration (Longitude, positive east)*/
|
|
|
+ int16_t az; /*< [cm/s^2] Ground Z acceleration (Altitude, positive down)*/
|
|
|
+} mavlink_vk_attitude_global_position_int_t;
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN 56
|
|
|
+#define MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_MIN_LEN 56
|
|
|
+#define MAVLINK_MSG_ID_53301_LEN 56
|
|
|
+#define MAVLINK_MSG_ID_53301_MIN_LEN 56
|
|
|
+
|
|
|
+#define MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_CRC 6
|
|
|
+#define MAVLINK_MSG_ID_53301_CRC 6
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+#if MAVLINK_COMMAND_24BIT
|
|
|
+#define MAVLINK_MESSAGE_INFO_VK_ATTITUDE_GLOBAL_POSITION_INT { \
|
|
|
+ 53301, \
|
|
|
+ "VK_ATTITUDE_GLOBAL_POSITION_INT", \
|
|
|
+ 17, \
|
|
|
+ { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_attitude_global_position_int_t, time_boot_ms) }, \
|
|
|
+ { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_vk_attitude_global_position_int_t, roll) }, \
|
|
|
+ { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vk_attitude_global_position_int_t, pitch) }, \
|
|
|
+ { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vk_attitude_global_position_int_t, yaw) }, \
|
|
|
+ { "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vk_attitude_global_position_int_t, rollspeed) }, \
|
|
|
+ { "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vk_attitude_global_position_int_t, pitchspeed) }, \
|
|
|
+ { "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_vk_attitude_global_position_int_t, yawspeed) }, \
|
|
|
+ { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 28, offsetof(mavlink_vk_attitude_global_position_int_t, lat) }, \
|
|
|
+ { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 32, offsetof(mavlink_vk_attitude_global_position_int_t, lon) }, \
|
|
|
+ { "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_vk_attitude_global_position_int_t, alt) }, \
|
|
|
+ { "relative_alt", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_vk_attitude_global_position_int_t, relative_alt) }, \
|
|
|
+ { "vx", NULL, MAVLINK_TYPE_INT16_T, 0, 44, offsetof(mavlink_vk_attitude_global_position_int_t, vx) }, \
|
|
|
+ { "vy", NULL, MAVLINK_TYPE_INT16_T, 0, 46, offsetof(mavlink_vk_attitude_global_position_int_t, vy) }, \
|
|
|
+ { "vz", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_vk_attitude_global_position_int_t, vz) }, \
|
|
|
+ { "ax", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_vk_attitude_global_position_int_t, ax) }, \
|
|
|
+ { "ay", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_vk_attitude_global_position_int_t, ay) }, \
|
|
|
+ { "az", NULL, MAVLINK_TYPE_INT16_T, 0, 54, offsetof(mavlink_vk_attitude_global_position_int_t, az) }, \
|
|
|
+ } \
|
|
|
+}
|
|
|
+#else
|
|
|
+#define MAVLINK_MESSAGE_INFO_VK_ATTITUDE_GLOBAL_POSITION_INT { \
|
|
|
+ "VK_ATTITUDE_GLOBAL_POSITION_INT", \
|
|
|
+ 17, \
|
|
|
+ { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_attitude_global_position_int_t, time_boot_ms) }, \
|
|
|
+ { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_vk_attitude_global_position_int_t, roll) }, \
|
|
|
+ { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vk_attitude_global_position_int_t, pitch) }, \
|
|
|
+ { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vk_attitude_global_position_int_t, yaw) }, \
|
|
|
+ { "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vk_attitude_global_position_int_t, rollspeed) }, \
|
|
|
+ { "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vk_attitude_global_position_int_t, pitchspeed) }, \
|
|
|
+ { "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_vk_attitude_global_position_int_t, yawspeed) }, \
|
|
|
+ { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 28, offsetof(mavlink_vk_attitude_global_position_int_t, lat) }, \
|
|
|
+ { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 32, offsetof(mavlink_vk_attitude_global_position_int_t, lon) }, \
|
|
|
+ { "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_vk_attitude_global_position_int_t, alt) }, \
|
|
|
+ { "relative_alt", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_vk_attitude_global_position_int_t, relative_alt) }, \
|
|
|
+ { "vx", NULL, MAVLINK_TYPE_INT16_T, 0, 44, offsetof(mavlink_vk_attitude_global_position_int_t, vx) }, \
|
|
|
+ { "vy", NULL, MAVLINK_TYPE_INT16_T, 0, 46, offsetof(mavlink_vk_attitude_global_position_int_t, vy) }, \
|
|
|
+ { "vz", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_vk_attitude_global_position_int_t, vz) }, \
|
|
|
+ { "ax", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_vk_attitude_global_position_int_t, ax) }, \
|
|
|
+ { "ay", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_vk_attitude_global_position_int_t, ay) }, \
|
|
|
+ { "az", NULL, MAVLINK_TYPE_INT16_T, 0, 54, offsetof(mavlink_vk_attitude_global_position_int_t, az) }, \
|
|
|
+ } \
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_attitude_global_position_int message
|
|
|
+ * @param system_id ID of this system
|
|
|
+ * @param component_id ID of this component (e.g. 200 for IMU)
|
|
|
+ * @param msg The MAVLink message to compress the data into
|
|
|
+ *
|
|
|
+ * @param time_boot_ms [ms] Timestamp (time since system boot).
|
|
|
+ * @param roll [rad] Roll angle (-pi..+pi)
|
|
|
+ * @param pitch [rad] Pitch angle (-pi..+pi)
|
|
|
+ * @param yaw [rad] Yaw angle (-pi..+pi)
|
|
|
+ * @param rollspeed [rad/s] Roll angular speed
|
|
|
+ * @param pitchspeed [rad/s] Pitch angular speed
|
|
|
+ * @param yawspeed [rad/s] Yaw angular speed
|
|
|
+ * @param lat [degE7] Latitude, expressed
|
|
|
+ * @param lon [degE7] Longitude, expressed
|
|
|
+ * @param alt [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.
|
|
|
+ * @param relative_alt [mm] Altitude above ground
|
|
|
+ * @param vx [cm/s] Ground X Speed (Latitude, positive north)
|
|
|
+ * @param vy [cm/s] Ground Y Speed (Longitude, positive east)
|
|
|
+ * @param vz [cm/s] Ground Z Speed (Altitude, positive down)
|
|
|
+ * @param ax [cm/s^2] Ground X acceleration (Latitude, positive north)
|
|
|
+ * @param ay [cm/s^2] Ground Y acceleration (Longitude, positive east)
|
|
|
+ * @param az [cm/s^2] Ground Z acceleration (Altitude, positive down)
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_attitude_global_position_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
|
|
+ uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, int16_t ax, int16_t ay, int16_t az)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, time_boot_ms);
|
|
|
+ _mav_put_float(buf, 4, roll);
|
|
|
+ _mav_put_float(buf, 8, pitch);
|
|
|
+ _mav_put_float(buf, 12, yaw);
|
|
|
+ _mav_put_float(buf, 16, rollspeed);
|
|
|
+ _mav_put_float(buf, 20, pitchspeed);
|
|
|
+ _mav_put_float(buf, 24, yawspeed);
|
|
|
+ _mav_put_int32_t(buf, 28, lat);
|
|
|
+ _mav_put_int32_t(buf, 32, lon);
|
|
|
+ _mav_put_int32_t(buf, 36, alt);
|
|
|
+ _mav_put_int32_t(buf, 40, relative_alt);
|
|
|
+ _mav_put_int16_t(buf, 44, vx);
|
|
|
+ _mav_put_int16_t(buf, 46, vy);
|
|
|
+ _mav_put_int16_t(buf, 48, vz);
|
|
|
+ _mav_put_int16_t(buf, 50, ax);
|
|
|
+ _mav_put_int16_t(buf, 52, ay);
|
|
|
+ _mav_put_int16_t(buf, 54, az);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_attitude_global_position_int_t packet;
|
|
|
+ packet.time_boot_ms = time_boot_ms;
|
|
|
+ packet.roll = roll;
|
|
|
+ packet.pitch = pitch;
|
|
|
+ packet.yaw = yaw;
|
|
|
+ packet.rollspeed = rollspeed;
|
|
|
+ packet.pitchspeed = pitchspeed;
|
|
|
+ packet.yawspeed = yawspeed;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.alt = alt;
|
|
|
+ packet.relative_alt = relative_alt;
|
|
|
+ packet.vx = vx;
|
|
|
+ packet.vy = vy;
|
|
|
+ packet.vz = vz;
|
|
|
+ packet.ax = ax;
|
|
|
+ packet.ay = ay;
|
|
|
+ packet.az = az;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT;
|
|
|
+ return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_MIN_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_CRC);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_attitude_global_position_int 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 time_boot_ms [ms] Timestamp (time since system boot).
|
|
|
+ * @param roll [rad] Roll angle (-pi..+pi)
|
|
|
+ * @param pitch [rad] Pitch angle (-pi..+pi)
|
|
|
+ * @param yaw [rad] Yaw angle (-pi..+pi)
|
|
|
+ * @param rollspeed [rad/s] Roll angular speed
|
|
|
+ * @param pitchspeed [rad/s] Pitch angular speed
|
|
|
+ * @param yawspeed [rad/s] Yaw angular speed
|
|
|
+ * @param lat [degE7] Latitude, expressed
|
|
|
+ * @param lon [degE7] Longitude, expressed
|
|
|
+ * @param alt [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.
|
|
|
+ * @param relative_alt [mm] Altitude above ground
|
|
|
+ * @param vx [cm/s] Ground X Speed (Latitude, positive north)
|
|
|
+ * @param vy [cm/s] Ground Y Speed (Longitude, positive east)
|
|
|
+ * @param vz [cm/s] Ground Z Speed (Altitude, positive down)
|
|
|
+ * @param ax [cm/s^2] Ground X acceleration (Latitude, positive north)
|
|
|
+ * @param ay [cm/s^2] Ground Y acceleration (Longitude, positive east)
|
|
|
+ * @param az [cm/s^2] Ground Z acceleration (Altitude, positive down)
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_attitude_global_position_int_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
|
|
+ uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, int16_t ax, int16_t ay, int16_t az)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, time_boot_ms);
|
|
|
+ _mav_put_float(buf, 4, roll);
|
|
|
+ _mav_put_float(buf, 8, pitch);
|
|
|
+ _mav_put_float(buf, 12, yaw);
|
|
|
+ _mav_put_float(buf, 16, rollspeed);
|
|
|
+ _mav_put_float(buf, 20, pitchspeed);
|
|
|
+ _mav_put_float(buf, 24, yawspeed);
|
|
|
+ _mav_put_int32_t(buf, 28, lat);
|
|
|
+ _mav_put_int32_t(buf, 32, lon);
|
|
|
+ _mav_put_int32_t(buf, 36, alt);
|
|
|
+ _mav_put_int32_t(buf, 40, relative_alt);
|
|
|
+ _mav_put_int16_t(buf, 44, vx);
|
|
|
+ _mav_put_int16_t(buf, 46, vy);
|
|
|
+ _mav_put_int16_t(buf, 48, vz);
|
|
|
+ _mav_put_int16_t(buf, 50, ax);
|
|
|
+ _mav_put_int16_t(buf, 52, ay);
|
|
|
+ _mav_put_int16_t(buf, 54, az);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_attitude_global_position_int_t packet;
|
|
|
+ packet.time_boot_ms = time_boot_ms;
|
|
|
+ packet.roll = roll;
|
|
|
+ packet.pitch = pitch;
|
|
|
+ packet.yaw = yaw;
|
|
|
+ packet.rollspeed = rollspeed;
|
|
|
+ packet.pitchspeed = pitchspeed;
|
|
|
+ packet.yawspeed = yawspeed;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.alt = alt;
|
|
|
+ packet.relative_alt = relative_alt;
|
|
|
+ packet.vx = vx;
|
|
|
+ packet.vy = vy;
|
|
|
+ packet.vz = vz;
|
|
|
+ packet.ax = ax;
|
|
|
+ packet.ay = ay;
|
|
|
+ packet.az = az;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT;
|
|
|
+#if MAVLINK_CRC_EXTRA
|
|
|
+ return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_MIN_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_CRC);
|
|
|
+#else
|
|
|
+ return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_MIN_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Pack a vk_attitude_global_position_int 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 time_boot_ms [ms] Timestamp (time since system boot).
|
|
|
+ * @param roll [rad] Roll angle (-pi..+pi)
|
|
|
+ * @param pitch [rad] Pitch angle (-pi..+pi)
|
|
|
+ * @param yaw [rad] Yaw angle (-pi..+pi)
|
|
|
+ * @param rollspeed [rad/s] Roll angular speed
|
|
|
+ * @param pitchspeed [rad/s] Pitch angular speed
|
|
|
+ * @param yawspeed [rad/s] Yaw angular speed
|
|
|
+ * @param lat [degE7] Latitude, expressed
|
|
|
+ * @param lon [degE7] Longitude, expressed
|
|
|
+ * @param alt [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.
|
|
|
+ * @param relative_alt [mm] Altitude above ground
|
|
|
+ * @param vx [cm/s] Ground X Speed (Latitude, positive north)
|
|
|
+ * @param vy [cm/s] Ground Y Speed (Longitude, positive east)
|
|
|
+ * @param vz [cm/s] Ground Z Speed (Altitude, positive down)
|
|
|
+ * @param ax [cm/s^2] Ground X acceleration (Latitude, positive north)
|
|
|
+ * @param ay [cm/s^2] Ground Y acceleration (Longitude, positive east)
|
|
|
+ * @param az [cm/s^2] Ground Z acceleration (Altitude, positive down)
|
|
|
+ * @return length of the message in bytes (excluding serial stream start sign)
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_attitude_global_position_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
|
|
+ mavlink_message_t* msg,
|
|
|
+ uint32_t time_boot_ms,float roll,float pitch,float yaw,float rollspeed,float pitchspeed,float yawspeed,int32_t lat,int32_t lon,int32_t alt,int32_t relative_alt,int16_t vx,int16_t vy,int16_t vz,int16_t ax,int16_t ay,int16_t az)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, time_boot_ms);
|
|
|
+ _mav_put_float(buf, 4, roll);
|
|
|
+ _mav_put_float(buf, 8, pitch);
|
|
|
+ _mav_put_float(buf, 12, yaw);
|
|
|
+ _mav_put_float(buf, 16, rollspeed);
|
|
|
+ _mav_put_float(buf, 20, pitchspeed);
|
|
|
+ _mav_put_float(buf, 24, yawspeed);
|
|
|
+ _mav_put_int32_t(buf, 28, lat);
|
|
|
+ _mav_put_int32_t(buf, 32, lon);
|
|
|
+ _mav_put_int32_t(buf, 36, alt);
|
|
|
+ _mav_put_int32_t(buf, 40, relative_alt);
|
|
|
+ _mav_put_int16_t(buf, 44, vx);
|
|
|
+ _mav_put_int16_t(buf, 46, vy);
|
|
|
+ _mav_put_int16_t(buf, 48, vz);
|
|
|
+ _mav_put_int16_t(buf, 50, ax);
|
|
|
+ _mav_put_int16_t(buf, 52, ay);
|
|
|
+ _mav_put_int16_t(buf, 54, az);
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN);
|
|
|
+#else
|
|
|
+ mavlink_vk_attitude_global_position_int_t packet;
|
|
|
+ packet.time_boot_ms = time_boot_ms;
|
|
|
+ packet.roll = roll;
|
|
|
+ packet.pitch = pitch;
|
|
|
+ packet.yaw = yaw;
|
|
|
+ packet.rollspeed = rollspeed;
|
|
|
+ packet.pitchspeed = pitchspeed;
|
|
|
+ packet.yawspeed = yawspeed;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.alt = alt;
|
|
|
+ packet.relative_alt = relative_alt;
|
|
|
+ packet.vx = vx;
|
|
|
+ packet.vy = vy;
|
|
|
+ packet.vz = vz;
|
|
|
+ packet.ax = ax;
|
|
|
+ packet.ay = ay;
|
|
|
+ packet.az = az;
|
|
|
+
|
|
|
+ memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN);
|
|
|
+#endif
|
|
|
+
|
|
|
+ msg->msgid = MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT;
|
|
|
+ return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_MIN_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_CRC);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_attitude_global_position_int 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_attitude_global_position_int C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_attitude_global_position_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_attitude_global_position_int_t* vk_attitude_global_position_int)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_attitude_global_position_int_pack(system_id, component_id, msg, vk_attitude_global_position_int->time_boot_ms, vk_attitude_global_position_int->roll, vk_attitude_global_position_int->pitch, vk_attitude_global_position_int->yaw, vk_attitude_global_position_int->rollspeed, vk_attitude_global_position_int->pitchspeed, vk_attitude_global_position_int->yawspeed, vk_attitude_global_position_int->lat, vk_attitude_global_position_int->lon, vk_attitude_global_position_int->alt, vk_attitude_global_position_int->relative_alt, vk_attitude_global_position_int->vx, vk_attitude_global_position_int->vy, vk_attitude_global_position_int->vz, vk_attitude_global_position_int->ax, vk_attitude_global_position_int->ay, vk_attitude_global_position_int->az);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_attitude_global_position_int 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_attitude_global_position_int C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_attitude_global_position_int_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_attitude_global_position_int_t* vk_attitude_global_position_int)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_attitude_global_position_int_pack_chan(system_id, component_id, chan, msg, vk_attitude_global_position_int->time_boot_ms, vk_attitude_global_position_int->roll, vk_attitude_global_position_int->pitch, vk_attitude_global_position_int->yaw, vk_attitude_global_position_int->rollspeed, vk_attitude_global_position_int->pitchspeed, vk_attitude_global_position_int->yawspeed, vk_attitude_global_position_int->lat, vk_attitude_global_position_int->lon, vk_attitude_global_position_int->alt, vk_attitude_global_position_int->relative_alt, vk_attitude_global_position_int->vx, vk_attitude_global_position_int->vy, vk_attitude_global_position_int->vz, vk_attitude_global_position_int->ax, vk_attitude_global_position_int->ay, vk_attitude_global_position_int->az);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Encode a vk_attitude_global_position_int 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_attitude_global_position_int C-struct to read the message contents from
|
|
|
+ */
|
|
|
+static inline uint16_t mavlink_msg_vk_attitude_global_position_int_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_attitude_global_position_int_t* vk_attitude_global_position_int)
|
|
|
+{
|
|
|
+ return mavlink_msg_vk_attitude_global_position_int_pack_status(system_id, component_id, _status, msg, vk_attitude_global_position_int->time_boot_ms, vk_attitude_global_position_int->roll, vk_attitude_global_position_int->pitch, vk_attitude_global_position_int->yaw, vk_attitude_global_position_int->rollspeed, vk_attitude_global_position_int->pitchspeed, vk_attitude_global_position_int->yawspeed, vk_attitude_global_position_int->lat, vk_attitude_global_position_int->lon, vk_attitude_global_position_int->alt, vk_attitude_global_position_int->relative_alt, vk_attitude_global_position_int->vx, vk_attitude_global_position_int->vy, vk_attitude_global_position_int->vz, vk_attitude_global_position_int->ax, vk_attitude_global_position_int->ay, vk_attitude_global_position_int->az);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Send a vk_attitude_global_position_int message
|
|
|
+ * @param chan MAVLink channel to send the message
|
|
|
+ *
|
|
|
+ * @param time_boot_ms [ms] Timestamp (time since system boot).
|
|
|
+ * @param roll [rad] Roll angle (-pi..+pi)
|
|
|
+ * @param pitch [rad] Pitch angle (-pi..+pi)
|
|
|
+ * @param yaw [rad] Yaw angle (-pi..+pi)
|
|
|
+ * @param rollspeed [rad/s] Roll angular speed
|
|
|
+ * @param pitchspeed [rad/s] Pitch angular speed
|
|
|
+ * @param yawspeed [rad/s] Yaw angular speed
|
|
|
+ * @param lat [degE7] Latitude, expressed
|
|
|
+ * @param lon [degE7] Longitude, expressed
|
|
|
+ * @param alt [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.
|
|
|
+ * @param relative_alt [mm] Altitude above ground
|
|
|
+ * @param vx [cm/s] Ground X Speed (Latitude, positive north)
|
|
|
+ * @param vy [cm/s] Ground Y Speed (Longitude, positive east)
|
|
|
+ * @param vz [cm/s] Ground Z Speed (Altitude, positive down)
|
|
|
+ * @param ax [cm/s^2] Ground X acceleration (Latitude, positive north)
|
|
|
+ * @param ay [cm/s^2] Ground Y acceleration (Longitude, positive east)
|
|
|
+ * @param az [cm/s^2] Ground Z acceleration (Altitude, positive down)
|
|
|
+ */
|
|
|
+#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
|
|
+
|
|
|
+static inline void mavlink_msg_vk_attitude_global_position_int_send(mavlink_channel_t chan, uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, int16_t ax, int16_t ay, int16_t az)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char buf[MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN];
|
|
|
+ _mav_put_uint32_t(buf, 0, time_boot_ms);
|
|
|
+ _mav_put_float(buf, 4, roll);
|
|
|
+ _mav_put_float(buf, 8, pitch);
|
|
|
+ _mav_put_float(buf, 12, yaw);
|
|
|
+ _mav_put_float(buf, 16, rollspeed);
|
|
|
+ _mav_put_float(buf, 20, pitchspeed);
|
|
|
+ _mav_put_float(buf, 24, yawspeed);
|
|
|
+ _mav_put_int32_t(buf, 28, lat);
|
|
|
+ _mav_put_int32_t(buf, 32, lon);
|
|
|
+ _mav_put_int32_t(buf, 36, alt);
|
|
|
+ _mav_put_int32_t(buf, 40, relative_alt);
|
|
|
+ _mav_put_int16_t(buf, 44, vx);
|
|
|
+ _mav_put_int16_t(buf, 46, vy);
|
|
|
+ _mav_put_int16_t(buf, 48, vz);
|
|
|
+ _mav_put_int16_t(buf, 50, ax);
|
|
|
+ _mav_put_int16_t(buf, 52, ay);
|
|
|
+ _mav_put_int16_t(buf, 54, az);
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT, buf, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_MIN_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_CRC);
|
|
|
+#else
|
|
|
+ mavlink_vk_attitude_global_position_int_t packet;
|
|
|
+ packet.time_boot_ms = time_boot_ms;
|
|
|
+ packet.roll = roll;
|
|
|
+ packet.pitch = pitch;
|
|
|
+ packet.yaw = yaw;
|
|
|
+ packet.rollspeed = rollspeed;
|
|
|
+ packet.pitchspeed = pitchspeed;
|
|
|
+ packet.yawspeed = yawspeed;
|
|
|
+ packet.lat = lat;
|
|
|
+ packet.lon = lon;
|
|
|
+ packet.alt = alt;
|
|
|
+ packet.relative_alt = relative_alt;
|
|
|
+ packet.vx = vx;
|
|
|
+ packet.vy = vy;
|
|
|
+ packet.vz = vz;
|
|
|
+ packet.ax = ax;
|
|
|
+ packet.ay = ay;
|
|
|
+ packet.az = az;
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT, (const char *)&packet, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_MIN_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Send a vk_attitude_global_position_int message
|
|
|
+ * @param chan MAVLink channel to send the message
|
|
|
+ * @param struct The MAVLink struct to serialize
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vk_attitude_global_position_int_send_struct(mavlink_channel_t chan, const mavlink_vk_attitude_global_position_int_t* vk_attitude_global_position_int)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ mavlink_msg_vk_attitude_global_position_int_send(chan, vk_attitude_global_position_int->time_boot_ms, vk_attitude_global_position_int->roll, vk_attitude_global_position_int->pitch, vk_attitude_global_position_int->yaw, vk_attitude_global_position_int->rollspeed, vk_attitude_global_position_int->pitchspeed, vk_attitude_global_position_int->yawspeed, vk_attitude_global_position_int->lat, vk_attitude_global_position_int->lon, vk_attitude_global_position_int->alt, vk_attitude_global_position_int->relative_alt, vk_attitude_global_position_int->vx, vk_attitude_global_position_int->vy, vk_attitude_global_position_int->vz, vk_attitude_global_position_int->ax, vk_attitude_global_position_int->ay, vk_attitude_global_position_int->az);
|
|
|
+#else
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT, (const char *)vk_attitude_global_position_int, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_MIN_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+#if MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_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_attitude_global_position_int_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, float roll, float pitch, float yaw, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, int16_t vx, int16_t vy, int16_t vz, int16_t ax, int16_t ay, int16_t az)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ char *buf = (char *)msgbuf;
|
|
|
+ _mav_put_uint32_t(buf, 0, time_boot_ms);
|
|
|
+ _mav_put_float(buf, 4, roll);
|
|
|
+ _mav_put_float(buf, 8, pitch);
|
|
|
+ _mav_put_float(buf, 12, yaw);
|
|
|
+ _mav_put_float(buf, 16, rollspeed);
|
|
|
+ _mav_put_float(buf, 20, pitchspeed);
|
|
|
+ _mav_put_float(buf, 24, yawspeed);
|
|
|
+ _mav_put_int32_t(buf, 28, lat);
|
|
|
+ _mav_put_int32_t(buf, 32, lon);
|
|
|
+ _mav_put_int32_t(buf, 36, alt);
|
|
|
+ _mav_put_int32_t(buf, 40, relative_alt);
|
|
|
+ _mav_put_int16_t(buf, 44, vx);
|
|
|
+ _mav_put_int16_t(buf, 46, vy);
|
|
|
+ _mav_put_int16_t(buf, 48, vz);
|
|
|
+ _mav_put_int16_t(buf, 50, ax);
|
|
|
+ _mav_put_int16_t(buf, 52, ay);
|
|
|
+ _mav_put_int16_t(buf, 54, az);
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT, buf, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_MIN_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_CRC);
|
|
|
+#else
|
|
|
+ mavlink_vk_attitude_global_position_int_t *packet = (mavlink_vk_attitude_global_position_int_t *)msgbuf;
|
|
|
+ packet->time_boot_ms = time_boot_ms;
|
|
|
+ packet->roll = roll;
|
|
|
+ packet->pitch = pitch;
|
|
|
+ packet->yaw = yaw;
|
|
|
+ packet->rollspeed = rollspeed;
|
|
|
+ packet->pitchspeed = pitchspeed;
|
|
|
+ packet->yawspeed = yawspeed;
|
|
|
+ packet->lat = lat;
|
|
|
+ packet->lon = lon;
|
|
|
+ packet->alt = alt;
|
|
|
+ packet->relative_alt = relative_alt;
|
|
|
+ packet->vx = vx;
|
|
|
+ packet->vy = vy;
|
|
|
+ packet->vz = vz;
|
|
|
+ packet->ax = ax;
|
|
|
+ packet->ay = ay;
|
|
|
+ packet->az = az;
|
|
|
+
|
|
|
+ _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT, (const char *)packet, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_MIN_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_CRC);
|
|
|
+#endif
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+#endif
|
|
|
+
|
|
|
+// MESSAGE VK_ATTITUDE_GLOBAL_POSITION_INT UNPACKING
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field time_boot_ms from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [ms] Timestamp (time since system boot).
|
|
|
+ */
|
|
|
+static inline uint32_t mavlink_msg_vk_attitude_global_position_int_get_time_boot_ms(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_uint32_t(msg, 0);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field roll from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [rad] Roll angle (-pi..+pi)
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_attitude_global_position_int_get_roll(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 4);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field pitch from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [rad] Pitch angle (-pi..+pi)
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_attitude_global_position_int_get_pitch(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 8);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field yaw from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [rad] Yaw angle (-pi..+pi)
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_attitude_global_position_int_get_yaw(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 12);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field rollspeed from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [rad/s] Roll angular speed
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_attitude_global_position_int_get_rollspeed(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 16);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field pitchspeed from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [rad/s] Pitch angular speed
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_attitude_global_position_int_get_pitchspeed(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 20);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field yawspeed from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [rad/s] Yaw angular speed
|
|
|
+ */
|
|
|
+static inline float mavlink_msg_vk_attitude_global_position_int_get_yawspeed(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_float(msg, 24);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field lat from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [degE7] Latitude, expressed
|
|
|
+ */
|
|
|
+static inline int32_t mavlink_msg_vk_attitude_global_position_int_get_lat(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int32_t(msg, 28);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field lon from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [degE7] Longitude, expressed
|
|
|
+ */
|
|
|
+static inline int32_t mavlink_msg_vk_attitude_global_position_int_get_lon(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int32_t(msg, 32);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field alt from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.
|
|
|
+ */
|
|
|
+static inline int32_t mavlink_msg_vk_attitude_global_position_int_get_alt(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int32_t(msg, 36);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field relative_alt from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [mm] Altitude above ground
|
|
|
+ */
|
|
|
+static inline int32_t mavlink_msg_vk_attitude_global_position_int_get_relative_alt(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int32_t(msg, 40);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field vx from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [cm/s] Ground X Speed (Latitude, positive north)
|
|
|
+ */
|
|
|
+static inline int16_t mavlink_msg_vk_attitude_global_position_int_get_vx(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int16_t(msg, 44);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field vy from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [cm/s] Ground Y Speed (Longitude, positive east)
|
|
|
+ */
|
|
|
+static inline int16_t mavlink_msg_vk_attitude_global_position_int_get_vy(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int16_t(msg, 46);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field vz from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [cm/s] Ground Z Speed (Altitude, positive down)
|
|
|
+ */
|
|
|
+static inline int16_t mavlink_msg_vk_attitude_global_position_int_get_vz(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int16_t(msg, 48);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field ax from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [cm/s^2] Ground X acceleration (Latitude, positive north)
|
|
|
+ */
|
|
|
+static inline int16_t mavlink_msg_vk_attitude_global_position_int_get_ax(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int16_t(msg, 50);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field ay from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [cm/s^2] Ground Y acceleration (Longitude, positive east)
|
|
|
+ */
|
|
|
+static inline int16_t mavlink_msg_vk_attitude_global_position_int_get_ay(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int16_t(msg, 52);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Get field az from vk_attitude_global_position_int message
|
|
|
+ *
|
|
|
+ * @return [cm/s^2] Ground Z acceleration (Altitude, positive down)
|
|
|
+ */
|
|
|
+static inline int16_t mavlink_msg_vk_attitude_global_position_int_get_az(const mavlink_message_t* msg)
|
|
|
+{
|
|
|
+ return _MAV_RETURN_int16_t(msg, 54);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * @brief Decode a vk_attitude_global_position_int message into a struct
|
|
|
+ *
|
|
|
+ * @param msg The message to decode
|
|
|
+ * @param vk_attitude_global_position_int C-struct to decode the message contents into
|
|
|
+ */
|
|
|
+static inline void mavlink_msg_vk_attitude_global_position_int_decode(const mavlink_message_t* msg, mavlink_vk_attitude_global_position_int_t* vk_attitude_global_position_int)
|
|
|
+{
|
|
|
+#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
|
|
+ vk_attitude_global_position_int->time_boot_ms = mavlink_msg_vk_attitude_global_position_int_get_time_boot_ms(msg);
|
|
|
+ vk_attitude_global_position_int->roll = mavlink_msg_vk_attitude_global_position_int_get_roll(msg);
|
|
|
+ vk_attitude_global_position_int->pitch = mavlink_msg_vk_attitude_global_position_int_get_pitch(msg);
|
|
|
+ vk_attitude_global_position_int->yaw = mavlink_msg_vk_attitude_global_position_int_get_yaw(msg);
|
|
|
+ vk_attitude_global_position_int->rollspeed = mavlink_msg_vk_attitude_global_position_int_get_rollspeed(msg);
|
|
|
+ vk_attitude_global_position_int->pitchspeed = mavlink_msg_vk_attitude_global_position_int_get_pitchspeed(msg);
|
|
|
+ vk_attitude_global_position_int->yawspeed = mavlink_msg_vk_attitude_global_position_int_get_yawspeed(msg);
|
|
|
+ vk_attitude_global_position_int->lat = mavlink_msg_vk_attitude_global_position_int_get_lat(msg);
|
|
|
+ vk_attitude_global_position_int->lon = mavlink_msg_vk_attitude_global_position_int_get_lon(msg);
|
|
|
+ vk_attitude_global_position_int->alt = mavlink_msg_vk_attitude_global_position_int_get_alt(msg);
|
|
|
+ vk_attitude_global_position_int->relative_alt = mavlink_msg_vk_attitude_global_position_int_get_relative_alt(msg);
|
|
|
+ vk_attitude_global_position_int->vx = mavlink_msg_vk_attitude_global_position_int_get_vx(msg);
|
|
|
+ vk_attitude_global_position_int->vy = mavlink_msg_vk_attitude_global_position_int_get_vy(msg);
|
|
|
+ vk_attitude_global_position_int->vz = mavlink_msg_vk_attitude_global_position_int_get_vz(msg);
|
|
|
+ vk_attitude_global_position_int->ax = mavlink_msg_vk_attitude_global_position_int_get_ax(msg);
|
|
|
+ vk_attitude_global_position_int->ay = mavlink_msg_vk_attitude_global_position_int_get_ay(msg);
|
|
|
+ vk_attitude_global_position_int->az = mavlink_msg_vk_attitude_global_position_int_get_az(msg);
|
|
|
+#else
|
|
|
+ uint8_t len = msg->len < MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN? msg->len : MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN;
|
|
|
+ memset(vk_attitude_global_position_int, 0, MAVLINK_MSG_ID_VK_ATTITUDE_GLOBAL_POSITION_INT_LEN);
|
|
|
+ memcpy(vk_attitude_global_position_int, _MAV_PAYLOAD(msg), len);
|
|
|
+#endif
|
|
|
+}
|