4#define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE 104
16} mavlink_vicon_position_estimate_t;
18#define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN 116
19#define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_MIN_LEN 32
20#define MAVLINK_MSG_ID_104_LEN 116
21#define MAVLINK_MSG_ID_104_MIN_LEN 32
23#define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_CRC 56
24#define MAVLINK_MSG_ID_104_CRC 56
26#define MAVLINK_MSG_VICON_POSITION_ESTIMATE_FIELD_COVARIANCE_LEN 21
28#if MAVLINK_COMMAND_24BIT
29#define MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE {
31 "VICON_POSITION_ESTIMATE",
33 { { "usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_vicon_position_estimate_t, usec) },
34 { "x", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_vicon_position_estimate_t, x) },
35 { "y", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_vicon_position_estimate_t, y) },
36 { "z", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_vicon_position_estimate_t, z) },
37 { "roll", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_vicon_position_estimate_t, roll) },
38 { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_vicon_position_estimate_t, pitch) },
39 { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0
, 28
, offsetof(mavlink_vicon_position_estimate_t, yaw) },
40 { "covariance", NULL, MAVLINK_TYPE_FLOAT, 21
, 32
, offsetof(mavlink_vicon_position_estimate_t, covariance) },
42}
44#define MAVLINK_MESSAGE_INFO_VICON_POSITION_ESTIMATE {
45 "VICON_POSITION_ESTIMATE",
47 { { "usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_vicon_position_estimate_t, usec) },
48 { "x", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_vicon_position_estimate_t, x) },
49 { "y", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_vicon_position_estimate_t, y) },
50 { "z", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_vicon_position_estimate_t, z) },
51 { "roll", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_vicon_position_estimate_t, roll) },
52 { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_vicon_position_estimate_t, pitch) },
53 { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0
, 28
, offsetof(mavlink_vicon_position_estimate_t, yaw) },
54 { "covariance", NULL, MAVLINK_TYPE_FLOAT, 21
, 32
, offsetof(mavlink_vicon_position_estimate_t, covariance) },
56}
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75static inline uint16_t mavlink_msg_vicon_position_estimate_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
76 uint64_t usec,
float x,
float y,
float z,
float roll,
float pitch,
float yaw,
const float *covariance)
78#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
80 _mav_put_uint64_t(buf, 0, usec);
81 _mav_put_float(buf, 8, x);
82 _mav_put_float(buf, 12, y);
83 _mav_put_float(buf, 16, z);
84 _mav_put_float(buf, 20, roll);
85 _mav_put_float(buf, 24, pitch);
86 _mav_put_float(buf, 28, yaw);
87 _mav_put_float_array(buf, 32, covariance, 21);
90 mavlink_vicon_position_estimate_t packet;
98 mav_array_memcpy(packet.covariance, covariance,
sizeof(
float)*21);
99 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN);
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123static inline uint16_t mavlink_msg_vicon_position_estimate_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
124 uint64_t usec,
float x,
float y,
float z,
float roll,
float pitch,
float yaw,
const float *covariance)
126#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
128 _mav_put_uint64_t(buf, 0, usec);
129 _mav_put_float(buf, 8, x);
130 _mav_put_float(buf, 12, y);
131 _mav_put_float(buf, 16, z);
132 _mav_put_float(buf, 20, roll);
133 _mav_put_float(buf, 24, pitch);
134 _mav_put_float(buf, 28, yaw);
135 _mav_put_float_array(buf, 32, covariance, 21);
138 mavlink_vicon_position_estimate_t packet;
144 packet.pitch = pitch;
146 mav_array_memcpy(packet.covariance, covariance,
sizeof(
float)*21);
147 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN);
152 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_MIN_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_CRC);
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174static inline uint16_t mavlink_msg_vicon_position_estimate_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
175 mavlink_message_t* msg,
176 uint64_t usec,
float x,
float y,
float z,
float roll,
float pitch,
float yaw,
const float *covariance)
178#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
180 _mav_put_uint64_t(buf, 0, usec);
181 _mav_put_float(buf, 8, x);
182 _mav_put_float(buf, 12, y);
183 _mav_put_float(buf, 16, z);
184 _mav_put_float(buf, 20, roll);
185 _mav_put_float(buf, 24, pitch);
186 _mav_put_float(buf, 28, yaw);
187 _mav_put_float_array(buf, 32, covariance, 21);
190 mavlink_vicon_position_estimate_t packet;
196 packet.pitch = pitch;
198 mav_array_memcpy(packet.covariance, covariance,
sizeof(
float)*21);
199 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN);
207
208
209
210
211
212
213
214static inline uint16_t mavlink_msg_vicon_position_estimate_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_vicon_position_estimate_t* vicon_position_estimate)
216 return mavlink_msg_vicon_position_estimate_pack(system_id, component_id, msg, vicon_position_estimate->usec, vicon_position_estimate->x, vicon_position_estimate->y, vicon_position_estimate->z, vicon_position_estimate->roll, vicon_position_estimate->pitch, vicon_position_estimate->yaw, vicon_position_estimate->covariance);
220
221
222
223
224
225
226
227
228static inline uint16_t mavlink_msg_vicon_position_estimate_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_vicon_position_estimate_t* vicon_position_estimate)
230 return mavlink_msg_vicon_position_estimate_pack_chan(system_id, component_id, chan, msg, vicon_position_estimate->usec, vicon_position_estimate->x, vicon_position_estimate->y, vicon_position_estimate->z, vicon_position_estimate->roll, vicon_position_estimate->pitch, vicon_position_estimate->yaw, vicon_position_estimate->covariance);
234
235
236
237
238
239
240
241
242static inline uint16_t mavlink_msg_vicon_position_estimate_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_vicon_position_estimate_t* vicon_position_estimate)
244 return mavlink_msg_vicon_position_estimate_pack_status(system_id, component_id, _status, msg, vicon_position_estimate->usec, vicon_position_estimate->x, vicon_position_estimate->y, vicon_position_estimate->z, vicon_position_estimate->roll, vicon_position_estimate->pitch, vicon_position_estimate->yaw, vicon_position_estimate->covariance);
248
249
250
251
252
253
254
255
256
257
258
259
260#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
262static inline void mavlink_msg_vicon_position_estimate_send(mavlink_channel_t chan, uint64_t usec,
float x,
float y,
float z,
float roll,
float pitch,
float yaw,
const float *covariance)
264#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
265 char buf[MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN];
266 _mav_put_uint64_t(buf, 0, usec);
267 _mav_put_float(buf, 8, x);
268 _mav_put_float(buf, 12, y);
269 _mav_put_float(buf, 16, z);
270 _mav_put_float(buf, 20, roll);
271 _mav_put_float(buf, 24, pitch);
272 _mav_put_float(buf, 28, yaw);
273 _mav_put_float_array(buf, 32, covariance, 21);
274 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE, buf, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_MIN_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_CRC);
276 mavlink_vicon_position_estimate_t packet;
282 packet.pitch = pitch;
284 mav_array_memcpy(packet.covariance, covariance,
sizeof(
float)*21);
285 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE, (
const char *)&packet, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_MIN_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_CRC);
290
291
292
293
294static inline void mavlink_msg_vicon_position_estimate_send_struct(mavlink_channel_t chan,
const mavlink_vicon_position_estimate_t* vicon_position_estimate)
296#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
297 mavlink_msg_vicon_position_estimate_send(chan, vicon_position_estimate->usec, vicon_position_estimate->x, vicon_position_estimate->y, vicon_position_estimate->z, vicon_position_estimate->roll, vicon_position_estimate->pitch, vicon_position_estimate->yaw, vicon_position_estimate->covariance);
299 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE, (
const char *)vicon_position_estimate, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_MIN_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_CRC);
303#if MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
305
306
307
308
309
310
311static inline void mavlink_msg_vicon_position_estimate_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t usec,
float x,
float y,
float z,
float roll,
float pitch,
float yaw,
const float *covariance)
313#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
314 char *buf = (
char *)msgbuf;
315 _mav_put_uint64_t(buf, 0, usec);
316 _mav_put_float(buf, 8, x);
317 _mav_put_float(buf, 12, y);
318 _mav_put_float(buf, 16, z);
319 _mav_put_float(buf, 20, roll);
320 _mav_put_float(buf, 24, pitch);
321 _mav_put_float(buf, 28, yaw);
322 _mav_put_float_array(buf, 32, covariance, 21);
323 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE, buf, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_MIN_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_CRC);
325 mavlink_vicon_position_estimate_t *packet = (mavlink_vicon_position_estimate_t *)msgbuf;
331 packet->pitch = pitch;
333 mav_array_memcpy(packet->covariance, covariance,
sizeof(
float)*21);
334 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE, (
const char *)packet, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_MIN_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_CRC);
345
346
347
348
349static inline uint64_t mavlink_msg_vicon_position_estimate_get_usec(
const mavlink_message_t* msg)
351 return _MAV_RETURN_uint64_t(msg, 0);
355
356
357
358
359static inline float mavlink_msg_vicon_position_estimate_get_x(
const mavlink_message_t* msg)
361 return _MAV_RETURN_float(msg, 8);
365
366
367
368
369static inline float mavlink_msg_vicon_position_estimate_get_y(
const mavlink_message_t* msg)
371 return _MAV_RETURN_float(msg, 12);
375
376
377
378
379static inline float mavlink_msg_vicon_position_estimate_get_z(
const mavlink_message_t* msg)
381 return _MAV_RETURN_float(msg, 16);
385
386
387
388
389static inline float mavlink_msg_vicon_position_estimate_get_roll(
const mavlink_message_t* msg)
391 return _MAV_RETURN_float(msg, 20);
395
396
397
398
399static inline float mavlink_msg_vicon_position_estimate_get_pitch(
const mavlink_message_t* msg)
401 return _MAV_RETURN_float(msg, 24);
405
406
407
408
409static inline float mavlink_msg_vicon_position_estimate_get_yaw(
const mavlink_message_t* msg)
411 return _MAV_RETURN_float(msg, 28);
415
416
417
418
419static inline uint16_t mavlink_msg_vicon_position_estimate_get_covariance(
const mavlink_message_t* msg,
float *covariance)
421 return _MAV_RETURN_float_array(msg, covariance, 21, 32);
425
426
427
428
429
430static inline void mavlink_msg_vicon_position_estimate_decode(
const mavlink_message_t* msg, mavlink_vicon_position_estimate_t* vicon_position_estimate)
432#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
433 vicon_position_estimate->usec = mavlink_msg_vicon_position_estimate_get_usec(msg);
434 vicon_position_estimate->x = mavlink_msg_vicon_position_estimate_get_x(msg);
435 vicon_position_estimate->y = mavlink_msg_vicon_position_estimate_get_y(msg);
436 vicon_position_estimate->z = mavlink_msg_vicon_position_estimate_get_z(msg);
437 vicon_position_estimate->roll = mavlink_msg_vicon_position_estimate_get_roll(msg);
438 vicon_position_estimate->pitch = mavlink_msg_vicon_position_estimate_get_pitch(msg);
439 vicon_position_estimate->yaw = mavlink_msg_vicon_position_estimate_get_yaw(msg);
440 mavlink_msg_vicon_position_estimate_get_covariance(msg, vicon_position_estimate->covariance);
442 uint8_t len = msg->len < MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN? msg->len : MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN;
443 memset(vicon_position_estimate, 0, MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN);
444 memcpy(vicon_position_estimate, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_MIN_LEN
Definition: mavlink_msg_vicon_position_estimate.h:19
#define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_LEN
Definition: mavlink_msg_vicon_position_estimate.h:18
#define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE
Definition: mavlink_msg_vicon_position_estimate.h:4
#define MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE_CRC
Definition: mavlink_msg_vicon_position_estimate.h:23
Definition: mavlink_msg_vicon_position_estimate.h:7
float roll
Definition: mavlink_msg_vicon_position_estimate.h:12
float pitch
Definition: mavlink_msg_vicon_position_estimate.h:13
float yaw
Definition: mavlink_msg_vicon_position_estimate.h:14
float y
Definition: mavlink_msg_vicon_position_estimate.h:10
float x
Definition: mavlink_msg_vicon_position_estimate.h:9
uint64_t usec
Definition: mavlink_msg_vicon_position_estimate.h:8
float covariance[21]
Definition: mavlink_msg_vicon_position_estimate.h:15
float z
Definition: mavlink_msg_vicon_position_estimate.h:11