4#define MAVLINK_MSG_ID_RAW_IMU 27
7typedef struct __mavlink_raw_imu_t {
22#define MAVLINK_MSG_ID_RAW_IMU_LEN 29
23#define MAVLINK_MSG_ID_RAW_IMU_MIN_LEN 26
24#define MAVLINK_MSG_ID_27_LEN 29
25#define MAVLINK_MSG_ID_27_MIN_LEN 26
27#define MAVLINK_MSG_ID_RAW_IMU_CRC 144
28#define MAVLINK_MSG_ID_27_CRC 144
32#if MAVLINK_COMMAND_24BIT
33#define MAVLINK_MESSAGE_INFO_RAW_IMU {
37 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_raw_imu_t, time_usec) },
38 { "xacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 8
, offsetof(mavlink_raw_imu_t, xacc) },
39 { "yacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 10
, offsetof(mavlink_raw_imu_t, yacc) },
40 { "zacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 12
, offsetof(mavlink_raw_imu_t, zacc) },
41 { "xgyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 14
, offsetof(mavlink_raw_imu_t, xgyro) },
42 { "ygyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 16
, offsetof(mavlink_raw_imu_t, ygyro) },
43 { "zgyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 18
, offsetof(mavlink_raw_imu_t, zgyro) },
44 { "xmag", NULL, MAVLINK_TYPE_INT16_T, 0
, 20
, offsetof(mavlink_raw_imu_t, xmag) },
45 { "ymag", NULL, MAVLINK_TYPE_INT16_T, 0
, 22
, offsetof(mavlink_raw_imu_t, ymag) },
46 { "zmag", NULL, MAVLINK_TYPE_INT16_T, 0
, 24
, offsetof(mavlink_raw_imu_t, zmag) },
47 { "id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 26
, offsetof(mavlink_raw_imu_t, id) },
48 { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0
, 27
, offsetof(mavlink_raw_imu_t, temperature) },
50}
52#define MAVLINK_MESSAGE_INFO_RAW_IMU {
55 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_raw_imu_t, time_usec) },
56 { "xacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 8
, offsetof(mavlink_raw_imu_t, xacc) },
57 { "yacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 10
, offsetof(mavlink_raw_imu_t, yacc) },
58 { "zacc", NULL, MAVLINK_TYPE_INT16_T, 0
, 12
, offsetof(mavlink_raw_imu_t, zacc) },
59 { "xgyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 14
, offsetof(mavlink_raw_imu_t, xgyro) },
60 { "ygyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 16
, offsetof(mavlink_raw_imu_t, ygyro) },
61 { "zgyro", NULL, MAVLINK_TYPE_INT16_T, 0
, 18
, offsetof(mavlink_raw_imu_t, zgyro) },
62 { "xmag", NULL, MAVLINK_TYPE_INT16_T, 0
, 20
, offsetof(mavlink_raw_imu_t, xmag) },
63 { "ymag", NULL, MAVLINK_TYPE_INT16_T, 0
, 22
, offsetof(mavlink_raw_imu_t, ymag) },
64 { "zmag", NULL, MAVLINK_TYPE_INT16_T, 0
, 24
, offsetof(mavlink_raw_imu_t, zmag) },
65 { "id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 26
, offsetof(mavlink_raw_imu_t, id) },
66 { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0
, 27
, offsetof(mavlink_raw_imu_t, temperature) },
68}
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91static inline uint16_t mavlink_msg_raw_imu_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
92 uint64_t time_usec, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag, uint8_t id, int16_t temperature)
94#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
96 _mav_put_uint64_t(buf, 0, time_usec);
97 _mav_put_int16_t(buf, 8, xacc);
98 _mav_put_int16_t(buf, 10, yacc);
99 _mav_put_int16_t(buf, 12, zacc);
100 _mav_put_int16_t(buf, 14, xgyro);
101 _mav_put_int16_t(buf, 16, ygyro);
102 _mav_put_int16_t(buf, 18, zgyro);
103 _mav_put_int16_t(buf, 20, xmag);
104 _mav_put_int16_t(buf, 22, ymag);
105 _mav_put_int16_t(buf, 24, zmag);
106 _mav_put_uint8_t(buf, 26, id);
107 _mav_put_int16_t(buf, 27, temperature);
111 mavlink_raw_imu_t packet;
112 packet.time_usec = time_usec;
116 packet.xgyro = xgyro;
117 packet.ygyro = ygyro;
118 packet.zgyro = zgyro;
123 packet.temperature = temperature;
125 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_IMU_LEN);
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153static inline uint16_t mavlink_msg_raw_imu_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
154 uint64_t time_usec, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag, uint8_t id, int16_t temperature)
156#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
158 _mav_put_uint64_t(buf, 0, time_usec);
159 _mav_put_int16_t(buf, 8, xacc);
160 _mav_put_int16_t(buf, 10, yacc);
161 _mav_put_int16_t(buf, 12, zacc);
162 _mav_put_int16_t(buf, 14, xgyro);
163 _mav_put_int16_t(buf, 16, ygyro);
164 _mav_put_int16_t(buf, 18, zgyro);
165 _mav_put_int16_t(buf, 20, xmag);
166 _mav_put_int16_t(buf, 22, ymag);
167 _mav_put_int16_t(buf, 24, zmag);
168 _mav_put_uint8_t(buf, 26, id);
169 _mav_put_int16_t(buf, 27, temperature);
173 mavlink_raw_imu_t packet;
174 packet.time_usec = time_usec;
178 packet.xgyro = xgyro;
179 packet.ygyro = ygyro;
180 packet.zgyro = zgyro;
185 packet.temperature = temperature;
187 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_IMU_LEN);
192 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RAW_IMU_MIN_LEN, MAVLINK_MSG_ID_RAW_IMU_LEN, MAVLINK_MSG_ID_RAW_IMU_CRC);
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218static inline uint16_t mavlink_msg_raw_imu_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
219 mavlink_message_t* msg,
220 uint64_t time_usec,int16_t xacc,int16_t yacc,int16_t zacc,int16_t xgyro,int16_t ygyro,int16_t zgyro,int16_t xmag,int16_t ymag,int16_t zmag,uint8_t id,int16_t temperature)
222#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
224 _mav_put_uint64_t(buf, 0, time_usec);
225 _mav_put_int16_t(buf, 8, xacc);
226 _mav_put_int16_t(buf, 10, yacc);
227 _mav_put_int16_t(buf, 12, zacc);
228 _mav_put_int16_t(buf, 14, xgyro);
229 _mav_put_int16_t(buf, 16, ygyro);
230 _mav_put_int16_t(buf, 18, zgyro);
231 _mav_put_int16_t(buf, 20, xmag);
232 _mav_put_int16_t(buf, 22, ymag);
233 _mav_put_int16_t(buf, 24, zmag);
234 _mav_put_uint8_t(buf, 26, id);
235 _mav_put_int16_t(buf, 27, temperature);
239 mavlink_raw_imu_t packet;
240 packet.time_usec = time_usec;
244 packet.xgyro = xgyro;
245 packet.ygyro = ygyro;
246 packet.zgyro = zgyro;
251 packet.temperature = temperature;
253 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RAW_IMU_LEN);
261
262
263
264
265
266
267
268static inline uint16_t mavlink_msg_raw_imu_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_raw_imu_t* raw_imu)
270 return mavlink_msg_raw_imu_pack(system_id, component_id, msg, raw_imu->time_usec, raw_imu->xacc, raw_imu->yacc, raw_imu->zacc, raw_imu->xgyro, raw_imu->ygyro, raw_imu->zgyro, raw_imu->xmag, raw_imu->ymag, raw_imu->zmag, raw_imu->id, raw_imu->temperature);
274
275
276
277
278
279
280
281
282static inline uint16_t mavlink_msg_raw_imu_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_raw_imu_t* raw_imu)
284 return mavlink_msg_raw_imu_pack_chan(system_id, component_id, chan, msg, raw_imu->time_usec, raw_imu->xacc, raw_imu->yacc, raw_imu->zacc, raw_imu->xgyro, raw_imu->ygyro, raw_imu->zgyro, raw_imu->xmag, raw_imu->ymag, raw_imu->zmag, raw_imu->id, raw_imu->temperature);
288
289
290
291
292
293
294
295
296static inline uint16_t mavlink_msg_raw_imu_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_raw_imu_t* raw_imu)
298 return mavlink_msg_raw_imu_pack_status(system_id, component_id, _status, msg, raw_imu->time_usec, raw_imu->xacc, raw_imu->yacc, raw_imu->zacc, raw_imu->xgyro, raw_imu->ygyro, raw_imu->zgyro, raw_imu->xmag, raw_imu->ymag, raw_imu->zmag, raw_imu->id, raw_imu->temperature);
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
320static inline void mavlink_msg_raw_imu_send(mavlink_channel_t chan, uint64_t time_usec, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag, uint8_t id, int16_t temperature)
322#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
323 char buf[MAVLINK_MSG_ID_RAW_IMU_LEN];
324 _mav_put_uint64_t(buf, 0, time_usec);
325 _mav_put_int16_t(buf, 8, xacc);
326 _mav_put_int16_t(buf, 10, yacc);
327 _mav_put_int16_t(buf, 12, zacc);
328 _mav_put_int16_t(buf, 14, xgyro);
329 _mav_put_int16_t(buf, 16, ygyro);
330 _mav_put_int16_t(buf, 18, zgyro);
331 _mav_put_int16_t(buf, 20, xmag);
332 _mav_put_int16_t(buf, 22, ymag);
333 _mav_put_int16_t(buf, 24, zmag);
334 _mav_put_uint8_t(buf, 26, id);
335 _mav_put_int16_t(buf, 27, temperature);
337 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, buf, MAVLINK_MSG_ID_RAW_IMU_MIN_LEN, MAVLINK_MSG_ID_RAW_IMU_LEN, MAVLINK_MSG_ID_RAW_IMU_CRC);
339 mavlink_raw_imu_t packet;
340 packet.time_usec = time_usec;
344 packet.xgyro = xgyro;
345 packet.ygyro = ygyro;
346 packet.zgyro = zgyro;
351 packet.temperature = temperature;
353 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, (
const char *)&packet, MAVLINK_MSG_ID_RAW_IMU_MIN_LEN, MAVLINK_MSG_ID_RAW_IMU_LEN, MAVLINK_MSG_ID_RAW_IMU_CRC);
358
359
360
361
362static inline void mavlink_msg_raw_imu_send_struct(mavlink_channel_t chan,
const mavlink_raw_imu_t* raw_imu)
364#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
365 mavlink_msg_raw_imu_send(chan, raw_imu->time_usec, raw_imu->xacc, raw_imu->yacc, raw_imu->zacc, raw_imu->xgyro, raw_imu->ygyro, raw_imu->zgyro, raw_imu->xmag, raw_imu->ymag, raw_imu->zmag, raw_imu->id, raw_imu->temperature);
367 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, (
const char *)raw_imu, MAVLINK_MSG_ID_RAW_IMU_MIN_LEN, MAVLINK_MSG_ID_RAW_IMU_LEN, MAVLINK_MSG_ID_RAW_IMU_CRC);
371#if MAVLINK_MSG_ID_RAW_IMU_LEN <= MAVLINK_MAX_PAYLOAD_LEN
373
374
375
376
377
378
379static inline void mavlink_msg_raw_imu_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, int16_t xacc, int16_t yacc, int16_t zacc, int16_t xgyro, int16_t ygyro, int16_t zgyro, int16_t xmag, int16_t ymag, int16_t zmag, uint8_t id, int16_t temperature)
381#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
382 char *buf = (
char *)msgbuf;
383 _mav_put_uint64_t(buf, 0, time_usec);
384 _mav_put_int16_t(buf, 8, xacc);
385 _mav_put_int16_t(buf, 10, yacc);
386 _mav_put_int16_t(buf, 12, zacc);
387 _mav_put_int16_t(buf, 14, xgyro);
388 _mav_put_int16_t(buf, 16, ygyro);
389 _mav_put_int16_t(buf, 18, zgyro);
390 _mav_put_int16_t(buf, 20, xmag);
391 _mav_put_int16_t(buf, 22, ymag);
392 _mav_put_int16_t(buf, 24, zmag);
393 _mav_put_uint8_t(buf, 26, id);
394 _mav_put_int16_t(buf, 27, temperature);
396 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, buf, MAVLINK_MSG_ID_RAW_IMU_MIN_LEN, MAVLINK_MSG_ID_RAW_IMU_LEN, MAVLINK_MSG_ID_RAW_IMU_CRC);
398 mavlink_raw_imu_t *packet = (mavlink_raw_imu_t *)msgbuf;
399 packet->time_usec = time_usec;
403 packet->xgyro = xgyro;
404 packet->ygyro = ygyro;
405 packet->zgyro = zgyro;
410 packet->temperature = temperature;
412 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_RAW_IMU, (
const char *)packet, MAVLINK_MSG_ID_RAW_IMU_MIN_LEN, MAVLINK_MSG_ID_RAW_IMU_LEN, MAVLINK_MSG_ID_RAW_IMU_CRC);
423
424
425
426
427static inline uint64_t mavlink_msg_raw_imu_get_time_usec(
const mavlink_message_t* msg)
429 return _MAV_RETURN_uint64_t(msg, 0);
433
434
435
436
437static inline int16_t mavlink_msg_raw_imu_get_xacc(
const mavlink_message_t* msg)
439 return _MAV_RETURN_int16_t(msg, 8);
443
444
445
446
447static inline int16_t mavlink_msg_raw_imu_get_yacc(
const mavlink_message_t* msg)
449 return _MAV_RETURN_int16_t(msg, 10);
453
454
455
456
457static inline int16_t mavlink_msg_raw_imu_get_zacc(
const mavlink_message_t* msg)
459 return _MAV_RETURN_int16_t(msg, 12);
463
464
465
466
467static inline int16_t mavlink_msg_raw_imu_get_xgyro(
const mavlink_message_t* msg)
469 return _MAV_RETURN_int16_t(msg, 14);
473
474
475
476
477static inline int16_t mavlink_msg_raw_imu_get_ygyro(
const mavlink_message_t* msg)
479 return _MAV_RETURN_int16_t(msg, 16);
483
484
485
486
487static inline int16_t mavlink_msg_raw_imu_get_zgyro(
const mavlink_message_t* msg)
489 return _MAV_RETURN_int16_t(msg, 18);
493
494
495
496
497static inline int16_t mavlink_msg_raw_imu_get_xmag(
const mavlink_message_t* msg)
499 return _MAV_RETURN_int16_t(msg, 20);
503
504
505
506
507static inline int16_t mavlink_msg_raw_imu_get_ymag(
const mavlink_message_t* msg)
509 return _MAV_RETURN_int16_t(msg, 22);
513
514
515
516
517static inline int16_t mavlink_msg_raw_imu_get_zmag(
const mavlink_message_t* msg)
519 return _MAV_RETURN_int16_t(msg, 24);
523
524
525
526
527static inline uint8_t mavlink_msg_raw_imu_get_id(
const mavlink_message_t* msg)
529 return _MAV_RETURN_uint8_t(msg, 26);
533
534
535
536
537static inline int16_t mavlink_msg_raw_imu_get_temperature(
const mavlink_message_t* msg)
539 return _MAV_RETURN_int16_t(msg, 27);
543
544
545
546
547
548static inline void mavlink_msg_raw_imu_decode(
const mavlink_message_t* msg, mavlink_raw_imu_t* raw_imu)
550#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
551 raw_imu->time_usec = mavlink_msg_raw_imu_get_time_usec(msg);
552 raw_imu->xacc = mavlink_msg_raw_imu_get_xacc(msg);
553 raw_imu->yacc = mavlink_msg_raw_imu_get_yacc(msg);
554 raw_imu->zacc = mavlink_msg_raw_imu_get_zacc(msg);
555 raw_imu->xgyro = mavlink_msg_raw_imu_get_xgyro(msg);
556 raw_imu->ygyro = mavlink_msg_raw_imu_get_ygyro(msg);
557 raw_imu->zgyro = mavlink_msg_raw_imu_get_zgyro(msg);
558 raw_imu->xmag = mavlink_msg_raw_imu_get_xmag(msg);
559 raw_imu->ymag = mavlink_msg_raw_imu_get_ymag(msg);
560 raw_imu->zmag = mavlink_msg_raw_imu_get_zmag(msg);
561 raw_imu->id = mavlink_msg_raw_imu_get_id(msg);
562 raw_imu->temperature = mavlink_msg_raw_imu_get_temperature(msg);
564 uint8_t len = msg->len < MAVLINK_MSG_ID_RAW_IMU_LEN? msg->len : MAVLINK_MSG_ID_RAW_IMU_LEN;
565 memset(raw_imu, 0, MAVLINK_MSG_ID_RAW_IMU_LEN);
566 memcpy(raw_imu, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_RAW_IMU_CRC
Definition: mavlink_msg_raw_imu.h:27
#define MAVLINK_MSG_ID_RAW_IMU_LEN
Definition: mavlink_msg_raw_imu.h:22
#define MAVLINK_MSG_ID_RAW_IMU
Definition: mavlink_msg_raw_imu.h:4
#define MAVLINK_MSG_ID_RAW_IMU_MIN_LEN
Definition: mavlink_msg_raw_imu.h:23