4#define MAVLINK_MSG_ID_GPS2_RTK 128
7typedef struct __mavlink_gps2_rtk_t {
8 uint32_t time_last_baseline_ms;
10 int32_t baseline_a_mm;
11 int32_t baseline_b_mm;
12 int32_t baseline_c_mm;
14 int32_t iar_num_hypotheses;
16 uint8_t rtk_receiver_id;
20 uint8_t baseline_coords_type;
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
28#define MAVLINK_MSG_ID_GPS2_RTK_CRC 226
29#define MAVLINK_MSG_ID_128_CRC 226
33#if MAVLINK_COMMAND_24BIT
34#define MAVLINK_MESSAGE_INFO_GPS2_RTK { \
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) }, \
54#define MAVLINK_MESSAGE_INFO_GPS2_RTK { \
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) }, \
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)
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);
114 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS2_RTK_LEN);
116 mavlink_gps2_rtk_t packet;
117 packet.time_last_baseline_ms = time_last_baseline_ms;
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;
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;
131 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS2_RTK_LEN);
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);
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)
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);
179 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS2_RTK_LEN);
181 mavlink_gps2_rtk_t packet;
182 packet.time_last_baseline_ms = time_last_baseline_ms;
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;
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;
196 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS2_RTK_LEN);
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);
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)
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);
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)
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);
248#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
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)
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);
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);
270 mavlink_gps2_rtk_t packet;
271 packet.time_last_baseline_ms = time_last_baseline_ms;
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;
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;
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);
294static inline void mavlink_msg_gps2_rtk_send_struct(mavlink_channel_t chan,
const mavlink_gps2_rtk_t* gps2_rtk)
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);
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);
303#if MAVLINK_MSG_ID_GPS2_RTK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
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)
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);
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);
331 mavlink_gps2_rtk_t *packet = (mavlink_gps2_rtk_t *)msgbuf;
332 packet->time_last_baseline_ms = time_last_baseline_ms;
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;
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;
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);
361static inline uint32_t mavlink_msg_gps2_rtk_get_time_last_baseline_ms(
const mavlink_message_t* msg)
363 return _MAV_RETURN_uint32_t(msg, 0);
371static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_receiver_id(
const mavlink_message_t* msg)
373 return _MAV_RETURN_uint8_t(msg, 30);
381static inline uint16_t mavlink_msg_gps2_rtk_get_wn(
const mavlink_message_t* msg)
383 return _MAV_RETURN_uint16_t(msg, 28);
391static inline uint32_t mavlink_msg_gps2_rtk_get_tow(
const mavlink_message_t* msg)
393 return _MAV_RETURN_uint32_t(msg, 4);
401static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_health(
const mavlink_message_t* msg)
403 return _MAV_RETURN_uint8_t(msg, 31);
411static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_rate(
const mavlink_message_t* msg)
413 return _MAV_RETURN_uint8_t(msg, 32);
421static inline uint8_t mavlink_msg_gps2_rtk_get_nsats(
const mavlink_message_t* msg)
423 return _MAV_RETURN_uint8_t(msg, 33);
431static inline uint8_t mavlink_msg_gps2_rtk_get_baseline_coords_type(
const mavlink_message_t* msg)
433 return _MAV_RETURN_uint8_t(msg, 34);
441static inline int32_t mavlink_msg_gps2_rtk_get_baseline_a_mm(
const mavlink_message_t* msg)
443 return _MAV_RETURN_int32_t(msg, 8);
451static inline int32_t mavlink_msg_gps2_rtk_get_baseline_b_mm(
const mavlink_message_t* msg)
453 return _MAV_RETURN_int32_t(msg, 12);
461static inline int32_t mavlink_msg_gps2_rtk_get_baseline_c_mm(
const mavlink_message_t* msg)
463 return _MAV_RETURN_int32_t(msg, 16);
471static inline uint32_t mavlink_msg_gps2_rtk_get_accuracy(
const mavlink_message_t* msg)
473 return _MAV_RETURN_uint32_t(msg, 20);
481static inline int32_t mavlink_msg_gps2_rtk_get_iar_num_hypotheses(
const mavlink_message_t* msg)
483 return _MAV_RETURN_int32_t(msg, 24);
492static inline void mavlink_msg_gps2_rtk_decode(
const mavlink_message_t* msg, mavlink_gps2_rtk_t* gps2_rtk)
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);
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);