4#define MAVLINK_MSG_ID_ATT_POS_MOCAP 138
14} mavlink_att_pos_mocap_t;
16#define MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN 120
17#define MAVLINK_MSG_ID_ATT_POS_MOCAP_MIN_LEN 36
18#define MAVLINK_MSG_ID_138_LEN 120
19#define MAVLINK_MSG_ID_138_MIN_LEN 36
21#define MAVLINK_MSG_ID_ATT_POS_MOCAP_CRC 109
22#define MAVLINK_MSG_ID_138_CRC 109
24#define MAVLINK_MSG_ATT_POS_MOCAP_FIELD_Q_LEN 4
25#define MAVLINK_MSG_ATT_POS_MOCAP_FIELD_COVARIANCE_LEN 21
27#if MAVLINK_COMMAND_24BIT
28#define MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP {
32 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_att_pos_mocap_t, time_usec) },
33 { "q", NULL, MAVLINK_TYPE_FLOAT, 4
, 8
, offsetof(mavlink_att_pos_mocap_t, q) },
34 { "x", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_att_pos_mocap_t, x) },
35 { "y", NULL, MAVLINK_TYPE_FLOAT, 0
, 28
, offsetof(mavlink_att_pos_mocap_t, y) },
36 { "z", NULL, MAVLINK_TYPE_FLOAT, 0
, 32
, offsetof(mavlink_att_pos_mocap_t, z) },
37 { "covariance", NULL, MAVLINK_TYPE_FLOAT, 21
, 36
, offsetof(mavlink_att_pos_mocap_t, covariance) },
39}
41#define MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP {
44 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_att_pos_mocap_t, time_usec) },
45 { "q", NULL, MAVLINK_TYPE_FLOAT, 4
, 8
, offsetof(mavlink_att_pos_mocap_t, q) },
46 { "x", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_att_pos_mocap_t, x) },
47 { "y", NULL, MAVLINK_TYPE_FLOAT, 0
, 28
, offsetof(mavlink_att_pos_mocap_t, y) },
48 { "z", NULL, MAVLINK_TYPE_FLOAT, 0
, 32
, offsetof(mavlink_att_pos_mocap_t, z) },
49 { "covariance", NULL, MAVLINK_TYPE_FLOAT, 21
, 36
, offsetof(mavlink_att_pos_mocap_t, covariance) },
51}
55
56
57
58
59
60
61
62
63
64
65
66
67
68static inline uint16_t mavlink_msg_att_pos_mocap_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
69 uint64_t time_usec,
const float *q,
float x,
float y,
float z,
const float *covariance)
71#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
73 _mav_put_uint64_t(buf, 0, time_usec);
74 _mav_put_float(buf, 24, x);
75 _mav_put_float(buf, 28, y);
76 _mav_put_float(buf, 32, z);
77 _mav_put_float_array(buf, 8, q, 4);
78 _mav_put_float_array(buf, 36, covariance, 21);
81 mavlink_att_pos_mocap_t packet;
82 packet.time_usec = time_usec;
86 mav_array_memcpy(packet.q, q,
sizeof(
float)*4);
87 mav_array_memcpy(packet.covariance, covariance,
sizeof(
float)*21);
88 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN);
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110static inline uint16_t mavlink_msg_att_pos_mocap_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
111 uint64_t time_usec,
const float *q,
float x,
float y,
float z,
const float *covariance)
113#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
115 _mav_put_uint64_t(buf, 0, time_usec);
116 _mav_put_float(buf, 24, x);
117 _mav_put_float(buf, 28, y);
118 _mav_put_float(buf, 32, z);
119 _mav_put_float_array(buf, 8, q, 4);
120 _mav_put_float_array(buf, 36, covariance, 21);
123 mavlink_att_pos_mocap_t packet;
124 packet.time_usec = time_usec;
128 mav_array_memcpy(packet.q, q,
sizeof(
float)*4);
129 mav_array_memcpy(packet.covariance, covariance,
sizeof(
float)*21);
130 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN);
135 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ATT_POS_MOCAP_MIN_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_CRC);
142
143
144
145
146
147
148
149
150
151
152
153
154
155static inline uint16_t mavlink_msg_att_pos_mocap_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
156 mavlink_message_t* msg,
157 uint64_t time_usec,
const float *q,
float x,
float y,
float z,
const float *covariance)
159#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
161 _mav_put_uint64_t(buf, 0, time_usec);
162 _mav_put_float(buf, 24, x);
163 _mav_put_float(buf, 28, y);
164 _mav_put_float(buf, 32, z);
165 _mav_put_float_array(buf, 8, q, 4);
166 _mav_put_float_array(buf, 36, covariance, 21);
169 mavlink_att_pos_mocap_t packet;
170 packet.time_usec = time_usec;
174 mav_array_memcpy(packet.q, q,
sizeof(
float)*4);
175 mav_array_memcpy(packet.covariance, covariance,
sizeof(
float)*21);
176 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN);
184
185
186
187
188
189
190
191static inline uint16_t mavlink_msg_att_pos_mocap_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_att_pos_mocap_t* att_pos_mocap)
193 return mavlink_msg_att_pos_mocap_pack(system_id, component_id, msg, att_pos_mocap->time_usec, att_pos_mocap->q, att_pos_mocap->x, att_pos_mocap->y, att_pos_mocap->z, att_pos_mocap->covariance);
197
198
199
200
201
202
203
204
205static inline uint16_t mavlink_msg_att_pos_mocap_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_att_pos_mocap_t* att_pos_mocap)
207 return mavlink_msg_att_pos_mocap_pack_chan(system_id, component_id, chan, msg, att_pos_mocap->time_usec, att_pos_mocap->q, att_pos_mocap->x, att_pos_mocap->y, att_pos_mocap->z, att_pos_mocap->covariance);
211
212
213
214
215
216
217
218
219static inline uint16_t mavlink_msg_att_pos_mocap_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_att_pos_mocap_t* att_pos_mocap)
221 return mavlink_msg_att_pos_mocap_pack_status(system_id, component_id, _status, msg, att_pos_mocap->time_usec, att_pos_mocap->q, att_pos_mocap->x, att_pos_mocap->y, att_pos_mocap->z, att_pos_mocap->covariance);
225
226
227
228
229
230
231
232
233
234
235#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
237static inline void mavlink_msg_att_pos_mocap_send(mavlink_channel_t chan, uint64_t time_usec,
const float *q,
float x,
float y,
float z,
const float *covariance)
239#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
240 char buf[MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN];
241 _mav_put_uint64_t(buf, 0, time_usec);
242 _mav_put_float(buf, 24, x);
243 _mav_put_float(buf, 28, y);
244 _mav_put_float(buf, 32, z);
245 _mav_put_float_array(buf, 8, q, 4);
246 _mav_put_float_array(buf, 36, covariance, 21);
247 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATT_POS_MOCAP, buf, MAVLINK_MSG_ID_ATT_POS_MOCAP_MIN_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_CRC);
249 mavlink_att_pos_mocap_t packet;
250 packet.time_usec = time_usec;
254 mav_array_memcpy(packet.q, q,
sizeof(
float)*4);
255 mav_array_memcpy(packet.covariance, covariance,
sizeof(
float)*21);
256 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATT_POS_MOCAP, (
const char *)&packet, MAVLINK_MSG_ID_ATT_POS_MOCAP_MIN_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_CRC);
261
262
263
264
265static inline void mavlink_msg_att_pos_mocap_send_struct(mavlink_channel_t chan,
const mavlink_att_pos_mocap_t* att_pos_mocap)
267#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
268 mavlink_msg_att_pos_mocap_send(chan, att_pos_mocap->time_usec, att_pos_mocap->q, att_pos_mocap->x, att_pos_mocap->y, att_pos_mocap->z, att_pos_mocap->covariance);
270 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATT_POS_MOCAP, (
const char *)att_pos_mocap, MAVLINK_MSG_ID_ATT_POS_MOCAP_MIN_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_CRC);
274#if MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN <= MAVLINK_MAX_PAYLOAD_LEN
276
277
278
279
280
281
282static inline void mavlink_msg_att_pos_mocap_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec,
const float *q,
float x,
float y,
float z,
const float *covariance)
284#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
285 char *buf = (
char *)msgbuf;
286 _mav_put_uint64_t(buf, 0, time_usec);
287 _mav_put_float(buf, 24, x);
288 _mav_put_float(buf, 28, y);
289 _mav_put_float(buf, 32, z);
290 _mav_put_float_array(buf, 8, q, 4);
291 _mav_put_float_array(buf, 36, covariance, 21);
292 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATT_POS_MOCAP, buf, MAVLINK_MSG_ID_ATT_POS_MOCAP_MIN_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_CRC);
294 mavlink_att_pos_mocap_t *packet = (mavlink_att_pos_mocap_t *)msgbuf;
295 packet->time_usec = time_usec;
299 mav_array_memcpy(packet->q, q,
sizeof(
float)*4);
300 mav_array_memcpy(packet->covariance, covariance,
sizeof(
float)*21);
301 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATT_POS_MOCAP, (
const char *)packet, MAVLINK_MSG_ID_ATT_POS_MOCAP_MIN_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN, MAVLINK_MSG_ID_ATT_POS_MOCAP_CRC);
312
313
314
315
316static inline uint64_t mavlink_msg_att_pos_mocap_get_time_usec(
const mavlink_message_t* msg)
318 return _MAV_RETURN_uint64_t(msg, 0);
322
323
324
325
326static inline uint16_t mavlink_msg_att_pos_mocap_get_q(
const mavlink_message_t* msg,
float *q)
328 return _MAV_RETURN_float_array(msg, q, 4, 8);
332
333
334
335
336static inline float mavlink_msg_att_pos_mocap_get_x(
const mavlink_message_t* msg)
338 return _MAV_RETURN_float(msg, 24);
342
343
344
345
346static inline float mavlink_msg_att_pos_mocap_get_y(
const mavlink_message_t* msg)
348 return _MAV_RETURN_float(msg, 28);
352
353
354
355
356static inline float mavlink_msg_att_pos_mocap_get_z(
const mavlink_message_t* msg)
358 return _MAV_RETURN_float(msg, 32);
362
363
364
365
366static inline uint16_t mavlink_msg_att_pos_mocap_get_covariance(
const mavlink_message_t* msg,
float *covariance)
368 return _MAV_RETURN_float_array(msg, covariance, 21, 36);
372
373
374
375
376
377static inline void mavlink_msg_att_pos_mocap_decode(
const mavlink_message_t* msg, mavlink_att_pos_mocap_t* att_pos_mocap)
379#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
380 att_pos_mocap->time_usec = mavlink_msg_att_pos_mocap_get_time_usec(msg);
381 mavlink_msg_att_pos_mocap_get_q(msg, att_pos_mocap->q);
382 att_pos_mocap->x = mavlink_msg_att_pos_mocap_get_x(msg);
383 att_pos_mocap->y = mavlink_msg_att_pos_mocap_get_y(msg);
384 att_pos_mocap->z = mavlink_msg_att_pos_mocap_get_z(msg);
385 mavlink_msg_att_pos_mocap_get_covariance(msg, att_pos_mocap->covariance);
387 uint8_t len = msg->len < MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN? msg->len : MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN;
388 memset(att_pos_mocap, 0, MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN);
389 memcpy(att_pos_mocap, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_ATT_POS_MOCAP_CRC
Definition: mavlink_msg_att_pos_mocap.h:21
#define MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN
Definition: mavlink_msg_att_pos_mocap.h:16
#define MAVLINK_MSG_ID_ATT_POS_MOCAP_MIN_LEN
Definition: mavlink_msg_att_pos_mocap.h:17
#define MAVLINK_MSG_ID_ATT_POS_MOCAP
Definition: mavlink_msg_att_pos_mocap.h:4
Definition: mavlink_msg_att_pos_mocap.h:7
uint64_t time_usec
Definition: mavlink_msg_att_pos_mocap.h:8
float y
Definition: mavlink_msg_att_pos_mocap.h:11
float q[4]
Definition: mavlink_msg_att_pos_mocap.h:9
float x
Definition: mavlink_msg_att_pos_mocap.h:10
float covariance[21]
Definition: mavlink_msg_att_pos_mocap.h:13
float z
Definition: mavlink_msg_att_pos_mocap.h:12