4#define MAVLINK_MSG_ID_HIL_GPS 113
7typedef struct __mavlink_hil_gps_t {
20 uint8_t satellites_visible;
25#define MAVLINK_MSG_ID_HIL_GPS_LEN 39
26#define MAVLINK_MSG_ID_HIL_GPS_MIN_LEN 36
27#define MAVLINK_MSG_ID_113_LEN 39
28#define MAVLINK_MSG_ID_113_MIN_LEN 36
30#define MAVLINK_MSG_ID_HIL_GPS_CRC 124
31#define MAVLINK_MSG_ID_113_CRC 124
35#if MAVLINK_COMMAND_24BIT
36#define MAVLINK_MESSAGE_INFO_HIL_GPS {
40 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_hil_gps_t, time_usec) },
41 { "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 34
, offsetof(mavlink_hil_gps_t, fix_type) },
42 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0
, 8
, offsetof(mavlink_hil_gps_t, lat) },
43 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0
, 12
, offsetof(mavlink_hil_gps_t, lon) },
44 { "alt", NULL, MAVLINK_TYPE_INT32_T, 0
, 16
, offsetof(mavlink_hil_gps_t, alt) },
45 { "eph", NULL, MAVLINK_TYPE_UINT16_T, 0
, 20
, offsetof(mavlink_hil_gps_t, eph) },
46 { "epv", NULL, MAVLINK_TYPE_UINT16_T, 0
, 22
, offsetof(mavlink_hil_gps_t, epv) },
47 { "vel", NULL, MAVLINK_TYPE_UINT16_T, 0
, 24
, offsetof(mavlink_hil_gps_t, vel) },
48 { "vn", NULL, MAVLINK_TYPE_INT16_T, 0
, 26
, offsetof(mavlink_hil_gps_t, vn) },
49 { "ve", NULL, MAVLINK_TYPE_INT16_T, 0
, 28
, offsetof(mavlink_hil_gps_t, ve) },
50 { "vd", NULL, MAVLINK_TYPE_INT16_T, 0
, 30
, offsetof(mavlink_hil_gps_t, vd) },
51 { "cog", NULL, MAVLINK_TYPE_UINT16_T, 0
, 32
, offsetof(mavlink_hil_gps_t, cog) },
52 { "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0
, 35
, offsetof(mavlink_hil_gps_t, satellites_visible) },
53 { "id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 36
, offsetof(mavlink_hil_gps_t, id) },
54 { "yaw", NULL, MAVLINK_TYPE_UINT16_T, 0
, 37
, offsetof(mavlink_hil_gps_t, yaw) },
56}
58#define MAVLINK_MESSAGE_INFO_HIL_GPS {
61 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_hil_gps_t, time_usec) },
62 { "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 34
, offsetof(mavlink_hil_gps_t, fix_type) },
63 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0
, 8
, offsetof(mavlink_hil_gps_t, lat) },
64 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0
, 12
, offsetof(mavlink_hil_gps_t, lon) },
65 { "alt", NULL, MAVLINK_TYPE_INT32_T, 0
, 16
, offsetof(mavlink_hil_gps_t, alt) },
66 { "eph", NULL, MAVLINK_TYPE_UINT16_T, 0
, 20
, offsetof(mavlink_hil_gps_t, eph) },
67 { "epv", NULL, MAVLINK_TYPE_UINT16_T, 0
, 22
, offsetof(mavlink_hil_gps_t, epv) },
68 { "vel", NULL, MAVLINK_TYPE_UINT16_T, 0
, 24
, offsetof(mavlink_hil_gps_t, vel) },
69 { "vn", NULL, MAVLINK_TYPE_INT16_T, 0
, 26
, offsetof(mavlink_hil_gps_t, vn) },
70 { "ve", NULL, MAVLINK_TYPE_INT16_T, 0
, 28
, offsetof(mavlink_hil_gps_t, ve) },
71 { "vd", NULL, MAVLINK_TYPE_INT16_T, 0
, 30
, offsetof(mavlink_hil_gps_t, vd) },
72 { "cog", NULL, MAVLINK_TYPE_UINT16_T, 0
, 32
, offsetof(mavlink_hil_gps_t, cog) },
73 { "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0
, 35
, offsetof(mavlink_hil_gps_t, satellites_visible) },
74 { "id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 36
, offsetof(mavlink_hil_gps_t, id) },
75 { "yaw", NULL, MAVLINK_TYPE_UINT16_T, 0
, 37
, offsetof(mavlink_hil_gps_t, yaw) },
77}
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103static inline uint16_t mavlink_msg_hil_gps_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, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible, uint8_t id, uint16_t yaw)
106#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
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_int16_t(buf, 26, vn);
116 _mav_put_int16_t(buf, 28, ve);
117 _mav_put_int16_t(buf, 30, vd);
118 _mav_put_uint16_t(buf, 32, cog);
119 _mav_put_uint8_t(buf, 34, fix_type);
120 _mav_put_uint8_t(buf, 35, satellites_visible);
121 _mav_put_uint8_t(buf, 36, id);
122 _mav_put_uint16_t(buf, 37, yaw);
126 mavlink_hil_gps_t packet;
127 packet.time_usec = time_usec;
138 packet.fix_type = fix_type;
139 packet.satellites_visible = satellites_visible;
143 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174static inline uint16_t mavlink_msg_hil_gps_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, 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, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible, uint8_t id, uint16_t yaw)
177#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
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_int16_t(buf, 26, vn);
187 _mav_put_int16_t(buf, 28, ve);
188 _mav_put_int16_t(buf, 30, vd);
189 _mav_put_uint16_t(buf, 32, cog);
190 _mav_put_uint8_t(buf, 34, fix_type);
191 _mav_put_uint8_t(buf, 35, satellites_visible);
192 _mav_put_uint8_t(buf, 36, id);
193 _mav_put_uint16_t(buf, 37, yaw);
197 mavlink_hil_gps_t packet;
198 packet.time_usec = time_usec;
209 packet.fix_type = fix_type;
210 packet.satellites_visible = satellites_visible;
214 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
219 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_HIL_GPS_MIN_LEN, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248static inline uint16_t mavlink_msg_hil_gps_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
249 mavlink_message_t* msg,
250 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,int16_t vn,int16_t ve,int16_t vd,uint16_t cog,uint8_t satellites_visible,uint8_t id,uint16_t yaw)
252#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
254 _mav_put_uint64_t(buf, 0, time_usec);
255 _mav_put_int32_t(buf, 8, lat);
256 _mav_put_int32_t(buf, 12, lon);
257 _mav_put_int32_t(buf, 16, alt);
258 _mav_put_uint16_t(buf, 20, eph);
259 _mav_put_uint16_t(buf, 22, epv);
260 _mav_put_uint16_t(buf, 24, vel);
261 _mav_put_int16_t(buf, 26, vn);
262 _mav_put_int16_t(buf, 28, ve);
263 _mav_put_int16_t(buf, 30, vd);
264 _mav_put_uint16_t(buf, 32, cog);
265 _mav_put_uint8_t(buf, 34, fix_type);
266 _mav_put_uint8_t(buf, 35, satellites_visible);
267 _mav_put_uint8_t(buf, 36, id);
268 _mav_put_uint16_t(buf, 37, yaw);
272 mavlink_hil_gps_t packet;
273 packet.time_usec = time_usec;
284 packet.fix_type = fix_type;
285 packet.satellites_visible = satellites_visible;
289 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
297
298
299
300
301
302
303
304static inline uint16_t mavlink_msg_hil_gps_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_hil_gps_t* hil_gps)
306 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);
310
311
312
313
314
315
316
317
318static inline uint16_t mavlink_msg_hil_gps_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_hil_gps_t* hil_gps)
320 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);
324
325
326
327
328
329
330
331
332static inline uint16_t mavlink_msg_hil_gps_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_hil_gps_t* hil_gps)
334 return mavlink_msg_hil_gps_pack_status(system_id, component_id, _status, 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);
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
359static inline void mavlink_msg_hil_gps_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, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible, uint8_t id, uint16_t yaw)
361#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
362 char buf[MAVLINK_MSG_ID_HIL_GPS_LEN];
363 _mav_put_uint64_t(buf, 0, time_usec);
364 _mav_put_int32_t(buf, 8, lat);
365 _mav_put_int32_t(buf, 12, lon);
366 _mav_put_int32_t(buf, 16, alt);
367 _mav_put_uint16_t(buf, 20, eph);
368 _mav_put_uint16_t(buf, 22, epv);
369 _mav_put_uint16_t(buf, 24, vel);
370 _mav_put_int16_t(buf, 26, vn);
371 _mav_put_int16_t(buf, 28, ve);
372 _mav_put_int16_t(buf, 30, vd);
373 _mav_put_uint16_t(buf, 32, cog);
374 _mav_put_uint8_t(buf, 34, fix_type);
375 _mav_put_uint8_t(buf, 35, satellites_visible);
376 _mav_put_uint8_t(buf, 36, id);
377 _mav_put_uint16_t(buf, 37, yaw);
379 _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);
381 mavlink_hil_gps_t packet;
382 packet.time_usec = time_usec;
393 packet.fix_type = fix_type;
394 packet.satellites_visible = satellites_visible;
398 _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);
403
404
405
406
407static inline void mavlink_msg_hil_gps_send_struct(mavlink_channel_t chan,
const mavlink_hil_gps_t* hil_gps)
409#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
410 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);
412 _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);
416#if MAVLINK_MSG_ID_HIL_GPS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
418
419
420
421
422
423
424static inline void mavlink_msg_hil_gps_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, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible, uint8_t id, uint16_t yaw)
426#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
427 char *buf = (
char *)msgbuf;
428 _mav_put_uint64_t(buf, 0, time_usec);
429 _mav_put_int32_t(buf, 8, lat);
430 _mav_put_int32_t(buf, 12, lon);
431 _mav_put_int32_t(buf, 16, alt);
432 _mav_put_uint16_t(buf, 20, eph);
433 _mav_put_uint16_t(buf, 22, epv);
434 _mav_put_uint16_t(buf, 24, vel);
435 _mav_put_int16_t(buf, 26, vn);
436 _mav_put_int16_t(buf, 28, ve);
437 _mav_put_int16_t(buf, 30, vd);
438 _mav_put_uint16_t(buf, 32, cog);
439 _mav_put_uint8_t(buf, 34, fix_type);
440 _mav_put_uint8_t(buf, 35, satellites_visible);
441 _mav_put_uint8_t(buf, 36, id);
442 _mav_put_uint16_t(buf, 37, yaw);
444 _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);
446 mavlink_hil_gps_t *packet = (mavlink_hil_gps_t *)msgbuf;
447 packet->time_usec = time_usec;
458 packet->fix_type = fix_type;
459 packet->satellites_visible = satellites_visible;
463 _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);
474
475
476
477
478static inline uint64_t mavlink_msg_hil_gps_get_time_usec(
const mavlink_message_t* msg)
480 return _MAV_RETURN_uint64_t(msg, 0);
484
485
486
487
488static inline uint8_t mavlink_msg_hil_gps_get_fix_type(
const mavlink_message_t* msg)
490 return _MAV_RETURN_uint8_t(msg, 34);
494
495
496
497
498static inline int32_t mavlink_msg_hil_gps_get_lat(
const mavlink_message_t* msg)
500 return _MAV_RETURN_int32_t(msg, 8);
504
505
506
507
508static inline int32_t mavlink_msg_hil_gps_get_lon(
const mavlink_message_t* msg)
510 return _MAV_RETURN_int32_t(msg, 12);
514
515
516
517
518static inline int32_t mavlink_msg_hil_gps_get_alt(
const mavlink_message_t* msg)
520 return _MAV_RETURN_int32_t(msg, 16);
524
525
526
527
528static inline uint16_t mavlink_msg_hil_gps_get_eph(
const mavlink_message_t* msg)
530 return _MAV_RETURN_uint16_t(msg, 20);
534
535
536
537
538static inline uint16_t mavlink_msg_hil_gps_get_epv(
const mavlink_message_t* msg)
540 return _MAV_RETURN_uint16_t(msg, 22);
544
545
546
547
548static inline uint16_t mavlink_msg_hil_gps_get_vel(
const mavlink_message_t* msg)
550 return _MAV_RETURN_uint16_t(msg, 24);
554
555
556
557
558static inline int16_t mavlink_msg_hil_gps_get_vn(
const mavlink_message_t* msg)
560 return _MAV_RETURN_int16_t(msg, 26);
564
565
566
567
568static inline int16_t mavlink_msg_hil_gps_get_ve(
const mavlink_message_t* msg)
570 return _MAV_RETURN_int16_t(msg, 28);
574
575
576
577
578static inline int16_t mavlink_msg_hil_gps_get_vd(
const mavlink_message_t* msg)
580 return _MAV_RETURN_int16_t(msg, 30);
584
585
586
587
588static inline uint16_t mavlink_msg_hil_gps_get_cog(
const mavlink_message_t* msg)
590 return _MAV_RETURN_uint16_t(msg, 32);
594
595
596
597
598static inline uint8_t mavlink_msg_hil_gps_get_satellites_visible(
const mavlink_message_t* msg)
600 return _MAV_RETURN_uint8_t(msg, 35);
604
605
606
607
608static inline uint8_t mavlink_msg_hil_gps_get_id(
const mavlink_message_t* msg)
610 return _MAV_RETURN_uint8_t(msg, 36);
614
615
616
617
618static inline uint16_t mavlink_msg_hil_gps_get_yaw(
const mavlink_message_t* msg)
620 return _MAV_RETURN_uint16_t(msg, 37);
624
625
626
627
628
629static inline void mavlink_msg_hil_gps_decode(
const mavlink_message_t* msg, mavlink_hil_gps_t* hil_gps)
631#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
632 hil_gps->time_usec = mavlink_msg_hil_gps_get_time_usec(msg);
633 hil_gps->lat = mavlink_msg_hil_gps_get_lat(msg);
634 hil_gps->lon = mavlink_msg_hil_gps_get_lon(msg);
635 hil_gps->alt = mavlink_msg_hil_gps_get_alt(msg);
636 hil_gps->eph = mavlink_msg_hil_gps_get_eph(msg);
637 hil_gps->epv = mavlink_msg_hil_gps_get_epv(msg);
638 hil_gps->vel = mavlink_msg_hil_gps_get_vel(msg);
639 hil_gps->vn = mavlink_msg_hil_gps_get_vn(msg);
640 hil_gps->ve = mavlink_msg_hil_gps_get_ve(msg);
641 hil_gps->vd = mavlink_msg_hil_gps_get_vd(msg);
642 hil_gps->cog = mavlink_msg_hil_gps_get_cog(msg);
643 hil_gps->fix_type = mavlink_msg_hil_gps_get_fix_type(msg);
644 hil_gps->satellites_visible = mavlink_msg_hil_gps_get_satellites_visible(msg);
645 hil_gps->id = mavlink_msg_hil_gps_get_id(msg);
646 hil_gps->yaw = mavlink_msg_hil_gps_get_yaw(msg);
648 uint8_t len = msg->len < MAVLINK_MSG_ID_HIL_GPS_LEN? msg->len : MAVLINK_MSG_ID_HIL_GPS_LEN;
649 memset(hil_gps, 0, MAVLINK_MSG_ID_HIL_GPS_LEN);
650 memcpy(hil_gps, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_HIL_GPS_LEN
Definition: mavlink_msg_hil_gps.h:25
#define MAVLINK_MSG_ID_HIL_GPS
Definition: mavlink_msg_hil_gps.h:4
#define MAVLINK_MSG_ID_HIL_GPS_CRC
Definition: mavlink_msg_hil_gps.h:30
#define MAVLINK_MSG_ID_HIL_GPS_MIN_LEN
Definition: mavlink_msg_hil_gps.h:26