3 #define MAVLINK_MSG_ID_SCALED_IMU2 116
19 #define MAVLINK_MSG_ID_SCALED_IMU2_LEN 22
20 #define MAVLINK_MSG_ID_116_LEN 22
22 #define MAVLINK_MSG_ID_SCALED_IMU2_CRC 76
23 #define MAVLINK_MSG_ID_116_CRC 76
27 #define MAVLINK_MESSAGE_INFO_SCALED_IMU2 { \
30 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_scaled_imu2_t, time_boot_ms) }, \
31 { "xacc", NULL, MAVLINK_TYPE_INT16_T, 0, 4, offsetof(mavlink_scaled_imu2_t, xacc) }, \
32 { "yacc", NULL, MAVLINK_TYPE_INT16_T, 0, 6, offsetof(mavlink_scaled_imu2_t, yacc) }, \
33 { "zacc", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_scaled_imu2_t, zacc) }, \
34 { "xgyro", NULL, MAVLINK_TYPE_INT16_T, 0, 10, offsetof(mavlink_scaled_imu2_t, xgyro) }, \
35 { "ygyro", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_scaled_imu2_t, ygyro) }, \
36 { "zgyro", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_scaled_imu2_t, zgyro) }, \
37 { "xmag", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_scaled_imu2_t, xmag) }, \
38 { "ymag", NULL, MAVLINK_TYPE_INT16_T, 0, 18, offsetof(mavlink_scaled_imu2_t, ymag) }, \
39 { "zmag", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_scaled_imu2_t, zmag) }, \
62 static inline uint16_t mavlink_msg_scaled_imu2_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
63 uint32_t time_boot_ms, 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)
65 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
121 static inline uint16_t mavlink_msg_scaled_imu2_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
122 mavlink_message_t* msg,
123 uint32_t time_boot_ms,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)
125 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
145 packet.
xgyro = xgyro;
146 packet.
ygyro = ygyro;
147 packet.
zgyro = zgyro;
156 #if MAVLINK_CRC_EXTRA
171 static inline uint16_t mavlink_msg_scaled_imu2_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_scaled_imu2_t* scaled_imu2)
173 return mavlink_msg_scaled_imu2_pack(system_id, component_id, msg, scaled_imu2->
time_boot_ms, scaled_imu2->
xacc, scaled_imu2->
yacc, scaled_imu2->
zacc, scaled_imu2->
xgyro, scaled_imu2->
ygyro, scaled_imu2->
zgyro, scaled_imu2->
xmag, scaled_imu2->
ymag, scaled_imu2->
zmag);
185 static inline uint16_t mavlink_msg_scaled_imu2_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_scaled_imu2_t* scaled_imu2)
187 return mavlink_msg_scaled_imu2_pack_chan(system_id, component_id, chan, msg, scaled_imu2->
time_boot_ms, scaled_imu2->
xacc, scaled_imu2->
yacc, scaled_imu2->
zacc, scaled_imu2->
xgyro, scaled_imu2->
ygyro, scaled_imu2->
zgyro, scaled_imu2->
xmag, scaled_imu2->
ymag, scaled_imu2->
zmag);
205 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
207 static inline void mavlink_msg_scaled_imu2_send(
mavlink_channel_t chan, uint32_t time_boot_ms, 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)
209 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
222 #if MAVLINK_CRC_EXTRA
233 packet.
xgyro = xgyro;
234 packet.
ygyro = ygyro;
235 packet.
zgyro = zgyro;
240 #if MAVLINK_CRC_EXTRA
248 #if MAVLINK_MSG_ID_SCALED_IMU2_LEN <= MAVLINK_MAX_PAYLOAD_LEN
256 static inline void mavlink_msg_scaled_imu2_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint32_t time_boot_ms, 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)
258 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
259 char *buf = (
char *)msgbuf;
271 #if MAVLINK_CRC_EXTRA
282 packet->
xgyro = xgyro;
283 packet->
ygyro = ygyro;
284 packet->
zgyro = zgyro;
289 #if MAVLINK_CRC_EXTRA
308 static inline uint32_t mavlink_msg_scaled_imu2_get_time_boot_ms(
const mavlink_message_t* msg)
310 return _MAV_RETURN_uint32_t(msg, 0);
318 static inline int16_t mavlink_msg_scaled_imu2_get_xacc(
const mavlink_message_t* msg)
320 return _MAV_RETURN_int16_t(msg, 4);
328 static inline int16_t mavlink_msg_scaled_imu2_get_yacc(
const mavlink_message_t* msg)
330 return _MAV_RETURN_int16_t(msg, 6);
338 static inline int16_t mavlink_msg_scaled_imu2_get_zacc(
const mavlink_message_t* msg)
340 return _MAV_RETURN_int16_t(msg, 8);
348 static inline int16_t mavlink_msg_scaled_imu2_get_xgyro(
const mavlink_message_t* msg)
350 return _MAV_RETURN_int16_t(msg, 10);
358 static inline int16_t mavlink_msg_scaled_imu2_get_ygyro(
const mavlink_message_t* msg)
360 return _MAV_RETURN_int16_t(msg, 12);
368 static inline int16_t mavlink_msg_scaled_imu2_get_zgyro(
const mavlink_message_t* msg)
370 return _MAV_RETURN_int16_t(msg, 14);
378 static inline int16_t mavlink_msg_scaled_imu2_get_xmag(
const mavlink_message_t* msg)
380 return _MAV_RETURN_int16_t(msg, 16);
388 static inline int16_t mavlink_msg_scaled_imu2_get_ymag(
const mavlink_message_t* msg)
390 return _MAV_RETURN_int16_t(msg, 18);
398 static inline int16_t mavlink_msg_scaled_imu2_get_zmag(
const mavlink_message_t* msg)
400 return _MAV_RETURN_int16_t(msg, 20);
409 static inline void mavlink_msg_scaled_imu2_decode(
const mavlink_message_t* msg,
mavlink_scaled_imu2_t* scaled_imu2)
411 #if MAVLINK_NEED_BYTE_SWAP
412 scaled_imu2->
time_boot_ms = mavlink_msg_scaled_imu2_get_time_boot_ms(msg);
413 scaled_imu2->
xacc = mavlink_msg_scaled_imu2_get_xacc(msg);
414 scaled_imu2->
yacc = mavlink_msg_scaled_imu2_get_yacc(msg);
415 scaled_imu2->
zacc = mavlink_msg_scaled_imu2_get_zacc(msg);
416 scaled_imu2->
xgyro = mavlink_msg_scaled_imu2_get_xgyro(msg);
417 scaled_imu2->
ygyro = mavlink_msg_scaled_imu2_get_ygyro(msg);
418 scaled_imu2->
zgyro = mavlink_msg_scaled_imu2_get_zgyro(msg);
419 scaled_imu2->
xmag = mavlink_msg_scaled_imu2_get_xmag(msg);
420 scaled_imu2->
ymag = mavlink_msg_scaled_imu2_get_ymag(msg);
421 scaled_imu2->
zmag = mavlink_msg_scaled_imu2_get_zmag(msg);
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_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
int16_t ygyro
Angular speed around Y axis (millirad /sec)
Definition: mavlink_msg_scaled_imu2.h:12
mavlink_channel_t
Definition: mavlink_types.h:178
#define MAVLINK_MSG_ID_SCALED_IMU2_CRC
Definition: mavlink_msg_scaled_imu2.h:22
int16_t ymag
Y Magnetic field (milli tesla)
Definition: mavlink_msg_scaled_imu2.h:15
int16_t xgyro
Angular speed around X axis (millirad /sec)
Definition: mavlink_msg_scaled_imu2.h:11
struct __mavlink_scaled_imu2_t mavlink_scaled_imu2_t
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
int16_t yacc
Y acceleration (mg)
Definition: mavlink_msg_scaled_imu2.h:9
int16_t zgyro
Angular speed around Z axis (millirad /sec)
Definition: mavlink_msg_scaled_imu2.h:13
#define MAVLINK_MSG_ID_SCALED_IMU2
Definition: mavlink_msg_scaled_imu2.h:3
Definition: mavlink_msg_scaled_imu2.h:5
uint32_t time_boot_ms
Timestamp (milliseconds since system boot)
Definition: mavlink_msg_scaled_imu2.h:7
int16_t xmag
X Magnetic field (milli tesla)
Definition: mavlink_msg_scaled_imu2.h:14
#define MAVLINK_MSG_ID_SCALED_IMU2_LEN
Definition: mavlink_msg_scaled_imu2.h:19
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
int16_t zmag
Z Magnetic field (milli tesla)
Definition: mavlink_msg_scaled_imu2.h:16
int16_t xacc
X acceleration (mg)
Definition: mavlink_msg_scaled_imu2.h:8
#define _mav_put_int16_t(buf, wire_offset, b)
Definition: protocol.h:140
int16_t zacc
Z acceleration (mg)
Definition: mavlink_msg_scaled_imu2.h:10
#define _mav_put_uint32_t(buf, wire_offset, b)
Definition: protocol.h:141