3 #define MAVLINK_MSG_ID_HIL_STATE_QUATERNION 115
25 #define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN 64
26 #define MAVLINK_MSG_ID_115_LEN 64
28 #define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC 4
29 #define MAVLINK_MSG_ID_115_CRC 4
31 #define MAVLINK_MSG_HIL_STATE_QUATERNION_FIELD_ATTITUDE_QUATERNION_LEN 4
33 #define MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION { \
34 "HIL_STATE_QUATERNION", \
36 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_state_quaternion_t, time_usec) }, \
37 { "attitude_quaternion", NULL, MAVLINK_TYPE_FLOAT, 4, 8, offsetof(mavlink_hil_state_quaternion_t, attitude_quaternion) }, \
38 { "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_hil_state_quaternion_t, rollspeed) }, \
39 { "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_hil_state_quaternion_t, pitchspeed) }, \
40 { "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_hil_state_quaternion_t, yawspeed) }, \
41 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_hil_state_quaternion_t, lat) }, \
42 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_hil_state_quaternion_t, lon) }, \
43 { "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 44, offsetof(mavlink_hil_state_quaternion_t, alt) }, \
44 { "vx", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_hil_state_quaternion_t, vx) }, \
45 { "vy", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_hil_state_quaternion_t, vy) }, \
46 { "vz", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_hil_state_quaternion_t, vz) }, \
47 { "ind_airspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 54, offsetof(mavlink_hil_state_quaternion_t, ind_airspeed) }, \
48 { "true_airspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 56, offsetof(mavlink_hil_state_quaternion_t, true_airspeed) }, \
49 { "xacc", NULL, MAVLINK_TYPE_INT16_T, 0, 58, offsetof(mavlink_hil_state_quaternion_t, xacc) }, \
50 { "yacc", NULL, MAVLINK_TYPE_INT16_T, 0, 60, offsetof(mavlink_hil_state_quaternion_t, yacc) }, \
51 { "zacc", NULL, MAVLINK_TYPE_INT16_T, 0, 62, offsetof(mavlink_hil_state_quaternion_t, zacc) }, \
80 static inline uint16_t mavlink_msg_hil_state_quaternion_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
81 uint64_t time_usec,
const float *attitude_quaternion,
float rollspeed,
float pitchspeed,
float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, uint16_t ind_airspeed, uint16_t true_airspeed, int16_t xacc, int16_t yacc, int16_t zacc)
83 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
100 _mav_put_float_array(buf, 8, attitude_quaternion, 4);
124 #if MAVLINK_CRC_EXTRA
155 static inline uint16_t mavlink_msg_hil_state_quaternion_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
156 mavlink_message_t* msg,
157 uint64_t time_usec,
const float *attitude_quaternion,
float rollspeed,
float pitchspeed,
float yawspeed,int32_t lat,int32_t lon,int32_t alt,int16_t vx,int16_t vy,int16_t vz,uint16_t ind_airspeed,uint16_t true_airspeed,int16_t xacc,int16_t yacc,int16_t zacc)
159 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
176 _mav_put_float_array(buf, 8, attitude_quaternion, 4);
200 #if MAVLINK_CRC_EXTRA
215 static inline uint16_t mavlink_msg_hil_state_quaternion_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_hil_state_quaternion_t* hil_state_quaternion)
217 return mavlink_msg_hil_state_quaternion_pack(system_id, component_id, msg, hil_state_quaternion->
time_usec, hil_state_quaternion->
attitude_quaternion, hil_state_quaternion->
rollspeed, hil_state_quaternion->
pitchspeed, hil_state_quaternion->
yawspeed, hil_state_quaternion->
lat, hil_state_quaternion->
lon, hil_state_quaternion->
alt, hil_state_quaternion->
vx, hil_state_quaternion->
vy, hil_state_quaternion->
vz, hil_state_quaternion->
ind_airspeed, hil_state_quaternion->
true_airspeed, hil_state_quaternion->
xacc, hil_state_quaternion->
yacc, hil_state_quaternion->
zacc);
229 static inline uint16_t mavlink_msg_hil_state_quaternion_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_hil_state_quaternion_t* hil_state_quaternion)
231 return mavlink_msg_hil_state_quaternion_pack_chan(system_id, component_id, chan, msg, hil_state_quaternion->
time_usec, hil_state_quaternion->
attitude_quaternion, hil_state_quaternion->
rollspeed, hil_state_quaternion->
pitchspeed, hil_state_quaternion->
yawspeed, hil_state_quaternion->
lat, hil_state_quaternion->
lon, hil_state_quaternion->
alt, hil_state_quaternion->
vx, hil_state_quaternion->
vy, hil_state_quaternion->
vz, hil_state_quaternion->
ind_airspeed, hil_state_quaternion->
true_airspeed, hil_state_quaternion->
xacc, hil_state_quaternion->
yacc, hil_state_quaternion->
zacc);
255 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
257 static inline void mavlink_msg_hil_state_quaternion_send(
mavlink_channel_t chan, uint64_t time_usec,
const float *attitude_quaternion,
float rollspeed,
float pitchspeed,
float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, uint16_t ind_airspeed, uint16_t true_airspeed, int16_t xacc, int16_t yacc, int16_t zacc)
259 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
276 _mav_put_float_array(buf, 8, attitude_quaternion, 4);
277 #if MAVLINK_CRC_EXTRA
300 #if MAVLINK_CRC_EXTRA
308 #if MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
316 static inline void mavlink_msg_hil_state_quaternion_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint64_t time_usec,
const float *attitude_quaternion,
float rollspeed,
float pitchspeed,
float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, uint16_t ind_airspeed, uint16_t true_airspeed, int16_t xacc, int16_t yacc, int16_t zacc)
318 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
319 char *buf = (
char *)msgbuf;
335 _mav_put_float_array(buf, 8, attitude_quaternion, 4);
336 #if MAVLINK_CRC_EXTRA
359 #if MAVLINK_CRC_EXTRA
378 static inline uint64_t mavlink_msg_hil_state_quaternion_get_time_usec(
const mavlink_message_t* msg)
380 return _MAV_RETURN_uint64_t(msg, 0);
388 static inline uint16_t mavlink_msg_hil_state_quaternion_get_attitude_quaternion(
const mavlink_message_t* msg,
float *attitude_quaternion)
390 return _MAV_RETURN_float_array(msg, attitude_quaternion, 4, 8);
398 static inline float mavlink_msg_hil_state_quaternion_get_rollspeed(
const mavlink_message_t* msg)
400 return _MAV_RETURN_float(msg, 24);
408 static inline float mavlink_msg_hil_state_quaternion_get_pitchspeed(
const mavlink_message_t* msg)
410 return _MAV_RETURN_float(msg, 28);
418 static inline float mavlink_msg_hil_state_quaternion_get_yawspeed(
const mavlink_message_t* msg)
420 return _MAV_RETURN_float(msg, 32);
428 static inline int32_t mavlink_msg_hil_state_quaternion_get_lat(
const mavlink_message_t* msg)
430 return _MAV_RETURN_int32_t(msg, 36);
438 static inline int32_t mavlink_msg_hil_state_quaternion_get_lon(
const mavlink_message_t* msg)
440 return _MAV_RETURN_int32_t(msg, 40);
448 static inline int32_t mavlink_msg_hil_state_quaternion_get_alt(
const mavlink_message_t* msg)
450 return _MAV_RETURN_int32_t(msg, 44);
458 static inline int16_t mavlink_msg_hil_state_quaternion_get_vx(
const mavlink_message_t* msg)
460 return _MAV_RETURN_int16_t(msg, 48);
468 static inline int16_t mavlink_msg_hil_state_quaternion_get_vy(
const mavlink_message_t* msg)
470 return _MAV_RETURN_int16_t(msg, 50);
478 static inline int16_t mavlink_msg_hil_state_quaternion_get_vz(
const mavlink_message_t* msg)
480 return _MAV_RETURN_int16_t(msg, 52);
488 static inline uint16_t mavlink_msg_hil_state_quaternion_get_ind_airspeed(
const mavlink_message_t* msg)
490 return _MAV_RETURN_uint16_t(msg, 54);
498 static inline uint16_t mavlink_msg_hil_state_quaternion_get_true_airspeed(
const mavlink_message_t* msg)
500 return _MAV_RETURN_uint16_t(msg, 56);
508 static inline int16_t mavlink_msg_hil_state_quaternion_get_xacc(
const mavlink_message_t* msg)
510 return _MAV_RETURN_int16_t(msg, 58);
518 static inline int16_t mavlink_msg_hil_state_quaternion_get_yacc(
const mavlink_message_t* msg)
520 return _MAV_RETURN_int16_t(msg, 60);
528 static inline int16_t mavlink_msg_hil_state_quaternion_get_zacc(
const mavlink_message_t* msg)
530 return _MAV_RETURN_int16_t(msg, 62);
541 #if MAVLINK_NEED_BYTE_SWAP
542 hil_state_quaternion->
time_usec = mavlink_msg_hil_state_quaternion_get_time_usec(msg);
543 mavlink_msg_hil_state_quaternion_get_attitude_quaternion(msg, hil_state_quaternion->
attitude_quaternion);
544 hil_state_quaternion->
rollspeed = mavlink_msg_hil_state_quaternion_get_rollspeed(msg);
545 hil_state_quaternion->
pitchspeed = mavlink_msg_hil_state_quaternion_get_pitchspeed(msg);
546 hil_state_quaternion->
yawspeed = mavlink_msg_hil_state_quaternion_get_yawspeed(msg);
547 hil_state_quaternion->
lat = mavlink_msg_hil_state_quaternion_get_lat(msg);
548 hil_state_quaternion->
lon = mavlink_msg_hil_state_quaternion_get_lon(msg);
549 hil_state_quaternion->
alt = mavlink_msg_hil_state_quaternion_get_alt(msg);
550 hil_state_quaternion->
vx = mavlink_msg_hil_state_quaternion_get_vx(msg);
551 hil_state_quaternion->
vy = mavlink_msg_hil_state_quaternion_get_vy(msg);
552 hil_state_quaternion->
vz = mavlink_msg_hil_state_quaternion_get_vz(msg);
553 hil_state_quaternion->
ind_airspeed = mavlink_msg_hil_state_quaternion_get_ind_airspeed(msg);
554 hil_state_quaternion->
true_airspeed = mavlink_msg_hil_state_quaternion_get_true_airspeed(msg);
555 hil_state_quaternion->
xacc = mavlink_msg_hil_state_quaternion_get_xacc(msg);
556 hil_state_quaternion->
yacc = mavlink_msg_hil_state_quaternion_get_yacc(msg);
557 hil_state_quaternion->
zacc = mavlink_msg_hil_state_quaternion_get_zacc(msg);
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC
Definition: mavlink_msg_hil_state_quaternion.h:28
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
float yawspeed
Body frame yaw / psi angular speed (rad/s)
Definition: mavlink_msg_hil_state_quaternion.h:11
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN
Definition: mavlink_msg_hil_state_quaternion.h:25
uint16_t ind_airspeed
Indicated airspeed, expressed as m/s * 100.
Definition: mavlink_msg_hil_state_quaternion.h:18
uint64_t time_usec
Timestamp (microseconds since UNIX epoch or microseconds since system boot)
Definition: mavlink_msg_hil_state_quaternion.h:7
int16_t vx
Ground X Speed (Latitude), expressed as m/s * 100.
Definition: mavlink_msg_hil_state_quaternion.h:15
int32_t alt
Altitude in meters, expressed as * 1000 (millimeters)
Definition: mavlink_msg_hil_state_quaternion.h:14
int16_t xacc
X acceleration (mg)
Definition: mavlink_msg_hil_state_quaternion.h:20
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_put_int32_t(buf, wire_offset, b)
Definition: protocol.h:142
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
int16_t vz
Ground Z Speed (Altitude), expressed as m/s * 100.
Definition: mavlink_msg_hil_state_quaternion.h:17
int32_t lon
Longitude, expressed as * 1E7.
Definition: mavlink_msg_hil_state_quaternion.h:13
mavlink_channel_t
Definition: mavlink_types.h:178
int16_t zacc
Z acceleration (mg)
Definition: mavlink_msg_hil_state_quaternion.h:22
struct __mavlink_hil_state_quaternion_t mavlink_hil_state_quaternion_t
int16_t yacc
Y acceleration (mg)
Definition: mavlink_msg_hil_state_quaternion.h:21
Definition: mavlink_msg_hil_state_quaternion.h:5
float rollspeed
Body frame roll / phi angular speed (rad/s)
Definition: mavlink_msg_hil_state_quaternion.h:9
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
int16_t vy
Ground Y Speed (Longitude), expressed as m/s * 100.
Definition: mavlink_msg_hil_state_quaternion.h:16
float pitchspeed
Body frame pitch / theta angular speed (rad/s)
Definition: mavlink_msg_hil_state_quaternion.h:10
float attitude_quaternion[4]
Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-...
Definition: mavlink_msg_hil_state_quaternion.h:8
uint16_t true_airspeed
True airspeed, expressed as m/s * 100.
Definition: mavlink_msg_hil_state_quaternion.h:19
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION
Definition: mavlink_msg_hil_state_quaternion.h:3
int32_t lat
Latitude, expressed as * 1E7.
Definition: mavlink_msg_hil_state_quaternion.h:12
#define _mav_put_uint16_t(buf, wire_offset, b)
Definition: protocol.h:139
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 _mav_put_int16_t(buf, wire_offset, b)
Definition: protocol.h:140