3 #define MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV 61
15 #define MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN 68
16 #define MAVLINK_MSG_ID_61_LEN 68
18 #define MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_CRC 153
19 #define MAVLINK_MSG_ID_61_CRC 153
21 #define MAVLINK_MSG_ATTITUDE_QUATERNION_COV_FIELD_Q_LEN 4
22 #define MAVLINK_MSG_ATTITUDE_QUATERNION_COV_FIELD_COVARIANCE_LEN 9
24 #define MAVLINK_MESSAGE_INFO_ATTITUDE_QUATERNION_COV { \
25 "ATTITUDE_QUATERNION_COV", \
27 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_attitude_quaternion_cov_t, time_boot_ms) }, \
28 { "q", NULL, MAVLINK_TYPE_FLOAT, 4, 4, offsetof(mavlink_attitude_quaternion_cov_t, q) }, \
29 { "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_attitude_quaternion_cov_t, rollspeed) }, \
30 { "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_attitude_quaternion_cov_t, pitchspeed) }, \
31 { "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_attitude_quaternion_cov_t, yawspeed) }, \
32 { "covariance", NULL, MAVLINK_TYPE_FLOAT, 9, 32, offsetof(mavlink_attitude_quaternion_cov_t, covariance) }, \
51 static inline uint16_t mavlink_msg_attitude_quaternion_cov_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
52 uint32_t time_boot_ms,
const float *q,
float rollspeed,
float pitchspeed,
float yawspeed,
const float *covariance)
54 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
55 char buf[MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN];
56 _mav_put_uint32_t(buf, 0, time_boot_ms);
57 _mav_put_float(buf, 20, rollspeed);
58 _mav_put_float(buf, 24, pitchspeed);
59 _mav_put_float(buf, 28, yawspeed);
60 _mav_put_float_array(buf, 4, q, 4);
61 _mav_put_float_array(buf, 32, covariance, 9);
62 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
69 mav_array_memcpy(packet.
q, q,
sizeof(
float)*4);
70 mav_array_memcpy(packet.
covariance, covariance,
sizeof(
float)*9);
71 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
74 msg->msgid = MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV;
76 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_CRC);
78 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
96 static inline uint16_t mavlink_msg_attitude_quaternion_cov_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
97 mavlink_message_t* msg,
98 uint32_t time_boot_ms,
const float *q,
float rollspeed,
float pitchspeed,
float yawspeed,
const float *covariance)
100 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
101 char buf[MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN];
102 _mav_put_uint32_t(buf, 0, time_boot_ms);
103 _mav_put_float(buf, 20, rollspeed);
104 _mav_put_float(buf, 24, pitchspeed);
105 _mav_put_float(buf, 28, yawspeed);
106 _mav_put_float_array(buf, 4, q, 4);
107 _mav_put_float_array(buf, 32, covariance, 9);
108 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
115 mav_array_memcpy(packet.
q, q,
sizeof(
float)*4);
116 mav_array_memcpy(packet.
covariance, covariance,
sizeof(
float)*9);
117 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
120 msg->msgid = MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV;
121 #if MAVLINK_CRC_EXTRA
122 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_CRC);
124 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
136 static inline uint16_t mavlink_msg_attitude_quaternion_cov_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_attitude_quaternion_cov_t* attitude_quaternion_cov)
138 return mavlink_msg_attitude_quaternion_cov_pack(system_id, component_id, msg, attitude_quaternion_cov->
time_boot_ms, attitude_quaternion_cov->
q, attitude_quaternion_cov->
rollspeed, attitude_quaternion_cov->
pitchspeed, attitude_quaternion_cov->
yawspeed, attitude_quaternion_cov->
covariance);
150 static inline uint16_t mavlink_msg_attitude_quaternion_cov_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_attitude_quaternion_cov_t* attitude_quaternion_cov)
152 return mavlink_msg_attitude_quaternion_cov_pack_chan(system_id, component_id, chan, msg, attitude_quaternion_cov->
time_boot_ms, attitude_quaternion_cov->
q, attitude_quaternion_cov->
rollspeed, attitude_quaternion_cov->
pitchspeed, attitude_quaternion_cov->
yawspeed, attitude_quaternion_cov->
covariance);
166 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
168 static inline void mavlink_msg_attitude_quaternion_cov_send(mavlink_channel_t chan, uint32_t time_boot_ms,
const float *q,
float rollspeed,
float pitchspeed,
float yawspeed,
const float *covariance)
170 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
171 char buf[MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN];
172 _mav_put_uint32_t(buf, 0, time_boot_ms);
173 _mav_put_float(buf, 20, rollspeed);
174 _mav_put_float(buf, 24, pitchspeed);
175 _mav_put_float(buf, 28, yawspeed);
176 _mav_put_float_array(buf, 4, q, 4);
177 _mav_put_float_array(buf, 32, covariance, 9);
178 #if MAVLINK_CRC_EXTRA
179 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV, buf, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_CRC);
181 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV, buf, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
189 mav_array_memcpy(packet.
q, q,
sizeof(
float)*4);
190 mav_array_memcpy(packet.
covariance, covariance,
sizeof(
float)*9);
191 #if MAVLINK_CRC_EXTRA
192 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV, (
const char *)&packet, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_CRC);
194 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV, (
const char *)&packet, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
199 #if MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN <= MAVLINK_MAX_PAYLOAD_LEN
207 static inline void mavlink_msg_attitude_quaternion_cov_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms,
const float *q,
float rollspeed,
float pitchspeed,
float yawspeed,
const float *covariance)
209 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
210 char *buf = (
char *)msgbuf;
211 _mav_put_uint32_t(buf, 0, time_boot_ms);
212 _mav_put_float(buf, 20, rollspeed);
213 _mav_put_float(buf, 24, pitchspeed);
214 _mav_put_float(buf, 28, yawspeed);
215 _mav_put_float_array(buf, 4, q, 4);
216 _mav_put_float_array(buf, 32, covariance, 9);
217 #if MAVLINK_CRC_EXTRA
218 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV, buf, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_CRC);
220 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV, buf, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
228 mav_array_memcpy(packet->
q, q,
sizeof(
float)*4);
229 mav_array_memcpy(packet->
covariance, covariance,
sizeof(
float)*9);
230 #if MAVLINK_CRC_EXTRA
231 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV, (
const char *)packet, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_CRC);
233 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV, (
const char *)packet, MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
249 static inline uint32_t mavlink_msg_attitude_quaternion_cov_get_time_boot_ms(
const mavlink_message_t* msg)
251 return _MAV_RETURN_uint32_t(msg, 0);
259 static inline uint16_t mavlink_msg_attitude_quaternion_cov_get_q(
const mavlink_message_t* msg,
float *q)
261 return _MAV_RETURN_float_array(msg, q, 4, 4);
269 static inline float mavlink_msg_attitude_quaternion_cov_get_rollspeed(
const mavlink_message_t* msg)
271 return _MAV_RETURN_float(msg, 20);
279 static inline float mavlink_msg_attitude_quaternion_cov_get_pitchspeed(
const mavlink_message_t* msg)
281 return _MAV_RETURN_float(msg, 24);
289 static inline float mavlink_msg_attitude_quaternion_cov_get_yawspeed(
const mavlink_message_t* msg)
291 return _MAV_RETURN_float(msg, 28);
299 static inline uint16_t mavlink_msg_attitude_quaternion_cov_get_covariance(
const mavlink_message_t* msg,
float *covariance)
301 return _MAV_RETURN_float_array(msg, covariance, 9, 32);
312 #if MAVLINK_NEED_BYTE_SWAP
313 attitude_quaternion_cov->
time_boot_ms = mavlink_msg_attitude_quaternion_cov_get_time_boot_ms(msg);
314 mavlink_msg_attitude_quaternion_cov_get_q(msg, attitude_quaternion_cov->
q);
315 attitude_quaternion_cov->
rollspeed = mavlink_msg_attitude_quaternion_cov_get_rollspeed(msg);
316 attitude_quaternion_cov->
pitchspeed = mavlink_msg_attitude_quaternion_cov_get_pitchspeed(msg);
317 attitude_quaternion_cov->
yawspeed = mavlink_msg_attitude_quaternion_cov_get_yawspeed(msg);
318 mavlink_msg_attitude_quaternion_cov_get_covariance(msg, attitude_quaternion_cov->
covariance);
320 memcpy(attitude_quaternion_cov, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV_LEN);
float q[4]
Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)
Definition: mavlink_msg_attitude_quaternion_cov.h:8
uint32_t time_boot_ms
Timestamp (milliseconds since system boot)
Definition: mavlink_msg_attitude_quaternion_cov.h:7
float rollspeed
Roll angular speed (rad/s)
Definition: mavlink_msg_attitude_quaternion_cov.h:9
Definition: mavlink_msg_attitude_quaternion_cov.h:5
float covariance[9]
Attitude covariance.
Definition: mavlink_msg_attitude_quaternion_cov.h:12
float yawspeed
Yaw angular speed (rad/s)
Definition: mavlink_msg_attitude_quaternion_cov.h:11
float pitchspeed
Pitch angular speed (rad/s)
Definition: mavlink_msg_attitude_quaternion_cov.h:10