4#define MAVLINK_MSG_ID_ODOMETRY 331
28#define MAVLINK_MSG_ID_ODOMETRY_LEN 233
29#define MAVLINK_MSG_ID_ODOMETRY_MIN_LEN 230
30#define MAVLINK_MSG_ID_331_LEN 233
31#define MAVLINK_MSG_ID_331_MIN_LEN 230
33#define MAVLINK_MSG_ID_ODOMETRY_CRC 91
34#define MAVLINK_MSG_ID_331_CRC 91
36#define MAVLINK_MSG_ODOMETRY_FIELD_Q_LEN 4
37#define MAVLINK_MSG_ODOMETRY_FIELD_POSE_COVARIANCE_LEN 21
38#define MAVLINK_MSG_ODOMETRY_FIELD_VELOCITY_COVARIANCE_LEN 21
40#if MAVLINK_COMMAND_24BIT
41#define MAVLINK_MESSAGE_INFO_ODOMETRY {
45 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_odometry_t, time_usec) },
46 { "frame_id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 228
, offsetof(mavlink_odometry_t, frame_id) },
47 { "child_frame_id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 229
, offsetof(mavlink_odometry_t, child_frame_id) },
48 { "x", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_odometry_t, x) },
49 { "y", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_odometry_t, y) },
50 { "z", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_odometry_t, z) },
51 { "q", NULL, MAVLINK_TYPE_FLOAT, 4
, 20
, offsetof(mavlink_odometry_t, q) },
52 { "vx", NULL, MAVLINK_TYPE_FLOAT, 0
, 36
, offsetof(mavlink_odometry_t, vx) },
53 { "vy", NULL, MAVLINK_TYPE_FLOAT, 0
, 40
, offsetof(mavlink_odometry_t, vy) },
54 { "vz", NULL, MAVLINK_TYPE_FLOAT, 0
, 44
, offsetof(mavlink_odometry_t, vz) },
55 { "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0
, 48
, offsetof(mavlink_odometry_t, rollspeed) },
56 { "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0
, 52
, offsetof(mavlink_odometry_t, pitchspeed) },
57 { "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0
, 56
, offsetof(mavlink_odometry_t, yawspeed) },
58 { "pose_covariance", NULL, MAVLINK_TYPE_FLOAT, 21
, 60
, offsetof(mavlink_odometry_t, pose_covariance) },
59 { "velocity_covariance", NULL, MAVLINK_TYPE_FLOAT, 21
, 144
, offsetof(mavlink_odometry_t, velocity_covariance) },
60 { "reset_counter", NULL, MAVLINK_TYPE_UINT8_T, 0
, 230
, offsetof(mavlink_odometry_t, reset_counter) },
61 { "estimator_type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 231
, offsetof(mavlink_odometry_t, estimator_type) },
62 { "quality", NULL, MAVLINK_TYPE_INT8_T, 0
, 232
, offsetof(mavlink_odometry_t, quality) },
64}
66#define MAVLINK_MESSAGE_INFO_ODOMETRY {
69 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_odometry_t, time_usec) },
70 { "frame_id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 228
, offsetof(mavlink_odometry_t, frame_id) },
71 { "child_frame_id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 229
, offsetof(mavlink_odometry_t, child_frame_id) },
72 { "x", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_odometry_t, x) },
73 { "y", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_odometry_t, y) },
74 { "z", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_odometry_t, z) },
75 { "q", NULL, MAVLINK_TYPE_FLOAT, 4
, 20
, offsetof(mavlink_odometry_t, q) },
76 { "vx", NULL, MAVLINK_TYPE_FLOAT, 0
, 36
, offsetof(mavlink_odometry_t, vx) },
77 { "vy", NULL, MAVLINK_TYPE_FLOAT, 0
, 40
, offsetof(mavlink_odometry_t, vy) },
78 { "vz", NULL, MAVLINK_TYPE_FLOAT, 0
, 44
, offsetof(mavlink_odometry_t, vz) },
79 { "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0
, 48
, offsetof(mavlink_odometry_t, rollspeed) },
80 { "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0
, 52
, offsetof(mavlink_odometry_t, pitchspeed) },
81 { "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0
, 56
, offsetof(mavlink_odometry_t, yawspeed) },
82 { "pose_covariance", NULL, MAVLINK_TYPE_FLOAT, 21
, 60
, offsetof(mavlink_odometry_t, pose_covariance) },
83 { "velocity_covariance", NULL, MAVLINK_TYPE_FLOAT, 21
, 144
, offsetof(mavlink_odometry_t, velocity_covariance) },
84 { "reset_counter", NULL, MAVLINK_TYPE_UINT8_T, 0
, 230
, offsetof(mavlink_odometry_t, reset_counter) },
85 { "estimator_type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 231
, offsetof(mavlink_odometry_t, estimator_type) },
86 { "quality", NULL, MAVLINK_TYPE_INT8_T, 0
, 232
, offsetof(mavlink_odometry_t, quality) },
88}
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117static inline uint16_t mavlink_msg_odometry_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
118 uint64_t time_usec, uint8_t frame_id, uint8_t child_frame_id,
float x,
float y,
float z,
const float *q,
float vx,
float vy,
float vz,
float rollspeed,
float pitchspeed,
float yawspeed,
const float *pose_covariance,
const float *velocity_covariance, uint8_t reset_counter, uint8_t estimator_type, int8_t quality)
120#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
122 _mav_put_uint64_t(buf, 0, time_usec);
123 _mav_put_float(buf, 8, x);
124 _mav_put_float(buf, 12, y);
125 _mav_put_float(buf, 16, z);
126 _mav_put_float(buf, 36, vx);
127 _mav_put_float(buf, 40, vy);
128 _mav_put_float(buf, 44, vz);
129 _mav_put_float(buf, 48, rollspeed);
130 _mav_put_float(buf, 52, pitchspeed);
131 _mav_put_float(buf, 56, yawspeed);
132 _mav_put_uint8_t(buf, 228, frame_id);
133 _mav_put_uint8_t(buf, 229, child_frame_id);
134 _mav_put_uint8_t(buf, 230, reset_counter);
135 _mav_put_uint8_t(buf, 231, estimator_type);
136 _mav_put_int8_t(buf, 232, quality);
137 _mav_put_float_array(buf, 20, q, 4);
138 _mav_put_float_array(buf, 60, pose_covariance, 21);
139 _mav_put_float_array(buf, 144, velocity_covariance, 21);
142 mavlink_odometry_t packet;
143 packet.time_usec = time_usec;
150 packet.rollspeed = rollspeed;
151 packet.pitchspeed = pitchspeed;
152 packet.yawspeed = yawspeed;
153 packet.frame_id = frame_id;
154 packet.child_frame_id = child_frame_id;
155 packet.reset_counter = reset_counter;
156 packet.estimator_type = estimator_type;
157 packet.quality = quality;
158 mav_array_memcpy(packet.q, q,
sizeof(
float)*4);
159 mav_array_memcpy(packet.pose_covariance, pose_covariance,
sizeof(
float)*21);
160 mav_array_memcpy(packet.velocity_covariance, velocity_covariance,
sizeof(
float)*21);
161 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ODOMETRY_LEN);
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195static inline uint16_t mavlink_msg_odometry_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
196 uint64_t time_usec, uint8_t frame_id, uint8_t child_frame_id,
float x,
float y,
float z,
const float *q,
float vx,
float vy,
float vz,
float rollspeed,
float pitchspeed,
float yawspeed,
const float *pose_covariance,
const float *velocity_covariance, uint8_t reset_counter, uint8_t estimator_type, int8_t quality)
198#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
200 _mav_put_uint64_t(buf, 0, time_usec);
201 _mav_put_float(buf, 8, x);
202 _mav_put_float(buf, 12, y);
203 _mav_put_float(buf, 16, z);
204 _mav_put_float(buf, 36, vx);
205 _mav_put_float(buf, 40, vy);
206 _mav_put_float(buf, 44, vz);
207 _mav_put_float(buf, 48, rollspeed);
208 _mav_put_float(buf, 52, pitchspeed);
209 _mav_put_float(buf, 56, yawspeed);
210 _mav_put_uint8_t(buf, 228, frame_id);
211 _mav_put_uint8_t(buf, 229, child_frame_id);
212 _mav_put_uint8_t(buf, 230, reset_counter);
213 _mav_put_uint8_t(buf, 231, estimator_type);
214 _mav_put_int8_t(buf, 232, quality);
215 _mav_put_float_array(buf, 20, q, 4);
216 _mav_put_float_array(buf, 60, pose_covariance, 21);
217 _mav_put_float_array(buf, 144, velocity_covariance, 21);
220 mavlink_odometry_t packet;
221 packet.time_usec = time_usec;
228 packet.rollspeed = rollspeed;
229 packet.pitchspeed = pitchspeed;
230 packet.yawspeed = yawspeed;
231 packet.frame_id = frame_id;
232 packet.child_frame_id = child_frame_id;
233 packet.reset_counter = reset_counter;
234 packet.estimator_type = estimator_type;
235 packet.quality = quality;
236 mav_array_memcpy(packet.q, q,
sizeof(
float)*4);
237 mav_array_memcpy(packet.pose_covariance, pose_covariance,
sizeof(
float)*21);
238 mav_array_memcpy(packet.velocity_covariance, velocity_covariance,
sizeof(
float)*21);
239 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ODOMETRY_LEN);
244 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ODOMETRY_MIN_LEN, MAVLINK_MSG_ID_ODOMETRY_LEN, MAVLINK_MSG_ID_ODOMETRY_CRC);
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276static inline uint16_t mavlink_msg_odometry_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
277 mavlink_message_t* msg,
278 uint64_t time_usec,uint8_t frame_id,uint8_t child_frame_id,
float x,
float y,
float z,
const float *q,
float vx,
float vy,
float vz,
float rollspeed,
float pitchspeed,
float yawspeed,
const float *pose_covariance,
const float *velocity_covariance,uint8_t reset_counter,uint8_t estimator_type,int8_t quality)
280#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
282 _mav_put_uint64_t(buf, 0, time_usec);
283 _mav_put_float(buf, 8, x);
284 _mav_put_float(buf, 12, y);
285 _mav_put_float(buf, 16, z);
286 _mav_put_float(buf, 36, vx);
287 _mav_put_float(buf, 40, vy);
288 _mav_put_float(buf, 44, vz);
289 _mav_put_float(buf, 48, rollspeed);
290 _mav_put_float(buf, 52, pitchspeed);
291 _mav_put_float(buf, 56, yawspeed);
292 _mav_put_uint8_t(buf, 228, frame_id);
293 _mav_put_uint8_t(buf, 229, child_frame_id);
294 _mav_put_uint8_t(buf, 230, reset_counter);
295 _mav_put_uint8_t(buf, 231, estimator_type);
296 _mav_put_int8_t(buf, 232, quality);
297 _mav_put_float_array(buf, 20, q, 4);
298 _mav_put_float_array(buf, 60, pose_covariance, 21);
299 _mav_put_float_array(buf, 144, velocity_covariance, 21);
302 mavlink_odometry_t packet;
303 packet.time_usec = time_usec;
310 packet.rollspeed = rollspeed;
311 packet.pitchspeed = pitchspeed;
312 packet.yawspeed = yawspeed;
313 packet.frame_id = frame_id;
314 packet.child_frame_id = child_frame_id;
315 packet.reset_counter = reset_counter;
316 packet.estimator_type = estimator_type;
317 packet.quality = quality;
318 mav_array_memcpy(packet.q, q,
sizeof(
float)*4);
319 mav_array_memcpy(packet.pose_covariance, pose_covariance,
sizeof(
float)*21);
320 mav_array_memcpy(packet.velocity_covariance, velocity_covariance,
sizeof(
float)*21);
321 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ODOMETRY_LEN);
329
330
331
332
333
334
335
336static inline uint16_t mavlink_msg_odometry_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_odometry_t* odometry)
338 return mavlink_msg_odometry_pack(system_id, component_id, msg, odometry->time_usec, odometry->frame_id, odometry->child_frame_id, odometry->x, odometry->y, odometry->z, odometry->q, odometry->vx, odometry->vy, odometry->vz, odometry->rollspeed, odometry->pitchspeed, odometry->yawspeed, odometry->pose_covariance, odometry->velocity_covariance, odometry->reset_counter, odometry->estimator_type, odometry->quality);
342
343
344
345
346
347
348
349
350static inline uint16_t mavlink_msg_odometry_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_odometry_t* odometry)
352 return mavlink_msg_odometry_pack_chan(system_id, component_id, chan, msg, odometry->time_usec, odometry->frame_id, odometry->child_frame_id, odometry->x, odometry->y, odometry->z, odometry->q, odometry->vx, odometry->vy, odometry->vz, odometry->rollspeed, odometry->pitchspeed, odometry->yawspeed, odometry->pose_covariance, odometry->velocity_covariance, odometry->reset_counter, odometry->estimator_type, odometry->quality);
356
357
358
359
360
361
362
363
364static inline uint16_t mavlink_msg_odometry_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_odometry_t* odometry)
366 return mavlink_msg_odometry_pack_status(system_id, component_id, _status, msg, odometry->time_usec, odometry->frame_id, odometry->child_frame_id, odometry->x, odometry->y, odometry->z, odometry->q, odometry->vx, odometry->vy, odometry->vz, odometry->rollspeed, odometry->pitchspeed, odometry->yawspeed, odometry->pose_covariance, odometry->velocity_covariance, odometry->reset_counter, odometry->estimator_type, odometry->quality);
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
394static inline void mavlink_msg_odometry_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t frame_id, uint8_t child_frame_id,
float x,
float y,
float z,
const float *q,
float vx,
float vy,
float vz,
float rollspeed,
float pitchspeed,
float yawspeed,
const float *pose_covariance,
const float *velocity_covariance, uint8_t reset_counter, uint8_t estimator_type, int8_t quality)
396#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
397 char buf[MAVLINK_MSG_ID_ODOMETRY_LEN];
398 _mav_put_uint64_t(buf, 0, time_usec);
399 _mav_put_float(buf, 8, x);
400 _mav_put_float(buf, 12, y);
401 _mav_put_float(buf, 16, z);
402 _mav_put_float(buf, 36, vx);
403 _mav_put_float(buf, 40, vy);
404 _mav_put_float(buf, 44, vz);
405 _mav_put_float(buf, 48, rollspeed);
406 _mav_put_float(buf, 52, pitchspeed);
407 _mav_put_float(buf, 56, yawspeed);
408 _mav_put_uint8_t(buf, 228, frame_id);
409 _mav_put_uint8_t(buf, 229, child_frame_id);
410 _mav_put_uint8_t(buf, 230, reset_counter);
411 _mav_put_uint8_t(buf, 231, estimator_type);
412 _mav_put_int8_t(buf, 232, quality);
413 _mav_put_float_array(buf, 20, q, 4);
414 _mav_put_float_array(buf, 60, pose_covariance, 21);
415 _mav_put_float_array(buf, 144, velocity_covariance, 21);
416 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ODOMETRY, buf, MAVLINK_MSG_ID_ODOMETRY_MIN_LEN, MAVLINK_MSG_ID_ODOMETRY_LEN, MAVLINK_MSG_ID_ODOMETRY_CRC);
418 mavlink_odometry_t packet;
419 packet.time_usec = time_usec;
426 packet.rollspeed = rollspeed;
427 packet.pitchspeed = pitchspeed;
428 packet.yawspeed = yawspeed;
429 packet.frame_id = frame_id;
430 packet.child_frame_id = child_frame_id;
431 packet.reset_counter = reset_counter;
432 packet.estimator_type = estimator_type;
433 packet.quality = quality;
434 mav_array_memcpy(packet.q, q,
sizeof(
float)*4);
435 mav_array_memcpy(packet.pose_covariance, pose_covariance,
sizeof(
float)*21);
436 mav_array_memcpy(packet.velocity_covariance, velocity_covariance,
sizeof(
float)*21);
437 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ODOMETRY, (
const char *)&packet, MAVLINK_MSG_ID_ODOMETRY_MIN_LEN, MAVLINK_MSG_ID_ODOMETRY_LEN, MAVLINK_MSG_ID_ODOMETRY_CRC);
442
443
444
445
446static inline void mavlink_msg_odometry_send_struct(mavlink_channel_t chan,
const mavlink_odometry_t* odometry)
448#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
449 mavlink_msg_odometry_send(chan, odometry->time_usec, odometry->frame_id, odometry->child_frame_id, odometry->x, odometry->y, odometry->z, odometry->q, odometry->vx, odometry->vy, odometry->vz, odometry->rollspeed, odometry->pitchspeed, odometry->yawspeed, odometry->pose_covariance, odometry->velocity_covariance, odometry->reset_counter, odometry->estimator_type, odometry->quality);
451 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ODOMETRY, (
const char *)odometry, MAVLINK_MSG_ID_ODOMETRY_MIN_LEN, MAVLINK_MSG_ID_ODOMETRY_LEN, MAVLINK_MSG_ID_ODOMETRY_CRC);
455#if MAVLINK_MSG_ID_ODOMETRY_LEN <= MAVLINK_MAX_PAYLOAD_LEN
457
458
459
460
461
462
463static inline void mavlink_msg_odometry_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint8_t frame_id, uint8_t child_frame_id,
float x,
float y,
float z,
const float *q,
float vx,
float vy,
float vz,
float rollspeed,
float pitchspeed,
float yawspeed,
const float *pose_covariance,
const float *velocity_covariance, uint8_t reset_counter, uint8_t estimator_type, int8_t quality)
465#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
466 char *buf = (
char *)msgbuf;
467 _mav_put_uint64_t(buf, 0, time_usec);
468 _mav_put_float(buf, 8, x);
469 _mav_put_float(buf, 12, y);
470 _mav_put_float(buf, 16, z);
471 _mav_put_float(buf, 36, vx);
472 _mav_put_float(buf, 40, vy);
473 _mav_put_float(buf, 44, vz);
474 _mav_put_float(buf, 48, rollspeed);
475 _mav_put_float(buf, 52, pitchspeed);
476 _mav_put_float(buf, 56, yawspeed);
477 _mav_put_uint8_t(buf, 228, frame_id);
478 _mav_put_uint8_t(buf, 229, child_frame_id);
479 _mav_put_uint8_t(buf, 230, reset_counter);
480 _mav_put_uint8_t(buf, 231, estimator_type);
481 _mav_put_int8_t(buf, 232, quality);
482 _mav_put_float_array(buf, 20, q, 4);
483 _mav_put_float_array(buf, 60, pose_covariance, 21);
484 _mav_put_float_array(buf, 144, velocity_covariance, 21);
485 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ODOMETRY, buf, MAVLINK_MSG_ID_ODOMETRY_MIN_LEN, MAVLINK_MSG_ID_ODOMETRY_LEN, MAVLINK_MSG_ID_ODOMETRY_CRC);
487 mavlink_odometry_t *packet = (mavlink_odometry_t *)msgbuf;
488 packet->time_usec = time_usec;
495 packet->rollspeed = rollspeed;
496 packet->pitchspeed = pitchspeed;
497 packet->yawspeed = yawspeed;
498 packet->frame_id = frame_id;
499 packet->child_frame_id = child_frame_id;
500 packet->reset_counter = reset_counter;
501 packet->estimator_type = estimator_type;
502 packet->quality = quality;
503 mav_array_memcpy(packet->q, q,
sizeof(
float)*4);
504 mav_array_memcpy(packet->pose_covariance, pose_covariance,
sizeof(
float)*21);
505 mav_array_memcpy(packet->velocity_covariance, velocity_covariance,
sizeof(
float)*21);
506 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ODOMETRY, (
const char *)packet, MAVLINK_MSG_ID_ODOMETRY_MIN_LEN, MAVLINK_MSG_ID_ODOMETRY_LEN, MAVLINK_MSG_ID_ODOMETRY_CRC);
517
518
519
520
521static inline uint64_t mavlink_msg_odometry_get_time_usec(
const mavlink_message_t* msg)
523 return _MAV_RETURN_uint64_t(msg, 0);
527
528
529
530
531static inline uint8_t mavlink_msg_odometry_get_frame_id(
const mavlink_message_t* msg)
533 return _MAV_RETURN_uint8_t(msg, 228);
537
538
539
540
541static inline uint8_t mavlink_msg_odometry_get_child_frame_id(
const mavlink_message_t* msg)
543 return _MAV_RETURN_uint8_t(msg, 229);
547
548
549
550
551static inline float mavlink_msg_odometry_get_x(
const mavlink_message_t* msg)
553 return _MAV_RETURN_float(msg, 8);
557
558
559
560
561static inline float mavlink_msg_odometry_get_y(
const mavlink_message_t* msg)
563 return _MAV_RETURN_float(msg, 12);
567
568
569
570
571static inline float mavlink_msg_odometry_get_z(
const mavlink_message_t* msg)
573 return _MAV_RETURN_float(msg, 16);
577
578
579
580
581static inline uint16_t mavlink_msg_odometry_get_q(
const mavlink_message_t* msg,
float *q)
583 return _MAV_RETURN_float_array(msg, q, 4, 20);
587
588
589
590
591static inline float mavlink_msg_odometry_get_vx(
const mavlink_message_t* msg)
593 return _MAV_RETURN_float(msg, 36);
597
598
599
600
601static inline float mavlink_msg_odometry_get_vy(
const mavlink_message_t* msg)
603 return _MAV_RETURN_float(msg, 40);
607
608
609
610
611static inline float mavlink_msg_odometry_get_vz(
const mavlink_message_t* msg)
613 return _MAV_RETURN_float(msg, 44);
617
618
619
620
621static inline float mavlink_msg_odometry_get_rollspeed(
const mavlink_message_t* msg)
623 return _MAV_RETURN_float(msg, 48);
627
628
629
630
631static inline float mavlink_msg_odometry_get_pitchspeed(
const mavlink_message_t* msg)
633 return _MAV_RETURN_float(msg, 52);
637
638
639
640
641static inline float mavlink_msg_odometry_get_yawspeed(
const mavlink_message_t* msg)
643 return _MAV_RETURN_float(msg, 56);
647
648
649
650
651static inline uint16_t mavlink_msg_odometry_get_pose_covariance(
const mavlink_message_t* msg,
float *pose_covariance)
653 return _MAV_RETURN_float_array(msg, pose_covariance, 21, 60);
657
658
659
660
661static inline uint16_t mavlink_msg_odometry_get_velocity_covariance(
const mavlink_message_t* msg,
float *velocity_covariance)
663 return _MAV_RETURN_float_array(msg, velocity_covariance, 21, 144);
667
668
669
670
671static inline uint8_t mavlink_msg_odometry_get_reset_counter(
const mavlink_message_t* msg)
673 return _MAV_RETURN_uint8_t(msg, 230);
677
678
679
680
681static inline uint8_t mavlink_msg_odometry_get_estimator_type(
const mavlink_message_t* msg)
683 return _MAV_RETURN_uint8_t(msg, 231);
687
688
689
690
691static inline int8_t mavlink_msg_odometry_get_quality(
const mavlink_message_t* msg)
693 return _MAV_RETURN_int8_t(msg, 232);
697
698
699
700
701
702static inline void mavlink_msg_odometry_decode(
const mavlink_message_t* msg, mavlink_odometry_t* odometry)
704#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
705 odometry->time_usec = mavlink_msg_odometry_get_time_usec(msg);
706 odometry->x = mavlink_msg_odometry_get_x(msg);
707 odometry->y = mavlink_msg_odometry_get_y(msg);
708 odometry->z = mavlink_msg_odometry_get_z(msg);
709 mavlink_msg_odometry_get_q(msg, odometry->q);
710 odometry->vx = mavlink_msg_odometry_get_vx(msg);
711 odometry->vy = mavlink_msg_odometry_get_vy(msg);
712 odometry->vz = mavlink_msg_odometry_get_vz(msg);
713 odometry->rollspeed = mavlink_msg_odometry_get_rollspeed(msg);
714 odometry->pitchspeed = mavlink_msg_odometry_get_pitchspeed(msg);
715 odometry->yawspeed = mavlink_msg_odometry_get_yawspeed(msg);
716 mavlink_msg_odometry_get_pose_covariance(msg, odometry->pose_covariance);
717 mavlink_msg_odometry_get_velocity_covariance(msg, odometry->velocity_covariance);
718 odometry->frame_id = mavlink_msg_odometry_get_frame_id(msg);
719 odometry->child_frame_id = mavlink_msg_odometry_get_child_frame_id(msg);
720 odometry->reset_counter = mavlink_msg_odometry_get_reset_counter(msg);
721 odometry->estimator_type = mavlink_msg_odometry_get_estimator_type(msg);
722 odometry->quality = mavlink_msg_odometry_get_quality(msg);
724 uint8_t len = msg->len < MAVLINK_MSG_ID_ODOMETRY_LEN? msg->len : MAVLINK_MSG_ID_ODOMETRY_LEN;
725 memset(odometry, 0, MAVLINK_MSG_ID_ODOMETRY_LEN);
726 memcpy(odometry, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_ODOMETRY_CRC
Definition: mavlink_msg_odometry.h:33
#define MAVLINK_MSG_ID_ODOMETRY_LEN
Definition: mavlink_msg_odometry.h:28
#define MAVLINK_MSG_ID_ODOMETRY_MIN_LEN
Definition: mavlink_msg_odometry.h:29
#define MAVLINK_MSG_ID_ODOMETRY
Definition: mavlink_msg_odometry.h:4
Definition: mavlink_msg_odometry.h:7
uint8_t frame_id
Definition: mavlink_msg_odometry.h:21
int8_t quality
Definition: mavlink_msg_odometry.h:25
uint8_t estimator_type
Definition: mavlink_msg_odometry.h:24
uint64_t time_usec
Definition: mavlink_msg_odometry.h:8
float vz
Definition: mavlink_msg_odometry.h:15
float rollspeed
Definition: mavlink_msg_odometry.h:16
float pose_covariance[21]
Definition: mavlink_msg_odometry.h:19
float vy
Definition: mavlink_msg_odometry.h:14
float velocity_covariance[21]
Definition: mavlink_msg_odometry.h:20
float vx
Definition: mavlink_msg_odometry.h:13
uint8_t reset_counter
Definition: mavlink_msg_odometry.h:23
float y
Definition: mavlink_msg_odometry.h:10
float pitchspeed
Definition: mavlink_msg_odometry.h:17
uint8_t child_frame_id
Definition: mavlink_msg_odometry.h:22
float q[4]
Definition: mavlink_msg_odometry.h:12
float x
Definition: mavlink_msg_odometry.h:9
float yawspeed
Definition: mavlink_msg_odometry.h:18
float z
Definition: mavlink_msg_odometry.h:11