3 #define MAVLINK_MSG_ID_GPS2_RTK 128
22 #define MAVLINK_MSG_ID_GPS2_RTK_LEN 35
23 #define MAVLINK_MSG_ID_128_LEN 35
25 #define MAVLINK_MSG_ID_GPS2_RTK_CRC 226
26 #define MAVLINK_MSG_ID_128_CRC 226
30 #define MAVLINK_MESSAGE_INFO_GPS2_RTK { \
33 { { "time_last_baseline_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_gps2_rtk_t, time_last_baseline_ms) }, \
34 { "tow", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_gps2_rtk_t, tow) }, \
35 { "baseline_a_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps2_rtk_t, baseline_a_mm) }, \
36 { "baseline_b_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps2_rtk_t, baseline_b_mm) }, \
37 { "baseline_c_mm", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps2_rtk_t, baseline_c_mm) }, \
38 { "accuracy", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_gps2_rtk_t, accuracy) }, \
39 { "iar_num_hypotheses", NULL, MAVLINK_TYPE_INT32_T, 0, 24, offsetof(mavlink_gps2_rtk_t, iar_num_hypotheses) }, \
40 { "wn", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_gps2_rtk_t, wn) }, \
41 { "rtk_receiver_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_gps2_rtk_t, rtk_receiver_id) }, \
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) }, \
71 static inline uint16_t mavlink_msg_gps2_rtk_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
72 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)
74 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
104 packet.
nsats = nsats;
111 #if MAVLINK_CRC_EXTRA
139 static inline uint16_t mavlink_msg_gps2_rtk_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
140 mavlink_message_t* msg,
141 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)
143 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
173 packet.
nsats = nsats;
180 #if MAVLINK_CRC_EXTRA
195 static 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)
197 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);
209 static 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)
211 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);
232 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
234 static 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)
236 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
252 #if MAVLINK_CRC_EXTRA
270 packet.
nsats = nsats;
273 #if MAVLINK_CRC_EXTRA
281 #if MAVLINK_MSG_ID_GPS2_RTK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
289 static 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)
291 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
292 char *buf = (
char *)msgbuf;
307 #if MAVLINK_CRC_EXTRA
325 packet->
nsats = nsats;
328 #if MAVLINK_CRC_EXTRA
347 static inline uint32_t mavlink_msg_gps2_rtk_get_time_last_baseline_ms(
const mavlink_message_t* msg)
349 return _MAV_RETURN_uint32_t(msg, 0);
357 static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_receiver_id(
const mavlink_message_t* msg)
367 static inline uint16_t mavlink_msg_gps2_rtk_get_wn(
const mavlink_message_t* msg)
369 return _MAV_RETURN_uint16_t(msg, 28);
377 static inline uint32_t mavlink_msg_gps2_rtk_get_tow(
const mavlink_message_t* msg)
379 return _MAV_RETURN_uint32_t(msg, 4);
387 static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_health(
const mavlink_message_t* msg)
397 static inline uint8_t mavlink_msg_gps2_rtk_get_rtk_rate(
const mavlink_message_t* msg)
407 static inline uint8_t mavlink_msg_gps2_rtk_get_nsats(
const mavlink_message_t* msg)
417 static inline uint8_t mavlink_msg_gps2_rtk_get_baseline_coords_type(
const mavlink_message_t* msg)
427 static inline int32_t mavlink_msg_gps2_rtk_get_baseline_a_mm(
const mavlink_message_t* msg)
429 return _MAV_RETURN_int32_t(msg, 8);
437 static inline int32_t mavlink_msg_gps2_rtk_get_baseline_b_mm(
const mavlink_message_t* msg)
439 return _MAV_RETURN_int32_t(msg, 12);
447 static inline int32_t mavlink_msg_gps2_rtk_get_baseline_c_mm(
const mavlink_message_t* msg)
449 return _MAV_RETURN_int32_t(msg, 16);
457 static inline uint32_t mavlink_msg_gps2_rtk_get_accuracy(
const mavlink_message_t* msg)
459 return _MAV_RETURN_uint32_t(msg, 20);
467 static inline int32_t mavlink_msg_gps2_rtk_get_iar_num_hypotheses(
const mavlink_message_t* msg)
469 return _MAV_RETURN_int32_t(msg, 24);
478 static inline void mavlink_msg_gps2_rtk_decode(
const mavlink_message_t* msg,
mavlink_gps2_rtk_t* gps2_rtk)
480 #if MAVLINK_NEED_BYTE_SWAP
482 gps2_rtk->
tow = mavlink_msg_gps2_rtk_get_tow(msg);
483 gps2_rtk->
baseline_a_mm = mavlink_msg_gps2_rtk_get_baseline_a_mm(msg);
484 gps2_rtk->
baseline_b_mm = mavlink_msg_gps2_rtk_get_baseline_b_mm(msg);
485 gps2_rtk->
baseline_c_mm = mavlink_msg_gps2_rtk_get_baseline_c_mm(msg);
486 gps2_rtk->
accuracy = mavlink_msg_gps2_rtk_get_accuracy(msg);
488 gps2_rtk->
wn = mavlink_msg_gps2_rtk_get_wn(msg);
489 gps2_rtk->
rtk_receiver_id = mavlink_msg_gps2_rtk_get_rtk_receiver_id(msg);
490 gps2_rtk->
rtk_health = mavlink_msg_gps2_rtk_get_rtk_health(msg);
491 gps2_rtk->
rtk_rate = mavlink_msg_gps2_rtk_get_rtk_rate(msg);
492 gps2_rtk->
nsats = mavlink_msg_gps2_rtk_get_nsats(msg);
uint16_t wn
GPS Week Number of last baseline.
Definition: mavlink_msg_gps2_rtk.h:14
int32_t baseline_b_mm
Current baseline in ECEF y or NED east component in mm.
Definition: mavlink_msg_gps2_rtk.h:10
struct __mavlink_gps2_rtk_t mavlink_gps2_rtk_t
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
uint8_t rtk_rate
Rate of baseline messages being received by GPS, in HZ.
Definition: mavlink_msg_gps2_rtk.h:17
uint32_t accuracy
Current estimate of baseline accuracy.
Definition: mavlink_msg_gps2_rtk.h:12
MAVLINK_HELPER uint16_t mavlink_finalize_message(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t length)
Finalize a MAVLink message with MAVLINK_COMM_0 as default channel.
Definition: mavlink_helpers.h:105
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _mav_put_int32_t(buf, wire_offset, b)
Definition: protocol.h:142
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
uint8_t baseline_coords_type
Coordinate system of baseline. 0 == ECEF, 1 == NED.
Definition: mavlink_msg_gps2_rtk.h:19
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
#define MAVLINK_MSG_ID_GPS2_RTK_CRC
Definition: mavlink_msg_gps2_rtk.h:25
uint8_t nsats
Current number of sats used for RTK calculation.
Definition: mavlink_msg_gps2_rtk.h:18
int32_t iar_num_hypotheses
Current number of integer ambiguity hypotheses.
Definition: mavlink_msg_gps2_rtk.h:13
int32_t baseline_a_mm
Current baseline in ECEF x or NED north component in mm.
Definition: mavlink_msg_gps2_rtk.h:9
uint8_t rtk_receiver_id
Identification of connected RTK receiver.
Definition: mavlink_msg_gps2_rtk.h:15
#define MAVLINK_MSG_ID_GPS2_RTK
Definition: mavlink_msg_gps2_rtk.h:3
uint32_t tow
GPS Time of Week of last baseline.
Definition: mavlink_msg_gps2_rtk.h:8
uint8_t rtk_health
GPS-specific health report for RTK data.
Definition: mavlink_msg_gps2_rtk.h:16
Definition: mavlink_msg_gps2_rtk.h:5
#define _mav_put_uint16_t(buf, wire_offset, b)
Definition: protocol.h:139
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t chan, uint8_t length)
Finalize a MAVLink message with channel assignment.
Definition: mavlink_helpers.h:71
uint32_t time_last_baseline_ms
Time since boot of last baseline message received in ms.
Definition: mavlink_msg_gps2_rtk.h:7
#define MAVLINK_MSG_ID_GPS2_RTK_LEN
Definition: mavlink_msg_gps2_rtk.h:22
int32_t baseline_c_mm
Current baseline in ECEF z or NED down component in mm.
Definition: mavlink_msg_gps2_rtk.h:11
#define _mav_put_uint32_t(buf, wire_offset, b)
Definition: protocol.h:141