feat: update definitions

This commit is contained in:
matt
2020-09-20 13:56:18 +08:00
parent 36a71efa12
commit b2baf4bffc
146 changed files with 28320 additions and 3729 deletions
+83 -33
View File
@@ -3,26 +3,28 @@
#define MAVLINK_MSG_ID_HIL_GPS 113
MAVPACKED(
typedef struct __mavlink_hil_gps_t {
uint32_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 the number.*/
uint32_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)*/
int32_t lon; /*< [degE7] Longitude (WGS84)*/
int32_t alt; /*< [mm] Altitude (MSL). Positive for up.*/
uint16_t eph; /*< [cm] GPS HDOP horizontal dilution of position. If unknown, set to: 65535*/
uint16_t epv; /*< [cm] GPS VDOP vertical dilution of position. If unknown, set to: 65535*/
uint16_t vel; /*< [cm/s] GPS ground speed. If unknown, set to: 65535*/
int16_t vn; /*< [cm/s] GPS velocity in NORTH direction in earth-fixed NED frame*/
int16_t ve; /*< [cm/s] GPS velocity in EAST direction in earth-fixed NED frame*/
int16_t vd; /*< [cm/s] GPS velocity in DOWN direction in earth-fixed NED frame*/
int16_t vn; /*< [cm/s] GPS velocity in north direction in earth-fixed NED frame*/
int16_t ve; /*< [cm/s] GPS velocity in east direction in earth-fixed NED frame*/
int16_t vd; /*< [cm/s] GPS velocity in down direction in earth-fixed NED frame*/
uint16_t cog; /*< [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: 65535*/
uint8_t fix_type; /*< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.*/
uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to 255*/
} mavlink_hil_gps_t;
uint8_t id; /*< GPS ID (zero indexed). Used for multiple GPS inputs*/
uint16_t yaw; /*< [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north*/
}) mavlink_hil_gps_t;
#define MAVLINK_MSG_ID_HIL_GPS_LEN 32
#define MAVLINK_MSG_ID_HIL_GPS_LEN 35
#define MAVLINK_MSG_ID_HIL_GPS_MIN_LEN 32
#define MAVLINK_MSG_ID_113_LEN 32
#define MAVLINK_MSG_ID_113_LEN 35
#define MAVLINK_MSG_ID_113_MIN_LEN 32
#define MAVLINK_MSG_ID_HIL_GPS_CRC 84
@@ -34,7 +36,7 @@ typedef struct __mavlink_hil_gps_t {
#define MAVLINK_MESSAGE_INFO_HIL_GPS { \
113, \
"HIL_GPS", \
13, \
15, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_hil_gps_t, time_usec) }, \
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_hil_gps_t, fix_type) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_hil_gps_t, lat) }, \
@@ -48,12 +50,14 @@ typedef struct __mavlink_hil_gps_t {
{ "vd", NULL, MAVLINK_TYPE_INT16_T, 0, 26, offsetof(mavlink_hil_gps_t, vd) }, \
{ "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_hil_gps_t, cog) }, \
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_hil_gps_t, satellites_visible) }, \
{ "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_hil_gps_t, id) }, \
{ "yaw", NULL, MAVLINK_TYPE_UINT16_T, 0, 33, offsetof(mavlink_hil_gps_t, yaw) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_HIL_GPS { \
"HIL_GPS", \
13, \
15, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_hil_gps_t, time_usec) }, \
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_hil_gps_t, fix_type) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_hil_gps_t, lat) }, \
@@ -67,6 +71,8 @@ typedef struct __mavlink_hil_gps_t {
{ "vd", NULL, MAVLINK_TYPE_INT16_T, 0, 26, offsetof(mavlink_hil_gps_t, vd) }, \
{ "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_hil_gps_t, cog) }, \
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_hil_gps_t, satellites_visible) }, \
{ "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_hil_gps_t, id) }, \
{ "yaw", NULL, MAVLINK_TYPE_UINT16_T, 0, 33, offsetof(mavlink_hil_gps_t, yaw) }, \
} \
}
#endif
@@ -77,7 +83,7 @@ typedef struct __mavlink_hil_gps_t {
* @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 the number.
* @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 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat [degE7] Latitude (WGS84)
* @param lon [degE7] Longitude (WGS84)
@@ -85,15 +91,17 @@ typedef struct __mavlink_hil_gps_t {
* @param eph [cm] GPS HDOP horizontal dilution of position. If unknown, set to: 65535
* @param epv [cm] GPS VDOP vertical dilution of position. If unknown, set to: 65535
* @param vel [cm/s] GPS ground speed. If unknown, set to: 65535
* @param vn [cm/s] GPS velocity in NORTH direction in earth-fixed NED frame
* @param ve [cm/s] GPS velocity in EAST direction in earth-fixed NED frame
* @param vd [cm/s] GPS velocity in DOWN direction in earth-fixed NED frame
* @param vn [cm/s] GPS velocity in north direction in earth-fixed NED frame
* @param ve [cm/s] GPS velocity in east direction in earth-fixed NED frame
* @param vd [cm/s] GPS velocity in down direction in earth-fixed NED frame
* @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @param id GPS ID (zero indexed). Used for multiple GPS inputs
* @param yaw [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_gps_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
uint32_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible)
uint32_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible, uint8_t id, uint16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_GPS_LEN];
@@ -110,6 +118,8 @@ static inline uint16_t mavlink_msg_hil_gps_pack(uint16_t system_id, uint8_t comp
_mav_put_uint16_t(buf, 28, cog);
_mav_put_uint8_t(buf, 30, fix_type);
_mav_put_uint8_t(buf, 31, satellites_visible);
_mav_put_uint8_t(buf, 32, id);
_mav_put_uint16_t(buf, 33, yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_GPS_LEN);
#else
@@ -127,6 +137,8 @@ static inline uint16_t mavlink_msg_hil_gps_pack(uint16_t system_id, uint8_t comp
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
packet.id = id;
packet.yaw = yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
#endif
@@ -141,7 +153,7 @@ static inline uint16_t mavlink_msg_hil_gps_pack(uint16_t system_id, uint8_t comp
* @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 the number.
* @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 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat [degE7] Latitude (WGS84)
* @param lon [degE7] Longitude (WGS84)
@@ -149,16 +161,18 @@ static inline uint16_t mavlink_msg_hil_gps_pack(uint16_t system_id, uint8_t comp
* @param eph [cm] GPS HDOP horizontal dilution of position. If unknown, set to: 65535
* @param epv [cm] GPS VDOP vertical dilution of position. If unknown, set to: 65535
* @param vel [cm/s] GPS ground speed. If unknown, set to: 65535
* @param vn [cm/s] GPS velocity in NORTH direction in earth-fixed NED frame
* @param ve [cm/s] GPS velocity in EAST direction in earth-fixed NED frame
* @param vd [cm/s] GPS velocity in DOWN direction in earth-fixed NED frame
* @param vn [cm/s] GPS velocity in north direction in earth-fixed NED frame
* @param ve [cm/s] GPS velocity in east direction in earth-fixed NED frame
* @param vd [cm/s] GPS velocity in down direction in earth-fixed NED frame
* @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @param id GPS ID (zero indexed). Used for multiple GPS inputs
* @param yaw [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_hil_gps_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
mavlink_message_t* msg,
uint32_t time_usec,uint8_t fix_type,int32_t lat,int32_t lon,int32_t alt,uint16_t eph,uint16_t epv,uint16_t vel,int16_t vn,int16_t ve,int16_t vd,uint16_t cog,uint8_t satellites_visible)
uint32_t time_usec,uint8_t fix_type,int32_t lat,int32_t lon,int32_t alt,uint16_t eph,uint16_t epv,uint16_t vel,int16_t vn,int16_t ve,int16_t vd,uint16_t cog,uint8_t satellites_visible,uint8_t id,uint16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_GPS_LEN];
@@ -175,6 +189,8 @@ static inline uint16_t mavlink_msg_hil_gps_pack_chan(uint16_t system_id, uint8_t
_mav_put_uint16_t(buf, 28, cog);
_mav_put_uint8_t(buf, 30, fix_type);
_mav_put_uint8_t(buf, 31, satellites_visible);
_mav_put_uint8_t(buf, 32, id);
_mav_put_uint16_t(buf, 33, yaw);
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_GPS_LEN);
#else
@@ -192,6 +208,8 @@ static inline uint16_t mavlink_msg_hil_gps_pack_chan(uint16_t system_id, uint8_t
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
packet.id = id;
packet.yaw = yaw;
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
#endif
@@ -210,7 +228,7 @@ static inline uint16_t mavlink_msg_hil_gps_pack_chan(uint16_t system_id, uint8_t
*/
static inline uint16_t mavlink_msg_hil_gps_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_gps_t* hil_gps)
{
return mavlink_msg_hil_gps_pack(system_id, component_id, msg, hil_gps->time_usec, hil_gps->fix_type, hil_gps->lat, hil_gps->lon, hil_gps->alt, hil_gps->eph, hil_gps->epv, hil_gps->vel, hil_gps->vn, hil_gps->ve, hil_gps->vd, hil_gps->cog, hil_gps->satellites_visible);
return mavlink_msg_hil_gps_pack(system_id, component_id, msg, hil_gps->time_usec, hil_gps->fix_type, hil_gps->lat, hil_gps->lon, hil_gps->alt, hil_gps->eph, hil_gps->epv, hil_gps->vel, hil_gps->vn, hil_gps->ve, hil_gps->vd, hil_gps->cog, hil_gps->satellites_visible, hil_gps->id, hil_gps->yaw);
}
/**
@@ -224,14 +242,14 @@ static inline uint16_t mavlink_msg_hil_gps_encode(uint16_t system_id, uint8_t co
*/
static inline uint16_t mavlink_msg_hil_gps_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_hil_gps_t* hil_gps)
{
return mavlink_msg_hil_gps_pack_chan(system_id, component_id, chan, msg, hil_gps->time_usec, hil_gps->fix_type, hil_gps->lat, hil_gps->lon, hil_gps->alt, hil_gps->eph, hil_gps->epv, hil_gps->vel, hil_gps->vn, hil_gps->ve, hil_gps->vd, hil_gps->cog, hil_gps->satellites_visible);
return mavlink_msg_hil_gps_pack_chan(system_id, component_id, chan, msg, hil_gps->time_usec, hil_gps->fix_type, hil_gps->lat, hil_gps->lon, hil_gps->alt, hil_gps->eph, hil_gps->epv, hil_gps->vel, hil_gps->vn, hil_gps->ve, hil_gps->vd, hil_gps->cog, hil_gps->satellites_visible, hil_gps->id, hil_gps->yaw);
}
/**
* @brief Send a hil_gps 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 the number.
* @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 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
* @param lat [degE7] Latitude (WGS84)
* @param lon [degE7] Longitude (WGS84)
@@ -239,15 +257,17 @@ static inline uint16_t mavlink_msg_hil_gps_encode_chan(uint16_t system_id, uint8
* @param eph [cm] GPS HDOP horizontal dilution of position. If unknown, set to: 65535
* @param epv [cm] GPS VDOP vertical dilution of position. If unknown, set to: 65535
* @param vel [cm/s] GPS ground speed. If unknown, set to: 65535
* @param vn [cm/s] GPS velocity in NORTH direction in earth-fixed NED frame
* @param ve [cm/s] GPS velocity in EAST direction in earth-fixed NED frame
* @param vd [cm/s] GPS velocity in DOWN direction in earth-fixed NED frame
* @param vn [cm/s] GPS velocity in north direction in earth-fixed NED frame
* @param ve [cm/s] GPS velocity in east direction in earth-fixed NED frame
* @param vd [cm/s] GPS velocity in down direction in earth-fixed NED frame
* @param cog [cdeg] Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: 65535
* @param satellites_visible Number of satellites visible. If unknown, set to 255
* @param id GPS ID (zero indexed). Used for multiple GPS inputs
* @param yaw [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static inline void mavlink_msg_hil_gps_send(mavlink_channel_t chan, uint32_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible)
static inline void mavlink_msg_hil_gps_send(mavlink_channel_t chan, uint32_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible, uint8_t id, uint16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char buf[MAVLINK_MSG_ID_HIL_GPS_LEN];
@@ -264,6 +284,8 @@ static inline void mavlink_msg_hil_gps_send(mavlink_channel_t chan, uint32_t tim
_mav_put_uint16_t(buf, 28, cog);
_mav_put_uint8_t(buf, 30, fix_type);
_mav_put_uint8_t(buf, 31, satellites_visible);
_mav_put_uint8_t(buf, 32, id);
_mav_put_uint16_t(buf, 33, yaw);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, buf, MAVLINK_MSG_ID_HIL_GPS_MIN_LEN, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
#else
@@ -281,6 +303,8 @@ static inline void mavlink_msg_hil_gps_send(mavlink_channel_t chan, uint32_t tim
packet.cog = cog;
packet.fix_type = fix_type;
packet.satellites_visible = satellites_visible;
packet.id = id;
packet.yaw = yaw;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, (const char *)&packet, MAVLINK_MSG_ID_HIL_GPS_MIN_LEN, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
#endif
@@ -294,7 +318,7 @@ static inline void mavlink_msg_hil_gps_send(mavlink_channel_t chan, uint32_t tim
static inline void mavlink_msg_hil_gps_send_struct(mavlink_channel_t chan, const mavlink_hil_gps_t* hil_gps)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_hil_gps_send(chan, hil_gps->time_usec, hil_gps->fix_type, hil_gps->lat, hil_gps->lon, hil_gps->alt, hil_gps->eph, hil_gps->epv, hil_gps->vel, hil_gps->vn, hil_gps->ve, hil_gps->vd, hil_gps->cog, hil_gps->satellites_visible);
mavlink_msg_hil_gps_send(chan, hil_gps->time_usec, hil_gps->fix_type, hil_gps->lat, hil_gps->lon, hil_gps->alt, hil_gps->eph, hil_gps->epv, hil_gps->vel, hil_gps->vn, hil_gps->ve, hil_gps->vd, hil_gps->cog, hil_gps->satellites_visible, hil_gps->id, hil_gps->yaw);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, (const char *)hil_gps, MAVLINK_MSG_ID_HIL_GPS_MIN_LEN, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
#endif
@@ -308,7 +332,7 @@ static inline void mavlink_msg_hil_gps_send_struct(mavlink_channel_t chan, const
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_hil_gps_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible)
static inline void mavlink_msg_hil_gps_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible, uint8_t id, uint16_t yaw)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char *buf = (char *)msgbuf;
@@ -325,6 +349,8 @@ static inline void mavlink_msg_hil_gps_send_buf(mavlink_message_t *msgbuf, mavli
_mav_put_uint16_t(buf, 28, cog);
_mav_put_uint8_t(buf, 30, fix_type);
_mav_put_uint8_t(buf, 31, satellites_visible);
_mav_put_uint8_t(buf, 32, id);
_mav_put_uint16_t(buf, 33, yaw);
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, buf, MAVLINK_MSG_ID_HIL_GPS_MIN_LEN, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
#else
@@ -342,6 +368,8 @@ static inline void mavlink_msg_hil_gps_send_buf(mavlink_message_t *msgbuf, mavli
packet->cog = cog;
packet->fix_type = fix_type;
packet->satellites_visible = satellites_visible;
packet->id = id;
packet->yaw = yaw;
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, (const char *)packet, MAVLINK_MSG_ID_HIL_GPS_MIN_LEN, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
#endif
@@ -356,7 +384,7 @@ static inline void mavlink_msg_hil_gps_send_buf(mavlink_message_t *msgbuf, mavli
/**
* @brief Get field time_usec from hil_gps 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 the number.
* @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 uint32_t mavlink_msg_hil_gps_get_time_usec(const mavlink_message_t* msg)
{
@@ -436,7 +464,7 @@ static inline uint16_t mavlink_msg_hil_gps_get_vel(const mavlink_message_t* msg)
/**
* @brief Get field vn from hil_gps message
*
* @return [cm/s] GPS velocity in NORTH direction in earth-fixed NED frame
* @return [cm/s] GPS velocity in north direction in earth-fixed NED frame
*/
static inline int16_t mavlink_msg_hil_gps_get_vn(const mavlink_message_t* msg)
{
@@ -446,7 +474,7 @@ static inline int16_t mavlink_msg_hil_gps_get_vn(const mavlink_message_t* msg)
/**
* @brief Get field ve from hil_gps message
*
* @return [cm/s] GPS velocity in EAST direction in earth-fixed NED frame
* @return [cm/s] GPS velocity in east direction in earth-fixed NED frame
*/
static inline int16_t mavlink_msg_hil_gps_get_ve(const mavlink_message_t* msg)
{
@@ -456,7 +484,7 @@ static inline int16_t mavlink_msg_hil_gps_get_ve(const mavlink_message_t* msg)
/**
* @brief Get field vd from hil_gps message
*
* @return [cm/s] GPS velocity in DOWN direction in earth-fixed NED frame
* @return [cm/s] GPS velocity in down direction in earth-fixed NED frame
*/
static inline int16_t mavlink_msg_hil_gps_get_vd(const mavlink_message_t* msg)
{
@@ -483,6 +511,26 @@ static inline uint8_t mavlink_msg_hil_gps_get_satellites_visible(const mavlink_m
return _MAV_RETURN_uint8_t(msg, 31);
}
/**
* @brief Get field id from hil_gps message
*
* @return GPS ID (zero indexed). Used for multiple GPS inputs
*/
static inline uint8_t mavlink_msg_hil_gps_get_id(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint8_t(msg, 32);
}
/**
* @brief Get field yaw from hil_gps message
*
* @return [cdeg] Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north
*/
static inline uint16_t mavlink_msg_hil_gps_get_yaw(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 33);
}
/**
* @brief Decode a hil_gps message into a struct
*
@@ -505,6 +553,8 @@ static inline void mavlink_msg_hil_gps_decode(const mavlink_message_t* msg, mavl
hil_gps->cog = mavlink_msg_hil_gps_get_cog(msg);
hil_gps->fix_type = mavlink_msg_hil_gps_get_fix_type(msg);
hil_gps->satellites_visible = mavlink_msg_hil_gps_get_satellites_visible(msg);
hil_gps->id = mavlink_msg_hil_gps_get_id(msg);
hil_gps->yaw = mavlink_msg_hil_gps_get_yaw(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_HIL_GPS_LEN? msg->len : MAVLINK_MSG_ID_HIL_GPS_LEN;
memset(hil_gps, 0, MAVLINK_MSG_ID_HIL_GPS_LEN);