4#define MAVLINK_MSG_ID_GPS_RAW_INT 24
7typedef struct __mavlink_gps_raw_int_t {
17 uint8_t satellites_visible;
18 int32_t alt_ellipsoid;
23}) mavlink_gps_raw_int_t;
25#define MAVLINK_MSG_ID_GPS_RAW_INT_LEN 50
26#define MAVLINK_MSG_ID_GPS_RAW_INT_MIN_LEN 30
27#define MAVLINK_MSG_ID_24_LEN 50
28#define MAVLINK_MSG_ID_24_MIN_LEN 30
30#define MAVLINK_MSG_ID_GPS_RAW_INT_CRC 24
31#define MAVLINK_MSG_ID_24_CRC 24
35#if MAVLINK_COMMAND_24BIT
36#define MAVLINK_MESSAGE_INFO_GPS_RAW_INT { \
40 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_gps_raw_int_t, time_usec) }, \
41 { "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_gps_raw_int_t, fix_type) }, \
42 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_raw_int_t, lat) }, \
43 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps_raw_int_t, lon) }, \
44 { "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps_raw_int_t, alt) }, \
45 { "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_gps_raw_int_t, eph) }, \
46 { "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_gps_raw_int_t, epv) }, \
47 { "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gps_raw_int_t, vel) }, \
48 { "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_gps_raw_int_t, cog) }, \
49 { "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_gps_raw_int_t, satellites_visible) }, \
50 { "alt_ellipsoid", NULL, MAVLINK_TYPE_INT32_T, 0, 30, offsetof(mavlink_gps_raw_int_t, alt_ellipsoid) }, \
51 { "h_acc", NULL, MAVLINK_TYPE_UINT32_T, 0, 34, offsetof(mavlink_gps_raw_int_t, h_acc) }, \
52 { "v_acc", NULL, MAVLINK_TYPE_UINT32_T, 0, 38, offsetof(mavlink_gps_raw_int_t, v_acc) }, \
53 { "vel_acc", NULL, MAVLINK_TYPE_UINT32_T, 0, 42, offsetof(mavlink_gps_raw_int_t, vel_acc) }, \
54 { "hdg_acc", NULL, MAVLINK_TYPE_UINT32_T, 0, 46, offsetof(mavlink_gps_raw_int_t, hdg_acc) }, \
58#define MAVLINK_MESSAGE_INFO_GPS_RAW_INT { \
61 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_gps_raw_int_t, time_usec) }, \
62 { "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_gps_raw_int_t, fix_type) }, \
63 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_raw_int_t, lat) }, \
64 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps_raw_int_t, lon) }, \
65 { "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps_raw_int_t, alt) }, \
66 { "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_gps_raw_int_t, eph) }, \
67 { "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_gps_raw_int_t, epv) }, \
68 { "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gps_raw_int_t, vel) }, \
69 { "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_gps_raw_int_t, cog) }, \
70 { "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_gps_raw_int_t, satellites_visible) }, \
71 { "alt_ellipsoid", NULL, MAVLINK_TYPE_INT32_T, 0, 30, offsetof(mavlink_gps_raw_int_t, alt_ellipsoid) }, \
72 { "h_acc", NULL, MAVLINK_TYPE_UINT32_T, 0, 34, offsetof(mavlink_gps_raw_int_t, h_acc) }, \
73 { "v_acc", NULL, MAVLINK_TYPE_UINT32_T, 0, 38, offsetof(mavlink_gps_raw_int_t, v_acc) }, \
74 { "vel_acc", NULL, MAVLINK_TYPE_UINT32_T, 0, 42, offsetof(mavlink_gps_raw_int_t, vel_acc) }, \
75 { "hdg_acc", NULL, MAVLINK_TYPE_UINT32_T, 0, 46, offsetof(mavlink_gps_raw_int_t, hdg_acc) }, \
103static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
104 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, int32_t alt_ellipsoid, uint32_t h_acc, uint32_t v_acc, uint32_t vel_acc, uint32_t hdg_acc)
106#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
107 char buf[MAVLINK_MSG_ID_GPS_RAW_INT_LEN];
108 _mav_put_uint64_t(buf, 0, time_usec);
109 _mav_put_int32_t(buf, 8, lat);
110 _mav_put_int32_t(buf, 12, lon);
111 _mav_put_int32_t(buf, 16, alt);
112 _mav_put_uint16_t(buf, 20, eph);
113 _mav_put_uint16_t(buf, 22, epv);
114 _mav_put_uint16_t(buf, 24, vel);
115 _mav_put_uint16_t(buf, 26, cog);
116 _mav_put_uint8_t(buf, 28, fix_type);
117 _mav_put_uint8_t(buf, 29, satellites_visible);
118 _mav_put_int32_t(buf, 30, alt_ellipsoid);
119 _mav_put_uint32_t(buf, 34, h_acc);
120 _mav_put_uint32_t(buf, 38, v_acc);
121 _mav_put_uint32_t(buf, 42, vel_acc);
122 _mav_put_uint32_t(buf, 46, hdg_acc);
124 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
126 mavlink_gps_raw_int_t packet;
127 packet.time_usec = time_usec;
135 packet.fix_type = fix_type;
136 packet.satellites_visible = satellites_visible;
137 packet.alt_ellipsoid = alt_ellipsoid;
138 packet.h_acc = h_acc;
139 packet.v_acc = v_acc;
140 packet.vel_acc = vel_acc;
141 packet.hdg_acc = hdg_acc;
143 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
146 msg->msgid = MAVLINK_MSG_ID_GPS_RAW_INT;
147 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_RAW_INT_MIN_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
173static inline uint16_t mavlink_msg_gps_raw_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
174 mavlink_message_t* msg,
175 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,int32_t alt_ellipsoid,uint32_t h_acc,uint32_t v_acc,uint32_t vel_acc,uint32_t hdg_acc)
177#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
178 char buf[MAVLINK_MSG_ID_GPS_RAW_INT_LEN];
179 _mav_put_uint64_t(buf, 0, time_usec);
180 _mav_put_int32_t(buf, 8, lat);
181 _mav_put_int32_t(buf, 12, lon);
182 _mav_put_int32_t(buf, 16, alt);
183 _mav_put_uint16_t(buf, 20, eph);
184 _mav_put_uint16_t(buf, 22, epv);
185 _mav_put_uint16_t(buf, 24, vel);
186 _mav_put_uint16_t(buf, 26, cog);
187 _mav_put_uint8_t(buf, 28, fix_type);
188 _mav_put_uint8_t(buf, 29, satellites_visible);
189 _mav_put_int32_t(buf, 30, alt_ellipsoid);
190 _mav_put_uint32_t(buf, 34, h_acc);
191 _mav_put_uint32_t(buf, 38, v_acc);
192 _mav_put_uint32_t(buf, 42, vel_acc);
193 _mav_put_uint32_t(buf, 46, hdg_acc);
195 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
197 mavlink_gps_raw_int_t packet;
198 packet.time_usec = time_usec;
206 packet.fix_type = fix_type;
207 packet.satellites_visible = satellites_visible;
208 packet.alt_ellipsoid = alt_ellipsoid;
209 packet.h_acc = h_acc;
210 packet.v_acc = v_acc;
211 packet.vel_acc = vel_acc;
212 packet.hdg_acc = hdg_acc;
214 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
217 msg->msgid = MAVLINK_MSG_ID_GPS_RAW_INT;
218 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_RAW_INT_MIN_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
229static inline uint16_t mavlink_msg_gps_raw_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_gps_raw_int_t* gps_raw_int)
231 return mavlink_msg_gps_raw_int_pack(system_id, component_id, msg, gps_raw_int->time_usec, gps_raw_int->fix_type, gps_raw_int->lat, gps_raw_int->lon, gps_raw_int->alt, gps_raw_int->eph, gps_raw_int->epv, gps_raw_int->vel, gps_raw_int->cog, gps_raw_int->satellites_visible, gps_raw_int->alt_ellipsoid, gps_raw_int->h_acc, gps_raw_int->v_acc, gps_raw_int->vel_acc, gps_raw_int->hdg_acc);
243static inline uint16_t mavlink_msg_gps_raw_int_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_gps_raw_int_t* gps_raw_int)
245 return mavlink_msg_gps_raw_int_pack_chan(system_id, component_id, chan, msg, gps_raw_int->time_usec, gps_raw_int->fix_type, gps_raw_int->lat, gps_raw_int->lon, gps_raw_int->alt, gps_raw_int->eph, gps_raw_int->epv, gps_raw_int->vel, gps_raw_int->cog, gps_raw_int->satellites_visible, gps_raw_int->alt_ellipsoid, gps_raw_int->h_acc, gps_raw_int->v_acc, gps_raw_int->vel_acc, gps_raw_int->hdg_acc);
268#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
270static inline void mavlink_msg_gps_raw_int_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, int32_t alt_ellipsoid, uint32_t h_acc, uint32_t v_acc, uint32_t vel_acc, uint32_t hdg_acc)
272#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
273 char buf[MAVLINK_MSG_ID_GPS_RAW_INT_LEN];
274 _mav_put_uint64_t(buf, 0, time_usec);
275 _mav_put_int32_t(buf, 8, lat);
276 _mav_put_int32_t(buf, 12, lon);
277 _mav_put_int32_t(buf, 16, alt);
278 _mav_put_uint16_t(buf, 20, eph);
279 _mav_put_uint16_t(buf, 22, epv);
280 _mav_put_uint16_t(buf, 24, vel);
281 _mav_put_uint16_t(buf, 26, cog);
282 _mav_put_uint8_t(buf, 28, fix_type);
283 _mav_put_uint8_t(buf, 29, satellites_visible);
284 _mav_put_int32_t(buf, 30, alt_ellipsoid);
285 _mav_put_uint32_t(buf, 34, h_acc);
286 _mav_put_uint32_t(buf, 38, v_acc);
287 _mav_put_uint32_t(buf, 42, vel_acc);
288 _mav_put_uint32_t(buf, 46, hdg_acc);
290 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, MAVLINK_MSG_ID_GPS_RAW_INT_MIN_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
292 mavlink_gps_raw_int_t packet;
293 packet.time_usec = time_usec;
301 packet.fix_type = fix_type;
302 packet.satellites_visible = satellites_visible;
303 packet.alt_ellipsoid = alt_ellipsoid;
304 packet.h_acc = h_acc;
305 packet.v_acc = v_acc;
306 packet.vel_acc = vel_acc;
307 packet.hdg_acc = hdg_acc;
309 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (
const char *)&packet, MAVLINK_MSG_ID_GPS_RAW_INT_MIN_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
318static inline void mavlink_msg_gps_raw_int_send_struct(mavlink_channel_t chan,
const mavlink_gps_raw_int_t* gps_raw_int)
320#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
321 mavlink_msg_gps_raw_int_send(chan, gps_raw_int->time_usec, gps_raw_int->fix_type, gps_raw_int->lat, gps_raw_int->lon, gps_raw_int->alt, gps_raw_int->eph, gps_raw_int->epv, gps_raw_int->vel, gps_raw_int->cog, gps_raw_int->satellites_visible, gps_raw_int->alt_ellipsoid, gps_raw_int->h_acc, gps_raw_int->v_acc, gps_raw_int->vel_acc, gps_raw_int->hdg_acc);
323 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (
const char *)gps_raw_int, MAVLINK_MSG_ID_GPS_RAW_INT_MIN_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
327#if MAVLINK_MSG_ID_GPS_RAW_INT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
335static inline void mavlink_msg_gps_raw_int_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, int32_t alt_ellipsoid, uint32_t h_acc, uint32_t v_acc, uint32_t vel_acc, uint32_t hdg_acc)
337#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
338 char *buf = (
char *)msgbuf;
339 _mav_put_uint64_t(buf, 0, time_usec);
340 _mav_put_int32_t(buf, 8, lat);
341 _mav_put_int32_t(buf, 12, lon);
342 _mav_put_int32_t(buf, 16, alt);
343 _mav_put_uint16_t(buf, 20, eph);
344 _mav_put_uint16_t(buf, 22, epv);
345 _mav_put_uint16_t(buf, 24, vel);
346 _mav_put_uint16_t(buf, 26, cog);
347 _mav_put_uint8_t(buf, 28, fix_type);
348 _mav_put_uint8_t(buf, 29, satellites_visible);
349 _mav_put_int32_t(buf, 30, alt_ellipsoid);
350 _mav_put_uint32_t(buf, 34, h_acc);
351 _mav_put_uint32_t(buf, 38, v_acc);
352 _mav_put_uint32_t(buf, 42, vel_acc);
353 _mav_put_uint32_t(buf, 46, hdg_acc);
355 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, MAVLINK_MSG_ID_GPS_RAW_INT_MIN_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
357 mavlink_gps_raw_int_t *packet = (mavlink_gps_raw_int_t *)msgbuf;
358 packet->time_usec = time_usec;
366 packet->fix_type = fix_type;
367 packet->satellites_visible = satellites_visible;
368 packet->alt_ellipsoid = alt_ellipsoid;
369 packet->h_acc = h_acc;
370 packet->v_acc = v_acc;
371 packet->vel_acc = vel_acc;
372 packet->hdg_acc = hdg_acc;
374 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (
const char *)packet, MAVLINK_MSG_ID_GPS_RAW_INT_MIN_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
389static inline uint64_t mavlink_msg_gps_raw_int_get_time_usec(
const mavlink_message_t* msg)
391 return _MAV_RETURN_uint64_t(msg, 0);
399static inline uint8_t mavlink_msg_gps_raw_int_get_fix_type(
const mavlink_message_t* msg)
401 return _MAV_RETURN_uint8_t(msg, 28);
409static inline int32_t mavlink_msg_gps_raw_int_get_lat(
const mavlink_message_t* msg)
411 return _MAV_RETURN_int32_t(msg, 8);
419static inline int32_t mavlink_msg_gps_raw_int_get_lon(
const mavlink_message_t* msg)
421 return _MAV_RETURN_int32_t(msg, 12);
429static inline int32_t mavlink_msg_gps_raw_int_get_alt(
const mavlink_message_t* msg)
431 return _MAV_RETURN_int32_t(msg, 16);
439static inline uint16_t mavlink_msg_gps_raw_int_get_eph(
const mavlink_message_t* msg)
441 return _MAV_RETURN_uint16_t(msg, 20);
449static inline uint16_t mavlink_msg_gps_raw_int_get_epv(
const mavlink_message_t* msg)
451 return _MAV_RETURN_uint16_t(msg, 22);
459static inline uint16_t mavlink_msg_gps_raw_int_get_vel(
const mavlink_message_t* msg)
461 return _MAV_RETURN_uint16_t(msg, 24);
469static inline uint16_t mavlink_msg_gps_raw_int_get_cog(
const mavlink_message_t* msg)
471 return _MAV_RETURN_uint16_t(msg, 26);
479static inline uint8_t mavlink_msg_gps_raw_int_get_satellites_visible(
const mavlink_message_t* msg)
481 return _MAV_RETURN_uint8_t(msg, 29);
489static inline int32_t mavlink_msg_gps_raw_int_get_alt_ellipsoid(
const mavlink_message_t* msg)
491 return _MAV_RETURN_int32_t(msg, 30);
499static inline uint32_t mavlink_msg_gps_raw_int_get_h_acc(
const mavlink_message_t* msg)
501 return _MAV_RETURN_uint32_t(msg, 34);
509static inline uint32_t mavlink_msg_gps_raw_int_get_v_acc(
const mavlink_message_t* msg)
511 return _MAV_RETURN_uint32_t(msg, 38);
519static inline uint32_t mavlink_msg_gps_raw_int_get_vel_acc(
const mavlink_message_t* msg)
521 return _MAV_RETURN_uint32_t(msg, 42);
529static inline uint32_t mavlink_msg_gps_raw_int_get_hdg_acc(
const mavlink_message_t* msg)
531 return _MAV_RETURN_uint32_t(msg, 46);
540static inline void mavlink_msg_gps_raw_int_decode(
const mavlink_message_t* msg, mavlink_gps_raw_int_t* gps_raw_int)
542#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
543 gps_raw_int->time_usec = mavlink_msg_gps_raw_int_get_time_usec(msg);
544 gps_raw_int->lat = mavlink_msg_gps_raw_int_get_lat(msg);
545 gps_raw_int->lon = mavlink_msg_gps_raw_int_get_lon(msg);
546 gps_raw_int->alt = mavlink_msg_gps_raw_int_get_alt(msg);
547 gps_raw_int->eph = mavlink_msg_gps_raw_int_get_eph(msg);
548 gps_raw_int->epv = mavlink_msg_gps_raw_int_get_epv(msg);
549 gps_raw_int->vel = mavlink_msg_gps_raw_int_get_vel(msg);
550 gps_raw_int->cog = mavlink_msg_gps_raw_int_get_cog(msg);
551 gps_raw_int->fix_type = mavlink_msg_gps_raw_int_get_fix_type(msg);
552 gps_raw_int->satellites_visible = mavlink_msg_gps_raw_int_get_satellites_visible(msg);
553 gps_raw_int->alt_ellipsoid = mavlink_msg_gps_raw_int_get_alt_ellipsoid(msg);
554 gps_raw_int->h_acc = mavlink_msg_gps_raw_int_get_h_acc(msg);
555 gps_raw_int->v_acc = mavlink_msg_gps_raw_int_get_v_acc(msg);
556 gps_raw_int->vel_acc = mavlink_msg_gps_raw_int_get_vel_acc(msg);
557 gps_raw_int->hdg_acc = mavlink_msg_gps_raw_int_get_hdg_acc(msg);
559 uint8_t len = msg->len < MAVLINK_MSG_ID_GPS_RAW_INT_LEN? msg->len : MAVLINK_MSG_ID_GPS_RAW_INT_LEN;
560 memset(gps_raw_int, 0, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
561 memcpy(gps_raw_int, _MAV_PAYLOAD(msg), len);