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) }, \ 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 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 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);
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 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;
336 #if MAVLINK_CRC_EXTRA 359 #if MAVLINK_CRC_EXTRA 380 return _MAV_RETURN_uint64_t(msg, 0);
390 return _MAV_RETURN_float_array(msg, attitude_quaternion, 4, 8);
400 return _MAV_RETURN_float(msg, 24);
410 return _MAV_RETURN_float(msg, 28);
420 return _MAV_RETURN_float(msg, 32);
430 return _MAV_RETURN_int32_t(msg, 36);
440 return _MAV_RETURN_int32_t(msg, 40);
450 return _MAV_RETURN_int32_t(msg, 44);
460 return _MAV_RETURN_int16_t(msg, 48);
470 return _MAV_RETURN_int16_t(msg, 50);
480 return _MAV_RETURN_int16_t(msg, 52);
490 return _MAV_RETURN_uint16_t(msg, 54);
500 return _MAV_RETURN_uint16_t(msg, 56);
510 return _MAV_RETURN_int16_t(msg, 58);
520 return _MAV_RETURN_int16_t(msg, 60);
530 return _MAV_RETURN_int16_t(msg, 62);
541 #if MAVLINK_NEED_BYTE_SWAP static int32_t mavlink_msg_hil_state_quaternion_get_lon(const mavlink_message_t *msg)
Get field lon from hil_state_quaternion message.
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC
static int16_t mavlink_msg_hil_state_quaternion_get_zacc(const mavlink_message_t *msg)
Get field zacc from hil_state_quaternion message.
#define _mav_put_float(buf, wire_offset, b)
static int16_t mavlink_msg_hil_state_quaternion_get_vy(const mavlink_message_t *msg)
Get field vy from hil_state_quaternion message.
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN
static int32_t mavlink_msg_hil_state_quaternion_get_lat(const mavlink_message_t *msg)
Get field lat from hil_state_quaternion message.
static 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)
Encode a hil_state_quaternion struct.
static uint16_t mavlink_msg_hil_state_quaternion_get_true_airspeed(const mavlink_message_t *msg)
Get field true_airspeed from hil_state_quaternion message.
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.
#define _mav_put_uint64_t(buf, wire_offset, b)
#define _mav_put_int32_t(buf, wire_offset, b)
#define _MAV_PAYLOAD_NON_CONST(msg)
static float mavlink_msg_hil_state_quaternion_get_pitchspeed(const mavlink_message_t *msg)
Get field pitchspeed from hil_state_quaternion message.
static int16_t mavlink_msg_hil_state_quaternion_get_yacc(const mavlink_message_t *msg)
Get field yacc from hil_state_quaternion message.
struct __mavlink_hil_state_quaternion_t mavlink_hil_state_quaternion_t
static int16_t mavlink_msg_hil_state_quaternion_get_vx(const mavlink_message_t *msg)
Get field vx from hil_state_quaternion message.
#define _MAV_PAYLOAD(msg)
static int16_t mavlink_msg_hil_state_quaternion_get_vz(const mavlink_message_t *msg)
Get field vz from hil_state_quaternion message.
static float mavlink_msg_hil_state_quaternion_get_rollspeed(const mavlink_message_t *msg)
Get field rollspeed from hil_state_quaternion message.
static uint16_t mavlink_msg_hil_state_quaternion_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t *msg, 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)
Pack a hil_state_quaternion message on a channel.
static void mavlink_msg_hil_state_quaternion_decode(const mavlink_message_t *msg, mavlink_hil_state_quaternion_t *hil_state_quaternion)
Decode a hil_state_quaternion message into a struct.
float attitude_quaternion[4]
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION
static void mav_array_memcpy(void *dest, const void *src, size_t n)
static uint64_t mavlink_msg_hil_state_quaternion_get_time_usec(const mavlink_message_t *msg)
Send a hil_state_quaternion message.
static 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)
Encode a hil_state_quaternion struct on a channel.
#define _mav_put_uint16_t(buf, wire_offset, b)
static int32_t mavlink_msg_hil_state_quaternion_get_alt(const mavlink_message_t *msg)
Get field alt from hil_state_quaternion message.
static uint16_t mavlink_msg_hil_state_quaternion_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, 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)
Pack a hil_state_quaternion message.
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.
#define _mav_put_int16_t(buf, wire_offset, b)
static int16_t mavlink_msg_hil_state_quaternion_get_xacc(const mavlink_message_t *msg)
Get field xacc from hil_state_quaternion message.
static uint16_t mavlink_msg_hil_state_quaternion_get_ind_airspeed(const mavlink_message_t *msg)
Get field ind_airspeed from hil_state_quaternion message.
static float mavlink_msg_hil_state_quaternion_get_yawspeed(const mavlink_message_t *msg)
Get field yawspeed from hil_state_quaternion message.
static uint16_t mavlink_msg_hil_state_quaternion_get_attitude_quaternion(const mavlink_message_t *msg, float *attitude_quaternion)
Get field attitude_quaternion from hil_state_quaternion message.