3 #define MAVLINK_MSG_ID_MAG_CAL_REPORT 192
23 #define MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN 44
24 #define MAVLINK_MSG_ID_192_LEN 44
26 #define MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC 36
27 #define MAVLINK_MSG_ID_192_CRC 36
31 #define MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT { \
34 { { "fitness", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mag_cal_report_t, fitness) }, \
35 { "ofs_x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mag_cal_report_t, ofs_x) }, \
36 { "ofs_y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mag_cal_report_t, ofs_y) }, \
37 { "ofs_z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mag_cal_report_t, ofs_z) }, \
38 { "diag_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_mag_cal_report_t, diag_x) }, \
39 { "diag_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_mag_cal_report_t, diag_y) }, \
40 { "diag_z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mag_cal_report_t, diag_z) }, \
41 { "offdiag_x", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_mag_cal_report_t, offdiag_x) }, \
42 { "offdiag_y", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_mag_cal_report_t, offdiag_y) }, \
43 { "offdiag_z", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_mag_cal_report_t, offdiag_z) }, \
44 { "compass_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_mag_cal_report_t, compass_id) }, \
45 { "cal_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_mag_cal_report_t, cal_mask) }, \
46 { "cal_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_mag_cal_report_t, cal_status) }, \
47 { "autosaved", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_mag_cal_report_t, autosaved) }, \
74 static inline uint16_t mavlink_msg_mag_cal_report_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
75 uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t autosaved,
float fitness,
float ofs_x,
float ofs_y,
float ofs_z,
float diag_x,
float diag_y,
float diag_z,
float offdiag_x,
float offdiag_y,
float offdiag_z)
77 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
100 packet.
ofs_z = ofs_z;
116 #if MAVLINK_CRC_EXTRA
145 static inline uint16_t mavlink_msg_mag_cal_report_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
146 mavlink_message_t* msg,
147 uint8_t compass_id,uint8_t cal_mask,uint8_t cal_status,uint8_t autosaved,
float fitness,
float ofs_x,
float ofs_y,
float ofs_z,
float diag_x,
float diag_y,
float diag_z,
float offdiag_x,
float offdiag_y,
float offdiag_z)
149 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
170 packet.
ofs_x = ofs_x;
171 packet.
ofs_y = ofs_y;
172 packet.
ofs_z = ofs_z;
188 #if MAVLINK_CRC_EXTRA
203 static inline uint16_t mavlink_msg_mag_cal_report_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_mag_cal_report_t* mag_cal_report)
205 return mavlink_msg_mag_cal_report_pack(system_id, component_id, msg, mag_cal_report->
compass_id, mag_cal_report->
cal_mask, mag_cal_report->
cal_status, mag_cal_report->
autosaved, mag_cal_report->
fitness, mag_cal_report->
ofs_x, mag_cal_report->
ofs_y, mag_cal_report->
ofs_z, mag_cal_report->
diag_x, mag_cal_report->
diag_y, mag_cal_report->
diag_z, mag_cal_report->
offdiag_x, mag_cal_report->
offdiag_y, mag_cal_report->
offdiag_z);
217 static inline uint16_t mavlink_msg_mag_cal_report_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_mag_cal_report_t* mag_cal_report)
219 return mavlink_msg_mag_cal_report_pack_chan(system_id, component_id, chan, msg, mag_cal_report->
compass_id, mag_cal_report->
cal_mask, mag_cal_report->
cal_status, mag_cal_report->
autosaved, mag_cal_report->
fitness, mag_cal_report->
ofs_x, mag_cal_report->
ofs_y, mag_cal_report->
ofs_z, mag_cal_report->
diag_x, mag_cal_report->
diag_y, mag_cal_report->
diag_z, mag_cal_report->
offdiag_x, mag_cal_report->
offdiag_y, mag_cal_report->
offdiag_z);
241 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
243 static inline void mavlink_msg_mag_cal_report_send(
mavlink_channel_t chan, uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t autosaved,
float fitness,
float ofs_x,
float ofs_y,
float ofs_z,
float diag_x,
float diag_y,
float diag_z,
float offdiag_x,
float offdiag_y,
float offdiag_z)
245 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
262 #if MAVLINK_CRC_EXTRA
270 packet.
ofs_x = ofs_x;
271 packet.
ofs_y = ofs_y;
272 packet.
ofs_z = ofs_z;
284 #if MAVLINK_CRC_EXTRA
292 #if MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
300 static inline void mavlink_msg_mag_cal_report_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t autosaved,
float fitness,
float ofs_x,
float ofs_y,
float ofs_z,
float diag_x,
float diag_y,
float diag_z,
float offdiag_x,
float offdiag_y,
float offdiag_z)
302 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
303 char *buf = (
char *)msgbuf;
319 #if MAVLINK_CRC_EXTRA
327 packet->
ofs_x = ofs_x;
328 packet->
ofs_y = ofs_y;
329 packet->
ofs_z = ofs_z;
341 #if MAVLINK_CRC_EXTRA
360 static inline uint8_t mavlink_msg_mag_cal_report_get_compass_id(
const mavlink_message_t* msg)
370 static inline uint8_t mavlink_msg_mag_cal_report_get_cal_mask(
const mavlink_message_t* msg)
380 static inline uint8_t mavlink_msg_mag_cal_report_get_cal_status(
const mavlink_message_t* msg)
390 static inline uint8_t mavlink_msg_mag_cal_report_get_autosaved(
const mavlink_message_t* msg)
400 static inline float mavlink_msg_mag_cal_report_get_fitness(
const mavlink_message_t* msg)
402 return _MAV_RETURN_float(msg, 0);
410 static inline float mavlink_msg_mag_cal_report_get_ofs_x(
const mavlink_message_t* msg)
412 return _MAV_RETURN_float(msg, 4);
420 static inline float mavlink_msg_mag_cal_report_get_ofs_y(
const mavlink_message_t* msg)
422 return _MAV_RETURN_float(msg, 8);
430 static inline float mavlink_msg_mag_cal_report_get_ofs_z(
const mavlink_message_t* msg)
432 return _MAV_RETURN_float(msg, 12);
440 static inline float mavlink_msg_mag_cal_report_get_diag_x(
const mavlink_message_t* msg)
442 return _MAV_RETURN_float(msg, 16);
450 static inline float mavlink_msg_mag_cal_report_get_diag_y(
const mavlink_message_t* msg)
452 return _MAV_RETURN_float(msg, 20);
460 static inline float mavlink_msg_mag_cal_report_get_diag_z(
const mavlink_message_t* msg)
462 return _MAV_RETURN_float(msg, 24);
470 static inline float mavlink_msg_mag_cal_report_get_offdiag_x(
const mavlink_message_t* msg)
472 return _MAV_RETURN_float(msg, 28);
480 static inline float mavlink_msg_mag_cal_report_get_offdiag_y(
const mavlink_message_t* msg)
482 return _MAV_RETURN_float(msg, 32);
490 static inline float mavlink_msg_mag_cal_report_get_offdiag_z(
const mavlink_message_t* msg)
492 return _MAV_RETURN_float(msg, 36);
501 static inline void mavlink_msg_mag_cal_report_decode(
const mavlink_message_t* msg,
mavlink_mag_cal_report_t* mag_cal_report)
503 #if MAVLINK_NEED_BYTE_SWAP
504 mag_cal_report->
fitness = mavlink_msg_mag_cal_report_get_fitness(msg);
505 mag_cal_report->
ofs_x = mavlink_msg_mag_cal_report_get_ofs_x(msg);
506 mag_cal_report->
ofs_y = mavlink_msg_mag_cal_report_get_ofs_y(msg);
507 mag_cal_report->
ofs_z = mavlink_msg_mag_cal_report_get_ofs_z(msg);
508 mag_cal_report->
diag_x = mavlink_msg_mag_cal_report_get_diag_x(msg);
509 mag_cal_report->
diag_y = mavlink_msg_mag_cal_report_get_diag_y(msg);
510 mag_cal_report->
diag_z = mavlink_msg_mag_cal_report_get_diag_z(msg);
511 mag_cal_report->
offdiag_x = mavlink_msg_mag_cal_report_get_offdiag_x(msg);
512 mag_cal_report->
offdiag_y = mavlink_msg_mag_cal_report_get_offdiag_y(msg);
513 mag_cal_report->
offdiag_z = mavlink_msg_mag_cal_report_get_offdiag_z(msg);
514 mag_cal_report->
compass_id = mavlink_msg_mag_cal_report_get_compass_id(msg);
515 mag_cal_report->
cal_mask = mavlink_msg_mag_cal_report_get_cal_mask(msg);
516 mag_cal_report->
cal_status = mavlink_msg_mag_cal_report_get_cal_status(msg);
517 mag_cal_report->
autosaved = mavlink_msg_mag_cal_report_get_autosaved(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
struct __mavlink_mag_cal_report_t mavlink_mag_cal_report_t
float ofs_z
Z offset.
Definition: mavlink_msg_mag_cal_report.h:10
float offdiag_y
Y off-diagonal (matrix 13 and 31)
Definition: mavlink_msg_mag_cal_report.h:15
float diag_x
X diagonal (matrix 11)
Definition: mavlink_msg_mag_cal_report.h:11
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
float fitness
RMS milligauss residuals.
Definition: mavlink_msg_mag_cal_report.h:7
float ofs_x
X offset.
Definition: mavlink_msg_mag_cal_report.h:8
float ofs_y
Y offset.
Definition: mavlink_msg_mag_cal_report.h:9
uint8_t compass_id
Compass being calibrated.
Definition: mavlink_msg_mag_cal_report.h:17
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_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
#define MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN
Definition: mavlink_msg_mag_cal_report.h:23
Definition: mavlink_msg_mag_cal_report.h:5
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
uint8_t autosaved
0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters
Definition: mavlink_msg_mag_cal_report.h:20
float offdiag_x
X off-diagonal (matrix 12 and 21)
Definition: mavlink_msg_mag_cal_report.h:14
float offdiag_z
Z off-diagonal (matrix 32 and 23)
Definition: mavlink_msg_mag_cal_report.h:16
uint8_t cal_status
Status (see MAG_CAL_STATUS enum)
Definition: mavlink_msg_mag_cal_report.h:19
#define MAVLINK_MSG_ID_MAG_CAL_REPORT
Definition: mavlink_msg_mag_cal_report.h:3
uint8_t cal_mask
Bitmask of compasses being calibrated.
Definition: mavlink_msg_mag_cal_report.h:18
float diag_y
Y diagonal (matrix 22)
Definition: mavlink_msg_mag_cal_report.h:12
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 MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC
Definition: mavlink_msg_mag_cal_report.h:26
float diag_z
Z diagonal (matrix 33)
Definition: mavlink_msg_mag_cal_report.h:13