4#define MAVLINK_MSG_ID_FOLLOW_TARGET 144
19} mavlink_follow_target_t;
21#define MAVLINK_MSG_ID_FOLLOW_TARGET_LEN 93
22#define MAVLINK_MSG_ID_FOLLOW_TARGET_MIN_LEN 93
23#define MAVLINK_MSG_ID_144_LEN 93
24#define MAVLINK_MSG_ID_144_MIN_LEN 93
26#define MAVLINK_MSG_ID_FOLLOW_TARGET_CRC 127
27#define MAVLINK_MSG_ID_144_CRC 127
29#define MAVLINK_MSG_FOLLOW_TARGET_FIELD_VEL_LEN 3
30#define MAVLINK_MSG_FOLLOW_TARGET_FIELD_ACC_LEN 3
31#define MAVLINK_MSG_FOLLOW_TARGET_FIELD_ATTITUDE_Q_LEN 4
32#define MAVLINK_MSG_FOLLOW_TARGET_FIELD_RATES_LEN 3
33#define MAVLINK_MSG_FOLLOW_TARGET_FIELD_POSITION_COV_LEN 3
35#if MAVLINK_COMMAND_24BIT
36#define MAVLINK_MESSAGE_INFO_FOLLOW_TARGET {
40 { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_follow_target_t, timestamp) },
41 { "est_capabilities", NULL, MAVLINK_TYPE_UINT8_T, 0
, 92
, offsetof(mavlink_follow_target_t, est_capabilities) },
42 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0
, 16
, offsetof(mavlink_follow_target_t, lat) },
43 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0
, 20
, offsetof(mavlink_follow_target_t, lon) },
44 { "alt", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_follow_target_t, alt) },
45 { "vel", NULL, MAVLINK_TYPE_FLOAT, 3
, 28
, offsetof(mavlink_follow_target_t, vel) },
46 { "acc", NULL, MAVLINK_TYPE_FLOAT, 3
, 40
, offsetof(mavlink_follow_target_t, acc) },
47 { "attitude_q", NULL, MAVLINK_TYPE_FLOAT, 4
, 52
, offsetof(mavlink_follow_target_t, attitude_q) },
48 { "rates", NULL, MAVLINK_TYPE_FLOAT, 3
, 68
, offsetof(mavlink_follow_target_t, rates) },
49 { "position_cov", NULL, MAVLINK_TYPE_FLOAT, 3
, 80
, offsetof(mavlink_follow_target_t, position_cov) },
50 { "custom_state", NULL, MAVLINK_TYPE_UINT64_T, 0
, 8
, offsetof(mavlink_follow_target_t, custom_state) },
52}
54#define MAVLINK_MESSAGE_INFO_FOLLOW_TARGET {
57 { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_follow_target_t, timestamp) },
58 { "est_capabilities", NULL, MAVLINK_TYPE_UINT8_T, 0
, 92
, offsetof(mavlink_follow_target_t, est_capabilities) },
59 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0
, 16
, offsetof(mavlink_follow_target_t, lat) },
60 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0
, 20
, offsetof(mavlink_follow_target_t, lon) },
61 { "alt", NULL, MAVLINK_TYPE_FLOAT, 0
, 24
, offsetof(mavlink_follow_target_t, alt) },
62 { "vel", NULL, MAVLINK_TYPE_FLOAT, 3
, 28
, offsetof(mavlink_follow_target_t, vel) },
63 { "acc", NULL, MAVLINK_TYPE_FLOAT, 3
, 40
, offsetof(mavlink_follow_target_t, acc) },
64 { "attitude_q", NULL, MAVLINK_TYPE_FLOAT, 4
, 52
, offsetof(mavlink_follow_target_t, attitude_q) },
65 { "rates", NULL, MAVLINK_TYPE_FLOAT, 3
, 68
, offsetof(mavlink_follow_target_t, rates) },
66 { "position_cov", NULL, MAVLINK_TYPE_FLOAT, 3
, 80
, offsetof(mavlink_follow_target_t, position_cov) },
67 { "custom_state", NULL, MAVLINK_TYPE_UINT64_T, 0
, 8
, offsetof(mavlink_follow_target_t, custom_state) },
69}
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91static inline uint16_t mavlink_msg_follow_target_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
92 uint64_t timestamp, uint8_t est_capabilities, int32_t lat, int32_t lon,
float alt,
const float *vel,
const float *acc,
const float *attitude_q,
const float *rates,
const float *position_cov, uint64_t custom_state)
94#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
96 _mav_put_uint64_t(buf, 0, timestamp);
97 _mav_put_uint64_t(buf, 8, custom_state);
98 _mav_put_int32_t(buf, 16, lat);
99 _mav_put_int32_t(buf, 20, lon);
100 _mav_put_float(buf, 24, alt);
101 _mav_put_uint8_t(buf, 92, est_capabilities);
102 _mav_put_float_array(buf, 28, vel, 3);
103 _mav_put_float_array(buf, 40, acc, 3);
104 _mav_put_float_array(buf, 52, attitude_q, 4);
105 _mav_put_float_array(buf, 68, rates, 3);
106 _mav_put_float_array(buf, 80, position_cov, 3);
109 mavlink_follow_target_t packet;
110 packet.timestamp = timestamp;
111 packet.custom_state = custom_state;
115 packet.est_capabilities = est_capabilities;
116 mav_array_memcpy(packet.vel, vel,
sizeof(
float)*3);
117 mav_array_memcpy(packet.acc, acc,
sizeof(
float)*3);
118 mav_array_memcpy(packet.attitude_q, attitude_q,
sizeof(
float)*4);
119 mav_array_memcpy(packet.rates, rates,
sizeof(
float)*3);
120 mav_array_memcpy(packet.position_cov, position_cov,
sizeof(
float)*3);
121 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN);
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148static inline uint16_t mavlink_msg_follow_target_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
149 uint64_t timestamp, uint8_t est_capabilities, int32_t lat, int32_t lon,
float alt,
const float *vel,
const float *acc,
const float *attitude_q,
const float *rates,
const float *position_cov, uint64_t custom_state)
151#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
153 _mav_put_uint64_t(buf, 0, timestamp);
154 _mav_put_uint64_t(buf, 8, custom_state);
155 _mav_put_int32_t(buf, 16, lat);
156 _mav_put_int32_t(buf, 20, lon);
157 _mav_put_float(buf, 24, alt);
158 _mav_put_uint8_t(buf, 92, est_capabilities);
159 _mav_put_float_array(buf, 28, vel, 3);
160 _mav_put_float_array(buf, 40, acc, 3);
161 _mav_put_float_array(buf, 52, attitude_q, 4);
162 _mav_put_float_array(buf, 68, rates, 3);
163 _mav_put_float_array(buf, 80, position_cov, 3);
166 mavlink_follow_target_t packet;
167 packet.timestamp = timestamp;
168 packet.custom_state = custom_state;
172 packet.est_capabilities = est_capabilities;
173 mav_array_memcpy(packet.vel, vel,
sizeof(
float)*3);
174 mav_array_memcpy(packet.acc, acc,
sizeof(
float)*3);
175 mav_array_memcpy(packet.attitude_q, attitude_q,
sizeof(
float)*4);
176 mav_array_memcpy(packet.rates, rates,
sizeof(
float)*3);
177 mav_array_memcpy(packet.position_cov, position_cov,
sizeof(
float)*3);
178 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN);
183 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FOLLOW_TARGET_MIN_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_CRC);
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208static inline uint16_t mavlink_msg_follow_target_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
209 mavlink_message_t* msg,
210 uint64_t timestamp,uint8_t est_capabilities,int32_t lat,int32_t lon,
float alt,
const float *vel,
const float *acc,
const float *attitude_q,
const float *rates,
const float *position_cov,uint64_t custom_state)
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
214 _mav_put_uint64_t(buf, 0, timestamp);
215 _mav_put_uint64_t(buf, 8, custom_state);
216 _mav_put_int32_t(buf, 16, lat);
217 _mav_put_int32_t(buf, 20, lon);
218 _mav_put_float(buf, 24, alt);
219 _mav_put_uint8_t(buf, 92, est_capabilities);
220 _mav_put_float_array(buf, 28, vel, 3);
221 _mav_put_float_array(buf, 40, acc, 3);
222 _mav_put_float_array(buf, 52, attitude_q, 4);
223 _mav_put_float_array(buf, 68, rates, 3);
224 _mav_put_float_array(buf, 80, position_cov, 3);
227 mavlink_follow_target_t packet;
228 packet.timestamp = timestamp;
229 packet.custom_state = custom_state;
233 packet.est_capabilities = est_capabilities;
234 mav_array_memcpy(packet.vel, vel,
sizeof(
float)*3);
235 mav_array_memcpy(packet.acc, acc,
sizeof(
float)*3);
236 mav_array_memcpy(packet.attitude_q, attitude_q,
sizeof(
float)*4);
237 mav_array_memcpy(packet.rates, rates,
sizeof(
float)*3);
238 mav_array_memcpy(packet.position_cov, position_cov,
sizeof(
float)*3);
239 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN);
247
248
249
250
251
252
253
254static inline uint16_t mavlink_msg_follow_target_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_follow_target_t* follow_target)
256 return mavlink_msg_follow_target_pack(system_id, component_id, msg, follow_target->timestamp, follow_target->est_capabilities, follow_target->lat, follow_target->lon, follow_target->alt, follow_target->vel, follow_target->acc, follow_target->attitude_q, follow_target->rates, follow_target->position_cov, follow_target->custom_state);
260
261
262
263
264
265
266
267
268static inline uint16_t mavlink_msg_follow_target_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_follow_target_t* follow_target)
270 return mavlink_msg_follow_target_pack_chan(system_id, component_id, chan, msg, follow_target->timestamp, follow_target->est_capabilities, follow_target->lat, follow_target->lon, follow_target->alt, follow_target->vel, follow_target->acc, follow_target->attitude_q, follow_target->rates, follow_target->position_cov, follow_target->custom_state);
274
275
276
277
278
279
280
281
282static inline uint16_t mavlink_msg_follow_target_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_follow_target_t* follow_target)
284 return mavlink_msg_follow_target_pack_status(system_id, component_id, _status, msg, follow_target->timestamp, follow_target->est_capabilities, follow_target->lat, follow_target->lon, follow_target->alt, follow_target->vel, follow_target->acc, follow_target->attitude_q, follow_target->rates, follow_target->position_cov, follow_target->custom_state);
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
305static inline void mavlink_msg_follow_target_send(mavlink_channel_t chan, uint64_t timestamp, uint8_t est_capabilities, int32_t lat, int32_t lon,
float alt,
const float *vel,
const float *acc,
const float *attitude_q,
const float *rates,
const float *position_cov, uint64_t custom_state)
307#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
308 char buf[MAVLINK_MSG_ID_FOLLOW_TARGET_LEN];
309 _mav_put_uint64_t(buf, 0, timestamp);
310 _mav_put_uint64_t(buf, 8, custom_state);
311 _mav_put_int32_t(buf, 16, lat);
312 _mav_put_int32_t(buf, 20, lon);
313 _mav_put_float(buf, 24, alt);
314 _mav_put_uint8_t(buf, 92, est_capabilities);
315 _mav_put_float_array(buf, 28, vel, 3);
316 _mav_put_float_array(buf, 40, acc, 3);
317 _mav_put_float_array(buf, 52, attitude_q, 4);
318 _mav_put_float_array(buf, 68, rates, 3);
319 _mav_put_float_array(buf, 80, position_cov, 3);
320 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FOLLOW_TARGET, buf, MAVLINK_MSG_ID_FOLLOW_TARGET_MIN_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_CRC);
322 mavlink_follow_target_t packet;
323 packet.timestamp = timestamp;
324 packet.custom_state = custom_state;
328 packet.est_capabilities = est_capabilities;
329 mav_array_memcpy(packet.vel, vel,
sizeof(
float)*3);
330 mav_array_memcpy(packet.acc, acc,
sizeof(
float)*3);
331 mav_array_memcpy(packet.attitude_q, attitude_q,
sizeof(
float)*4);
332 mav_array_memcpy(packet.rates, rates,
sizeof(
float)*3);
333 mav_array_memcpy(packet.position_cov, position_cov,
sizeof(
float)*3);
334 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FOLLOW_TARGET, (
const char *)&packet, MAVLINK_MSG_ID_FOLLOW_TARGET_MIN_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_CRC);
339
340
341
342
343static inline void mavlink_msg_follow_target_send_struct(mavlink_channel_t chan,
const mavlink_follow_target_t* follow_target)
345#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
346 mavlink_msg_follow_target_send(chan, follow_target->timestamp, follow_target->est_capabilities, follow_target->lat, follow_target->lon, follow_target->alt, follow_target->vel, follow_target->acc, follow_target->attitude_q, follow_target->rates, follow_target->position_cov, follow_target->custom_state);
348 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FOLLOW_TARGET, (
const char *)follow_target, MAVLINK_MSG_ID_FOLLOW_TARGET_MIN_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_CRC);
352#if MAVLINK_MSG_ID_FOLLOW_TARGET_LEN <= MAVLINK_MAX_PAYLOAD_LEN
354
355
356
357
358
359
360static inline void mavlink_msg_follow_target_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, uint8_t est_capabilities, int32_t lat, int32_t lon,
float alt,
const float *vel,
const float *acc,
const float *attitude_q,
const float *rates,
const float *position_cov, uint64_t custom_state)
362#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
363 char *buf = (
char *)msgbuf;
364 _mav_put_uint64_t(buf, 0, timestamp);
365 _mav_put_uint64_t(buf, 8, custom_state);
366 _mav_put_int32_t(buf, 16, lat);
367 _mav_put_int32_t(buf, 20, lon);
368 _mav_put_float(buf, 24, alt);
369 _mav_put_uint8_t(buf, 92, est_capabilities);
370 _mav_put_float_array(buf, 28, vel, 3);
371 _mav_put_float_array(buf, 40, acc, 3);
372 _mav_put_float_array(buf, 52, attitude_q, 4);
373 _mav_put_float_array(buf, 68, rates, 3);
374 _mav_put_float_array(buf, 80, position_cov, 3);
375 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FOLLOW_TARGET, buf, MAVLINK_MSG_ID_FOLLOW_TARGET_MIN_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_CRC);
377 mavlink_follow_target_t *packet = (mavlink_follow_target_t *)msgbuf;
378 packet->timestamp = timestamp;
379 packet->custom_state = custom_state;
383 packet->est_capabilities = est_capabilities;
384 mav_array_memcpy(packet->vel, vel,
sizeof(
float)*3);
385 mav_array_memcpy(packet->acc, acc,
sizeof(
float)*3);
386 mav_array_memcpy(packet->attitude_q, attitude_q,
sizeof(
float)*4);
387 mav_array_memcpy(packet->rates, rates,
sizeof(
float)*3);
388 mav_array_memcpy(packet->position_cov, position_cov,
sizeof(
float)*3);
389 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FOLLOW_TARGET, (
const char *)packet, MAVLINK_MSG_ID_FOLLOW_TARGET_MIN_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_CRC);
400
401
402
403
404static inline uint64_t mavlink_msg_follow_target_get_timestamp(
const mavlink_message_t* msg)
406 return _MAV_RETURN_uint64_t(msg, 0);
410
411
412
413
414static inline uint8_t mavlink_msg_follow_target_get_est_capabilities(
const mavlink_message_t* msg)
416 return _MAV_RETURN_uint8_t(msg, 92);
420
421
422
423
424static inline int32_t mavlink_msg_follow_target_get_lat(
const mavlink_message_t* msg)
426 return _MAV_RETURN_int32_t(msg, 16);
430
431
432
433
434static inline int32_t mavlink_msg_follow_target_get_lon(
const mavlink_message_t* msg)
436 return _MAV_RETURN_int32_t(msg, 20);
440
441
442
443
444static inline float mavlink_msg_follow_target_get_alt(
const mavlink_message_t* msg)
446 return _MAV_RETURN_float(msg, 24);
450
451
452
453
454static inline uint16_t mavlink_msg_follow_target_get_vel(
const mavlink_message_t* msg,
float *vel)
456 return _MAV_RETURN_float_array(msg, vel, 3, 28);
460
461
462
463
464static inline uint16_t mavlink_msg_follow_target_get_acc(
const mavlink_message_t* msg,
float *acc)
466 return _MAV_RETURN_float_array(msg, acc, 3, 40);
470
471
472
473
474static inline uint16_t mavlink_msg_follow_target_get_attitude_q(
const mavlink_message_t* msg,
float *attitude_q)
476 return _MAV_RETURN_float_array(msg, attitude_q, 4, 52);
480
481
482
483
484static inline uint16_t mavlink_msg_follow_target_get_rates(
const mavlink_message_t* msg,
float *rates)
486 return _MAV_RETURN_float_array(msg, rates, 3, 68);
490
491
492
493
494static inline uint16_t mavlink_msg_follow_target_get_position_cov(
const mavlink_message_t* msg,
float *position_cov)
496 return _MAV_RETURN_float_array(msg, position_cov, 3, 80);
500
501
502
503
504static inline uint64_t mavlink_msg_follow_target_get_custom_state(
const mavlink_message_t* msg)
506 return _MAV_RETURN_uint64_t(msg, 8);
510
511
512
513
514
515static inline void mavlink_msg_follow_target_decode(
const mavlink_message_t* msg, mavlink_follow_target_t* follow_target)
517#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
518 follow_target->timestamp = mavlink_msg_follow_target_get_timestamp(msg);
519 follow_target->custom_state = mavlink_msg_follow_target_get_custom_state(msg);
520 follow_target->lat = mavlink_msg_follow_target_get_lat(msg);
521 follow_target->lon = mavlink_msg_follow_target_get_lon(msg);
522 follow_target->alt = mavlink_msg_follow_target_get_alt(msg);
523 mavlink_msg_follow_target_get_vel(msg, follow_target->vel);
524 mavlink_msg_follow_target_get_acc(msg, follow_target->acc);
525 mavlink_msg_follow_target_get_attitude_q(msg, follow_target->attitude_q);
526 mavlink_msg_follow_target_get_rates(msg, follow_target->rates);
527 mavlink_msg_follow_target_get_position_cov(msg, follow_target->position_cov);
528 follow_target->est_capabilities = mavlink_msg_follow_target_get_est_capabilities(msg);
530 uint8_t len = msg->len < MAVLINK_MSG_ID_FOLLOW_TARGET_LEN? msg->len : MAVLINK_MSG_ID_FOLLOW_TARGET_LEN;
531 memset(follow_target, 0, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN);
532 memcpy(follow_target, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_FOLLOW_TARGET_MIN_LEN
Definition: mavlink_msg_follow_target.h:22
#define MAVLINK_MSG_ID_FOLLOW_TARGET
Definition: mavlink_msg_follow_target.h:4
#define MAVLINK_MSG_ID_FOLLOW_TARGET_CRC
Definition: mavlink_msg_follow_target.h:26
#define MAVLINK_MSG_ID_FOLLOW_TARGET_LEN
Definition: mavlink_msg_follow_target.h:21
Definition: mavlink_msg_follow_target.h:7
float rates[3]
Definition: mavlink_msg_follow_target.h:16
float position_cov[3]
Definition: mavlink_msg_follow_target.h:17
int32_t lon
Definition: mavlink_msg_follow_target.h:11
uint64_t timestamp
Definition: mavlink_msg_follow_target.h:8
float attitude_q[4]
Definition: mavlink_msg_follow_target.h:15
int32_t lat
Definition: mavlink_msg_follow_target.h:10
uint64_t custom_state
Definition: mavlink_msg_follow_target.h:9
float vel[3]
Definition: mavlink_msg_follow_target.h:13
uint8_t est_capabilities
Definition: mavlink_msg_follow_target.h:18
float acc[3]
Definition: mavlink_msg_follow_target.h:14
float alt
Definition: mavlink_msg_follow_target.h:12