4#define MAVLINK_MSG_ID_MAG_CAL_REPORT 192
7typedef struct __mavlink_mag_cal_report_t {
22}) mavlink_mag_cal_report_t;
24#define MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN 44
25#define MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN 44
26#define MAVLINK_MSG_ID_192_LEN 44
27#define MAVLINK_MSG_ID_192_MIN_LEN 44
29#define MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC 36
30#define MAVLINK_MSG_ID_192_CRC 36
34#if MAVLINK_COMMAND_24BIT
35#define MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT { \
39 { { "compass_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_mag_cal_report_t, compass_id) }, \
40 { "cal_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_mag_cal_report_t, cal_mask) }, \
41 { "cal_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_mag_cal_report_t, cal_status) }, \
42 { "autosaved", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_mag_cal_report_t, autosaved) }, \
43 { "fitness", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mag_cal_report_t, fitness) }, \
44 { "ofs_x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mag_cal_report_t, ofs_x) }, \
45 { "ofs_y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mag_cal_report_t, ofs_y) }, \
46 { "ofs_z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mag_cal_report_t, ofs_z) }, \
47 { "diag_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_mag_cal_report_t, diag_x) }, \
48 { "diag_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_mag_cal_report_t, diag_y) }, \
49 { "diag_z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mag_cal_report_t, diag_z) }, \
50 { "offdiag_x", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_mag_cal_report_t, offdiag_x) }, \
51 { "offdiag_y", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_mag_cal_report_t, offdiag_y) }, \
52 { "offdiag_z", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_mag_cal_report_t, offdiag_z) }, \
56#define MAVLINK_MESSAGE_INFO_MAG_CAL_REPORT { \
59 { { "compass_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_mag_cal_report_t, compass_id) }, \
60 { "cal_mask", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_mag_cal_report_t, cal_mask) }, \
61 { "cal_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_mag_cal_report_t, cal_status) }, \
62 { "autosaved", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_mag_cal_report_t, autosaved) }, \
63 { "fitness", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_mag_cal_report_t, fitness) }, \
64 { "ofs_x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mag_cal_report_t, ofs_x) }, \
65 { "ofs_y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mag_cal_report_t, ofs_y) }, \
66 { "ofs_z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mag_cal_report_t, ofs_z) }, \
67 { "diag_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_mag_cal_report_t, diag_x) }, \
68 { "diag_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_mag_cal_report_t, diag_y) }, \
69 { "diag_z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_mag_cal_report_t, diag_z) }, \
70 { "offdiag_x", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_mag_cal_report_t, offdiag_x) }, \
71 { "offdiag_y", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_mag_cal_report_t, offdiag_y) }, \
72 { "offdiag_z", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_mag_cal_report_t, offdiag_z) }, \
99static inline uint16_t mavlink_msg_mag_cal_report_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
100 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)
102#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
103 char buf[MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN];
104 _mav_put_float(buf, 0, fitness);
105 _mav_put_float(buf, 4, ofs_x);
106 _mav_put_float(buf, 8, ofs_y);
107 _mav_put_float(buf, 12, ofs_z);
108 _mav_put_float(buf, 16, diag_x);
109 _mav_put_float(buf, 20, diag_y);
110 _mav_put_float(buf, 24, diag_z);
111 _mav_put_float(buf, 28, offdiag_x);
112 _mav_put_float(buf, 32, offdiag_y);
113 _mav_put_float(buf, 36, offdiag_z);
114 _mav_put_uint8_t(buf, 40, compass_id);
115 _mav_put_uint8_t(buf, 41, cal_mask);
116 _mav_put_uint8_t(buf, 42, cal_status);
117 _mav_put_uint8_t(buf, 43, autosaved);
119 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN);
121 mavlink_mag_cal_report_t packet;
122 packet.fitness = fitness;
123 packet.ofs_x = ofs_x;
124 packet.ofs_y = ofs_y;
125 packet.ofs_z = ofs_z;
126 packet.diag_x = diag_x;
127 packet.diag_y = diag_y;
128 packet.diag_z = diag_z;
129 packet.offdiag_x = offdiag_x;
130 packet.offdiag_y = offdiag_y;
131 packet.offdiag_z = offdiag_z;
132 packet.compass_id = compass_id;
133 packet.cal_mask = cal_mask;
134 packet.cal_status = cal_status;
135 packet.autosaved = autosaved;
137 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN);
140 msg->msgid = MAVLINK_MSG_ID_MAG_CAL_REPORT;
141 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC);
166static inline uint16_t mavlink_msg_mag_cal_report_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
167 mavlink_message_t* msg,
168 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)
170#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
171 char buf[MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN];
172 _mav_put_float(buf, 0, fitness);
173 _mav_put_float(buf, 4, ofs_x);
174 _mav_put_float(buf, 8, ofs_y);
175 _mav_put_float(buf, 12, ofs_z);
176 _mav_put_float(buf, 16, diag_x);
177 _mav_put_float(buf, 20, diag_y);
178 _mav_put_float(buf, 24, diag_z);
179 _mav_put_float(buf, 28, offdiag_x);
180 _mav_put_float(buf, 32, offdiag_y);
181 _mav_put_float(buf, 36, offdiag_z);
182 _mav_put_uint8_t(buf, 40, compass_id);
183 _mav_put_uint8_t(buf, 41, cal_mask);
184 _mav_put_uint8_t(buf, 42, cal_status);
185 _mav_put_uint8_t(buf, 43, autosaved);
187 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN);
189 mavlink_mag_cal_report_t packet;
190 packet.fitness = fitness;
191 packet.ofs_x = ofs_x;
192 packet.ofs_y = ofs_y;
193 packet.ofs_z = ofs_z;
194 packet.diag_x = diag_x;
195 packet.diag_y = diag_y;
196 packet.diag_z = diag_z;
197 packet.offdiag_x = offdiag_x;
198 packet.offdiag_y = offdiag_y;
199 packet.offdiag_z = offdiag_z;
200 packet.compass_id = compass_id;
201 packet.cal_mask = cal_mask;
202 packet.cal_status = cal_status;
203 packet.autosaved = autosaved;
205 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN);
208 msg->msgid = MAVLINK_MSG_ID_MAG_CAL_REPORT;
209 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC);
220static 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)
222 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);
234static 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)
236 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);
258#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
260static 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)
262#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
263 char buf[MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN];
264 _mav_put_float(buf, 0, fitness);
265 _mav_put_float(buf, 4, ofs_x);
266 _mav_put_float(buf, 8, ofs_y);
267 _mav_put_float(buf, 12, ofs_z);
268 _mav_put_float(buf, 16, diag_x);
269 _mav_put_float(buf, 20, diag_y);
270 _mav_put_float(buf, 24, diag_z);
271 _mav_put_float(buf, 28, offdiag_x);
272 _mav_put_float(buf, 32, offdiag_y);
273 _mav_put_float(buf, 36, offdiag_z);
274 _mav_put_uint8_t(buf, 40, compass_id);
275 _mav_put_uint8_t(buf, 41, cal_mask);
276 _mav_put_uint8_t(buf, 42, cal_status);
277 _mav_put_uint8_t(buf, 43, autosaved);
279 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, buf, MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC);
281 mavlink_mag_cal_report_t packet;
282 packet.fitness = fitness;
283 packet.ofs_x = ofs_x;
284 packet.ofs_y = ofs_y;
285 packet.ofs_z = ofs_z;
286 packet.diag_x = diag_x;
287 packet.diag_y = diag_y;
288 packet.diag_z = diag_z;
289 packet.offdiag_x = offdiag_x;
290 packet.offdiag_y = offdiag_y;
291 packet.offdiag_z = offdiag_z;
292 packet.compass_id = compass_id;
293 packet.cal_mask = cal_mask;
294 packet.cal_status = cal_status;
295 packet.autosaved = autosaved;
297 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, (
const char *)&packet, MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC);
306static inline void mavlink_msg_mag_cal_report_send_struct(mavlink_channel_t chan,
const mavlink_mag_cal_report_t* mag_cal_report)
308#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
309 mavlink_msg_mag_cal_report_send(chan, 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);
311 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, (
const char *)mag_cal_report, MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC);
315#if MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
323static 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)
325#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
326 char *buf = (
char *)msgbuf;
327 _mav_put_float(buf, 0, fitness);
328 _mav_put_float(buf, 4, ofs_x);
329 _mav_put_float(buf, 8, ofs_y);
330 _mav_put_float(buf, 12, ofs_z);
331 _mav_put_float(buf, 16, diag_x);
332 _mav_put_float(buf, 20, diag_y);
333 _mav_put_float(buf, 24, diag_z);
334 _mav_put_float(buf, 28, offdiag_x);
335 _mav_put_float(buf, 32, offdiag_y);
336 _mav_put_float(buf, 36, offdiag_z);
337 _mav_put_uint8_t(buf, 40, compass_id);
338 _mav_put_uint8_t(buf, 41, cal_mask);
339 _mav_put_uint8_t(buf, 42, cal_status);
340 _mav_put_uint8_t(buf, 43, autosaved);
342 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, buf, MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC);
344 mavlink_mag_cal_report_t *packet = (mavlink_mag_cal_report_t *)msgbuf;
345 packet->fitness = fitness;
346 packet->ofs_x = ofs_x;
347 packet->ofs_y = ofs_y;
348 packet->ofs_z = ofs_z;
349 packet->diag_x = diag_x;
350 packet->diag_y = diag_y;
351 packet->diag_z = diag_z;
352 packet->offdiag_x = offdiag_x;
353 packet->offdiag_y = offdiag_y;
354 packet->offdiag_z = offdiag_z;
355 packet->compass_id = compass_id;
356 packet->cal_mask = cal_mask;
357 packet->cal_status = cal_status;
358 packet->autosaved = autosaved;
360 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MAG_CAL_REPORT, (
const char *)packet, MAVLINK_MSG_ID_MAG_CAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN, MAVLINK_MSG_ID_MAG_CAL_REPORT_CRC);
375static inline uint8_t mavlink_msg_mag_cal_report_get_compass_id(
const mavlink_message_t* msg)
377 return _MAV_RETURN_uint8_t(msg, 40);
385static inline uint8_t mavlink_msg_mag_cal_report_get_cal_mask(
const mavlink_message_t* msg)
387 return _MAV_RETURN_uint8_t(msg, 41);
395static inline uint8_t mavlink_msg_mag_cal_report_get_cal_status(
const mavlink_message_t* msg)
397 return _MAV_RETURN_uint8_t(msg, 42);
405static inline uint8_t mavlink_msg_mag_cal_report_get_autosaved(
const mavlink_message_t* msg)
407 return _MAV_RETURN_uint8_t(msg, 43);
415static inline float mavlink_msg_mag_cal_report_get_fitness(
const mavlink_message_t* msg)
417 return _MAV_RETURN_float(msg, 0);
425static inline float mavlink_msg_mag_cal_report_get_ofs_x(
const mavlink_message_t* msg)
427 return _MAV_RETURN_float(msg, 4);
435static inline float mavlink_msg_mag_cal_report_get_ofs_y(
const mavlink_message_t* msg)
437 return _MAV_RETURN_float(msg, 8);
445static inline float mavlink_msg_mag_cal_report_get_ofs_z(
const mavlink_message_t* msg)
447 return _MAV_RETURN_float(msg, 12);
455static inline float mavlink_msg_mag_cal_report_get_diag_x(
const mavlink_message_t* msg)
457 return _MAV_RETURN_float(msg, 16);
465static inline float mavlink_msg_mag_cal_report_get_diag_y(
const mavlink_message_t* msg)
467 return _MAV_RETURN_float(msg, 20);
475static inline float mavlink_msg_mag_cal_report_get_diag_z(
const mavlink_message_t* msg)
477 return _MAV_RETURN_float(msg, 24);
485static inline float mavlink_msg_mag_cal_report_get_offdiag_x(
const mavlink_message_t* msg)
487 return _MAV_RETURN_float(msg, 28);
495static inline float mavlink_msg_mag_cal_report_get_offdiag_y(
const mavlink_message_t* msg)
497 return _MAV_RETURN_float(msg, 32);
505static inline float mavlink_msg_mag_cal_report_get_offdiag_z(
const mavlink_message_t* msg)
507 return _MAV_RETURN_float(msg, 36);
516static inline void mavlink_msg_mag_cal_report_decode(
const mavlink_message_t* msg, mavlink_mag_cal_report_t* mag_cal_report)
518#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
519 mag_cal_report->fitness = mavlink_msg_mag_cal_report_get_fitness(msg);
520 mag_cal_report->ofs_x = mavlink_msg_mag_cal_report_get_ofs_x(msg);
521 mag_cal_report->ofs_y = mavlink_msg_mag_cal_report_get_ofs_y(msg);
522 mag_cal_report->ofs_z = mavlink_msg_mag_cal_report_get_ofs_z(msg);
523 mag_cal_report->diag_x = mavlink_msg_mag_cal_report_get_diag_x(msg);
524 mag_cal_report->diag_y = mavlink_msg_mag_cal_report_get_diag_y(msg);
525 mag_cal_report->diag_z = mavlink_msg_mag_cal_report_get_diag_z(msg);
526 mag_cal_report->offdiag_x = mavlink_msg_mag_cal_report_get_offdiag_x(msg);
527 mag_cal_report->offdiag_y = mavlink_msg_mag_cal_report_get_offdiag_y(msg);
528 mag_cal_report->offdiag_z = mavlink_msg_mag_cal_report_get_offdiag_z(msg);
529 mag_cal_report->compass_id = mavlink_msg_mag_cal_report_get_compass_id(msg);
530 mag_cal_report->cal_mask = mavlink_msg_mag_cal_report_get_cal_mask(msg);
531 mag_cal_report->cal_status = mavlink_msg_mag_cal_report_get_cal_status(msg);
532 mag_cal_report->autosaved = mavlink_msg_mag_cal_report_get_autosaved(msg);
534 uint8_t len = msg->len < MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN? msg->len : MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN;
535 memset(mag_cal_report, 0, MAVLINK_MSG_ID_MAG_CAL_REPORT_LEN);
536 memcpy(mag_cal_report, _MAV_PAYLOAD(msg), len);