4#define MAVLINK_MSG_ID_GIMBAL_REPORT 200
7typedef struct __mavlink_gimbal_report_t {
12 float delta_velocity_x;
13 float delta_velocity_y;
14 float delta_velocity_z;
18 uint8_t target_system;
19 uint8_t target_component;
20}) mavlink_gimbal_report_t;
22#define MAVLINK_MSG_ID_GIMBAL_REPORT_LEN 42
23#define MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN 42
24#define MAVLINK_MSG_ID_200_LEN 42
25#define MAVLINK_MSG_ID_200_MIN_LEN 42
27#define MAVLINK_MSG_ID_GIMBAL_REPORT_CRC 134
28#define MAVLINK_MSG_ID_200_CRC 134
32#if MAVLINK_COMMAND_24BIT
33#define MAVLINK_MESSAGE_INFO_GIMBAL_REPORT { \
37 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_gimbal_report_t, target_system) }, \
38 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_gimbal_report_t, target_component) }, \
39 { "delta_time", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_gimbal_report_t, delta_time) }, \
40 { "delta_angle_x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_gimbal_report_t, delta_angle_x) }, \
41 { "delta_angle_y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_gimbal_report_t, delta_angle_y) }, \
42 { "delta_angle_z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_gimbal_report_t, delta_angle_z) }, \
43 { "delta_velocity_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_gimbal_report_t, delta_velocity_x) }, \
44 { "delta_velocity_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_gimbal_report_t, delta_velocity_y) }, \
45 { "delta_velocity_z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_gimbal_report_t, delta_velocity_z) }, \
46 { "joint_roll", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_gimbal_report_t, joint_roll) }, \
47 { "joint_el", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_gimbal_report_t, joint_el) }, \
48 { "joint_az", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_gimbal_report_t, joint_az) }, \
52#define MAVLINK_MESSAGE_INFO_GIMBAL_REPORT { \
55 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_gimbal_report_t, target_system) }, \
56 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_gimbal_report_t, target_component) }, \
57 { "delta_time", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_gimbal_report_t, delta_time) }, \
58 { "delta_angle_x", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_gimbal_report_t, delta_angle_x) }, \
59 { "delta_angle_y", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_gimbal_report_t, delta_angle_y) }, \
60 { "delta_angle_z", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_gimbal_report_t, delta_angle_z) }, \
61 { "delta_velocity_x", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_gimbal_report_t, delta_velocity_x) }, \
62 { "delta_velocity_y", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_gimbal_report_t, delta_velocity_y) }, \
63 { "delta_velocity_z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_gimbal_report_t, delta_velocity_z) }, \
64 { "joint_roll", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_gimbal_report_t, joint_roll) }, \
65 { "joint_el", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_gimbal_report_t, joint_el) }, \
66 { "joint_az", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_gimbal_report_t, joint_az) }, \
91static inline uint16_t mavlink_msg_gimbal_report_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
92 uint8_t target_system, uint8_t target_component,
float delta_time,
float delta_angle_x,
float delta_angle_y,
float delta_angle_z,
float delta_velocity_x,
float delta_velocity_y,
float delta_velocity_z,
float joint_roll,
float joint_el,
float joint_az)
94#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
95 char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_LEN];
96 _mav_put_float(buf, 0, delta_time);
97 _mav_put_float(buf, 4, delta_angle_x);
98 _mav_put_float(buf, 8, delta_angle_y);
99 _mav_put_float(buf, 12, delta_angle_z);
100 _mav_put_float(buf, 16, delta_velocity_x);
101 _mav_put_float(buf, 20, delta_velocity_y);
102 _mav_put_float(buf, 24, delta_velocity_z);
103 _mav_put_float(buf, 28, joint_roll);
104 _mav_put_float(buf, 32, joint_el);
105 _mav_put_float(buf, 36, joint_az);
106 _mav_put_uint8_t(buf, 40, target_system);
107 _mav_put_uint8_t(buf, 41, target_component);
109 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN);
111 mavlink_gimbal_report_t packet;
112 packet.delta_time = delta_time;
113 packet.delta_angle_x = delta_angle_x;
114 packet.delta_angle_y = delta_angle_y;
115 packet.delta_angle_z = delta_angle_z;
116 packet.delta_velocity_x = delta_velocity_x;
117 packet.delta_velocity_y = delta_velocity_y;
118 packet.delta_velocity_z = delta_velocity_z;
119 packet.joint_roll = joint_roll;
120 packet.joint_el = joint_el;
121 packet.joint_az = joint_az;
122 packet.target_system = target_system;
123 packet.target_component = target_component;
125 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN);
128 msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT;
129 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_CRC);
152static inline uint16_t mavlink_msg_gimbal_report_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
153 mavlink_message_t* msg,
154 uint8_t target_system,uint8_t target_component,
float delta_time,
float delta_angle_x,
float delta_angle_y,
float delta_angle_z,
float delta_velocity_x,
float delta_velocity_y,
float delta_velocity_z,
float joint_roll,
float joint_el,
float joint_az)
156#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
157 char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_LEN];
158 _mav_put_float(buf, 0, delta_time);
159 _mav_put_float(buf, 4, delta_angle_x);
160 _mav_put_float(buf, 8, delta_angle_y);
161 _mav_put_float(buf, 12, delta_angle_z);
162 _mav_put_float(buf, 16, delta_velocity_x);
163 _mav_put_float(buf, 20, delta_velocity_y);
164 _mav_put_float(buf, 24, delta_velocity_z);
165 _mav_put_float(buf, 28, joint_roll);
166 _mav_put_float(buf, 32, joint_el);
167 _mav_put_float(buf, 36, joint_az);
168 _mav_put_uint8_t(buf, 40, target_system);
169 _mav_put_uint8_t(buf, 41, target_component);
171 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN);
173 mavlink_gimbal_report_t packet;
174 packet.delta_time = delta_time;
175 packet.delta_angle_x = delta_angle_x;
176 packet.delta_angle_y = delta_angle_y;
177 packet.delta_angle_z = delta_angle_z;
178 packet.delta_velocity_x = delta_velocity_x;
179 packet.delta_velocity_y = delta_velocity_y;
180 packet.delta_velocity_z = delta_velocity_z;
181 packet.joint_roll = joint_roll;
182 packet.joint_el = joint_el;
183 packet.joint_az = joint_az;
184 packet.target_system = target_system;
185 packet.target_component = target_component;
187 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN);
190 msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT;
191 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_CRC);
202static inline uint16_t mavlink_msg_gimbal_report_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_gimbal_report_t* gimbal_report)
204 return mavlink_msg_gimbal_report_pack(system_id, component_id, msg, gimbal_report->target_system, gimbal_report->target_component, gimbal_report->delta_time, gimbal_report->delta_angle_x, gimbal_report->delta_angle_y, gimbal_report->delta_angle_z, gimbal_report->delta_velocity_x, gimbal_report->delta_velocity_y, gimbal_report->delta_velocity_z, gimbal_report->joint_roll, gimbal_report->joint_el, gimbal_report->joint_az);
216static inline uint16_t mavlink_msg_gimbal_report_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_gimbal_report_t* gimbal_report)
218 return mavlink_msg_gimbal_report_pack_chan(system_id, component_id, chan, msg, gimbal_report->target_system, gimbal_report->target_component, gimbal_report->delta_time, gimbal_report->delta_angle_x, gimbal_report->delta_angle_y, gimbal_report->delta_angle_z, gimbal_report->delta_velocity_x, gimbal_report->delta_velocity_y, gimbal_report->delta_velocity_z, gimbal_report->joint_roll, gimbal_report->joint_el, gimbal_report->joint_az);
238#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
240static inline void mavlink_msg_gimbal_report_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component,
float delta_time,
float delta_angle_x,
float delta_angle_y,
float delta_angle_z,
float delta_velocity_x,
float delta_velocity_y,
float delta_velocity_z,
float joint_roll,
float joint_el,
float joint_az)
242#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
243 char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_LEN];
244 _mav_put_float(buf, 0, delta_time);
245 _mav_put_float(buf, 4, delta_angle_x);
246 _mav_put_float(buf, 8, delta_angle_y);
247 _mav_put_float(buf, 12, delta_angle_z);
248 _mav_put_float(buf, 16, delta_velocity_x);
249 _mav_put_float(buf, 20, delta_velocity_y);
250 _mav_put_float(buf, 24, delta_velocity_z);
251 _mav_put_float(buf, 28, joint_roll);
252 _mav_put_float(buf, 32, joint_el);
253 _mav_put_float(buf, 36, joint_az);
254 _mav_put_uint8_t(buf, 40, target_system);
255 _mav_put_uint8_t(buf, 41, target_component);
257 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_CRC);
259 mavlink_gimbal_report_t packet;
260 packet.delta_time = delta_time;
261 packet.delta_angle_x = delta_angle_x;
262 packet.delta_angle_y = delta_angle_y;
263 packet.delta_angle_z = delta_angle_z;
264 packet.delta_velocity_x = delta_velocity_x;
265 packet.delta_velocity_y = delta_velocity_y;
266 packet.delta_velocity_z = delta_velocity_z;
267 packet.joint_roll = joint_roll;
268 packet.joint_el = joint_el;
269 packet.joint_az = joint_az;
270 packet.target_system = target_system;
271 packet.target_component = target_component;
273 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT, (
const char *)&packet, MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_CRC);
282static inline void mavlink_msg_gimbal_report_send_struct(mavlink_channel_t chan,
const mavlink_gimbal_report_t* gimbal_report)
284#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
285 mavlink_msg_gimbal_report_send(chan, gimbal_report->target_system, gimbal_report->target_component, gimbal_report->delta_time, gimbal_report->delta_angle_x, gimbal_report->delta_angle_y, gimbal_report->delta_angle_z, gimbal_report->delta_velocity_x, gimbal_report->delta_velocity_y, gimbal_report->delta_velocity_z, gimbal_report->joint_roll, gimbal_report->joint_el, gimbal_report->joint_az);
287 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT, (
const char *)gimbal_report, MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_CRC);
291#if MAVLINK_MSG_ID_GIMBAL_REPORT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
299static inline void mavlink_msg_gimbal_report_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component,
float delta_time,
float delta_angle_x,
float delta_angle_y,
float delta_angle_z,
float delta_velocity_x,
float delta_velocity_y,
float delta_velocity_z,
float joint_roll,
float joint_el,
float joint_az)
301#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
302 char *buf = (
char *)msgbuf;
303 _mav_put_float(buf, 0, delta_time);
304 _mav_put_float(buf, 4, delta_angle_x);
305 _mav_put_float(buf, 8, delta_angle_y);
306 _mav_put_float(buf, 12, delta_angle_z);
307 _mav_put_float(buf, 16, delta_velocity_x);
308 _mav_put_float(buf, 20, delta_velocity_y);
309 _mav_put_float(buf, 24, delta_velocity_z);
310 _mav_put_float(buf, 28, joint_roll);
311 _mav_put_float(buf, 32, joint_el);
312 _mav_put_float(buf, 36, joint_az);
313 _mav_put_uint8_t(buf, 40, target_system);
314 _mav_put_uint8_t(buf, 41, target_component);
316 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT, buf, MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_CRC);
318 mavlink_gimbal_report_t *packet = (mavlink_gimbal_report_t *)msgbuf;
319 packet->delta_time = delta_time;
320 packet->delta_angle_x = delta_angle_x;
321 packet->delta_angle_y = delta_angle_y;
322 packet->delta_angle_z = delta_angle_z;
323 packet->delta_velocity_x = delta_velocity_x;
324 packet->delta_velocity_y = delta_velocity_y;
325 packet->delta_velocity_z = delta_velocity_z;
326 packet->joint_roll = joint_roll;
327 packet->joint_el = joint_el;
328 packet->joint_az = joint_az;
329 packet->target_system = target_system;
330 packet->target_component = target_component;
332 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GIMBAL_REPORT, (
const char *)packet, MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_CRC);
347static inline uint8_t mavlink_msg_gimbal_report_get_target_system(
const mavlink_message_t* msg)
349 return _MAV_RETURN_uint8_t(msg, 40);
357static inline uint8_t mavlink_msg_gimbal_report_get_target_component(
const mavlink_message_t* msg)
359 return _MAV_RETURN_uint8_t(msg, 41);
367static inline float mavlink_msg_gimbal_report_get_delta_time(
const mavlink_message_t* msg)
369 return _MAV_RETURN_float(msg, 0);
377static inline float mavlink_msg_gimbal_report_get_delta_angle_x(
const mavlink_message_t* msg)
379 return _MAV_RETURN_float(msg, 4);
387static inline float mavlink_msg_gimbal_report_get_delta_angle_y(
const mavlink_message_t* msg)
389 return _MAV_RETURN_float(msg, 8);
397static inline float mavlink_msg_gimbal_report_get_delta_angle_z(
const mavlink_message_t* msg)
399 return _MAV_RETURN_float(msg, 12);
407static inline float mavlink_msg_gimbal_report_get_delta_velocity_x(
const mavlink_message_t* msg)
409 return _MAV_RETURN_float(msg, 16);
417static inline float mavlink_msg_gimbal_report_get_delta_velocity_y(
const mavlink_message_t* msg)
419 return _MAV_RETURN_float(msg, 20);
427static inline float mavlink_msg_gimbal_report_get_delta_velocity_z(
const mavlink_message_t* msg)
429 return _MAV_RETURN_float(msg, 24);
437static inline float mavlink_msg_gimbal_report_get_joint_roll(
const mavlink_message_t* msg)
439 return _MAV_RETURN_float(msg, 28);
447static inline float mavlink_msg_gimbal_report_get_joint_el(
const mavlink_message_t* msg)
449 return _MAV_RETURN_float(msg, 32);
457static inline float mavlink_msg_gimbal_report_get_joint_az(
const mavlink_message_t* msg)
459 return _MAV_RETURN_float(msg, 36);
468static inline void mavlink_msg_gimbal_report_decode(
const mavlink_message_t* msg, mavlink_gimbal_report_t* gimbal_report)
470#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
471 gimbal_report->delta_time = mavlink_msg_gimbal_report_get_delta_time(msg);
472 gimbal_report->delta_angle_x = mavlink_msg_gimbal_report_get_delta_angle_x(msg);
473 gimbal_report->delta_angle_y = mavlink_msg_gimbal_report_get_delta_angle_y(msg);
474 gimbal_report->delta_angle_z = mavlink_msg_gimbal_report_get_delta_angle_z(msg);
475 gimbal_report->delta_velocity_x = mavlink_msg_gimbal_report_get_delta_velocity_x(msg);
476 gimbal_report->delta_velocity_y = mavlink_msg_gimbal_report_get_delta_velocity_y(msg);
477 gimbal_report->delta_velocity_z = mavlink_msg_gimbal_report_get_delta_velocity_z(msg);
478 gimbal_report->joint_roll = mavlink_msg_gimbal_report_get_joint_roll(msg);
479 gimbal_report->joint_el = mavlink_msg_gimbal_report_get_joint_el(msg);
480 gimbal_report->joint_az = mavlink_msg_gimbal_report_get_joint_az(msg);
481 gimbal_report->target_system = mavlink_msg_gimbal_report_get_target_system(msg);
482 gimbal_report->target_component = mavlink_msg_gimbal_report_get_target_component(msg);
484 uint8_t len = msg->len < MAVLINK_MSG_ID_GIMBAL_REPORT_LEN? msg->len : MAVLINK_MSG_ID_GIMBAL_REPORT_LEN;
485 memset(gimbal_report, 0, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN);
486 memcpy(gimbal_report, _MAV_PAYLOAD(msg), len);