4#define MAVLINK_MSG_ID_AIRSPEEDS 182
7typedef struct __mavlink_airspeeds_t {
10 int16_t airspeed_pitot;
11 int16_t airspeed_hot_wire;
12 int16_t airspeed_ultrasonic;
15}) mavlink_airspeeds_t;
17#define MAVLINK_MSG_ID_AIRSPEEDS_LEN 16
18#define MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN 16
19#define MAVLINK_MSG_ID_182_LEN 16
20#define MAVLINK_MSG_ID_182_MIN_LEN 16
22#define MAVLINK_MSG_ID_AIRSPEEDS_CRC 154
23#define MAVLINK_MSG_ID_182_CRC 154
27#if MAVLINK_COMMAND_24BIT
28#define MAVLINK_MESSAGE_INFO_AIRSPEEDS { \
32 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_airspeeds_t, time_boot_ms) }, \
33 { "airspeed_imu", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_airspeeds_t, airspeed_imu) }, \
34 { "airspeed_pitot", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_airspeeds_t, airspeed_pitot) }, \
35 { "airspeed_hot_wire", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_airspeeds_t, airspeed_hot_wire) }, \
36 { "airspeed_ultrasonic", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_airspeeds_t, airspeed_ultrasonic) }, \
37 { "aoa", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_airspeeds_t, aoa) }, \
38 { "aoy", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_airspeeds_t, aoy) }, \
42#define MAVLINK_MESSAGE_INFO_AIRSPEEDS { \
45 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_airspeeds_t, time_boot_ms) }, \
46 { "airspeed_imu", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_airspeeds_t, airspeed_imu) }, \
47 { "airspeed_pitot", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_airspeeds_t, airspeed_pitot) }, \
48 { "airspeed_hot_wire", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_airspeeds_t, airspeed_hot_wire) }, \
49 { "airspeed_ultrasonic", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_airspeeds_t, airspeed_ultrasonic) }, \
50 { "aoa", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_airspeeds_t, aoa) }, \
51 { "aoy", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_airspeeds_t, aoy) }, \
71static inline uint16_t mavlink_msg_airspeeds_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
72 uint32_t time_boot_ms, int16_t airspeed_imu, int16_t airspeed_pitot, int16_t airspeed_hot_wire, int16_t airspeed_ultrasonic, int16_t aoa, int16_t aoy)
74#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
75 char buf[MAVLINK_MSG_ID_AIRSPEEDS_LEN];
76 _mav_put_uint32_t(buf, 0, time_boot_ms);
77 _mav_put_int16_t(buf, 4, airspeed_imu);
78 _mav_put_int16_t(buf, 6, airspeed_pitot);
79 _mav_put_int16_t(buf, 8, airspeed_hot_wire);
80 _mav_put_int16_t(buf, 10, airspeed_ultrasonic);
81 _mav_put_int16_t(buf, 12, aoa);
82 _mav_put_int16_t(buf, 14, aoy);
84 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRSPEEDS_LEN);
86 mavlink_airspeeds_t packet;
87 packet.time_boot_ms = time_boot_ms;
88 packet.airspeed_imu = airspeed_imu;
89 packet.airspeed_pitot = airspeed_pitot;
90 packet.airspeed_hot_wire = airspeed_hot_wire;
91 packet.airspeed_ultrasonic = airspeed_ultrasonic;
95 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRSPEEDS_LEN);
98 msg->msgid = MAVLINK_MSG_ID_AIRSPEEDS;
99 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC);
117static inline uint16_t mavlink_msg_airspeeds_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
118 mavlink_message_t* msg,
119 uint32_t time_boot_ms,int16_t airspeed_imu,int16_t airspeed_pitot,int16_t airspeed_hot_wire,int16_t airspeed_ultrasonic,int16_t aoa,int16_t aoy)
121#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
122 char buf[MAVLINK_MSG_ID_AIRSPEEDS_LEN];
123 _mav_put_uint32_t(buf, 0, time_boot_ms);
124 _mav_put_int16_t(buf, 4, airspeed_imu);
125 _mav_put_int16_t(buf, 6, airspeed_pitot);
126 _mav_put_int16_t(buf, 8, airspeed_hot_wire);
127 _mav_put_int16_t(buf, 10, airspeed_ultrasonic);
128 _mav_put_int16_t(buf, 12, aoa);
129 _mav_put_int16_t(buf, 14, aoy);
131 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRSPEEDS_LEN);
133 mavlink_airspeeds_t packet;
134 packet.time_boot_ms = time_boot_ms;
135 packet.airspeed_imu = airspeed_imu;
136 packet.airspeed_pitot = airspeed_pitot;
137 packet.airspeed_hot_wire = airspeed_hot_wire;
138 packet.airspeed_ultrasonic = airspeed_ultrasonic;
142 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRSPEEDS_LEN);
145 msg->msgid = MAVLINK_MSG_ID_AIRSPEEDS;
146 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC);
157static inline uint16_t mavlink_msg_airspeeds_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_airspeeds_t* airspeeds)
159 return mavlink_msg_airspeeds_pack(system_id, component_id, msg, airspeeds->time_boot_ms, airspeeds->airspeed_imu, airspeeds->airspeed_pitot, airspeeds->airspeed_hot_wire, airspeeds->airspeed_ultrasonic, airspeeds->aoa, airspeeds->aoy);
171static inline uint16_t mavlink_msg_airspeeds_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_airspeeds_t* airspeeds)
173 return mavlink_msg_airspeeds_pack_chan(system_id, component_id, chan, msg, airspeeds->time_boot_ms, airspeeds->airspeed_imu, airspeeds->airspeed_pitot, airspeeds->airspeed_hot_wire, airspeeds->airspeed_ultrasonic, airspeeds->aoa, airspeeds->aoy);
188#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
190static inline void mavlink_msg_airspeeds_send(mavlink_channel_t chan, uint32_t time_boot_ms, int16_t airspeed_imu, int16_t airspeed_pitot, int16_t airspeed_hot_wire, int16_t airspeed_ultrasonic, int16_t aoa, int16_t aoy)
192#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
193 char buf[MAVLINK_MSG_ID_AIRSPEEDS_LEN];
194 _mav_put_uint32_t(buf, 0, time_boot_ms);
195 _mav_put_int16_t(buf, 4, airspeed_imu);
196 _mav_put_int16_t(buf, 6, airspeed_pitot);
197 _mav_put_int16_t(buf, 8, airspeed_hot_wire);
198 _mav_put_int16_t(buf, 10, airspeed_ultrasonic);
199 _mav_put_int16_t(buf, 12, aoa);
200 _mav_put_int16_t(buf, 14, aoy);
202 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEEDS, buf, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC);
204 mavlink_airspeeds_t packet;
205 packet.time_boot_ms = time_boot_ms;
206 packet.airspeed_imu = airspeed_imu;
207 packet.airspeed_pitot = airspeed_pitot;
208 packet.airspeed_hot_wire = airspeed_hot_wire;
209 packet.airspeed_ultrasonic = airspeed_ultrasonic;
213 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEEDS, (
const char *)&packet, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC);
222static inline void mavlink_msg_airspeeds_send_struct(mavlink_channel_t chan,
const mavlink_airspeeds_t* airspeeds)
224#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
225 mavlink_msg_airspeeds_send(chan, airspeeds->time_boot_ms, airspeeds->airspeed_imu, airspeeds->airspeed_pitot, airspeeds->airspeed_hot_wire, airspeeds->airspeed_ultrasonic, airspeeds->aoa, airspeeds->aoy);
227 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEEDS, (
const char *)airspeeds, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC);
231#if MAVLINK_MSG_ID_AIRSPEEDS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
239static inline void mavlink_msg_airspeeds_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, int16_t airspeed_imu, int16_t airspeed_pitot, int16_t airspeed_hot_wire, int16_t airspeed_ultrasonic, int16_t aoa, int16_t aoy)
241#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
242 char *buf = (
char *)msgbuf;
243 _mav_put_uint32_t(buf, 0, time_boot_ms);
244 _mav_put_int16_t(buf, 4, airspeed_imu);
245 _mav_put_int16_t(buf, 6, airspeed_pitot);
246 _mav_put_int16_t(buf, 8, airspeed_hot_wire);
247 _mav_put_int16_t(buf, 10, airspeed_ultrasonic);
248 _mav_put_int16_t(buf, 12, aoa);
249 _mav_put_int16_t(buf, 14, aoy);
251 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEEDS, buf, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC);
253 mavlink_airspeeds_t *packet = (mavlink_airspeeds_t *)msgbuf;
254 packet->time_boot_ms = time_boot_ms;
255 packet->airspeed_imu = airspeed_imu;
256 packet->airspeed_pitot = airspeed_pitot;
257 packet->airspeed_hot_wire = airspeed_hot_wire;
258 packet->airspeed_ultrasonic = airspeed_ultrasonic;
262 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEEDS, (
const char *)packet, MAVLINK_MSG_ID_AIRSPEEDS_MIN_LEN, MAVLINK_MSG_ID_AIRSPEEDS_LEN, MAVLINK_MSG_ID_AIRSPEEDS_CRC);
277static inline uint32_t mavlink_msg_airspeeds_get_time_boot_ms(
const mavlink_message_t* msg)
279 return _MAV_RETURN_uint32_t(msg, 0);
287static inline int16_t mavlink_msg_airspeeds_get_airspeed_imu(
const mavlink_message_t* msg)
289 return _MAV_RETURN_int16_t(msg, 4);
297static inline int16_t mavlink_msg_airspeeds_get_airspeed_pitot(
const mavlink_message_t* msg)
299 return _MAV_RETURN_int16_t(msg, 6);
307static inline int16_t mavlink_msg_airspeeds_get_airspeed_hot_wire(
const mavlink_message_t* msg)
309 return _MAV_RETURN_int16_t(msg, 8);
317static inline int16_t mavlink_msg_airspeeds_get_airspeed_ultrasonic(
const mavlink_message_t* msg)
319 return _MAV_RETURN_int16_t(msg, 10);
327static inline int16_t mavlink_msg_airspeeds_get_aoa(
const mavlink_message_t* msg)
329 return _MAV_RETURN_int16_t(msg, 12);
337static inline int16_t mavlink_msg_airspeeds_get_aoy(
const mavlink_message_t* msg)
339 return _MAV_RETURN_int16_t(msg, 14);
348static inline void mavlink_msg_airspeeds_decode(
const mavlink_message_t* msg, mavlink_airspeeds_t* airspeeds)
350#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
351 airspeeds->time_boot_ms = mavlink_msg_airspeeds_get_time_boot_ms(msg);
352 airspeeds->airspeed_imu = mavlink_msg_airspeeds_get_airspeed_imu(msg);
353 airspeeds->airspeed_pitot = mavlink_msg_airspeeds_get_airspeed_pitot(msg);
354 airspeeds->airspeed_hot_wire = mavlink_msg_airspeeds_get_airspeed_hot_wire(msg);
355 airspeeds->airspeed_ultrasonic = mavlink_msg_airspeeds_get_airspeed_ultrasonic(msg);
356 airspeeds->aoa = mavlink_msg_airspeeds_get_aoa(msg);
357 airspeeds->aoy = mavlink_msg_airspeeds_get_aoy(msg);
359 uint8_t len = msg->len < MAVLINK_MSG_ID_AIRSPEEDS_LEN? msg->len : MAVLINK_MSG_ID_AIRSPEEDS_LEN;
360 memset(airspeeds, 0, MAVLINK_MSG_ID_AIRSPEEDS_LEN);
361 memcpy(airspeeds, _MAV_PAYLOAD(msg), len);