3 #define MAVLINK_MSG_ID_ATT_POS_MOCAP 138
14 #define MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN 36
15 #define MAVLINK_MSG_ID_138_LEN 36
17 #define MAVLINK_MSG_ID_ATT_POS_MOCAP_CRC 109
18 #define MAVLINK_MSG_ID_138_CRC 109
20 #define MAVLINK_MSG_ATT_POS_MOCAP_FIELD_Q_LEN 4
22 #define MAVLINK_MESSAGE_INFO_ATT_POS_MOCAP { \
25 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_att_pos_mocap_t, time_usec) }, \
26 { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 8, offsetof(mavlink_att_pos_mocap_t, q) }, \
27 { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_att_pos_mocap_t, x) }, \
28 { "y", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_att_pos_mocap_t, y) }, \
29 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_att_pos_mocap_t, z) }, \
47 static inline uint16_t mavlink_msg_att_pos_mocap_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
48 uint64_t time_usec,
const float *q,
float x,
float y,
float z)
50 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
56 _mav_put_float_array(buf, 8, q, 4);
64 mav_array_memcpy(packet.
q, q,
sizeof(
float)*4);
89 static inline uint16_t mavlink_msg_att_pos_mocap_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
90 mavlink_message_t* msg,
91 uint64_t time_usec,
const float *q,
float x,
float y,
float z)
93 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
99 _mav_put_float_array(buf, 8, q, 4);
107 mav_array_memcpy(packet.
q, q,
sizeof(
float)*4);
112 #if MAVLINK_CRC_EXTRA
127 static inline uint16_t mavlink_msg_att_pos_mocap_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_att_pos_mocap_t* att_pos_mocap)
129 return mavlink_msg_att_pos_mocap_pack(system_id, component_id, msg, att_pos_mocap->
time_usec, att_pos_mocap->
q, att_pos_mocap->
x, att_pos_mocap->
y, att_pos_mocap->
z);
141 static inline uint16_t mavlink_msg_att_pos_mocap_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_att_pos_mocap_t* att_pos_mocap)
143 return mavlink_msg_att_pos_mocap_pack_chan(system_id, component_id, chan, msg, att_pos_mocap->
time_usec, att_pos_mocap->
q, att_pos_mocap->
x, att_pos_mocap->
y, att_pos_mocap->
z);
156 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
158 static inline void mavlink_msg_att_pos_mocap_send(
mavlink_channel_t chan, uint64_t time_usec,
const float *q,
float x,
float y,
float z)
160 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
166 _mav_put_float_array(buf, 8, q, 4);
167 #if MAVLINK_CRC_EXTRA
178 mav_array_memcpy(packet.
q, q,
sizeof(
float)*4);
179 #if MAVLINK_CRC_EXTRA
187 #if MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN <= MAVLINK_MAX_PAYLOAD_LEN
195 static inline void mavlink_msg_att_pos_mocap_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint64_t time_usec,
const float *q,
float x,
float y,
float z)
197 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
198 char *buf = (
char *)msgbuf;
203 _mav_put_float_array(buf, 8, q, 4);
204 #if MAVLINK_CRC_EXTRA
215 mav_array_memcpy(packet->
q, q,
sizeof(
float)*4);
216 #if MAVLINK_CRC_EXTRA
235 static inline uint64_t mavlink_msg_att_pos_mocap_get_time_usec(
const mavlink_message_t* msg)
237 return _MAV_RETURN_uint64_t(msg, 0);
245 static inline uint16_t mavlink_msg_att_pos_mocap_get_q(
const mavlink_message_t* msg,
float *q)
247 return _MAV_RETURN_float_array(msg, q, 4, 8);
255 static inline float mavlink_msg_att_pos_mocap_get_x(
const mavlink_message_t* msg)
257 return _MAV_RETURN_float(msg, 24);
265 static inline float mavlink_msg_att_pos_mocap_get_y(
const mavlink_message_t* msg)
267 return _MAV_RETURN_float(msg, 28);
275 static inline float mavlink_msg_att_pos_mocap_get_z(
const mavlink_message_t* msg)
277 return _MAV_RETURN_float(msg, 32);
286 static inline void mavlink_msg_att_pos_mocap_decode(
const mavlink_message_t* msg,
mavlink_att_pos_mocap_t* att_pos_mocap)
288 #if MAVLINK_NEED_BYTE_SWAP
289 att_pos_mocap->
time_usec = mavlink_msg_att_pos_mocap_get_time_usec(msg);
290 mavlink_msg_att_pos_mocap_get_q(msg, att_pos_mocap->
q);
291 att_pos_mocap->
x = mavlink_msg_att_pos_mocap_get_x(msg);
292 att_pos_mocap->
y = mavlink_msg_att_pos_mocap_get_y(msg);
293 att_pos_mocap->
z = mavlink_msg_att_pos_mocap_get_z(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
#define MAVLINK_MSG_ID_ATT_POS_MOCAP
Definition: mavlink_msg_att_pos_mocap.h:3
struct __mavlink_att_pos_mocap_t mavlink_att_pos_mocap_t
float z
Z position in meters (NED)
Definition: mavlink_msg_att_pos_mocap.h:11
MAVLINK_HELPER uint16_t mavlink_finalize_message(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t length)
Finalize a MAVLink message with MAVLINK_COMM_0 as default channel.
Definition: mavlink_helpers.h:105
#define _mav_put_uint64_t(buf, wire_offset, b)
Definition: protocol.h:143
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
float y
Y position in meters (NED)
Definition: mavlink_msg_att_pos_mocap.h:10
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
float x
X position in meters (NED)
Definition: mavlink_msg_att_pos_mocap.h:9
uint8_t z
set the acc deadband for z-Axis, this ignores small accelerations
Definition: accelerometer.h:52
#define MAVLINK_MSG_ID_ATT_POS_MOCAP_CRC
Definition: mavlink_msg_att_pos_mocap.h:17
Definition: mavlink_msg_att_pos_mocap.h:5
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t chan, uint8_t length)
Finalize a MAVLink message with channel assignment.
Definition: mavlink_helpers.h:71
#define MAVLINK_MSG_ID_ATT_POS_MOCAP_LEN
Definition: mavlink_msg_att_pos_mocap.h:14
uint64_t time_usec
Timestamp (micros since boot or Unix epoch)
Definition: mavlink_msg_att_pos_mocap.h:7
float q[4]
Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)
Definition: mavlink_msg_att_pos_mocap.h:8