RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
mavlink_msg_gps2_rtk.h
1#pragma once
2// MESSAGE GPS2_RTK PACKING
3
4#define MAVLINK_MSG_ID_GPS2_RTK 128
5
6MAVPACKED(
7typedef struct __mavlink_gps2_rtk_t {
8 uint32_t time_last_baseline_ms; /*< Time since boot of last baseline message received in ms.*/
9 uint32_t tow; /*< GPS Time of Week of last baseline*/
10 int32_t baseline_a_mm; /*< Current baseline in ECEF x or NED north component in mm.*/
11 int32_t baseline_b_mm; /*< Current baseline in ECEF y or NED east component in mm.*/
12 int32_t baseline_c_mm; /*< Current baseline in ECEF z or NED down component in mm.*/
13 uint32_t accuracy; /*< Current estimate of baseline accuracy.*/
14 int32_t iar_num_hypotheses; /*< Current number of integer ambiguity hypotheses.*/
15 uint16_t wn; /*< GPS Week Number of last baseline*/
16 uint8_t rtk_receiver_id; /*< Identification of connected RTK receiver.*/
17 uint8_t rtk_health; /*< GPS-specific health report for RTK data.*/
18 uint8_t rtk_rate; /*< Rate of baseline messages being received by GPS, in HZ*/
19 uint8_t nsats; /*< Current number of sats used for RTK calculation.*/
20 uint8_t baseline_coords_type; /*< Coordinate system of baseline. 0 == ECEF, 1 == NED*/
21}) mavlink_gps2_rtk_t;
22
23#define MAVLINK_MSG_ID_GPS2_RTK_LEN 35
24#define MAVLINK_MSG_ID_GPS2_RTK_MIN_LEN 35
25#define MAVLINK_MSG_ID_128_LEN 35
26#define MAVLINK_MSG_ID_128_MIN_LEN 35
27
28#define MAVLINK_MSG_ID_GPS2_RTK_CRC 226
29#define MAVLINK_MSG_ID_128_CRC 226
30
31
32
33#if MAVLINK_COMMAND_24BIT
34#define MAVLINK_MESSAGE_INFO_GPS2_RTK { \
35 128, \
36 "GPS2_RTK", \
37 13, \
38 { { "time_last_baseline_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gps2_rtk_t, time_last_baseline_ms) }, \
39 { "rtk_receiver_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gps2_rtk_t, rtk_receiver_id) }, \
40 { "wn", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gps2_rtk_t, wn) }, \
41 { "tow", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_gps2_rtk_t, tow) }, \
42 { "rtk_health", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_gps2_rtk_t, rtk_health) }, \
43 { "rtk_rate", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gps2_rtk_t, rtk_rate) }, \
44 { "nsats", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_gps2_rtk_t, nsats) }, \
45 { "baseline_coords_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_gps2_rtk_t, baseline_coords_type) }, \
46 { "baseline_a_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps2_rtk_t, baseline_a_mm) }, \
47 { "baseline_b_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps2_rtk_t, baseline_b_mm) }, \
48 { "baseline_c_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps2_rtk_t, baseline_c_mm) }, \
49 { "accuracy", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_gps2_rtk_t, accuracy) }, \
50 { "iar_num_hypotheses", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_gps2_rtk_t, iar_num_hypotheses) }, \
51 } \
52}
53#else
54#define MAVLINK_MESSAGE_INFO_GPS2_RTK { \
55 "GPS2_RTK", \
56 13, \
57 { { "time_last_baseline_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gps2_rtk_t, time_last_baseline_ms) }, \
58 { "rtk_receiver_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gps2_rtk_t, rtk_receiver_id) }, \
59 { "wn", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gps2_rtk_t, wn) }, \
60 { "tow", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_gps2_rtk_t, tow) }, \
61 { "rtk_health", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_gps2_rtk_t, rtk_health) }, \
62 { "rtk_rate", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_gps2_rtk_t, rtk_rate) }, \
63 { "nsats", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_gps2_rtk_t, nsats) }, \
64 { "baseline_coords_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_gps2_rtk_t, baseline_coords_type) }, \
65 { "baseline_a_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps2_rtk_t, baseline_a_mm) }, \
66 { "baseline_b_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps2_rtk_t, baseline_b_mm) }, \
67 { "baseline_c_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps2_rtk_t, baseline_c_mm) }, \
68 { "accuracy", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_gps2_rtk_t, accuracy) }, \
69 { "iar_num_hypotheses", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_gps2_rtk_t, iar_num_hypotheses) }, \
70 } \
71}
72#endif
73
95static inline uint16_t mavlink_msg_gps2_rtk_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
96 uint32_t time_last_baseline_ms, uint8_t rtk_receiver_id, uint16_t wn, uint32_t tow, uint8_t rtk_health, uint8_t rtk_rate, uint8_t nsats, uint8_t baseline_coords_type, int32_t baseline_a_mm, int32_t baseline_b_mm, int32_t baseline_c_mm, uint32_t accuracy, int32_t iar_num_hypotheses)
97{
98#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
99 char buf[MAVLINK_MSG_ID_GPS2_RTK_LEN];
100 _mav_put_uint32_t(buf, 0, time_last_baseline_ms);
101 _mav_put_uint32_t(buf, 4, tow);
102 _mav_put_int32_t(buf, 8, baseline_a_mm);
103 _mav_put_int32_t(buf, 12, baseline_b_mm);
104 _mav_put_int32_t(buf, 16, baseline_c_mm);
105 _mav_put_uint32_t(buf, 20, accuracy);
106 _mav_put_int32_t(buf, 24, iar_num_hypotheses);
107 _mav_put_uint16_t(buf, 28, wn);
108 _mav_put_uint8_t(buf, 30, rtk_receiver_id);
109 _mav_put_uint8_t(buf, 31, rtk_health);
110 _mav_put_uint8_t(buf, 32, rtk_rate);
111 _mav_put_uint8_t(buf, 33, nsats);
112 _mav_put_uint8_t(buf, 34, baseline_coords_type);
113
114 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS2_RTK_LEN);
115#else
116 mavlink_gps2_rtk_t packet;
117 packet.time_last_baseline_ms = time_last_baseline_ms;
118 packet.tow = tow;
119 packet.baseline_a_mm = baseline_a_mm;
120 packet.baseline_b_mm = baseline_b_mm;
121 packet.baseline_c_mm = baseline_c_mm;
122 packet.accuracy = accuracy;
123 packet.iar_num_hypotheses = iar_num_hypotheses;
124 packet.wn = wn;
125 packet.rtk_receiver_id = rtk_receiver_id;
126 packet.rtk_health = rtk_health;
127 packet.rtk_rate = rtk_rate;
128 packet.nsats = nsats;
129 packet.baseline_coords_type = baseline_coords_type;
130
131 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS2_RTK_LEN);
132#endif
133
134 msg->msgid = MAVLINK_MSG_ID_GPS2_RTK;
135 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS2_RTK_MIN_LEN, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
136}
137
159static inline uint16_t mavlink_msg_gps2_rtk_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
160 mavlink_message_t* msg,
161 uint32_t time_last_baseline_ms,uint8_t rtk_receiver_id,uint16_t wn,uint32_t tow,uint8_t rtk_health,uint8_t rtk_rate,uint8_t nsats,uint8_t baseline_coords_type,int32_t baseline_a_mm,int32_t baseline_b_mm,int32_t baseline_c_mm,uint32_t accuracy,int32_t iar_num_hypotheses)
162{
163#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
164 char buf[MAVLINK_MSG_ID_GPS2_RTK_LEN];
165 _mav_put_uint32_t(buf, 0, time_last_baseline_ms);
166 _mav_put_uint32_t(buf, 4, tow);
167 _mav_put_int32_t(buf, 8, baseline_a_mm);
168 _mav_put_int32_t(buf, 12, baseline_b_mm);
169 _mav_put_int32_t(buf, 16, baseline_c_mm);
170 _mav_put_uint32_t(buf, 20, accuracy);
171 _mav_put_int32_t(buf, 24, iar_num_hypotheses);
172 _mav_put_uint16_t(buf, 28, wn);
173 _mav_put_uint8_t(buf, 30, rtk_receiver_id);
174 _mav_put_uint8_t(buf, 31, rtk_health);
175 _mav_put_uint8_t(buf, 32, rtk_rate);
176 _mav_put_uint8_t(buf, 33, nsats);
177 _mav_put_uint8_t(buf, 34, baseline_coords_type);
178
179 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS2_RTK_LEN);
180#else
181 mavlink_gps2_rtk_t packet;
182 packet.time_last_baseline_ms = time_last_baseline_ms;
183 packet.tow = tow;
184 packet.baseline_a_mm = baseline_a_mm;
185 packet.baseline_b_mm = baseline_b_mm;
186 packet.baseline_c_mm = baseline_c_mm;
187 packet.accuracy = accuracy;
188 packet.iar_num_hypotheses = iar_num_hypotheses;
189 packet.wn = wn;
190 packet.rtk_receiver_id = rtk_receiver_id;
191 packet.rtk_health = rtk_health;
192 packet.rtk_rate = rtk_rate;
193 packet.nsats = nsats;
194 packet.baseline_coords_type = baseline_coords_type;
195
196 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS2_RTK_LEN);
197#endif
198
199 msg->msgid = MAVLINK_MSG_ID_GPS2_RTK;
200 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS2_RTK_MIN_LEN, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
201}
202
211static inline uint16_t mavlink_msg_gps2_rtk_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps2_rtk_t* gps2_rtk)
212{
213 return mavlink_msg_gps2_rtk_pack(system_id, component_id, msg, gps2_rtk->time_last_baseline_ms, gps2_rtk->rtk_receiver_id, gps2_rtk->wn, gps2_rtk->tow, gps2_rtk->rtk_health, gps2_rtk->rtk_rate, gps2_rtk->nsats, gps2_rtk->baseline_coords_type, gps2_rtk->baseline_a_mm, gps2_rtk->baseline_b_mm, gps2_rtk->baseline_c_mm, gps2_rtk->accuracy, gps2_rtk->iar_num_hypotheses);
214}
215
225static inline uint16_t mavlink_msg_gps2_rtk_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps2_rtk_t* gps2_rtk)
226{
227 return mavlink_msg_gps2_rtk_pack_chan(system_id, component_id, chan, msg, gps2_rtk->time_last_baseline_ms, gps2_rtk->rtk_receiver_id, gps2_rtk->wn, gps2_rtk->tow, gps2_rtk->rtk_health, gps2_rtk->rtk_rate, gps2_rtk->nsats, gps2_rtk->baseline_coords_type, gps2_rtk->baseline_a_mm, gps2_rtk->baseline_b_mm, gps2_rtk->baseline_c_mm, gps2_rtk->accuracy, gps2_rtk->iar_num_hypotheses);
228}
229
248#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
249
250static inline void mavlink_msg_gps2_rtk_send(mavlink_channel_t chan, uint32_t time_last_baseline_ms, uint8_t rtk_receiver_id, uint16_t wn, uint32_t tow, uint8_t rtk_health, uint8_t rtk_rate, uint8_t nsats, uint8_t baseline_coords_type, int32_t baseline_a_mm, int32_t baseline_b_mm, int32_t baseline_c_mm, uint32_t accuracy, int32_t iar_num_hypotheses)
251{
252#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
253 char buf[MAVLINK_MSG_ID_GPS2_RTK_LEN];
254 _mav_put_uint32_t(buf, 0, time_last_baseline_ms);
255 _mav_put_uint32_t(buf, 4, tow);
256 _mav_put_int32_t(buf, 8, baseline_a_mm);
257 _mav_put_int32_t(buf, 12, baseline_b_mm);
258 _mav_put_int32_t(buf, 16, baseline_c_mm);
259 _mav_put_uint32_t(buf, 20, accuracy);
260 _mav_put_int32_t(buf, 24, iar_num_hypotheses);
261 _mav_put_uint16_t(buf, 28, wn);
262 _mav_put_uint8_t(buf, 30, rtk_receiver_id);
263 _mav_put_uint8_t(buf, 31, rtk_health);
264 _mav_put_uint8_t(buf, 32, rtk_rate);
265 _mav_put_uint8_t(buf, 33, nsats);
266 _mav_put_uint8_t(buf, 34, baseline_coords_type);
267
268 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, buf, MAVLINK_MSG_ID_GPS2_RTK_MIN_LEN, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
269#else
270 mavlink_gps2_rtk_t packet;
271 packet.time_last_baseline_ms = time_last_baseline_ms;
272 packet.tow = tow;
273 packet.baseline_a_mm = baseline_a_mm;
274 packet.baseline_b_mm = baseline_b_mm;
275 packet.baseline_c_mm = baseline_c_mm;
276 packet.accuracy = accuracy;
277 packet.iar_num_hypotheses = iar_num_hypotheses;
278 packet.wn = wn;
279 packet.rtk_receiver_id = rtk_receiver_id;
280 packet.rtk_health = rtk_health;
281 packet.rtk_rate = rtk_rate;
282 packet.nsats = nsats;
283 packet.baseline_coords_type = baseline_coords_type;
284
285 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, (const char *)&packet, MAVLINK_MSG_ID_GPS2_RTK_MIN_LEN, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
286#endif
287}
288
294static inline void mavlink_msg_gps2_rtk_send_struct(mavlink_channel_t chan, const mavlink_gps2_rtk_t* gps2_rtk)
295{
296#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
297 mavlink_msg_gps2_rtk_send(chan, gps2_rtk->time_last_baseline_ms, gps2_rtk->rtk_receiver_id, gps2_rtk->wn, gps2_rtk->tow, gps2_rtk->rtk_health, gps2_rtk->rtk_rate, gps2_rtk->nsats, gps2_rtk->baseline_coords_type, gps2_rtk->baseline_a_mm, gps2_rtk->baseline_b_mm, gps2_rtk->baseline_c_mm, gps2_rtk->accuracy, gps2_rtk->iar_num_hypotheses);
298#else
299 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, (const char *)gps2_rtk, MAVLINK_MSG_ID_GPS2_RTK_MIN_LEN, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
300#endif
301}
302
303#if MAVLINK_MSG_ID_GPS2_RTK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
304/*
305 This varient of _send() can be used to save stack space by re-using
306 memory from the receive buffer. The caller provides a
307 mavlink_message_t which is the size of a full mavlink message. This
308 is usually the receive buffer for the channel, and allows a reply to an
309 incoming message with minimum stack space usage.
310 */
311static inline void mavlink_msg_gps2_rtk_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_last_baseline_ms, uint8_t rtk_receiver_id, uint16_t wn, uint32_t tow, uint8_t rtk_health, uint8_t rtk_rate, uint8_t nsats, uint8_t baseline_coords_type, int32_t baseline_a_mm, int32_t baseline_b_mm, int32_t baseline_c_mm, uint32_t accuracy, int32_t iar_num_hypotheses)
312{
313#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
314 char *buf = (char *)msgbuf;
315 _mav_put_uint32_t(buf, 0, time_last_baseline_ms);
316 _mav_put_uint32_t(buf, 4, tow);
317 _mav_put_int32_t(buf, 8, baseline_a_mm);
318 _mav_put_int32_t(buf, 12, baseline_b_mm);
319 _mav_put_int32_t(buf, 16, baseline_c_mm);
320 _mav_put_uint32_t(buf, 20, accuracy);
321 _mav_put_int32_t(buf, 24, iar_num_hypotheses);
322 _mav_put_uint16_t(buf, 28, wn);
323 _mav_put_uint8_t(buf, 30, rtk_receiver_id);
324 _mav_put_uint8_t(buf, 31, rtk_health);
325 _mav_put_uint8_t(buf, 32, rtk_rate);
326 _mav_put_uint8_t(buf, 33, nsats);
327 _mav_put_uint8_t(buf, 34, baseline_coords_type);
328
329 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, buf, MAVLINK_MSG_ID_GPS2_RTK_MIN_LEN, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
330#else
331 mavlink_gps2_rtk_t *packet = (mavlink_gps2_rtk_t *)msgbuf;
332 packet->time_last_baseline_ms = time_last_baseline_ms;
333 packet->tow = tow;
334 packet->baseline_a_mm = baseline_a_mm;
335 packet->baseline_b_mm = baseline_b_mm;
336 packet->baseline_c_mm = baseline_c_mm;
337 packet->accuracy = accuracy;
338 packet->iar_num_hypotheses = iar_num_hypotheses;
339 packet->wn = wn;
340 packet->rtk_receiver_id = rtk_receiver_id;
341 packet->rtk_health = rtk_health;
342 packet->rtk_rate = rtk_rate;
343 packet->nsats = nsats;
344 packet->baseline_coords_type = baseline_coords_type;
345
346 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS2_RTK, (const char *)packet, MAVLINK_MSG_ID_GPS2_RTK_MIN_LEN, MAVLINK_MSG_ID_GPS2_RTK_LEN, MAVLINK_MSG_ID_GPS2_RTK_CRC);
347#endif
348}
349#endif
350
351#endif
352
353// MESSAGE GPS2_RTK UNPACKING
354
355
361static inline uint32_t mavlink_msg_gps2_rtk_get_time_last_baseline_ms(const mavlink_message_t* msg)
362{
363 return _MAV_RETURN_uint32_t(msg, 0);
364}
365
371static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_receiver_id(const mavlink_message_t* msg)
372{
373 return _MAV_RETURN_uint8_t(msg, 30);
374}
375
381static inline uint16_t mavlink_msg_gps2_rtk_get_wn(const mavlink_message_t* msg)
382{
383 return _MAV_RETURN_uint16_t(msg, 28);
384}
385
391static inline uint32_t mavlink_msg_gps2_rtk_get_tow(const mavlink_message_t* msg)
392{
393 return _MAV_RETURN_uint32_t(msg, 4);
394}
395
401static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_health(const mavlink_message_t* msg)
402{
403 return _MAV_RETURN_uint8_t(msg, 31);
404}
405
411static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_rate(const mavlink_message_t* msg)
412{
413 return _MAV_RETURN_uint8_t(msg, 32);
414}
415
421static inline uint8_t mavlink_msg_gps2_rtk_get_nsats(const mavlink_message_t* msg)
422{
423 return _MAV_RETURN_uint8_t(msg, 33);
424}
425
431static inline uint8_t mavlink_msg_gps2_rtk_get_baseline_coords_type(const mavlink_message_t* msg)
432{
433 return _MAV_RETURN_uint8_t(msg, 34);
434}
435
441static inline int32_t mavlink_msg_gps2_rtk_get_baseline_a_mm(const mavlink_message_t* msg)
442{
443 return _MAV_RETURN_int32_t(msg, 8);
444}
445
451static inline int32_t mavlink_msg_gps2_rtk_get_baseline_b_mm(const mavlink_message_t* msg)
452{
453 return _MAV_RETURN_int32_t(msg, 12);
454}
455
461static inline int32_t mavlink_msg_gps2_rtk_get_baseline_c_mm(const mavlink_message_t* msg)
462{
463 return _MAV_RETURN_int32_t(msg, 16);
464}
465
471static inline uint32_t mavlink_msg_gps2_rtk_get_accuracy(const mavlink_message_t* msg)
472{
473 return _MAV_RETURN_uint32_t(msg, 20);
474}
475
481static inline int32_t mavlink_msg_gps2_rtk_get_iar_num_hypotheses(const mavlink_message_t* msg)
482{
483 return _MAV_RETURN_int32_t(msg, 24);
484}
485
492static inline void mavlink_msg_gps2_rtk_decode(const mavlink_message_t* msg, mavlink_gps2_rtk_t* gps2_rtk)
493{
494#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
495 gps2_rtk->time_last_baseline_ms = mavlink_msg_gps2_rtk_get_time_last_baseline_ms(msg);
496 gps2_rtk->tow = mavlink_msg_gps2_rtk_get_tow(msg);
497 gps2_rtk->baseline_a_mm = mavlink_msg_gps2_rtk_get_baseline_a_mm(msg);
498 gps2_rtk->baseline_b_mm = mavlink_msg_gps2_rtk_get_baseline_b_mm(msg);
499 gps2_rtk->baseline_c_mm = mavlink_msg_gps2_rtk_get_baseline_c_mm(msg);
500 gps2_rtk->accuracy = mavlink_msg_gps2_rtk_get_accuracy(msg);
501 gps2_rtk->iar_num_hypotheses = mavlink_msg_gps2_rtk_get_iar_num_hypotheses(msg);
502 gps2_rtk->wn = mavlink_msg_gps2_rtk_get_wn(msg);
503 gps2_rtk->rtk_receiver_id = mavlink_msg_gps2_rtk_get_rtk_receiver_id(msg);
504 gps2_rtk->rtk_health = mavlink_msg_gps2_rtk_get_rtk_health(msg);
505 gps2_rtk->rtk_rate = mavlink_msg_gps2_rtk_get_rtk_rate(msg);
506 gps2_rtk->nsats = mavlink_msg_gps2_rtk_get_nsats(msg);
507 gps2_rtk->baseline_coords_type = mavlink_msg_gps2_rtk_get_baseline_coords_type(msg);
508#else
509 uint8_t len = msg->len < MAVLINK_MSG_ID_GPS2_RTK_LEN? msg->len : MAVLINK_MSG_ID_GPS2_RTK_LEN;
510 memset(gps2_rtk, 0, MAVLINK_MSG_ID_GPS2_RTK_LEN);
511 memcpy(gps2_rtk, _MAV_PAYLOAD(msg), len);
512#endif
513}