3 #define MAVLINK_MSG_ID_GPS_STATUS 25
15 #define MAVLINK_MSG_ID_GPS_STATUS_LEN 101
16 #define MAVLINK_MSG_ID_25_LEN 101
18 #define MAVLINK_MSG_ID_GPS_STATUS_CRC 23
19 #define MAVLINK_MSG_ID_25_CRC 23
21 #define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_PRN_LEN 20
22 #define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_USED_LEN 20
23 #define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_ELEVATION_LEN 20
24 #define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_AZIMUTH_LEN 20
25 #define MAVLINK_MSG_GPS_STATUS_FIELD_SATELLITE_SNR_LEN 20
27 #define MAVLINK_MESSAGE_INFO_GPS_STATUS { \
30 { { "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_gps_status_t, satellites_visible) }, \
31 { "satellite_prn", NULL, MAVLINK_TYPE_UINT8_T, 20, 1, offsetof(mavlink_gps_status_t, satellite_prn) }, \
32 { "satellite_used", NULL, MAVLINK_TYPE_UINT8_T, 20, 21, offsetof(mavlink_gps_status_t, satellite_used) }, \
33 { "satellite_elevation", NULL, MAVLINK_TYPE_UINT8_T, 20, 41, offsetof(mavlink_gps_status_t, satellite_elevation) }, \
34 { "satellite_azimuth", NULL, MAVLINK_TYPE_UINT8_T, 20, 61, offsetof(mavlink_gps_status_t, satellite_azimuth) }, \
35 { "satellite_snr", NULL, MAVLINK_TYPE_UINT8_T, 20, 81, offsetof(mavlink_gps_status_t, satellite_snr) }, \
54 static inline uint16_t mavlink_msg_gps_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
55 uint8_t satellites_visible,
const uint8_t *satellite_prn,
const uint8_t *satellite_used,
const uint8_t *satellite_elevation,
const uint8_t *satellite_azimuth,
const uint8_t *satellite_snr)
57 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
60 _mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
61 _mav_put_uint8_t_array(buf, 21, satellite_used, 20);
62 _mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
63 _mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
64 _mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
69 mav_array_memcpy(packet.
satellite_prn, satellite_prn,
sizeof(uint8_t)*20);
70 mav_array_memcpy(packet.
satellite_used, satellite_used,
sizeof(uint8_t)*20);
72 mav_array_memcpy(packet.
satellite_azimuth, satellite_azimuth,
sizeof(uint8_t)*20);
73 mav_array_memcpy(packet.
satellite_snr, satellite_snr,
sizeof(uint8_t)*20);
99 static inline uint16_t mavlink_msg_gps_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
100 mavlink_message_t* msg,
101 uint8_t satellites_visible,
const uint8_t *satellite_prn,
const uint8_t *satellite_used,
const uint8_t *satellite_elevation,
const uint8_t *satellite_azimuth,
const uint8_t *satellite_snr)
103 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
106 _mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
107 _mav_put_uint8_t_array(buf, 21, satellite_used, 20);
108 _mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
109 _mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
110 _mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
115 mav_array_memcpy(packet.
satellite_prn, satellite_prn,
sizeof(uint8_t)*20);
116 mav_array_memcpy(packet.
satellite_used, satellite_used,
sizeof(uint8_t)*20);
118 mav_array_memcpy(packet.
satellite_azimuth, satellite_azimuth,
sizeof(uint8_t)*20);
119 mav_array_memcpy(packet.
satellite_snr, satellite_snr,
sizeof(uint8_t)*20);
124 #if MAVLINK_CRC_EXTRA
139 static inline uint16_t mavlink_msg_gps_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_gps_status_t* gps_status)
153 static inline uint16_t mavlink_msg_gps_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_gps_status_t* gps_status)
169 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
171 static inline void mavlink_msg_gps_status_send(
mavlink_channel_t chan, uint8_t satellites_visible,
const uint8_t *satellite_prn,
const uint8_t *satellite_used,
const uint8_t *satellite_elevation,
const uint8_t *satellite_azimuth,
const uint8_t *satellite_snr)
173 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
176 _mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
177 _mav_put_uint8_t_array(buf, 21, satellite_used, 20);
178 _mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
179 _mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
180 _mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
181 #if MAVLINK_CRC_EXTRA
189 mav_array_memcpy(packet.
satellite_prn, satellite_prn,
sizeof(uint8_t)*20);
190 mav_array_memcpy(packet.
satellite_used, satellite_used,
sizeof(uint8_t)*20);
192 mav_array_memcpy(packet.
satellite_azimuth, satellite_azimuth,
sizeof(uint8_t)*20);
193 mav_array_memcpy(packet.
satellite_snr, satellite_snr,
sizeof(uint8_t)*20);
194 #if MAVLINK_CRC_EXTRA
202 #if MAVLINK_MSG_ID_GPS_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
210 static inline void mavlink_msg_gps_status_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint8_t satellites_visible,
const uint8_t *satellite_prn,
const uint8_t *satellite_used,
const uint8_t *satellite_elevation,
const uint8_t *satellite_azimuth,
const uint8_t *satellite_snr)
212 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
213 char *buf = (
char *)msgbuf;
215 _mav_put_uint8_t_array(buf, 1, satellite_prn, 20);
216 _mav_put_uint8_t_array(buf, 21, satellite_used, 20);
217 _mav_put_uint8_t_array(buf, 41, satellite_elevation, 20);
218 _mav_put_uint8_t_array(buf, 61, satellite_azimuth, 20);
219 _mav_put_uint8_t_array(buf, 81, satellite_snr, 20);
220 #if MAVLINK_CRC_EXTRA
228 mav_array_memcpy(packet->
satellite_prn, satellite_prn,
sizeof(uint8_t)*20);
229 mav_array_memcpy(packet->
satellite_used, satellite_used,
sizeof(uint8_t)*20);
231 mav_array_memcpy(packet->
satellite_azimuth, satellite_azimuth,
sizeof(uint8_t)*20);
232 mav_array_memcpy(packet->
satellite_snr, satellite_snr,
sizeof(uint8_t)*20);
233 #if MAVLINK_CRC_EXTRA
252 static inline uint8_t mavlink_msg_gps_status_get_satellites_visible(
const mavlink_message_t* msg)
262 static inline uint16_t mavlink_msg_gps_status_get_satellite_prn(
const mavlink_message_t* msg, uint8_t *satellite_prn)
264 return _MAV_RETURN_uint8_t_array(msg, satellite_prn, 20, 1);
272 static inline uint16_t mavlink_msg_gps_status_get_satellite_used(
const mavlink_message_t* msg, uint8_t *satellite_used)
274 return _MAV_RETURN_uint8_t_array(msg, satellite_used, 20, 21);
282 static inline uint16_t mavlink_msg_gps_status_get_satellite_elevation(
const mavlink_message_t* msg, uint8_t *satellite_elevation)
284 return _MAV_RETURN_uint8_t_array(msg, satellite_elevation, 20, 41);
292 static inline uint16_t mavlink_msg_gps_status_get_satellite_azimuth(
const mavlink_message_t* msg, uint8_t *satellite_azimuth)
294 return _MAV_RETURN_uint8_t_array(msg, satellite_azimuth, 20, 61);
302 static inline uint16_t mavlink_msg_gps_status_get_satellite_snr(
const mavlink_message_t* msg, uint8_t *satellite_snr)
304 return _MAV_RETURN_uint8_t_array(msg, satellite_snr, 20, 81);
313 static inline void mavlink_msg_gps_status_decode(
const mavlink_message_t* msg,
mavlink_gps_status_t* gps_status)
315 #if MAVLINK_NEED_BYTE_SWAP
317 mavlink_msg_gps_status_get_satellite_prn(msg, gps_status->
satellite_prn);
318 mavlink_msg_gps_status_get_satellite_used(msg, gps_status->
satellite_used);
320 mavlink_msg_gps_status_get_satellite_azimuth(msg, gps_status->
satellite_azimuth);
321 mavlink_msg_gps_status_get_satellite_snr(msg, gps_status->
satellite_snr);
uint8_t satellite_used[20]
0: Satellite not used, 1: used for localization
Definition: mavlink_msg_gps_status.h:9
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
uint8_t satellite_prn[20]
Global satellite ID.
Definition: mavlink_msg_gps_status.h:8
uint8_t satellites_visible
Number of satellites visible.
Definition: mavlink_msg_gps_status.h:7
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 MAVLINK_MSG_ID_GPS_STATUS_CRC
Definition: mavlink_msg_gps_status.h:18
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
#define MAVLINK_MSG_ID_GPS_STATUS_LEN
Definition: mavlink_msg_gps_status.h:15
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
#define MAVLINK_MSG_ID_GPS_STATUS
Definition: mavlink_msg_gps_status.h:3
uint8_t satellite_elevation[20]
Elevation (0: right on top of receiver, 90: on the horizon) of satellite.
Definition: mavlink_msg_gps_status.h:10
Definition: mavlink_msg_gps_status.h:5
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
uint8_t satellite_snr[20]
Signal to noise ratio of satellite.
Definition: mavlink_msg_gps_status.h:12
struct __mavlink_gps_status_t mavlink_gps_status_t
uint8_t satellite_azimuth[20]
Direction of satellite, 0: 0 deg, 255: 360 deg.
Definition: mavlink_msg_gps_status.h:11