3 #define MAVLINK_MSG_ID_SIM_STATE 108
30 #define MAVLINK_MSG_ID_SIM_STATE_LEN 84
31 #define MAVLINK_MSG_ID_108_LEN 84
33 #define MAVLINK_MSG_ID_SIM_STATE_CRC 32
34 #define MAVLINK_MSG_ID_108_CRC 32
38 #define MAVLINK_MESSAGE_INFO_SIM_STATE { \
41 { { "q1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_sim_state_t, q1) }, \
42 { "q2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_sim_state_t, q2) }, \
43 { "q3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_sim_state_t, q3) }, \
44 { "q4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_sim_state_t, q4) }, \
45 { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_sim_state_t, roll) }, \
46 { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_sim_state_t, pitch) }, \
47 { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_sim_state_t, yaw) }, \
48 { "xacc", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_sim_state_t, xacc) }, \
49 { "yacc", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_sim_state_t, yacc) }, \
50 { "zacc", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_sim_state_t, zacc) }, \
51 { "xgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_sim_state_t, xgyro) }, \
52 { "ygyro", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_sim_state_t, ygyro) }, \
53 { "zgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_sim_state_t, zgyro) }, \
54 { "lat", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_sim_state_t, lat) }, \
55 { "lon", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_sim_state_t, lon) }, \
56 { "alt", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_sim_state_t, alt) }, \
57 { "std_dev_horz", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_sim_state_t, std_dev_horz) }, \
58 { "std_dev_vert", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_sim_state_t, std_dev_vert) }, \
59 { "vn", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_sim_state_t, vn) }, \
60 { "ve", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_sim_state_t, ve) }, \
61 { "vd", NULL, MAVLINK_TYPE_FLOAT, 0, 80, offsetof(mavlink_sim_state_t, vd) }, \
95 static inline uint16_t mavlink_msg_sim_state_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
96 float q1,
float q2,
float q3,
float q4,
float roll,
float pitch,
float yaw,
float xacc,
float yacc,
float zacc,
float xgyro,
float ygyro,
float zgyro,
float lat,
float lon,
float alt,
float std_dev_horz,
float std_dev_vert,
float vn,
float ve,
float vd)
98 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
135 packet.
xgyro = xgyro;
136 packet.
ygyro = ygyro;
137 packet.
zgyro = zgyro;
151 #if MAVLINK_CRC_EXTRA
187 static inline uint16_t mavlink_msg_sim_state_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
188 mavlink_message_t* msg,
189 float q1,
float q2,
float q3,
float q4,
float roll,
float pitch,
float yaw,
float xacc,
float yacc,
float zacc,
float xgyro,
float ygyro,
float zgyro,
float lat,
float lon,
float alt,
float std_dev_horz,
float std_dev_vert,
float vn,
float ve,
float vd)
191 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
228 packet.
xgyro = xgyro;
229 packet.
ygyro = ygyro;
230 packet.
zgyro = zgyro;
244 #if MAVLINK_CRC_EXTRA
259 static inline uint16_t mavlink_msg_sim_state_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_sim_state_t* sim_state)
261 return mavlink_msg_sim_state_pack(system_id, component_id, msg, sim_state->
q1, sim_state->
q2, sim_state->
q3, sim_state->
q4, sim_state->
roll, sim_state->
pitch, sim_state->
yaw, sim_state->
xacc, sim_state->
yacc, sim_state->
zacc, sim_state->
xgyro, sim_state->
ygyro, sim_state->
zgyro, sim_state->
lat, sim_state->
lon, sim_state->
alt, sim_state->
std_dev_horz, sim_state->
std_dev_vert, sim_state->
vn, sim_state->
ve, sim_state->
vd);
273 static inline uint16_t mavlink_msg_sim_state_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_sim_state_t* sim_state)
275 return mavlink_msg_sim_state_pack_chan(system_id, component_id, chan, msg, sim_state->
q1, sim_state->
q2, sim_state->
q3, sim_state->
q4, sim_state->
roll, sim_state->
pitch, sim_state->
yaw, sim_state->
xacc, sim_state->
yacc, sim_state->
zacc, sim_state->
xgyro, sim_state->
ygyro, sim_state->
zgyro, sim_state->
lat, sim_state->
lon, sim_state->
alt, sim_state->
std_dev_horz, sim_state->
std_dev_vert, sim_state->
vn, sim_state->
ve, sim_state->
vd);
304 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
306 static inline void mavlink_msg_sim_state_send(
mavlink_channel_t chan,
float q1,
float q2,
float q3,
float q4,
float roll,
float pitch,
float yaw,
float xacc,
float yacc,
float zacc,
float xgyro,
float ygyro,
float zgyro,
float lat,
float lon,
float alt,
float std_dev_horz,
float std_dev_vert,
float vn,
float ve,
float vd)
308 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
332 #if MAVLINK_CRC_EXTRA
349 packet.
xgyro = xgyro;
350 packet.
ygyro = ygyro;
351 packet.
zgyro = zgyro;
361 #if MAVLINK_CRC_EXTRA
369 #if MAVLINK_MSG_ID_SIM_STATE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
377 static inline void mavlink_msg_sim_state_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan,
float q1,
float q2,
float q3,
float q4,
float roll,
float pitch,
float yaw,
float xacc,
float yacc,
float zacc,
float xgyro,
float ygyro,
float zgyro,
float lat,
float lon,
float alt,
float std_dev_horz,
float std_dev_vert,
float vn,
float ve,
float vd)
379 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
380 char *buf = (
char *)msgbuf;
403 #if MAVLINK_CRC_EXTRA
420 packet->
xgyro = xgyro;
421 packet->
ygyro = ygyro;
422 packet->
zgyro = zgyro;
432 #if MAVLINK_CRC_EXTRA
451 static inline float mavlink_msg_sim_state_get_q1(
const mavlink_message_t* msg)
453 return _MAV_RETURN_float(msg, 0);
461 static inline float mavlink_msg_sim_state_get_q2(
const mavlink_message_t* msg)
463 return _MAV_RETURN_float(msg, 4);
471 static inline float mavlink_msg_sim_state_get_q3(
const mavlink_message_t* msg)
473 return _MAV_RETURN_float(msg, 8);
481 static inline float mavlink_msg_sim_state_get_q4(
const mavlink_message_t* msg)
483 return _MAV_RETURN_float(msg, 12);
491 static inline float mavlink_msg_sim_state_get_roll(
const mavlink_message_t* msg)
493 return _MAV_RETURN_float(msg, 16);
501 static inline float mavlink_msg_sim_state_get_pitch(
const mavlink_message_t* msg)
503 return _MAV_RETURN_float(msg, 20);
511 static inline float mavlink_msg_sim_state_get_yaw(
const mavlink_message_t* msg)
513 return _MAV_RETURN_float(msg, 24);
521 static inline float mavlink_msg_sim_state_get_xacc(
const mavlink_message_t* msg)
523 return _MAV_RETURN_float(msg, 28);
531 static inline float mavlink_msg_sim_state_get_yacc(
const mavlink_message_t* msg)
533 return _MAV_RETURN_float(msg, 32);
541 static inline float mavlink_msg_sim_state_get_zacc(
const mavlink_message_t* msg)
543 return _MAV_RETURN_float(msg, 36);
551 static inline float mavlink_msg_sim_state_get_xgyro(
const mavlink_message_t* msg)
553 return _MAV_RETURN_float(msg, 40);
561 static inline float mavlink_msg_sim_state_get_ygyro(
const mavlink_message_t* msg)
563 return _MAV_RETURN_float(msg, 44);
571 static inline float mavlink_msg_sim_state_get_zgyro(
const mavlink_message_t* msg)
573 return _MAV_RETURN_float(msg, 48);
581 static inline float mavlink_msg_sim_state_get_lat(
const mavlink_message_t* msg)
583 return _MAV_RETURN_float(msg, 52);
591 static inline float mavlink_msg_sim_state_get_lon(
const mavlink_message_t* msg)
593 return _MAV_RETURN_float(msg, 56);
601 static inline float mavlink_msg_sim_state_get_alt(
const mavlink_message_t* msg)
603 return _MAV_RETURN_float(msg, 60);
611 static inline float mavlink_msg_sim_state_get_std_dev_horz(
const mavlink_message_t* msg)
613 return _MAV_RETURN_float(msg, 64);
621 static inline float mavlink_msg_sim_state_get_std_dev_vert(
const mavlink_message_t* msg)
623 return _MAV_RETURN_float(msg, 68);
631 static inline float mavlink_msg_sim_state_get_vn(
const mavlink_message_t* msg)
633 return _MAV_RETURN_float(msg, 72);
641 static inline float mavlink_msg_sim_state_get_ve(
const mavlink_message_t* msg)
643 return _MAV_RETURN_float(msg, 76);
651 static inline float mavlink_msg_sim_state_get_vd(
const mavlink_message_t* msg)
653 return _MAV_RETURN_float(msg, 80);
662 static inline void mavlink_msg_sim_state_decode(
const mavlink_message_t* msg,
mavlink_sim_state_t* sim_state)
664 #if MAVLINK_NEED_BYTE_SWAP
665 sim_state->
q1 = mavlink_msg_sim_state_get_q1(msg);
666 sim_state->
q2 = mavlink_msg_sim_state_get_q2(msg);
667 sim_state->
q3 = mavlink_msg_sim_state_get_q3(msg);
668 sim_state->
q4 = mavlink_msg_sim_state_get_q4(msg);
669 sim_state->
roll = mavlink_msg_sim_state_get_roll(msg);
670 sim_state->
pitch = mavlink_msg_sim_state_get_pitch(msg);
671 sim_state->
yaw = mavlink_msg_sim_state_get_yaw(msg);
672 sim_state->
xacc = mavlink_msg_sim_state_get_xacc(msg);
673 sim_state->
yacc = mavlink_msg_sim_state_get_yacc(msg);
674 sim_state->
zacc = mavlink_msg_sim_state_get_zacc(msg);
675 sim_state->
xgyro = mavlink_msg_sim_state_get_xgyro(msg);
676 sim_state->
ygyro = mavlink_msg_sim_state_get_ygyro(msg);
677 sim_state->
zgyro = mavlink_msg_sim_state_get_zgyro(msg);
678 sim_state->
lat = mavlink_msg_sim_state_get_lat(msg);
679 sim_state->
lon = mavlink_msg_sim_state_get_lon(msg);
680 sim_state->
alt = mavlink_msg_sim_state_get_alt(msg);
681 sim_state->
std_dev_horz = mavlink_msg_sim_state_get_std_dev_horz(msg);
682 sim_state->
std_dev_vert = mavlink_msg_sim_state_get_std_dev_vert(msg);
683 sim_state->
vn = mavlink_msg_sim_state_get_vn(msg);
684 sim_state->
ve = mavlink_msg_sim_state_get_ve(msg);
685 sim_state->
vd = mavlink_msg_sim_state_get_vd(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
float alt
Altitude in meters.
Definition: mavlink_msg_sim_state.h:22
float q2
True attitude quaternion component 2, x (0 in null-rotation)
Definition: mavlink_msg_sim_state.h:8
float roll
Attitude roll expressed as Euler angles, not recommended except for human-readable outputs...
Definition: mavlink_msg_sim_state.h:11
float std_dev_horz
Horizontal position standard deviation.
Definition: mavlink_msg_sim_state.h:23
float xgyro
Angular speed around X axis rad/s.
Definition: mavlink_msg_sim_state.h:17
float q4
True attitude quaternion component 4, z (0 in null-rotation)
Definition: mavlink_msg_sim_state.h:10
float lon
Longitude in degrees.
Definition: mavlink_msg_sim_state.h:21
float lat
Latitude in degrees.
Definition: mavlink_msg_sim_state.h:20
float std_dev_vert
Vertical position standard deviation.
Definition: mavlink_msg_sim_state.h:24
float ve
True velocity in m/s in EAST direction in earth-fixed NED frame.
Definition: mavlink_msg_sim_state.h:26
#define MAVLINK_MSG_ID_SIM_STATE
Definition: mavlink_msg_sim_state.h:3
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_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
float q3
True attitude quaternion component 3, y (0 in null-rotation)
Definition: mavlink_msg_sim_state.h:9
mavlink_channel_t
Definition: mavlink_types.h:178
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
float pitch
Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs...
Definition: mavlink_msg_sim_state.h:12
int16_t pitch
Definition: accelerometer.h:52
#define MAVLINK_MSG_ID_SIM_STATE_CRC
Definition: mavlink_msg_sim_state.h:33
float vd
True velocity in m/s in DOWN direction in earth-fixed NED frame.
Definition: mavlink_msg_sim_state.h:27
struct __mavlink_sim_state_t mavlink_sim_state_t
float yacc
Y acceleration m/s/s.
Definition: mavlink_msg_sim_state.h:15
float zacc
Z acceleration m/s/s.
Definition: mavlink_msg_sim_state.h:16
int16_t yaw
Definition: sensors.h:31
float yaw
Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs...
Definition: mavlink_msg_sim_state.h:13
float vn
True velocity in m/s in NORTH direction in earth-fixed NED frame.
Definition: mavlink_msg_sim_state.h:25
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
float zgyro
Angular speed around Z axis rad/s.
Definition: mavlink_msg_sim_state.h:19
float xacc
X acceleration m/s/s.
Definition: mavlink_msg_sim_state.h:14
float ygyro
Angular speed around Y axis rad/s.
Definition: mavlink_msg_sim_state.h:18
float q1
True attitude quaternion component 1, w (1 in null-rotation)
Definition: mavlink_msg_sim_state.h:7
Definition: mavlink_msg_sim_state.h:5
int16_t roll
Definition: accelerometer.h:51
#define MAVLINK_MSG_ID_SIM_STATE_LEN
Definition: mavlink_msg_sim_state.h:30