RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
mavlink_msg_gps_raw_int.h
1#pragma once
2// MESSAGE GPS_RAW_INT PACKING
3
4#define MAVLINK_MSG_ID_GPS_RAW_INT 24
5
6MAVPACKED(
7typedef struct __mavlink_gps_raw_int_t {
8 uint64_t time_usec; /*< Timestamp (microseconds since UNIX epoch or microseconds since system boot)*/
9 int32_t lat; /*< Latitude (WGS84, EGM96 ellipsoid), in degrees * 1E7*/
10 int32_t lon; /*< Longitude (WGS84, EGM96 ellipsoid), in degrees * 1E7*/
11 int32_t alt; /*< Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude.*/
12 uint16_t eph; /*< GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX*/
13 uint16_t epv; /*< GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX*/
14 uint16_t vel; /*< GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX*/
15 uint16_t cog; /*< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX*/
16 uint8_t fix_type; /*< See the GPS_FIX_TYPE enum.*/
17 uint8_t satellites_visible; /*< Number of satellites visible. If unknown, set to 255*/
18 int32_t alt_ellipsoid; /*< Altitude (above WGS84, EGM96 ellipsoid), in meters * 1000 (positive for up).*/
19 uint32_t h_acc; /*< Position uncertainty in meters * 1000 (positive for up).*/
20 uint32_t v_acc; /*< Altitude uncertainty in meters * 1000 (positive for up).*/
21 uint32_t vel_acc; /*< Speed uncertainty in meters * 1000 (positive for up).*/
22 uint32_t hdg_acc; /*< Heading / track uncertainty in degrees * 1e5.*/
23}) mavlink_gps_raw_int_t;
24
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
29
30#define MAVLINK_MSG_ID_GPS_RAW_INT_CRC 24
31#define MAVLINK_MSG_ID_24_CRC 24
32
33
34
35#if MAVLINK_COMMAND_24BIT
36#define MAVLINK_MESSAGE_INFO_GPS_RAW_INT { \
37 24, \
38 "GPS_RAW_INT", \
39 15, \
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) }, \
55 } \
56}
57#else
58#define MAVLINK_MESSAGE_INFO_GPS_RAW_INT { \
59 "GPS_RAW_INT", \
60 15, \
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) }, \
76 } \
77}
78#endif
79
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)
105{
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);
123
124 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
125#else
126 mavlink_gps_raw_int_t packet;
127 packet.time_usec = time_usec;
128 packet.lat = lat;
129 packet.lon = lon;
130 packet.alt = alt;
131 packet.eph = eph;
132 packet.epv = epv;
133 packet.vel = vel;
134 packet.cog = cog;
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;
142
143 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
144#endif
145
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);
148}
149
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)
176{
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);
194
195 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
196#else
197 mavlink_gps_raw_int_t packet;
198 packet.time_usec = time_usec;
199 packet.lat = lat;
200 packet.lon = lon;
201 packet.alt = alt;
202 packet.eph = eph;
203 packet.epv = epv;
204 packet.vel = vel;
205 packet.cog = cog;
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;
213
214 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
215#endif
216
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);
219}
220
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)
230{
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);
232}
233
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)
244{
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);
246}
247
268#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
269
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)
271{
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);
289
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);
291#else
292 mavlink_gps_raw_int_t packet;
293 packet.time_usec = time_usec;
294 packet.lat = lat;
295 packet.lon = lon;
296 packet.alt = alt;
297 packet.eph = eph;
298 packet.epv = epv;
299 packet.vel = vel;
300 packet.cog = cog;
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;
308
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);
310#endif
311}
312
318static inline void mavlink_msg_gps_raw_int_send_struct(mavlink_channel_t chan, const mavlink_gps_raw_int_t* gps_raw_int)
319{
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);
322#else
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);
324#endif
325}
326
327#if MAVLINK_MSG_ID_GPS_RAW_INT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
328/*
329 This varient of _send() can be used to save stack space by re-using
330 memory from the receive buffer. The caller provides a
331 mavlink_message_t which is the size of a full mavlink message. This
332 is usually the receive buffer for the channel, and allows a reply to an
333 incoming message with minimum stack space usage.
334 */
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)
336{
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);
354
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);
356#else
357 mavlink_gps_raw_int_t *packet = (mavlink_gps_raw_int_t *)msgbuf;
358 packet->time_usec = time_usec;
359 packet->lat = lat;
360 packet->lon = lon;
361 packet->alt = alt;
362 packet->eph = eph;
363 packet->epv = epv;
364 packet->vel = vel;
365 packet->cog = cog;
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;
373
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);
375#endif
376}
377#endif
378
379#endif
380
381// MESSAGE GPS_RAW_INT UNPACKING
382
383
389static inline uint64_t mavlink_msg_gps_raw_int_get_time_usec(const mavlink_message_t* msg)
390{
391 return _MAV_RETURN_uint64_t(msg, 0);
392}
393
399static inline uint8_t mavlink_msg_gps_raw_int_get_fix_type(const mavlink_message_t* msg)
400{
401 return _MAV_RETURN_uint8_t(msg, 28);
402}
403
409static inline int32_t mavlink_msg_gps_raw_int_get_lat(const mavlink_message_t* msg)
410{
411 return _MAV_RETURN_int32_t(msg, 8);
412}
413
419static inline int32_t mavlink_msg_gps_raw_int_get_lon(const mavlink_message_t* msg)
420{
421 return _MAV_RETURN_int32_t(msg, 12);
422}
423
429static inline int32_t mavlink_msg_gps_raw_int_get_alt(const mavlink_message_t* msg)
430{
431 return _MAV_RETURN_int32_t(msg, 16);
432}
433
439static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t* msg)
440{
441 return _MAV_RETURN_uint16_t(msg, 20);
442}
443
449static inline uint16_t mavlink_msg_gps_raw_int_get_epv(const mavlink_message_t* msg)
450{
451 return _MAV_RETURN_uint16_t(msg, 22);
452}
453
459static inline uint16_t mavlink_msg_gps_raw_int_get_vel(const mavlink_message_t* msg)
460{
461 return _MAV_RETURN_uint16_t(msg, 24);
462}
463
469static inline uint16_t mavlink_msg_gps_raw_int_get_cog(const mavlink_message_t* msg)
470{
471 return _MAV_RETURN_uint16_t(msg, 26);
472}
473
479static inline uint8_t mavlink_msg_gps_raw_int_get_satellites_visible(const mavlink_message_t* msg)
480{
481 return _MAV_RETURN_uint8_t(msg, 29);
482}
483
489static inline int32_t mavlink_msg_gps_raw_int_get_alt_ellipsoid(const mavlink_message_t* msg)
490{
491 return _MAV_RETURN_int32_t(msg, 30);
492}
493
499static inline uint32_t mavlink_msg_gps_raw_int_get_h_acc(const mavlink_message_t* msg)
500{
501 return _MAV_RETURN_uint32_t(msg, 34);
502}
503
509static inline uint32_t mavlink_msg_gps_raw_int_get_v_acc(const mavlink_message_t* msg)
510{
511 return _MAV_RETURN_uint32_t(msg, 38);
512}
513
519static inline uint32_t mavlink_msg_gps_raw_int_get_vel_acc(const mavlink_message_t* msg)
520{
521 return _MAV_RETURN_uint32_t(msg, 42);
522}
523
529static inline uint32_t mavlink_msg_gps_raw_int_get_hdg_acc(const mavlink_message_t* msg)
530{
531 return _MAV_RETURN_uint32_t(msg, 46);
532}
533
540static inline void mavlink_msg_gps_raw_int_decode(const mavlink_message_t* msg, mavlink_gps_raw_int_t* gps_raw_int)
541{
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);
558#else
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);
562#endif
563}