3 #define MAVLINK_MSG_ID_GPS_RAW_INT 24
19 #define MAVLINK_MSG_ID_GPS_RAW_INT_LEN 30
20 #define MAVLINK_MSG_ID_24_LEN 30
22 #define MAVLINK_MSG_ID_GPS_RAW_INT_CRC 24
23 #define MAVLINK_MSG_ID_24_CRC 24
27 #define MAVLINK_MESSAGE_INFO_GPS_RAW_INT { \
30 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_gps_raw_int_t, time_usec) }, \
31 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_raw_int_t, lat) }, \
32 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_gps_raw_int_t, lon) }, \
33 { "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_gps_raw_int_t, alt) }, \
34 { "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_gps_raw_int_t, eph) }, \
35 { "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_gps_raw_int_t, epv) }, \
36 { "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_gps_raw_int_t, vel) }, \
37 { "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_gps_raw_int_t, cog) }, \
38 { "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_gps_raw_int_t, fix_type) }, \
39 { "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_gps_raw_int_t, satellites_visible) }, \
62 static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
63 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, uint16_t cog, uint8_t satellites_visible)
65 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
66 char buf[MAVLINK_MSG_ID_GPS_RAW_INT_LEN];
67 _mav_put_uint64_t(buf, 0, time_usec);
68 _mav_put_int32_t(buf, 8, lat);
69 _mav_put_int32_t(buf, 12, lon);
70 _mav_put_int32_t(buf, 16, alt);
71 _mav_put_uint16_t(buf, 20, eph);
72 _mav_put_uint16_t(buf, 22, epv);
73 _mav_put_uint16_t(buf, 24, vel);
74 _mav_put_uint16_t(buf, 26, cog);
75 _mav_put_uint8_t(buf, 28, fix_type);
76 _mav_put_uint8_t(buf, 29, satellites_visible);
78 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
92 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
95 msg->msgid = MAVLINK_MSG_ID_GPS_RAW_INT;
97 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
99 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
121 static inline uint16_t mavlink_msg_gps_raw_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
122 mavlink_message_t* msg,
123 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,uint16_t cog,uint8_t satellites_visible)
125 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
126 char buf[MAVLINK_MSG_ID_GPS_RAW_INT_LEN];
127 _mav_put_uint64_t(buf, 0, time_usec);
128 _mav_put_int32_t(buf, 8, lat);
129 _mav_put_int32_t(buf, 12, lon);
130 _mav_put_int32_t(buf, 16, alt);
131 _mav_put_uint16_t(buf, 20, eph);
132 _mav_put_uint16_t(buf, 22, epv);
133 _mav_put_uint16_t(buf, 24, vel);
134 _mav_put_uint16_t(buf, 26, cog);
135 _mav_put_uint8_t(buf, 28, fix_type);
136 _mav_put_uint8_t(buf, 29, satellites_visible);
138 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
152 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
155 msg->msgid = MAVLINK_MSG_ID_GPS_RAW_INT;
156 #if MAVLINK_CRC_EXTRA
157 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
159 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
171 static inline uint16_t mavlink_msg_gps_raw_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_gps_raw_int_t* gps_raw_int)
173 return mavlink_msg_gps_raw_int_pack(system_id, component_id, msg, gps_raw_int->
time_usec, gps_raw_int->
fix_type, gps_raw_int->
lat, gps_raw_int->
lon, gps_raw_int->
alt, gps_raw_int->
eph, gps_raw_int->
epv, gps_raw_int->
vel, gps_raw_int->
cog, gps_raw_int->
satellites_visible);
185 static inline uint16_t mavlink_msg_gps_raw_int_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_gps_raw_int_t* gps_raw_int)
187 return mavlink_msg_gps_raw_int_pack_chan(system_id, component_id, chan, msg, gps_raw_int->
time_usec, gps_raw_int->
fix_type, gps_raw_int->
lat, gps_raw_int->
lon, gps_raw_int->
alt, gps_raw_int->
eph, gps_raw_int->
epv, gps_raw_int->
vel, gps_raw_int->
cog, gps_raw_int->
satellites_visible);
205 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
207 static inline void mavlink_msg_gps_raw_int_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, uint16_t cog, uint8_t satellites_visible)
209 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
210 char buf[MAVLINK_MSG_ID_GPS_RAW_INT_LEN];
211 _mav_put_uint64_t(buf, 0, time_usec);
212 _mav_put_int32_t(buf, 8, lat);
213 _mav_put_int32_t(buf, 12, lon);
214 _mav_put_int32_t(buf, 16, alt);
215 _mav_put_uint16_t(buf, 20, eph);
216 _mav_put_uint16_t(buf, 22, epv);
217 _mav_put_uint16_t(buf, 24, vel);
218 _mav_put_uint16_t(buf, 26, cog);
219 _mav_put_uint8_t(buf, 28, fix_type);
220 _mav_put_uint8_t(buf, 29, satellites_visible);
222 #if MAVLINK_CRC_EXTRA
223 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
225 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
240 #if MAVLINK_CRC_EXTRA
241 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (
const char *)&packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
243 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (
const char *)&packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
248 #if MAVLINK_MSG_ID_GPS_RAW_INT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
256 static inline void mavlink_msg_gps_raw_int_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, uint16_t cog, uint8_t satellites_visible)
258 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
259 char *buf = (
char *)msgbuf;
260 _mav_put_uint64_t(buf, 0, time_usec);
261 _mav_put_int32_t(buf, 8, lat);
262 _mav_put_int32_t(buf, 12, lon);
263 _mav_put_int32_t(buf, 16, alt);
264 _mav_put_uint16_t(buf, 20, eph);
265 _mav_put_uint16_t(buf, 22, epv);
266 _mav_put_uint16_t(buf, 24, vel);
267 _mav_put_uint16_t(buf, 26, cog);
268 _mav_put_uint8_t(buf, 28, fix_type);
269 _mav_put_uint8_t(buf, 29, satellites_visible);
271 #if MAVLINK_CRC_EXTRA
272 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
274 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, buf, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
289 #if MAVLINK_CRC_EXTRA
290 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (
const char *)packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN, MAVLINK_MSG_ID_GPS_RAW_INT_CRC);
292 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW_INT, (
const char *)packet, MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
308 static inline uint64_t mavlink_msg_gps_raw_int_get_time_usec(
const mavlink_message_t* msg)
310 return _MAV_RETURN_uint64_t(msg, 0);
318 static inline uint8_t mavlink_msg_gps_raw_int_get_fix_type(
const mavlink_message_t* msg)
320 return _MAV_RETURN_uint8_t(msg, 28);
328 static inline int32_t mavlink_msg_gps_raw_int_get_lat(
const mavlink_message_t* msg)
330 return _MAV_RETURN_int32_t(msg, 8);
338 static inline int32_t mavlink_msg_gps_raw_int_get_lon(
const mavlink_message_t* msg)
340 return _MAV_RETURN_int32_t(msg, 12);
348 static inline int32_t mavlink_msg_gps_raw_int_get_alt(
const mavlink_message_t* msg)
350 return _MAV_RETURN_int32_t(msg, 16);
358 static inline uint16_t mavlink_msg_gps_raw_int_get_eph(
const mavlink_message_t* msg)
360 return _MAV_RETURN_uint16_t(msg, 20);
368 static inline uint16_t mavlink_msg_gps_raw_int_get_epv(
const mavlink_message_t* msg)
370 return _MAV_RETURN_uint16_t(msg, 22);
378 static inline uint16_t mavlink_msg_gps_raw_int_get_vel(
const mavlink_message_t* msg)
380 return _MAV_RETURN_uint16_t(msg, 24);
388 static inline uint16_t mavlink_msg_gps_raw_int_get_cog(
const mavlink_message_t* msg)
390 return _MAV_RETURN_uint16_t(msg, 26);
398 static inline uint8_t mavlink_msg_gps_raw_int_get_satellites_visible(
const mavlink_message_t* msg)
400 return _MAV_RETURN_uint8_t(msg, 29);
409 static inline void mavlink_msg_gps_raw_int_decode(
const mavlink_message_t* msg,
mavlink_gps_raw_int_t* gps_raw_int)
411 #if MAVLINK_NEED_BYTE_SWAP
412 gps_raw_int->
time_usec = mavlink_msg_gps_raw_int_get_time_usec(msg);
413 gps_raw_int->
lat = mavlink_msg_gps_raw_int_get_lat(msg);
414 gps_raw_int->
lon = mavlink_msg_gps_raw_int_get_lon(msg);
415 gps_raw_int->
alt = mavlink_msg_gps_raw_int_get_alt(msg);
416 gps_raw_int->
eph = mavlink_msg_gps_raw_int_get_eph(msg);
417 gps_raw_int->
epv = mavlink_msg_gps_raw_int_get_epv(msg);
418 gps_raw_int->
vel = mavlink_msg_gps_raw_int_get_vel(msg);
419 gps_raw_int->
cog = mavlink_msg_gps_raw_int_get_cog(msg);
420 gps_raw_int->
fix_type = mavlink_msg_gps_raw_int_get_fix_type(msg);
421 gps_raw_int->
satellites_visible = mavlink_msg_gps_raw_int_get_satellites_visible(msg);
423 memcpy(gps_raw_int, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_GPS_RAW_INT_LEN);
int32_t lat
Latitude (WGS84), in degrees * 1E7.
Definition: mavlink_msg_gps_raw_int.h:8
uint8_t satellites_visible
Number of satellites visible. If unknown, set to 255.
Definition: mavlink_msg_gps_raw_int.h:16
uint16_t epv
GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX.
Definition: mavlink_msg_gps_raw_int.h:12
uint64_t time_usec
Timestamp (microseconds since UNIX epoch or microseconds since system boot)
Definition: mavlink_msg_gps_raw_int.h:7
uint8_t fix_type
0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. Some applications will not use the value of this ...
Definition: mavlink_msg_gps_raw_int.h:15
uint16_t eph
GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX.
Definition: mavlink_msg_gps_raw_int.h:11
int32_t lon
Longitude (WGS84), in degrees * 1E7.
Definition: mavlink_msg_gps_raw_int.h:9
uint16_t vel
GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX.
Definition: mavlink_msg_gps_raw_int.h:13
uint16_t cog
Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX.
Definition: mavlink_msg_gps_raw_int.h:14
Definition: mavlink_msg_gps_raw_int.h:5
int32_t alt
Altitude (WGS84), in meters * 1000 (positive for up)
Definition: mavlink_msg_gps_raw_int.h:10