3 #define MAVLINK_MSG_ID_SENSOR_OFFSETS 150
21 #define MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN 42
22 #define MAVLINK_MSG_ID_150_LEN 42
24 #define MAVLINK_MSG_ID_SENSOR_OFFSETS_CRC 134
25 #define MAVLINK_MSG_ID_150_CRC 134
29 #define MAVLINK_MESSAGE_INFO_SENSOR_OFFSETS { \
32 { { "mag_declination", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_sensor_offsets_t, mag_declination) }, \
33 { "raw_press", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_sensor_offsets_t, raw_press) }, \
34 { "raw_temp", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_sensor_offsets_t, raw_temp) }, \
35 { "gyro_cal_x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_sensor_offsets_t, gyro_cal_x) }, \
36 { "gyro_cal_y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_sensor_offsets_t, gyro_cal_y) }, \
37 { "gyro_cal_z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_sensor_offsets_t, gyro_cal_z) }, \
38 { "accel_cal_x", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_sensor_offsets_t, accel_cal_x) }, \
39 { "accel_cal_y", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_sensor_offsets_t, accel_cal_y) }, \
40 { "accel_cal_z", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_sensor_offsets_t, accel_cal_z) }, \
41 { "mag_ofs_x", NULL, MAVLINK_TYPE_INT16_T, 0, 36, offsetof(mavlink_sensor_offsets_t, mag_ofs_x) }, \
42 { "mag_ofs_y", NULL, MAVLINK_TYPE_INT16_T, 0, 38, offsetof(mavlink_sensor_offsets_t, mag_ofs_y) }, \
43 { "mag_ofs_z", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_sensor_offsets_t, mag_ofs_z) }, \
68 static inline uint16_t mavlink_msg_sensor_offsets_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
69 int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z,
float mag_declination, int32_t raw_press, int32_t raw_temp,
float gyro_cal_x,
float gyro_cal_y,
float gyro_cal_z,
float accel_cal_x,
float accel_cal_y,
float accel_cal_z)
71 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
106 #if MAVLINK_CRC_EXTRA
133 static inline uint16_t mavlink_msg_sensor_offsets_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
134 mavlink_message_t* msg,
135 int16_t mag_ofs_x,int16_t mag_ofs_y,int16_t mag_ofs_z,
float mag_declination,int32_t raw_press,int32_t raw_temp,
float gyro_cal_x,
float gyro_cal_y,
float gyro_cal_z,
float accel_cal_x,
float accel_cal_y,
float accel_cal_z)
137 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
172 #if MAVLINK_CRC_EXTRA
187 static inline uint16_t mavlink_msg_sensor_offsets_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_sensor_offsets_t* sensor_offsets)
189 return mavlink_msg_sensor_offsets_pack(system_id, component_id, msg, sensor_offsets->
mag_ofs_x, sensor_offsets->
mag_ofs_y, sensor_offsets->
mag_ofs_z, sensor_offsets->
mag_declination, sensor_offsets->
raw_press, sensor_offsets->
raw_temp, sensor_offsets->
gyro_cal_x, sensor_offsets->
gyro_cal_y, sensor_offsets->
gyro_cal_z, sensor_offsets->
accel_cal_x, sensor_offsets->
accel_cal_y, sensor_offsets->
accel_cal_z);
201 static inline uint16_t mavlink_msg_sensor_offsets_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_sensor_offsets_t* sensor_offsets)
203 return mavlink_msg_sensor_offsets_pack_chan(system_id, component_id, chan, msg, sensor_offsets->
mag_ofs_x, sensor_offsets->
mag_ofs_y, sensor_offsets->
mag_ofs_z, sensor_offsets->
mag_declination, sensor_offsets->
raw_press, sensor_offsets->
raw_temp, sensor_offsets->
gyro_cal_x, sensor_offsets->
gyro_cal_y, sensor_offsets->
gyro_cal_z, sensor_offsets->
accel_cal_x, sensor_offsets->
accel_cal_y, sensor_offsets->
accel_cal_z);
223 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
225 static inline void mavlink_msg_sensor_offsets_send(
mavlink_channel_t chan, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z,
float mag_declination, int32_t raw_press, int32_t raw_temp,
float gyro_cal_x,
float gyro_cal_y,
float gyro_cal_z,
float accel_cal_x,
float accel_cal_y,
float accel_cal_z)
227 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
242 #if MAVLINK_CRC_EXTRA
262 #if MAVLINK_CRC_EXTRA
270 #if MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
278 static inline void mavlink_msg_sensor_offsets_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z,
float mag_declination, int32_t raw_press, int32_t raw_temp,
float gyro_cal_x,
float gyro_cal_y,
float gyro_cal_z,
float accel_cal_x,
float accel_cal_y,
float accel_cal_z)
280 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
281 char *buf = (
char *)msgbuf;
295 #if MAVLINK_CRC_EXTRA
315 #if MAVLINK_CRC_EXTRA
334 static inline int16_t mavlink_msg_sensor_offsets_get_mag_ofs_x(
const mavlink_message_t* msg)
336 return _MAV_RETURN_int16_t(msg, 36);
344 static inline int16_t mavlink_msg_sensor_offsets_get_mag_ofs_y(
const mavlink_message_t* msg)
346 return _MAV_RETURN_int16_t(msg, 38);
354 static inline int16_t mavlink_msg_sensor_offsets_get_mag_ofs_z(
const mavlink_message_t* msg)
356 return _MAV_RETURN_int16_t(msg, 40);
364 static inline float mavlink_msg_sensor_offsets_get_mag_declination(
const mavlink_message_t* msg)
366 return _MAV_RETURN_float(msg, 0);
374 static inline int32_t mavlink_msg_sensor_offsets_get_raw_press(
const mavlink_message_t* msg)
376 return _MAV_RETURN_int32_t(msg, 4);
384 static inline int32_t mavlink_msg_sensor_offsets_get_raw_temp(
const mavlink_message_t* msg)
386 return _MAV_RETURN_int32_t(msg, 8);
394 static inline float mavlink_msg_sensor_offsets_get_gyro_cal_x(
const mavlink_message_t* msg)
396 return _MAV_RETURN_float(msg, 12);
404 static inline float mavlink_msg_sensor_offsets_get_gyro_cal_y(
const mavlink_message_t* msg)
406 return _MAV_RETURN_float(msg, 16);
414 static inline float mavlink_msg_sensor_offsets_get_gyro_cal_z(
const mavlink_message_t* msg)
416 return _MAV_RETURN_float(msg, 20);
424 static inline float mavlink_msg_sensor_offsets_get_accel_cal_x(
const mavlink_message_t* msg)
426 return _MAV_RETURN_float(msg, 24);
434 static inline float mavlink_msg_sensor_offsets_get_accel_cal_y(
const mavlink_message_t* msg)
436 return _MAV_RETURN_float(msg, 28);
444 static inline float mavlink_msg_sensor_offsets_get_accel_cal_z(
const mavlink_message_t* msg)
446 return _MAV_RETURN_float(msg, 32);
455 static inline void mavlink_msg_sensor_offsets_decode(
const mavlink_message_t* msg,
mavlink_sensor_offsets_t* sensor_offsets)
457 #if MAVLINK_NEED_BYTE_SWAP
458 sensor_offsets->
mag_declination = mavlink_msg_sensor_offsets_get_mag_declination(msg);
459 sensor_offsets->
raw_press = mavlink_msg_sensor_offsets_get_raw_press(msg);
460 sensor_offsets->
raw_temp = mavlink_msg_sensor_offsets_get_raw_temp(msg);
461 sensor_offsets->
gyro_cal_x = mavlink_msg_sensor_offsets_get_gyro_cal_x(msg);
462 sensor_offsets->
gyro_cal_y = mavlink_msg_sensor_offsets_get_gyro_cal_y(msg);
463 sensor_offsets->
gyro_cal_z = mavlink_msg_sensor_offsets_get_gyro_cal_z(msg);
464 sensor_offsets->
accel_cal_x = mavlink_msg_sensor_offsets_get_accel_cal_x(msg);
465 sensor_offsets->
accel_cal_y = mavlink_msg_sensor_offsets_get_accel_cal_y(msg);
466 sensor_offsets->
accel_cal_z = mavlink_msg_sensor_offsets_get_accel_cal_z(msg);
467 sensor_offsets->
mag_ofs_x = mavlink_msg_sensor_offsets_get_mag_ofs_x(msg);
468 sensor_offsets->
mag_ofs_y = mavlink_msg_sensor_offsets_get_mag_ofs_y(msg);
469 sensor_offsets->
mag_ofs_z = mavlink_msg_sensor_offsets_get_mag_ofs_z(msg);
float accel_cal_z
accel Z calibration
Definition: mavlink_msg_sensor_offsets.h:15
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
float gyro_cal_y
gyro Y calibration
Definition: mavlink_msg_sensor_offsets.h:11
Definition: mavlink_msg_sensor_offsets.h:5
float gyro_cal_x
gyro X calibration
Definition: mavlink_msg_sensor_offsets.h:10
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
int16_t mag_ofs_z
magnetometer Z offset
Definition: mavlink_msg_sensor_offsets.h:18
#define _mav_put_int32_t(buf, wire_offset, b)
Definition: protocol.h:142
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
struct __mavlink_sensor_offsets_t mavlink_sensor_offsets_t
mavlink_channel_t
Definition: mavlink_types.h:178
float accel_cal_x
accel X calibration
Definition: mavlink_msg_sensor_offsets.h:13
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
int16_t mag_ofs_y
magnetometer Y offset
Definition: mavlink_msg_sensor_offsets.h:17
float mag_declination
magnetic declination (radians)
Definition: mavlink_msg_sensor_offsets.h:7
#define MAVLINK_MSG_ID_SENSOR_OFFSETS
Definition: mavlink_msg_sensor_offsets.h:3
float accel_cal_y
accel Y calibration
Definition: mavlink_msg_sensor_offsets.h:14
int16_t mag_ofs_x
magnetometer X offset
Definition: mavlink_msg_sensor_offsets.h:16
#define MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN
Definition: mavlink_msg_sensor_offsets.h:21
int32_t raw_temp
raw temperature from barometer
Definition: mavlink_msg_sensor_offsets.h:9
#define MAVLINK_MSG_ID_SENSOR_OFFSETS_CRC
Definition: mavlink_msg_sensor_offsets.h:24
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
#define _mav_put_int16_t(buf, wire_offset, b)
Definition: protocol.h:140
int16_t mag_declination
Definition: compass.h:89
float gyro_cal_z
gyro Z calibration
Definition: mavlink_msg_sensor_offsets.h:12
int32_t raw_press
raw pressure from barometer
Definition: mavlink_msg_sensor_offsets.h:8