4#define MAVLINK_MSG_ID_FOLLOW_TARGET 144
7typedef struct __mavlink_follow_target_t {
17 float position_cov[3];
18 uint8_t est_capabilities;
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) }, \
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) }, \
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
95 char buf[MAVLINK_MSG_ID_FOLLOW_TARGET_LEN];
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);
107 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN);
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);
124 msg->msgid = MAVLINK_MSG_ID_FOLLOW_TARGET;
125 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FOLLOW_TARGET_MIN_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_CRC);
147static inline uint16_t mavlink_msg_follow_target_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
148 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
152 char buf[MAVLINK_MSG_ID_FOLLOW_TARGET_LEN];
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);
164 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN);
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);
181 msg->msgid = MAVLINK_MSG_ID_FOLLOW_TARGET;
182 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FOLLOW_TARGET_MIN_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN, MAVLINK_MSG_ID_FOLLOW_TARGET_CRC);
193static 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)
195 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);
207static 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)
209 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);
228#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
230static 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)
232#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
233 char buf[MAVLINK_MSG_ID_FOLLOW_TARGET_LEN];
234 _mav_put_uint64_t(buf, 0, timestamp);
235 _mav_put_uint64_t(buf, 8, custom_state);
236 _mav_put_int32_t(buf, 16, lat);
237 _mav_put_int32_t(buf, 20, lon);
238 _mav_put_float(buf, 24, alt);
239 _mav_put_uint8_t(buf, 92, est_capabilities);
240 _mav_put_float_array(buf, 28, vel, 3);
241 _mav_put_float_array(buf, 40, acc, 3);
242 _mav_put_float_array(buf, 52, attitude_q, 4);
243 _mav_put_float_array(buf, 68, rates, 3);
244 _mav_put_float_array(buf, 80, position_cov, 3);
245 _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);
247 mavlink_follow_target_t packet;
248 packet.timestamp = timestamp;
249 packet.custom_state = custom_state;
253 packet.est_capabilities = est_capabilities;
254 mav_array_memcpy(packet.vel, vel,
sizeof(
float)*3);
255 mav_array_memcpy(packet.acc, acc,
sizeof(
float)*3);
256 mav_array_memcpy(packet.attitude_q, attitude_q,
sizeof(
float)*4);
257 mav_array_memcpy(packet.rates, rates,
sizeof(
float)*3);
258 mav_array_memcpy(packet.position_cov, position_cov,
sizeof(
float)*3);
259 _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);
268static inline void mavlink_msg_follow_target_send_struct(mavlink_channel_t chan,
const mavlink_follow_target_t* follow_target)
270#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
271 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);
273 _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);
277#if MAVLINK_MSG_ID_FOLLOW_TARGET_LEN <= MAVLINK_MAX_PAYLOAD_LEN
285static 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)
287#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
288 char *buf = (
char *)msgbuf;
289 _mav_put_uint64_t(buf, 0, timestamp);
290 _mav_put_uint64_t(buf, 8, custom_state);
291 _mav_put_int32_t(buf, 16, lat);
292 _mav_put_int32_t(buf, 20, lon);
293 _mav_put_float(buf, 24, alt);
294 _mav_put_uint8_t(buf, 92, est_capabilities);
295 _mav_put_float_array(buf, 28, vel, 3);
296 _mav_put_float_array(buf, 40, acc, 3);
297 _mav_put_float_array(buf, 52, attitude_q, 4);
298 _mav_put_float_array(buf, 68, rates, 3);
299 _mav_put_float_array(buf, 80, position_cov, 3);
300 _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);
302 mavlink_follow_target_t *packet = (mavlink_follow_target_t *)msgbuf;
303 packet->timestamp = timestamp;
304 packet->custom_state = custom_state;
308 packet->est_capabilities = est_capabilities;
309 mav_array_memcpy(packet->vel, vel,
sizeof(
float)*3);
310 mav_array_memcpy(packet->acc, acc,
sizeof(
float)*3);
311 mav_array_memcpy(packet->attitude_q, attitude_q,
sizeof(
float)*4);
312 mav_array_memcpy(packet->rates, rates,
sizeof(
float)*3);
313 mav_array_memcpy(packet->position_cov, position_cov,
sizeof(
float)*3);
314 _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);
329static inline uint64_t mavlink_msg_follow_target_get_timestamp(
const mavlink_message_t* msg)
331 return _MAV_RETURN_uint64_t(msg, 0);
339static inline uint8_t mavlink_msg_follow_target_get_est_capabilities(
const mavlink_message_t* msg)
341 return _MAV_RETURN_uint8_t(msg, 92);
349static inline int32_t mavlink_msg_follow_target_get_lat(
const mavlink_message_t* msg)
351 return _MAV_RETURN_int32_t(msg, 16);
359static inline int32_t mavlink_msg_follow_target_get_lon(
const mavlink_message_t* msg)
361 return _MAV_RETURN_int32_t(msg, 20);
369static inline float mavlink_msg_follow_target_get_alt(
const mavlink_message_t* msg)
371 return _MAV_RETURN_float(msg, 24);
379static inline uint16_t mavlink_msg_follow_target_get_vel(
const mavlink_message_t* msg,
float *vel)
381 return _MAV_RETURN_float_array(msg, vel, 3, 28);
389static inline uint16_t mavlink_msg_follow_target_get_acc(
const mavlink_message_t* msg,
float *acc)
391 return _MAV_RETURN_float_array(msg, acc, 3, 40);
399static inline uint16_t mavlink_msg_follow_target_get_attitude_q(
const mavlink_message_t* msg,
float *attitude_q)
401 return _MAV_RETURN_float_array(msg, attitude_q, 4, 52);
409static inline uint16_t mavlink_msg_follow_target_get_rates(
const mavlink_message_t* msg,
float *rates)
411 return _MAV_RETURN_float_array(msg, rates, 3, 68);
419static inline uint16_t mavlink_msg_follow_target_get_position_cov(
const mavlink_message_t* msg,
float *position_cov)
421 return _MAV_RETURN_float_array(msg, position_cov, 3, 80);
429static inline uint64_t mavlink_msg_follow_target_get_custom_state(
const mavlink_message_t* msg)
431 return _MAV_RETURN_uint64_t(msg, 8);
440static inline void mavlink_msg_follow_target_decode(
const mavlink_message_t* msg, mavlink_follow_target_t* follow_target)
442#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
443 follow_target->timestamp = mavlink_msg_follow_target_get_timestamp(msg);
444 follow_target->custom_state = mavlink_msg_follow_target_get_custom_state(msg);
445 follow_target->lat = mavlink_msg_follow_target_get_lat(msg);
446 follow_target->lon = mavlink_msg_follow_target_get_lon(msg);
447 follow_target->alt = mavlink_msg_follow_target_get_alt(msg);
448 mavlink_msg_follow_target_get_vel(msg, follow_target->vel);
449 mavlink_msg_follow_target_get_acc(msg, follow_target->acc);
450 mavlink_msg_follow_target_get_attitude_q(msg, follow_target->attitude_q);
451 mavlink_msg_follow_target_get_rates(msg, follow_target->rates);
452 mavlink_msg_follow_target_get_position_cov(msg, follow_target->position_cov);
453 follow_target->est_capabilities = mavlink_msg_follow_target_get_est_capabilities(msg);
455 uint8_t len = msg->len < MAVLINK_MSG_ID_FOLLOW_TARGET_LEN? msg->len : MAVLINK_MSG_ID_FOLLOW_TARGET_LEN;
456 memset(follow_target, 0, MAVLINK_MSG_ID_FOLLOW_TARGET_LEN);
457 memcpy(follow_target, _MAV_PAYLOAD(msg), len);