✨feat: 更好兼容matlab
uin64->uint32 payload64->payload
This commit is contained in:
+102
-102
@@ -3,9 +3,9 @@
|
||||
|
||||
#define MAVLINK_MSG_ID_GPS2_RAW 124
|
||||
|
||||
MAVPACKED(
|
||||
|
||||
typedef struct __mavlink_gps2_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 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 the number.*/
|
||||
int32_t lat; /*< [degE7] Latitude (WGS84)*/
|
||||
int32_t lon; /*< [degE7] Longitude (WGS84)*/
|
||||
int32_t alt; /*< [mm] Altitude (MSL). Positive for up.*/
|
||||
@@ -17,15 +17,15 @@ typedef struct __mavlink_gps2_raw_t {
|
||||
uint8_t fix_type; /*< GPS fix type.*/
|
||||
uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to 255*/
|
||||
uint8_t dgps_numch; /*< Number of DGPS satellites*/
|
||||
}) mavlink_gps2_raw_t;
|
||||
} mavlink_gps2_raw_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_GPS2_RAW_LEN 35
|
||||
#define MAVLINK_MSG_ID_GPS2_RAW_MIN_LEN 35
|
||||
#define MAVLINK_MSG_ID_124_LEN 35
|
||||
#define MAVLINK_MSG_ID_124_MIN_LEN 35
|
||||
#define MAVLINK_MSG_ID_GPS2_RAW_LEN 31
|
||||
#define MAVLINK_MSG_ID_GPS2_RAW_MIN_LEN 31
|
||||
#define MAVLINK_MSG_ID_124_LEN 31
|
||||
#define MAVLINK_MSG_ID_124_MIN_LEN 31
|
||||
|
||||
#define MAVLINK_MSG_ID_GPS2_RAW_CRC 87
|
||||
#define MAVLINK_MSG_ID_124_CRC 87
|
||||
#define MAVLINK_MSG_ID_GPS2_RAW_CRC 7
|
||||
#define MAVLINK_MSG_ID_124_CRC 7
|
||||
|
||||
|
||||
|
||||
@@ -34,36 +34,36 @@ typedef struct __mavlink_gps2_raw_t {
|
||||
124, \
|
||||
"GPS2_RAW", \
|
||||
12, \
|
||||
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_gps2_raw_t, time_usec) }, \
|
||||
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gps2_raw_t, fix_type) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps2_raw_t, lat) }, \
|
||||
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps2_raw_t, lon) }, \
|
||||
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps2_raw_t, alt) }, \
|
||||
{ "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gps2_raw_t, eph) }, \
|
||||
{ "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_gps2_raw_t, epv) }, \
|
||||
{ "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gps2_raw_t, vel) }, \
|
||||
{ "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_gps2_raw_t, cog) }, \
|
||||
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_gps2_raw_t, satellites_visible) }, \
|
||||
{ "dgps_numch", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_gps2_raw_t, dgps_numch) }, \
|
||||
{ "dgps_age", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_gps2_raw_t, dgps_age) }, \
|
||||
{ { "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gps2_raw_t, time_usec) }, \
|
||||
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_gps2_raw_t, fix_type) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_gps2_raw_t, lat) }, \
|
||||
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps2_raw_t, lon) }, \
|
||||
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps2_raw_t, alt) }, \
|
||||
{ "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_gps2_raw_t, eph) }, \
|
||||
{ "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_gps2_raw_t, epv) }, \
|
||||
{ "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gps2_raw_t, vel) }, \
|
||||
{ "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_gps2_raw_t, cog) }, \
|
||||
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_gps2_raw_t, satellites_visible) }, \
|
||||
{ "dgps_numch", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gps2_raw_t, dgps_numch) }, \
|
||||
{ "dgps_age", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_gps2_raw_t, dgps_age) }, \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_GPS2_RAW { \
|
||||
"GPS2_RAW", \
|
||||
12, \
|
||||
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_gps2_raw_t, time_usec) }, \
|
||||
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gps2_raw_t, fix_type) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps2_raw_t, lat) }, \
|
||||
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps2_raw_t, lon) }, \
|
||||
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps2_raw_t, alt) }, \
|
||||
{ "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gps2_raw_t, eph) }, \
|
||||
{ "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_gps2_raw_t, epv) }, \
|
||||
{ "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gps2_raw_t, vel) }, \
|
||||
{ "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_gps2_raw_t, cog) }, \
|
||||
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_gps2_raw_t, satellites_visible) }, \
|
||||
{ "dgps_numch", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_gps2_raw_t, dgps_numch) }, \
|
||||
{ "dgps_age", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_gps2_raw_t, dgps_age) }, \
|
||||
{ { "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gps2_raw_t, time_usec) }, \
|
||||
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_gps2_raw_t, fix_type) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_gps2_raw_t, lat) }, \
|
||||
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps2_raw_t, lon) }, \
|
||||
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps2_raw_t, alt) }, \
|
||||
{ "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_gps2_raw_t, eph) }, \
|
||||
{ "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_gps2_raw_t, epv) }, \
|
||||
{ "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gps2_raw_t, vel) }, \
|
||||
{ "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_gps2_raw_t, cog) }, \
|
||||
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_gps2_raw_t, satellites_visible) }, \
|
||||
{ "dgps_numch", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gps2_raw_t, dgps_numch) }, \
|
||||
{ "dgps_age", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_gps2_raw_t, dgps_age) }, \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
@@ -88,23 +88,23 @@ typedef struct __mavlink_gps2_raw_t {
|
||||
* @param dgps_age [ms] Age of DGPS info
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps2_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint64_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, uint16_t cog, uint8_t satellites_visible, uint8_t dgps_numch, uint32_t dgps_age)
|
||||
static inline uint16_t mavlink_msg_gps2_raw_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, uint16_t cog, uint8_t satellites_visible, uint8_t dgps_numch, uint32_t dgps_age)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GPS2_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_int32_t(buf, 16, alt);
|
||||
_mav_put_uint32_t(buf, 20, dgps_age);
|
||||
_mav_put_uint16_t(buf, 24, eph);
|
||||
_mav_put_uint16_t(buf, 26, epv);
|
||||
_mav_put_uint16_t(buf, 28, vel);
|
||||
_mav_put_uint16_t(buf, 30, cog);
|
||||
_mav_put_uint8_t(buf, 32, fix_type);
|
||||
_mav_put_uint8_t(buf, 33, satellites_visible);
|
||||
_mav_put_uint8_t(buf, 34, dgps_numch);
|
||||
_mav_put_uint32_t(buf, 0, time_usec);
|
||||
_mav_put_int32_t(buf, 4, lat);
|
||||
_mav_put_int32_t(buf, 8, lon);
|
||||
_mav_put_int32_t(buf, 12, alt);
|
||||
_mav_put_uint32_t(buf, 16, dgps_age);
|
||||
_mav_put_uint16_t(buf, 20, eph);
|
||||
_mav_put_uint16_t(buf, 22, epv);
|
||||
_mav_put_uint16_t(buf, 24, vel);
|
||||
_mav_put_uint16_t(buf, 26, cog);
|
||||
_mav_put_uint8_t(buf, 28, fix_type);
|
||||
_mav_put_uint8_t(buf, 29, satellites_visible);
|
||||
_mav_put_uint8_t(buf, 30, dgps_numch);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS2_RAW_LEN);
|
||||
#else
|
||||
@@ -149,24 +149,24 @@ static inline uint16_t mavlink_msg_gps2_raw_pack(uint8_t system_id, uint8_t comp
|
||||
* @param dgps_age [ms] Age of DGPS info
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps2_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
static inline uint16_t mavlink_msg_gps2_raw_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint64_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,uint16_t cog,uint8_t satellites_visible,uint8_t dgps_numch,uint32_t dgps_age)
|
||||
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,uint16_t cog,uint8_t satellites_visible,uint8_t dgps_numch,uint32_t dgps_age)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GPS2_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_int32_t(buf, 16, alt);
|
||||
_mav_put_uint32_t(buf, 20, dgps_age);
|
||||
_mav_put_uint16_t(buf, 24, eph);
|
||||
_mav_put_uint16_t(buf, 26, epv);
|
||||
_mav_put_uint16_t(buf, 28, vel);
|
||||
_mav_put_uint16_t(buf, 30, cog);
|
||||
_mav_put_uint8_t(buf, 32, fix_type);
|
||||
_mav_put_uint8_t(buf, 33, satellites_visible);
|
||||
_mav_put_uint8_t(buf, 34, dgps_numch);
|
||||
_mav_put_uint32_t(buf, 0, time_usec);
|
||||
_mav_put_int32_t(buf, 4, lat);
|
||||
_mav_put_int32_t(buf, 8, lon);
|
||||
_mav_put_int32_t(buf, 12, alt);
|
||||
_mav_put_uint32_t(buf, 16, dgps_age);
|
||||
_mav_put_uint16_t(buf, 20, eph);
|
||||
_mav_put_uint16_t(buf, 22, epv);
|
||||
_mav_put_uint16_t(buf, 24, vel);
|
||||
_mav_put_uint16_t(buf, 26, cog);
|
||||
_mav_put_uint8_t(buf, 28, fix_type);
|
||||
_mav_put_uint8_t(buf, 29, satellites_visible);
|
||||
_mav_put_uint8_t(buf, 30, dgps_numch);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS2_RAW_LEN);
|
||||
#else
|
||||
@@ -199,7 +199,7 @@ static inline uint16_t mavlink_msg_gps2_raw_pack_chan(uint8_t system_id, uint8_t
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gps2_raw C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps2_raw_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps2_raw_t* gps2_raw)
|
||||
static inline uint16_t mavlink_msg_gps2_raw_encode(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps2_raw_t* gps2_raw)
|
||||
{
|
||||
return mavlink_msg_gps2_raw_pack(system_id, component_id, msg, gps2_raw->time_usec, gps2_raw->fix_type, gps2_raw->lat, gps2_raw->lon, gps2_raw->alt, gps2_raw->eph, gps2_raw->epv, gps2_raw->vel, gps2_raw->cog, gps2_raw->satellites_visible, gps2_raw->dgps_numch, gps2_raw->dgps_age);
|
||||
}
|
||||
@@ -213,7 +213,7 @@ static inline uint16_t mavlink_msg_gps2_raw_encode(uint8_t system_id, uint8_t co
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gps2_raw C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps2_raw_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps2_raw_t* gps2_raw)
|
||||
static inline uint16_t mavlink_msg_gps2_raw_encode_chan(uint16_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps2_raw_t* gps2_raw)
|
||||
{
|
||||
return mavlink_msg_gps2_raw_pack_chan(system_id, component_id, chan, msg, gps2_raw->time_usec, gps2_raw->fix_type, gps2_raw->lat, gps2_raw->lon, gps2_raw->alt, gps2_raw->eph, gps2_raw->epv, gps2_raw->vel, gps2_raw->cog, gps2_raw->satellites_visible, gps2_raw->dgps_numch, gps2_raw->dgps_age);
|
||||
}
|
||||
@@ -237,22 +237,22 @@ static inline uint16_t mavlink_msg_gps2_raw_encode_chan(uint8_t system_id, uint8
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_gps2_raw_send(mavlink_channel_t chan, uint64_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, uint16_t cog, uint8_t satellites_visible, uint8_t dgps_numch, uint32_t dgps_age)
|
||||
static inline void mavlink_msg_gps2_raw_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, uint16_t cog, uint8_t satellites_visible, uint8_t dgps_numch, uint32_t dgps_age)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GPS2_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_int32_t(buf, 16, alt);
|
||||
_mav_put_uint32_t(buf, 20, dgps_age);
|
||||
_mav_put_uint16_t(buf, 24, eph);
|
||||
_mav_put_uint16_t(buf, 26, epv);
|
||||
_mav_put_uint16_t(buf, 28, vel);
|
||||
_mav_put_uint16_t(buf, 30, cog);
|
||||
_mav_put_uint8_t(buf, 32, fix_type);
|
||||
_mav_put_uint8_t(buf, 33, satellites_visible);
|
||||
_mav_put_uint8_t(buf, 34, dgps_numch);
|
||||
_mav_put_uint32_t(buf, 0, time_usec);
|
||||
_mav_put_int32_t(buf, 4, lat);
|
||||
_mav_put_int32_t(buf, 8, lon);
|
||||
_mav_put_int32_t(buf, 12, alt);
|
||||
_mav_put_uint32_t(buf, 16, dgps_age);
|
||||
_mav_put_uint16_t(buf, 20, eph);
|
||||
_mav_put_uint16_t(buf, 22, epv);
|
||||
_mav_put_uint16_t(buf, 24, vel);
|
||||
_mav_put_uint16_t(buf, 26, cog);
|
||||
_mav_put_uint8_t(buf, 28, fix_type);
|
||||
_mav_put_uint8_t(buf, 29, satellites_visible);
|
||||
_mav_put_uint8_t(buf, 30, dgps_numch);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RAW, buf, MAVLINK_MSG_ID_GPS2_RAW_MIN_LEN, MAVLINK_MSG_ID_GPS2_RAW_LEN, MAVLINK_MSG_ID_GPS2_RAW_CRC);
|
||||
#else
|
||||
@@ -296,22 +296,22 @@ static inline void mavlink_msg_gps2_raw_send_struct(mavlink_channel_t chan, cons
|
||||
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_gps2_raw_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_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, uint16_t cog, uint8_t satellites_visible, uint8_t dgps_numch, uint32_t dgps_age)
|
||||
static inline void mavlink_msg_gps2_raw_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, uint16_t cog, uint8_t satellites_visible, uint8_t dgps_numch, uint32_t dgps_age)
|
||||
{
|
||||
#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_int32_t(buf, 16, alt);
|
||||
_mav_put_uint32_t(buf, 20, dgps_age);
|
||||
_mav_put_uint16_t(buf, 24, eph);
|
||||
_mav_put_uint16_t(buf, 26, epv);
|
||||
_mav_put_uint16_t(buf, 28, vel);
|
||||
_mav_put_uint16_t(buf, 30, cog);
|
||||
_mav_put_uint8_t(buf, 32, fix_type);
|
||||
_mav_put_uint8_t(buf, 33, satellites_visible);
|
||||
_mav_put_uint8_t(buf, 34, dgps_numch);
|
||||
_mav_put_uint32_t(buf, 0, time_usec);
|
||||
_mav_put_int32_t(buf, 4, lat);
|
||||
_mav_put_int32_t(buf, 8, lon);
|
||||
_mav_put_int32_t(buf, 12, alt);
|
||||
_mav_put_uint32_t(buf, 16, dgps_age);
|
||||
_mav_put_uint16_t(buf, 20, eph);
|
||||
_mav_put_uint16_t(buf, 22, epv);
|
||||
_mav_put_uint16_t(buf, 24, vel);
|
||||
_mav_put_uint16_t(buf, 26, cog);
|
||||
_mav_put_uint8_t(buf, 28, fix_type);
|
||||
_mav_put_uint8_t(buf, 29, satellites_visible);
|
||||
_mav_put_uint8_t(buf, 30, dgps_numch);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RAW, buf, MAVLINK_MSG_ID_GPS2_RAW_MIN_LEN, MAVLINK_MSG_ID_GPS2_RAW_LEN, MAVLINK_MSG_ID_GPS2_RAW_CRC);
|
||||
#else
|
||||
@@ -344,9 +344,9 @@ static inline void mavlink_msg_gps2_raw_send_buf(mavlink_message_t *msgbuf, mavl
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
static inline uint64_t mavlink_msg_gps2_raw_get_time_usec(const mavlink_message_t* msg)
|
||||
static inline uint32_t mavlink_msg_gps2_raw_get_time_usec(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint64_t(msg, 0);
|
||||
return _MAV_RETURN_uint32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -356,7 +356,7 @@ static inline uint64_t mavlink_msg_gps2_raw_get_time_usec(const mavlink_message_
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_gps2_raw_get_fix_type(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 32);
|
||||
return _MAV_RETURN_uint8_t(msg, 28);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -366,7 +366,7 @@ static inline uint8_t mavlink_msg_gps2_raw_get_fix_type(const mavlink_message_t*
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps2_raw_get_lat(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 8);
|
||||
return _MAV_RETURN_int32_t(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -376,7 +376,7 @@ static inline int32_t mavlink_msg_gps2_raw_get_lat(const mavlink_message_t* msg)
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps2_raw_get_lon(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 12);
|
||||
return _MAV_RETURN_int32_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -386,7 +386,7 @@ static inline int32_t mavlink_msg_gps2_raw_get_lon(const mavlink_message_t* msg)
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps2_raw_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 16);
|
||||
return _MAV_RETURN_int32_t(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -396,7 +396,7 @@ static inline int32_t mavlink_msg_gps2_raw_get_alt(const mavlink_message_t* msg)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps2_raw_get_eph(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 24);
|
||||
return _MAV_RETURN_uint16_t(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -406,7 +406,7 @@ static inline uint16_t mavlink_msg_gps2_raw_get_eph(const mavlink_message_t* msg
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps2_raw_get_epv(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 26);
|
||||
return _MAV_RETURN_uint16_t(msg, 22);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -416,7 +416,7 @@ static inline uint16_t mavlink_msg_gps2_raw_get_epv(const mavlink_message_t* msg
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps2_raw_get_vel(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 28);
|
||||
return _MAV_RETURN_uint16_t(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -426,7 +426,7 @@ static inline uint16_t mavlink_msg_gps2_raw_get_vel(const mavlink_message_t* msg
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps2_raw_get_cog(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 30);
|
||||
return _MAV_RETURN_uint16_t(msg, 26);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -436,7 +436,7 @@ static inline uint16_t mavlink_msg_gps2_raw_get_cog(const mavlink_message_t* msg
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_gps2_raw_get_satellites_visible(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 33);
|
||||
return _MAV_RETURN_uint8_t(msg, 29);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -446,7 +446,7 @@ static inline uint8_t mavlink_msg_gps2_raw_get_satellites_visible(const mavlink_
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_gps2_raw_get_dgps_numch(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 34);
|
||||
return _MAV_RETURN_uint8_t(msg, 30);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -456,7 +456,7 @@ static inline uint8_t mavlink_msg_gps2_raw_get_dgps_numch(const mavlink_message_
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_gps2_raw_get_dgps_age(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 20);
|
||||
return _MAV_RETURN_uint32_t(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user