#pragma once // MESSAGE VK_MOSAICH_GPS_RAW PACKING #define MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW 53007 typedef struct __mavlink_vk_mosaich_gps_raw_t { uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/ int32_t lat; /*< [degE7] Latitude (WGS84, EGM96 ellipsoid)*/ int32_t lon; /*< [degE7] Longitude (WGS84, EGM96 ellipsoid)*/ float ellipsoid_alt; /*< [m] Altitude (Ellipsoild). Positive for up.*/ float ve; /*< [m/s] Ease speed in m/s.*/ float vn; /*< [m/s] North speed in m/s.*/ float vu; /*< [m/s] Up speed in m/s.*/ float yaw; /*< [deg] Attitude euler yaw.*/ float pitch; /*< [deg] Attitude euler pitch.*/ uint16_t h_acc; /*< [cm] Position uncertainty.*/ uint16_t v_acc; /*< [cm] Altitude uncertainty.*/ uint8_t fix_type; /*< GPS fix type.*/ uint8_t psv_num; /*< Number of satellites for positioning ANT*/ uint8_t pvt_err; /*< refer to mosaic_h reference page 308*/ uint8_t pvt_mode; /*< refer to mosaic_h reference page 308*/ uint8_t hsv_num; /*< Number of satellites for heading ANT*/ uint8_t att_err; /*< refer to mosaic_h reference page 336.*/ uint8_t att_mode; /*< refer to mosaic_h reference page 336.*/ uint8_t reserved; /*< Number of satellites*/ } mavlink_vk_mosaich_gps_raw_t; #define MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN 52 #define MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN 52 #define MAVLINK_MSG_ID_53007_LEN 52 #define MAVLINK_MSG_ID_53007_MIN_LEN 52 #define MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC 113 #define MAVLINK_MSG_ID_53007_CRC 113 #if MAVLINK_COMMAND_24BIT #define MAVLINK_MESSAGE_INFO_VK_MOSAICH_GPS_RAW { \ 53007, \ "VK_MOSAICH_GPS_RAW", \ 19, \ { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_vk_mosaich_gps_raw_t, time_usec) }, \ { "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_vk_mosaich_gps_raw_t, fix_type) }, \ { "psv_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_vk_mosaich_gps_raw_t, psv_num) }, \ { "pvt_err", NULL, MAVLINK_TYPE_UINT8_T, 0, 46, offsetof(mavlink_vk_mosaich_gps_raw_t, pvt_err) }, \ { "pvt_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 47, offsetof(mavlink_vk_mosaich_gps_raw_t, pvt_mode) }, \ { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_mosaich_gps_raw_t, lat) }, \ { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_vk_mosaich_gps_raw_t, lon) }, \ { "ellipsoid_alt", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vk_mosaich_gps_raw_t, ellipsoid_alt) }, \ { "ve", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vk_mosaich_gps_raw_t, ve) }, \ { "vn", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_vk_mosaich_gps_raw_t, vn) }, \ { "vu", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_vk_mosaich_gps_raw_t, vu) }, \ { "h_acc", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_vk_mosaich_gps_raw_t, h_acc) }, \ { "v_acc", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_vk_mosaich_gps_raw_t, v_acc) }, \ { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_vk_mosaich_gps_raw_t, yaw) }, \ { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_vk_mosaich_gps_raw_t, pitch) }, \ { "hsv_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 48, offsetof(mavlink_vk_mosaich_gps_raw_t, hsv_num) }, \ { "att_err", NULL, MAVLINK_TYPE_UINT8_T, 0, 49, offsetof(mavlink_vk_mosaich_gps_raw_t, att_err) }, \ { "att_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 50, offsetof(mavlink_vk_mosaich_gps_raw_t, att_mode) }, \ { "reserved", NULL, MAVLINK_TYPE_UINT8_T, 0, 51, offsetof(mavlink_vk_mosaich_gps_raw_t, reserved) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_VK_MOSAICH_GPS_RAW { \ "VK_MOSAICH_GPS_RAW", \ 19, \ { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_vk_mosaich_gps_raw_t, time_usec) }, \ { "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_vk_mosaich_gps_raw_t, fix_type) }, \ { "psv_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_vk_mosaich_gps_raw_t, psv_num) }, \ { "pvt_err", NULL, MAVLINK_TYPE_UINT8_T, 0, 46, offsetof(mavlink_vk_mosaich_gps_raw_t, pvt_err) }, \ { "pvt_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 47, offsetof(mavlink_vk_mosaich_gps_raw_t, pvt_mode) }, \ { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_mosaich_gps_raw_t, lat) }, \ { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_vk_mosaich_gps_raw_t, lon) }, \ { "ellipsoid_alt", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vk_mosaich_gps_raw_t, ellipsoid_alt) }, \ { "ve", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vk_mosaich_gps_raw_t, ve) }, \ { "vn", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_vk_mosaich_gps_raw_t, vn) }, \ { "vu", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_vk_mosaich_gps_raw_t, vu) }, \ { "h_acc", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_vk_mosaich_gps_raw_t, h_acc) }, \ { "v_acc", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_vk_mosaich_gps_raw_t, v_acc) }, \ { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_vk_mosaich_gps_raw_t, yaw) }, \ { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_vk_mosaich_gps_raw_t, pitch) }, \ { "hsv_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 48, offsetof(mavlink_vk_mosaich_gps_raw_t, hsv_num) }, \ { "att_err", NULL, MAVLINK_TYPE_UINT8_T, 0, 49, offsetof(mavlink_vk_mosaich_gps_raw_t, att_err) }, \ { "att_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 50, offsetof(mavlink_vk_mosaich_gps_raw_t, att_mode) }, \ { "reserved", NULL, MAVLINK_TYPE_UINT8_T, 0, 51, offsetof(mavlink_vk_mosaich_gps_raw_t, reserved) }, \ } \ } #endif /** * @brief Pack a vk_mosaich_gps_raw 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_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. * @param fix_type GPS fix type. * @param psv_num Number of satellites for positioning ANT * @param pvt_err refer to mosaic_h reference page 308 * @param pvt_mode refer to mosaic_h reference page 308 * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid) * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid) * @param ellipsoid_alt [m] Altitude (Ellipsoild). Positive for up. * @param ve [m/s] Ease speed in m/s. * @param vn [m/s] North speed in m/s. * @param vu [m/s] Up speed in m/s. * @param h_acc [cm] Position uncertainty. * @param v_acc [cm] Altitude uncertainty. * @param yaw [deg] Attitude euler yaw. * @param pitch [deg] Attitude euler pitch. * @param hsv_num Number of satellites for heading ANT * @param att_err refer to mosaic_h reference page 336. * @param att_mode refer to mosaic_h reference page 336. * @param reserved Number of satellites * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint64_t time_usec, uint8_t fix_type, uint8_t psv_num, uint8_t pvt_err, uint8_t pvt_mode, int32_t lat, int32_t lon, float ellipsoid_alt, float ve, float vn, float vu, uint16_t h_acc, uint16_t v_acc, float yaw, float pitch, uint8_t hsv_num, uint8_t att_err, uint8_t att_mode, uint8_t reserved) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN]; _mav_put_uint64_t(buf, 0, time_usec); _mav_put_int32_t(buf, 8, lat); _mav_put_int32_t(buf, 12, lon); _mav_put_float(buf, 16, ellipsoid_alt); _mav_put_float(buf, 20, ve); _mav_put_float(buf, 24, vn); _mav_put_float(buf, 28, vu); _mav_put_float(buf, 32, yaw); _mav_put_float(buf, 36, pitch); _mav_put_uint16_t(buf, 40, h_acc); _mav_put_uint16_t(buf, 42, v_acc); _mav_put_uint8_t(buf, 44, fix_type); _mav_put_uint8_t(buf, 45, psv_num); _mav_put_uint8_t(buf, 46, pvt_err); _mav_put_uint8_t(buf, 47, pvt_mode); _mav_put_uint8_t(buf, 48, hsv_num); _mav_put_uint8_t(buf, 49, att_err); _mav_put_uint8_t(buf, 50, att_mode); _mav_put_uint8_t(buf, 51, reserved); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN); #else mavlink_vk_mosaich_gps_raw_t packet; packet.time_usec = time_usec; packet.lat = lat; packet.lon = lon; packet.ellipsoid_alt = ellipsoid_alt; packet.ve = ve; packet.vn = vn; packet.vu = vu; packet.yaw = yaw; packet.pitch = pitch; packet.h_acc = h_acc; packet.v_acc = v_acc; packet.fix_type = fix_type; packet.psv_num = psv_num; packet.pvt_err = pvt_err; packet.pvt_mode = pvt_mode; packet.hsv_num = hsv_num; packet.att_err = att_err; packet.att_mode = att_mode; packet.reserved = reserved; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN); #endif msg->msgid = MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW; return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC); } /** * @brief Pack a vk_mosaich_gps_raw 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_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. * @param fix_type GPS fix type. * @param psv_num Number of satellites for positioning ANT * @param pvt_err refer to mosaic_h reference page 308 * @param pvt_mode refer to mosaic_h reference page 308 * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid) * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid) * @param ellipsoid_alt [m] Altitude (Ellipsoild). Positive for up. * @param ve [m/s] Ease speed in m/s. * @param vn [m/s] North speed in m/s. * @param vu [m/s] Up speed in m/s. * @param h_acc [cm] Position uncertainty. * @param v_acc [cm] Altitude uncertainty. * @param yaw [deg] Attitude euler yaw. * @param pitch [deg] Attitude euler pitch. * @param hsv_num Number of satellites for heading ANT * @param att_err refer to mosaic_h reference page 336. * @param att_mode refer to mosaic_h reference page 336. * @param reserved Number of satellites * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg, uint64_t time_usec, uint8_t fix_type, uint8_t psv_num, uint8_t pvt_err, uint8_t pvt_mode, int32_t lat, int32_t lon, float ellipsoid_alt, float ve, float vn, float vu, uint16_t h_acc, uint16_t v_acc, float yaw, float pitch, uint8_t hsv_num, uint8_t att_err, uint8_t att_mode, uint8_t reserved) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN]; _mav_put_uint64_t(buf, 0, time_usec); _mav_put_int32_t(buf, 8, lat); _mav_put_int32_t(buf, 12, lon); _mav_put_float(buf, 16, ellipsoid_alt); _mav_put_float(buf, 20, ve); _mav_put_float(buf, 24, vn); _mav_put_float(buf, 28, vu); _mav_put_float(buf, 32, yaw); _mav_put_float(buf, 36, pitch); _mav_put_uint16_t(buf, 40, h_acc); _mav_put_uint16_t(buf, 42, v_acc); _mav_put_uint8_t(buf, 44, fix_type); _mav_put_uint8_t(buf, 45, psv_num); _mav_put_uint8_t(buf, 46, pvt_err); _mav_put_uint8_t(buf, 47, pvt_mode); _mav_put_uint8_t(buf, 48, hsv_num); _mav_put_uint8_t(buf, 49, att_err); _mav_put_uint8_t(buf, 50, att_mode); _mav_put_uint8_t(buf, 51, reserved); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN); #else mavlink_vk_mosaich_gps_raw_t packet; packet.time_usec = time_usec; packet.lat = lat; packet.lon = lon; packet.ellipsoid_alt = ellipsoid_alt; packet.ve = ve; packet.vn = vn; packet.vu = vu; packet.yaw = yaw; packet.pitch = pitch; packet.h_acc = h_acc; packet.v_acc = v_acc; packet.fix_type = fix_type; packet.psv_num = psv_num; packet.pvt_err = pvt_err; packet.pvt_mode = pvt_mode; packet.hsv_num = hsv_num; packet.att_err = att_err; packet.att_mode = att_mode; packet.reserved = reserved; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN); #endif msg->msgid = MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW; #if MAVLINK_CRC_EXTRA return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC); #else return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN); #endif } /** * @brief Pack a vk_mosaich_gps_raw 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_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. * @param fix_type GPS fix type. * @param psv_num Number of satellites for positioning ANT * @param pvt_err refer to mosaic_h reference page 308 * @param pvt_mode refer to mosaic_h reference page 308 * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid) * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid) * @param ellipsoid_alt [m] Altitude (Ellipsoild). Positive for up. * @param ve [m/s] Ease speed in m/s. * @param vn [m/s] North speed in m/s. * @param vu [m/s] Up speed in m/s. * @param h_acc [cm] Position uncertainty. * @param v_acc [cm] Altitude uncertainty. * @param yaw [deg] Attitude euler yaw. * @param pitch [deg] Attitude euler pitch. * @param hsv_num Number of satellites for heading ANT * @param att_err refer to mosaic_h reference page 336. * @param att_mode refer to mosaic_h reference page 336. * @param reserved Number of satellites * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint64_t time_usec,uint8_t fix_type,uint8_t psv_num,uint8_t pvt_err,uint8_t pvt_mode,int32_t lat,int32_t lon,float ellipsoid_alt,float ve,float vn,float vu,uint16_t h_acc,uint16_t v_acc,float yaw,float pitch,uint8_t hsv_num,uint8_t att_err,uint8_t att_mode,uint8_t reserved) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN]; _mav_put_uint64_t(buf, 0, time_usec); _mav_put_int32_t(buf, 8, lat); _mav_put_int32_t(buf, 12, lon); _mav_put_float(buf, 16, ellipsoid_alt); _mav_put_float(buf, 20, ve); _mav_put_float(buf, 24, vn); _mav_put_float(buf, 28, vu); _mav_put_float(buf, 32, yaw); _mav_put_float(buf, 36, pitch); _mav_put_uint16_t(buf, 40, h_acc); _mav_put_uint16_t(buf, 42, v_acc); _mav_put_uint8_t(buf, 44, fix_type); _mav_put_uint8_t(buf, 45, psv_num); _mav_put_uint8_t(buf, 46, pvt_err); _mav_put_uint8_t(buf, 47, pvt_mode); _mav_put_uint8_t(buf, 48, hsv_num); _mav_put_uint8_t(buf, 49, att_err); _mav_put_uint8_t(buf, 50, att_mode); _mav_put_uint8_t(buf, 51, reserved); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN); #else mavlink_vk_mosaich_gps_raw_t packet; packet.time_usec = time_usec; packet.lat = lat; packet.lon = lon; packet.ellipsoid_alt = ellipsoid_alt; packet.ve = ve; packet.vn = vn; packet.vu = vu; packet.yaw = yaw; packet.pitch = pitch; packet.h_acc = h_acc; packet.v_acc = v_acc; packet.fix_type = fix_type; packet.psv_num = psv_num; packet.pvt_err = pvt_err; packet.pvt_mode = pvt_mode; packet.hsv_num = hsv_num; packet.att_err = att_err; packet.att_mode = att_mode; packet.reserved = reserved; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN); #endif msg->msgid = MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW; return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC); } /** * @brief Encode a vk_mosaich_gps_raw 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_mosaich_gps_raw C-struct to read the message contents from */ static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_mosaich_gps_raw_t* vk_mosaich_gps_raw) { return mavlink_msg_vk_mosaich_gps_raw_pack(system_id, component_id, msg, vk_mosaich_gps_raw->time_usec, vk_mosaich_gps_raw->fix_type, vk_mosaich_gps_raw->psv_num, vk_mosaich_gps_raw->pvt_err, vk_mosaich_gps_raw->pvt_mode, vk_mosaich_gps_raw->lat, vk_mosaich_gps_raw->lon, vk_mosaich_gps_raw->ellipsoid_alt, vk_mosaich_gps_raw->ve, vk_mosaich_gps_raw->vn, vk_mosaich_gps_raw->vu, vk_mosaich_gps_raw->h_acc, vk_mosaich_gps_raw->v_acc, vk_mosaich_gps_raw->yaw, vk_mosaich_gps_raw->pitch, vk_mosaich_gps_raw->hsv_num, vk_mosaich_gps_raw->att_err, vk_mosaich_gps_raw->att_mode, vk_mosaich_gps_raw->reserved); } /** * @brief Encode a vk_mosaich_gps_raw 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_mosaich_gps_raw C-struct to read the message contents from */ static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_mosaich_gps_raw_t* vk_mosaich_gps_raw) { return mavlink_msg_vk_mosaich_gps_raw_pack_chan(system_id, component_id, chan, msg, vk_mosaich_gps_raw->time_usec, vk_mosaich_gps_raw->fix_type, vk_mosaich_gps_raw->psv_num, vk_mosaich_gps_raw->pvt_err, vk_mosaich_gps_raw->pvt_mode, vk_mosaich_gps_raw->lat, vk_mosaich_gps_raw->lon, vk_mosaich_gps_raw->ellipsoid_alt, vk_mosaich_gps_raw->ve, vk_mosaich_gps_raw->vn, vk_mosaich_gps_raw->vu, vk_mosaich_gps_raw->h_acc, vk_mosaich_gps_raw->v_acc, vk_mosaich_gps_raw->yaw, vk_mosaich_gps_raw->pitch, vk_mosaich_gps_raw->hsv_num, vk_mosaich_gps_raw->att_err, vk_mosaich_gps_raw->att_mode, vk_mosaich_gps_raw->reserved); } /** * @brief Encode a vk_mosaich_gps_raw 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_mosaich_gps_raw C-struct to read the message contents from */ static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_mosaich_gps_raw_t* vk_mosaich_gps_raw) { return mavlink_msg_vk_mosaich_gps_raw_pack_status(system_id, component_id, _status, msg, vk_mosaich_gps_raw->time_usec, vk_mosaich_gps_raw->fix_type, vk_mosaich_gps_raw->psv_num, vk_mosaich_gps_raw->pvt_err, vk_mosaich_gps_raw->pvt_mode, vk_mosaich_gps_raw->lat, vk_mosaich_gps_raw->lon, vk_mosaich_gps_raw->ellipsoid_alt, vk_mosaich_gps_raw->ve, vk_mosaich_gps_raw->vn, vk_mosaich_gps_raw->vu, vk_mosaich_gps_raw->h_acc, vk_mosaich_gps_raw->v_acc, vk_mosaich_gps_raw->yaw, vk_mosaich_gps_raw->pitch, vk_mosaich_gps_raw->hsv_num, vk_mosaich_gps_raw->att_err, vk_mosaich_gps_raw->att_mode, vk_mosaich_gps_raw->reserved); } /** * @brief Send a vk_mosaich_gps_raw message * @param chan MAVLink channel to send the message * * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. * @param fix_type GPS fix type. * @param psv_num Number of satellites for positioning ANT * @param pvt_err refer to mosaic_h reference page 308 * @param pvt_mode refer to mosaic_h reference page 308 * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid) * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid) * @param ellipsoid_alt [m] Altitude (Ellipsoild). Positive for up. * @param ve [m/s] Ease speed in m/s. * @param vn [m/s] North speed in m/s. * @param vu [m/s] Up speed in m/s. * @param h_acc [cm] Position uncertainty. * @param v_acc [cm] Altitude uncertainty. * @param yaw [deg] Attitude euler yaw. * @param pitch [deg] Attitude euler pitch. * @param hsv_num Number of satellites for heading ANT * @param att_err refer to mosaic_h reference page 336. * @param att_mode refer to mosaic_h reference page 336. * @param reserved Number of satellites */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS static inline void mavlink_msg_vk_mosaich_gps_raw_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t fix_type, uint8_t psv_num, uint8_t pvt_err, uint8_t pvt_mode, int32_t lat, int32_t lon, float ellipsoid_alt, float ve, float vn, float vu, uint16_t h_acc, uint16_t v_acc, float yaw, float pitch, uint8_t hsv_num, uint8_t att_err, uint8_t att_mode, uint8_t reserved) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN]; _mav_put_uint64_t(buf, 0, time_usec); _mav_put_int32_t(buf, 8, lat); _mav_put_int32_t(buf, 12, lon); _mav_put_float(buf, 16, ellipsoid_alt); _mav_put_float(buf, 20, ve); _mav_put_float(buf, 24, vn); _mav_put_float(buf, 28, vu); _mav_put_float(buf, 32, yaw); _mav_put_float(buf, 36, pitch); _mav_put_uint16_t(buf, 40, h_acc); _mav_put_uint16_t(buf, 42, v_acc); _mav_put_uint8_t(buf, 44, fix_type); _mav_put_uint8_t(buf, 45, psv_num); _mav_put_uint8_t(buf, 46, pvt_err); _mav_put_uint8_t(buf, 47, pvt_mode); _mav_put_uint8_t(buf, 48, hsv_num); _mav_put_uint8_t(buf, 49, att_err); _mav_put_uint8_t(buf, 50, att_mode); _mav_put_uint8_t(buf, 51, reserved); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW, buf, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC); #else mavlink_vk_mosaich_gps_raw_t packet; packet.time_usec = time_usec; packet.lat = lat; packet.lon = lon; packet.ellipsoid_alt = ellipsoid_alt; packet.ve = ve; packet.vn = vn; packet.vu = vu; packet.yaw = yaw; packet.pitch = pitch; packet.h_acc = h_acc; packet.v_acc = v_acc; packet.fix_type = fix_type; packet.psv_num = psv_num; packet.pvt_err = pvt_err; packet.pvt_mode = pvt_mode; packet.hsv_num = hsv_num; packet.att_err = att_err; packet.att_mode = att_mode; packet.reserved = reserved; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW, (const char *)&packet, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC); #endif } /** * @brief Send a vk_mosaich_gps_raw message * @param chan MAVLink channel to send the message * @param struct The MAVLink struct to serialize */ static inline void mavlink_msg_vk_mosaich_gps_raw_send_struct(mavlink_channel_t chan, const mavlink_vk_mosaich_gps_raw_t* vk_mosaich_gps_raw) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS mavlink_msg_vk_mosaich_gps_raw_send(chan, vk_mosaich_gps_raw->time_usec, vk_mosaich_gps_raw->fix_type, vk_mosaich_gps_raw->psv_num, vk_mosaich_gps_raw->pvt_err, vk_mosaich_gps_raw->pvt_mode, vk_mosaich_gps_raw->lat, vk_mosaich_gps_raw->lon, vk_mosaich_gps_raw->ellipsoid_alt, vk_mosaich_gps_raw->ve, vk_mosaich_gps_raw->vn, vk_mosaich_gps_raw->vu, vk_mosaich_gps_raw->h_acc, vk_mosaich_gps_raw->v_acc, vk_mosaich_gps_raw->yaw, vk_mosaich_gps_raw->pitch, vk_mosaich_gps_raw->hsv_num, vk_mosaich_gps_raw->att_err, vk_mosaich_gps_raw->att_mode, vk_mosaich_gps_raw->reserved); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW, (const char *)vk_mosaich_gps_raw, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC); #endif } #if MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_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_mosaich_gps_raw_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint8_t fix_type, uint8_t psv_num, uint8_t pvt_err, uint8_t pvt_mode, int32_t lat, int32_t lon, float ellipsoid_alt, float ve, float vn, float vu, uint16_t h_acc, uint16_t v_acc, float yaw, float pitch, uint8_t hsv_num, uint8_t att_err, uint8_t att_mode, uint8_t reserved) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; _mav_put_uint64_t(buf, 0, time_usec); _mav_put_int32_t(buf, 8, lat); _mav_put_int32_t(buf, 12, lon); _mav_put_float(buf, 16, ellipsoid_alt); _mav_put_float(buf, 20, ve); _mav_put_float(buf, 24, vn); _mav_put_float(buf, 28, vu); _mav_put_float(buf, 32, yaw); _mav_put_float(buf, 36, pitch); _mav_put_uint16_t(buf, 40, h_acc); _mav_put_uint16_t(buf, 42, v_acc); _mav_put_uint8_t(buf, 44, fix_type); _mav_put_uint8_t(buf, 45, psv_num); _mav_put_uint8_t(buf, 46, pvt_err); _mav_put_uint8_t(buf, 47, pvt_mode); _mav_put_uint8_t(buf, 48, hsv_num); _mav_put_uint8_t(buf, 49, att_err); _mav_put_uint8_t(buf, 50, att_mode); _mav_put_uint8_t(buf, 51, reserved); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW, buf, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC); #else mavlink_vk_mosaich_gps_raw_t *packet = (mavlink_vk_mosaich_gps_raw_t *)msgbuf; packet->time_usec = time_usec; packet->lat = lat; packet->lon = lon; packet->ellipsoid_alt = ellipsoid_alt; packet->ve = ve; packet->vn = vn; packet->vu = vu; packet->yaw = yaw; packet->pitch = pitch; packet->h_acc = h_acc; packet->v_acc = v_acc; packet->fix_type = fix_type; packet->psv_num = psv_num; packet->pvt_err = pvt_err; packet->pvt_mode = pvt_mode; packet->hsv_num = hsv_num; packet->att_err = att_err; packet->att_mode = att_mode; packet->reserved = reserved; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW, (const char *)packet, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC); #endif } #endif #endif // MESSAGE VK_MOSAICH_GPS_RAW UNPACKING /** * @brief Get field time_usec from vk_mosaich_gps_raw message * * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. */ static inline uint64_t mavlink_msg_vk_mosaich_gps_raw_get_time_usec(const mavlink_message_t* msg) { return _MAV_RETURN_uint64_t(msg, 0); } /** * @brief Get field fix_type from vk_mosaich_gps_raw message * * @return GPS fix type. */ static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_fix_type(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 44); } /** * @brief Get field psv_num from vk_mosaich_gps_raw message * * @return Number of satellites for positioning ANT */ static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_psv_num(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 45); } /** * @brief Get field pvt_err from vk_mosaich_gps_raw message * * @return refer to mosaic_h reference page 308 */ static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_pvt_err(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 46); } /** * @brief Get field pvt_mode from vk_mosaich_gps_raw message * * @return refer to mosaic_h reference page 308 */ static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_pvt_mode(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 47); } /** * @brief Get field lat from vk_mosaich_gps_raw message * * @return [degE7] Latitude (WGS84, EGM96 ellipsoid) */ static inline int32_t mavlink_msg_vk_mosaich_gps_raw_get_lat(const mavlink_message_t* msg) { return _MAV_RETURN_int32_t(msg, 8); } /** * @brief Get field lon from vk_mosaich_gps_raw message * * @return [degE7] Longitude (WGS84, EGM96 ellipsoid) */ static inline int32_t mavlink_msg_vk_mosaich_gps_raw_get_lon(const mavlink_message_t* msg) { return _MAV_RETURN_int32_t(msg, 12); } /** * @brief Get field ellipsoid_alt from vk_mosaich_gps_raw message * * @return [m] Altitude (Ellipsoild). Positive for up. */ static inline float mavlink_msg_vk_mosaich_gps_raw_get_ellipsoid_alt(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 16); } /** * @brief Get field ve from vk_mosaich_gps_raw message * * @return [m/s] Ease speed in m/s. */ static inline float mavlink_msg_vk_mosaich_gps_raw_get_ve(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 20); } /** * @brief Get field vn from vk_mosaich_gps_raw message * * @return [m/s] North speed in m/s. */ static inline float mavlink_msg_vk_mosaich_gps_raw_get_vn(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 24); } /** * @brief Get field vu from vk_mosaich_gps_raw message * * @return [m/s] Up speed in m/s. */ static inline float mavlink_msg_vk_mosaich_gps_raw_get_vu(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 28); } /** * @brief Get field h_acc from vk_mosaich_gps_raw message * * @return [cm] Position uncertainty. */ static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_get_h_acc(const mavlink_message_t* msg) { return _MAV_RETURN_uint16_t(msg, 40); } /** * @brief Get field v_acc from vk_mosaich_gps_raw message * * @return [cm] Altitude uncertainty. */ static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_get_v_acc(const mavlink_message_t* msg) { return _MAV_RETURN_uint16_t(msg, 42); } /** * @brief Get field yaw from vk_mosaich_gps_raw message * * @return [deg] Attitude euler yaw. */ static inline float mavlink_msg_vk_mosaich_gps_raw_get_yaw(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 32); } /** * @brief Get field pitch from vk_mosaich_gps_raw message * * @return [deg] Attitude euler pitch. */ static inline float mavlink_msg_vk_mosaich_gps_raw_get_pitch(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 36); } /** * @brief Get field hsv_num from vk_mosaich_gps_raw message * * @return Number of satellites for heading ANT */ static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_hsv_num(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 48); } /** * @brief Get field att_err from vk_mosaich_gps_raw message * * @return refer to mosaic_h reference page 336. */ static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_att_err(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 49); } /** * @brief Get field att_mode from vk_mosaich_gps_raw message * * @return refer to mosaic_h reference page 336. */ static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_att_mode(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 50); } /** * @brief Get field reserved from vk_mosaich_gps_raw message * * @return Number of satellites */ static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_reserved(const mavlink_message_t* msg) { return _MAV_RETURN_uint8_t(msg, 51); } /** * @brief Decode a vk_mosaich_gps_raw message into a struct * * @param msg The message to decode * @param vk_mosaich_gps_raw C-struct to decode the message contents into */ static inline void mavlink_msg_vk_mosaich_gps_raw_decode(const mavlink_message_t* msg, mavlink_vk_mosaich_gps_raw_t* vk_mosaich_gps_raw) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS vk_mosaich_gps_raw->time_usec = mavlink_msg_vk_mosaich_gps_raw_get_time_usec(msg); vk_mosaich_gps_raw->lat = mavlink_msg_vk_mosaich_gps_raw_get_lat(msg); vk_mosaich_gps_raw->lon = mavlink_msg_vk_mosaich_gps_raw_get_lon(msg); vk_mosaich_gps_raw->ellipsoid_alt = mavlink_msg_vk_mosaich_gps_raw_get_ellipsoid_alt(msg); vk_mosaich_gps_raw->ve = mavlink_msg_vk_mosaich_gps_raw_get_ve(msg); vk_mosaich_gps_raw->vn = mavlink_msg_vk_mosaich_gps_raw_get_vn(msg); vk_mosaich_gps_raw->vu = mavlink_msg_vk_mosaich_gps_raw_get_vu(msg); vk_mosaich_gps_raw->yaw = mavlink_msg_vk_mosaich_gps_raw_get_yaw(msg); vk_mosaich_gps_raw->pitch = mavlink_msg_vk_mosaich_gps_raw_get_pitch(msg); vk_mosaich_gps_raw->h_acc = mavlink_msg_vk_mosaich_gps_raw_get_h_acc(msg); vk_mosaich_gps_raw->v_acc = mavlink_msg_vk_mosaich_gps_raw_get_v_acc(msg); vk_mosaich_gps_raw->fix_type = mavlink_msg_vk_mosaich_gps_raw_get_fix_type(msg); vk_mosaich_gps_raw->psv_num = mavlink_msg_vk_mosaich_gps_raw_get_psv_num(msg); vk_mosaich_gps_raw->pvt_err = mavlink_msg_vk_mosaich_gps_raw_get_pvt_err(msg); vk_mosaich_gps_raw->pvt_mode = mavlink_msg_vk_mosaich_gps_raw_get_pvt_mode(msg); vk_mosaich_gps_raw->hsv_num = mavlink_msg_vk_mosaich_gps_raw_get_hsv_num(msg); vk_mosaich_gps_raw->att_err = mavlink_msg_vk_mosaich_gps_raw_get_att_err(msg); vk_mosaich_gps_raw->att_mode = mavlink_msg_vk_mosaich_gps_raw_get_att_mode(msg); vk_mosaich_gps_raw->reserved = mavlink_msg_vk_mosaich_gps_raw_get_reserved(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN? msg->len : MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN; memset(vk_mosaich_gps_raw, 0, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN); memcpy(vk_mosaich_gps_raw, _MAV_PAYLOAD(msg), len); #endif }