RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
mavlink_msg_adsb_vehicle.h
1#pragma once
2// MESSAGE ADSB_VEHICLE PACKING
3
4#define MAVLINK_MSG_ID_ADSB_VEHICLE 246
5
6MAVPACKED(
7typedef struct __mavlink_adsb_vehicle_t {
8 uint32_t ICAO_address; /*< ICAO address*/
9 int32_t lat; /*< Latitude, expressed as degrees * 1E7*/
10 int32_t lon; /*< Longitude, expressed as degrees * 1E7*/
11 int32_t altitude; /*< Altitude(ASL) in millimeters*/
12 uint16_t heading; /*< Course over ground in centidegrees*/
13 uint16_t hor_velocity; /*< The horizontal velocity in centimeters/second*/
14 int16_t ver_velocity; /*< The vertical velocity in centimeters/second, positive is up*/
15 uint16_t flags; /*< Flags to indicate various statuses including valid data fields*/
16 uint16_t squawk; /*< Squawk code*/
17 uint8_t altitude_type; /*< Type from ADSB_ALTITUDE_TYPE enum*/
18 char callsign[9]; /*< The callsign, 8+null*/
19 uint8_t emitter_type; /*< Type from ADSB_EMITTER_TYPE enum*/
20 uint8_t tslc; /*< Time since last communication in seconds*/
21}) mavlink_adsb_vehicle_t;
22
23#define MAVLINK_MSG_ID_ADSB_VEHICLE_LEN 38
24#define MAVLINK_MSG_ID_ADSB_VEHICLE_MIN_LEN 38
25#define MAVLINK_MSG_ID_246_LEN 38
26#define MAVLINK_MSG_ID_246_MIN_LEN 38
27
28#define MAVLINK_MSG_ID_ADSB_VEHICLE_CRC 184
29#define MAVLINK_MSG_ID_246_CRC 184
30
31#define MAVLINK_MSG_ADSB_VEHICLE_FIELD_CALLSIGN_LEN 9
32
33#if MAVLINK_COMMAND_24BIT
34#define MAVLINK_MESSAGE_INFO_ADSB_VEHICLE { \
35 246, \
36 "ADSB_VEHICLE", \
37 13, \
38 { { "ICAO_address", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_adsb_vehicle_t, ICAO_address) }, \
39 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_adsb_vehicle_t, lat) }, \
40 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_adsb_vehicle_t, lon) }, \
41 { "altitude_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_adsb_vehicle_t, altitude_type) }, \
42 { "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_adsb_vehicle_t, altitude) }, \
43 { "heading", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_adsb_vehicle_t, heading) }, \
44 { "hor_velocity", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_adsb_vehicle_t, hor_velocity) }, \
45 { "ver_velocity", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_adsb_vehicle_t, ver_velocity) }, \
46 { "callsign", NULL, MAVLINK_TYPE_CHAR, 9, 27, offsetof(mavlink_adsb_vehicle_t, callsign) }, \
47 { "emitter_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_adsb_vehicle_t, emitter_type) }, \
48 { "tslc", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_adsb_vehicle_t, tslc) }, \
49 { "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_adsb_vehicle_t, flags) }, \
50 { "squawk", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_adsb_vehicle_t, squawk) }, \
51 } \
52}
53#else
54#define MAVLINK_MESSAGE_INFO_ADSB_VEHICLE { \
55 "ADSB_VEHICLE", \
56 13, \
57 { { "ICAO_address", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_adsb_vehicle_t, ICAO_address) }, \
58 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_adsb_vehicle_t, lat) }, \
59 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_adsb_vehicle_t, lon) }, \
60 { "altitude_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_adsb_vehicle_t, altitude_type) }, \
61 { "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_adsb_vehicle_t, altitude) }, \
62 { "heading", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_adsb_vehicle_t, heading) }, \
63 { "hor_velocity", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_adsb_vehicle_t, hor_velocity) }, \
64 { "ver_velocity", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_adsb_vehicle_t, ver_velocity) }, \
65 { "callsign", NULL, MAVLINK_TYPE_CHAR, 9, 27, offsetof(mavlink_adsb_vehicle_t, callsign) }, \
66 { "emitter_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_adsb_vehicle_t, emitter_type) }, \
67 { "tslc", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_adsb_vehicle_t, tslc) }, \
68 { "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_adsb_vehicle_t, flags) }, \
69 { "squawk", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_adsb_vehicle_t, squawk) }, \
70 } \
71}
72#endif
73
95static inline uint16_t mavlink_msg_adsb_vehicle_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
96 uint32_t ICAO_address, int32_t lat, int32_t lon, uint8_t altitude_type, int32_t altitude, uint16_t heading, uint16_t hor_velocity, int16_t ver_velocity, const char *callsign, uint8_t emitter_type, uint8_t tslc, uint16_t flags, uint16_t squawk)
97{
98#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
99 char buf[MAVLINK_MSG_ID_ADSB_VEHICLE_LEN];
100 _mav_put_uint32_t(buf, 0, ICAO_address);
101 _mav_put_int32_t(buf, 4, lat);
102 _mav_put_int32_t(buf, 8, lon);
103 _mav_put_int32_t(buf, 12, altitude);
104 _mav_put_uint16_t(buf, 16, heading);
105 _mav_put_uint16_t(buf, 18, hor_velocity);
106 _mav_put_int16_t(buf, 20, ver_velocity);
107 _mav_put_uint16_t(buf, 22, flags);
108 _mav_put_uint16_t(buf, 24, squawk);
109 _mav_put_uint8_t(buf, 26, altitude_type);
110 _mav_put_uint8_t(buf, 36, emitter_type);
111 _mav_put_uint8_t(buf, 37, tslc);
112 _mav_put_char_array(buf, 27, callsign, 9);
113 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN);
114#else
115 mavlink_adsb_vehicle_t packet;
116 packet.ICAO_address = ICAO_address;
117 packet.lat = lat;
118 packet.lon = lon;
119 packet.altitude = altitude;
120 packet.heading = heading;
121 packet.hor_velocity = hor_velocity;
122 packet.ver_velocity = ver_velocity;
123 packet.flags = flags;
124 packet.squawk = squawk;
125 packet.altitude_type = altitude_type;
126 packet.emitter_type = emitter_type;
127 packet.tslc = tslc;
128 mav_array_memcpy(packet.callsign, callsign, sizeof(char)*9);
129 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN);
130#endif
131
132 msg->msgid = MAVLINK_MSG_ID_ADSB_VEHICLE;
133 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ADSB_VEHICLE_MIN_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC);
134}
135
157static inline uint16_t mavlink_msg_adsb_vehicle_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
158 mavlink_message_t* msg,
159 uint32_t ICAO_address,int32_t lat,int32_t lon,uint8_t altitude_type,int32_t altitude,uint16_t heading,uint16_t hor_velocity,int16_t ver_velocity,const char *callsign,uint8_t emitter_type,uint8_t tslc,uint16_t flags,uint16_t squawk)
160{
161#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
162 char buf[MAVLINK_MSG_ID_ADSB_VEHICLE_LEN];
163 _mav_put_uint32_t(buf, 0, ICAO_address);
164 _mav_put_int32_t(buf, 4, lat);
165 _mav_put_int32_t(buf, 8, lon);
166 _mav_put_int32_t(buf, 12, altitude);
167 _mav_put_uint16_t(buf, 16, heading);
168 _mav_put_uint16_t(buf, 18, hor_velocity);
169 _mav_put_int16_t(buf, 20, ver_velocity);
170 _mav_put_uint16_t(buf, 22, flags);
171 _mav_put_uint16_t(buf, 24, squawk);
172 _mav_put_uint8_t(buf, 26, altitude_type);
173 _mav_put_uint8_t(buf, 36, emitter_type);
174 _mav_put_uint8_t(buf, 37, tslc);
175 _mav_put_char_array(buf, 27, callsign, 9);
176 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN);
177#else
178 mavlink_adsb_vehicle_t packet;
179 packet.ICAO_address = ICAO_address;
180 packet.lat = lat;
181 packet.lon = lon;
182 packet.altitude = altitude;
183 packet.heading = heading;
184 packet.hor_velocity = hor_velocity;
185 packet.ver_velocity = ver_velocity;
186 packet.flags = flags;
187 packet.squawk = squawk;
188 packet.altitude_type = altitude_type;
189 packet.emitter_type = emitter_type;
190 packet.tslc = tslc;
191 mav_array_memcpy(packet.callsign, callsign, sizeof(char)*9);
192 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN);
193#endif
194
195 msg->msgid = MAVLINK_MSG_ID_ADSB_VEHICLE;
196 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ADSB_VEHICLE_MIN_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC);
197}
198
207static inline uint16_t mavlink_msg_adsb_vehicle_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_adsb_vehicle_t* adsb_vehicle)
208{
209 return mavlink_msg_adsb_vehicle_pack(system_id, component_id, msg, adsb_vehicle->ICAO_address, adsb_vehicle->lat, adsb_vehicle->lon, adsb_vehicle->altitude_type, adsb_vehicle->altitude, adsb_vehicle->heading, adsb_vehicle->hor_velocity, adsb_vehicle->ver_velocity, adsb_vehicle->callsign, adsb_vehicle->emitter_type, adsb_vehicle->tslc, adsb_vehicle->flags, adsb_vehicle->squawk);
210}
211
221static inline uint16_t mavlink_msg_adsb_vehicle_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_adsb_vehicle_t* adsb_vehicle)
222{
223 return mavlink_msg_adsb_vehicle_pack_chan(system_id, component_id, chan, msg, adsb_vehicle->ICAO_address, adsb_vehicle->lat, adsb_vehicle->lon, adsb_vehicle->altitude_type, adsb_vehicle->altitude, adsb_vehicle->heading, adsb_vehicle->hor_velocity, adsb_vehicle->ver_velocity, adsb_vehicle->callsign, adsb_vehicle->emitter_type, adsb_vehicle->tslc, adsb_vehicle->flags, adsb_vehicle->squawk);
224}
225
244#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
245
246static inline void mavlink_msg_adsb_vehicle_send(mavlink_channel_t chan, uint32_t ICAO_address, int32_t lat, int32_t lon, uint8_t altitude_type, int32_t altitude, uint16_t heading, uint16_t hor_velocity, int16_t ver_velocity, const char *callsign, uint8_t emitter_type, uint8_t tslc, uint16_t flags, uint16_t squawk)
247{
248#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
249 char buf[MAVLINK_MSG_ID_ADSB_VEHICLE_LEN];
250 _mav_put_uint32_t(buf, 0, ICAO_address);
251 _mav_put_int32_t(buf, 4, lat);
252 _mav_put_int32_t(buf, 8, lon);
253 _mav_put_int32_t(buf, 12, altitude);
254 _mav_put_uint16_t(buf, 16, heading);
255 _mav_put_uint16_t(buf, 18, hor_velocity);
256 _mav_put_int16_t(buf, 20, ver_velocity);
257 _mav_put_uint16_t(buf, 22, flags);
258 _mav_put_uint16_t(buf, 24, squawk);
259 _mav_put_uint8_t(buf, 26, altitude_type);
260 _mav_put_uint8_t(buf, 36, emitter_type);
261 _mav_put_uint8_t(buf, 37, tslc);
262 _mav_put_char_array(buf, 27, callsign, 9);
263 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, buf, MAVLINK_MSG_ID_ADSB_VEHICLE_MIN_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC);
264#else
265 mavlink_adsb_vehicle_t packet;
266 packet.ICAO_address = ICAO_address;
267 packet.lat = lat;
268 packet.lon = lon;
269 packet.altitude = altitude;
270 packet.heading = heading;
271 packet.hor_velocity = hor_velocity;
272 packet.ver_velocity = ver_velocity;
273 packet.flags = flags;
274 packet.squawk = squawk;
275 packet.altitude_type = altitude_type;
276 packet.emitter_type = emitter_type;
277 packet.tslc = tslc;
278 mav_array_memcpy(packet.callsign, callsign, sizeof(char)*9);
279 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, (const char *)&packet, MAVLINK_MSG_ID_ADSB_VEHICLE_MIN_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC);
280#endif
281}
282
288static inline void mavlink_msg_adsb_vehicle_send_struct(mavlink_channel_t chan, const mavlink_adsb_vehicle_t* adsb_vehicle)
289{
290#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
291 mavlink_msg_adsb_vehicle_send(chan, adsb_vehicle->ICAO_address, adsb_vehicle->lat, adsb_vehicle->lon, adsb_vehicle->altitude_type, adsb_vehicle->altitude, adsb_vehicle->heading, adsb_vehicle->hor_velocity, adsb_vehicle->ver_velocity, adsb_vehicle->callsign, adsb_vehicle->emitter_type, adsb_vehicle->tslc, adsb_vehicle->flags, adsb_vehicle->squawk);
292#else
293 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, (const char *)adsb_vehicle, MAVLINK_MSG_ID_ADSB_VEHICLE_MIN_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC);
294#endif
295}
296
297#if MAVLINK_MSG_ID_ADSB_VEHICLE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
298/*
299 This varient of _send() can be used to save stack space by re-using
300 memory from the receive buffer. The caller provides a
301 mavlink_message_t which is the size of a full mavlink message. This
302 is usually the receive buffer for the channel, and allows a reply to an
303 incoming message with minimum stack space usage.
304 */
305static inline void mavlink_msg_adsb_vehicle_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t ICAO_address, int32_t lat, int32_t lon, uint8_t altitude_type, int32_t altitude, uint16_t heading, uint16_t hor_velocity, int16_t ver_velocity, const char *callsign, uint8_t emitter_type, uint8_t tslc, uint16_t flags, uint16_t squawk)
306{
307#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
308 char *buf = (char *)msgbuf;
309 _mav_put_uint32_t(buf, 0, ICAO_address);
310 _mav_put_int32_t(buf, 4, lat);
311 _mav_put_int32_t(buf, 8, lon);
312 _mav_put_int32_t(buf, 12, altitude);
313 _mav_put_uint16_t(buf, 16, heading);
314 _mav_put_uint16_t(buf, 18, hor_velocity);
315 _mav_put_int16_t(buf, 20, ver_velocity);
316 _mav_put_uint16_t(buf, 22, flags);
317 _mav_put_uint16_t(buf, 24, squawk);
318 _mav_put_uint8_t(buf, 26, altitude_type);
319 _mav_put_uint8_t(buf, 36, emitter_type);
320 _mav_put_uint8_t(buf, 37, tslc);
321 _mav_put_char_array(buf, 27, callsign, 9);
322 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, buf, MAVLINK_MSG_ID_ADSB_VEHICLE_MIN_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC);
323#else
324 mavlink_adsb_vehicle_t *packet = (mavlink_adsb_vehicle_t *)msgbuf;
325 packet->ICAO_address = ICAO_address;
326 packet->lat = lat;
327 packet->lon = lon;
328 packet->altitude = altitude;
329 packet->heading = heading;
330 packet->hor_velocity = hor_velocity;
331 packet->ver_velocity = ver_velocity;
332 packet->flags = flags;
333 packet->squawk = squawk;
334 packet->altitude_type = altitude_type;
335 packet->emitter_type = emitter_type;
336 packet->tslc = tslc;
337 mav_array_memcpy(packet->callsign, callsign, sizeof(char)*9);
338 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ADSB_VEHICLE, (const char *)packet, MAVLINK_MSG_ID_ADSB_VEHICLE_MIN_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN, MAVLINK_MSG_ID_ADSB_VEHICLE_CRC);
339#endif
340}
341#endif
342
343#endif
344
345// MESSAGE ADSB_VEHICLE UNPACKING
346
347
353static inline uint32_t mavlink_msg_adsb_vehicle_get_ICAO_address(const mavlink_message_t* msg)
354{
355 return _MAV_RETURN_uint32_t(msg, 0);
356}
357
363static inline int32_t mavlink_msg_adsb_vehicle_get_lat(const mavlink_message_t* msg)
364{
365 return _MAV_RETURN_int32_t(msg, 4);
366}
367
373static inline int32_t mavlink_msg_adsb_vehicle_get_lon(const mavlink_message_t* msg)
374{
375 return _MAV_RETURN_int32_t(msg, 8);
376}
377
383static inline uint8_t mavlink_msg_adsb_vehicle_get_altitude_type(const mavlink_message_t* msg)
384{
385 return _MAV_RETURN_uint8_t(msg, 26);
386}
387
393static inline int32_t mavlink_msg_adsb_vehicle_get_altitude(const mavlink_message_t* msg)
394{
395 return _MAV_RETURN_int32_t(msg, 12);
396}
397
403static inline uint16_t mavlink_msg_adsb_vehicle_get_heading(const mavlink_message_t* msg)
404{
405 return _MAV_RETURN_uint16_t(msg, 16);
406}
407
413static inline uint16_t mavlink_msg_adsb_vehicle_get_hor_velocity(const mavlink_message_t* msg)
414{
415 return _MAV_RETURN_uint16_t(msg, 18);
416}
417
423static inline int16_t mavlink_msg_adsb_vehicle_get_ver_velocity(const mavlink_message_t* msg)
424{
425 return _MAV_RETURN_int16_t(msg, 20);
426}
427
433static inline uint16_t mavlink_msg_adsb_vehicle_get_callsign(const mavlink_message_t* msg, char *callsign)
434{
435 return _MAV_RETURN_char_array(msg, callsign, 9, 27);
436}
437
443static inline uint8_t mavlink_msg_adsb_vehicle_get_emitter_type(const mavlink_message_t* msg)
444{
445 return _MAV_RETURN_uint8_t(msg, 36);
446}
447
453static inline uint8_t mavlink_msg_adsb_vehicle_get_tslc(const mavlink_message_t* msg)
454{
455 return _MAV_RETURN_uint8_t(msg, 37);
456}
457
463static inline uint16_t mavlink_msg_adsb_vehicle_get_flags(const mavlink_message_t* msg)
464{
465 return _MAV_RETURN_uint16_t(msg, 22);
466}
467
473static inline uint16_t mavlink_msg_adsb_vehicle_get_squawk(const mavlink_message_t* msg)
474{
475 return _MAV_RETURN_uint16_t(msg, 24);
476}
477
484static inline void mavlink_msg_adsb_vehicle_decode(const mavlink_message_t* msg, mavlink_adsb_vehicle_t* adsb_vehicle)
485{
486#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
487 adsb_vehicle->ICAO_address = mavlink_msg_adsb_vehicle_get_ICAO_address(msg);
488 adsb_vehicle->lat = mavlink_msg_adsb_vehicle_get_lat(msg);
489 adsb_vehicle->lon = mavlink_msg_adsb_vehicle_get_lon(msg);
490 adsb_vehicle->altitude = mavlink_msg_adsb_vehicle_get_altitude(msg);
491 adsb_vehicle->heading = mavlink_msg_adsb_vehicle_get_heading(msg);
492 adsb_vehicle->hor_velocity = mavlink_msg_adsb_vehicle_get_hor_velocity(msg);
493 adsb_vehicle->ver_velocity = mavlink_msg_adsb_vehicle_get_ver_velocity(msg);
494 adsb_vehicle->flags = mavlink_msg_adsb_vehicle_get_flags(msg);
495 adsb_vehicle->squawk = mavlink_msg_adsb_vehicle_get_squawk(msg);
496 adsb_vehicle->altitude_type = mavlink_msg_adsb_vehicle_get_altitude_type(msg);
497 mavlink_msg_adsb_vehicle_get_callsign(msg, adsb_vehicle->callsign);
498 adsb_vehicle->emitter_type = mavlink_msg_adsb_vehicle_get_emitter_type(msg);
499 adsb_vehicle->tslc = mavlink_msg_adsb_vehicle_get_tslc(msg);
500#else
501 uint8_t len = msg->len < MAVLINK_MSG_ID_ADSB_VEHICLE_LEN? msg->len : MAVLINK_MSG_ID_ADSB_VEHICLE_LEN;
502 memset(adsb_vehicle, 0, MAVLINK_MSG_ID_ADSB_VEHICLE_LEN);
503 memcpy(adsb_vehicle, _MAV_PAYLOAD(msg), len);
504#endif
505}