3 #define MAVLINK_MSG_ID_SIMSTATE 164
20 #define MAVLINK_MSG_ID_SIMSTATE_LEN 44
21 #define MAVLINK_MSG_ID_164_LEN 44
23 #define MAVLINK_MSG_ID_SIMSTATE_CRC 154
24 #define MAVLINK_MSG_ID_164_CRC 154
28 #define MAVLINK_MESSAGE_INFO_SIMSTATE { \
31 { { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_simstate_t, roll) }, \
32 { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_simstate_t, pitch) }, \
33 { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_simstate_t, yaw) }, \
34 { "xacc", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_simstate_t, xacc) }, \
35 { "yacc", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_simstate_t, yacc) }, \
36 { "zacc", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_simstate_t, zacc) }, \
37 { "xgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_simstate_t, xgyro) }, \
38 { "ygyro", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_simstate_t, ygyro) }, \
39 { "zgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_simstate_t, zgyro) }, \
40 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_simstate_t, lat) }, \
41 { "lng", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_simstate_t, lng) }, \
65 static inline uint16_t mavlink_msg_simstate_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
66 float roll,
float pitch,
float yaw,
float xacc,
float yacc,
float zacc,
float xgyro,
float ygyro,
float zgyro, int32_t lat, int32_t lng)
68 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
101 #if MAVLINK_CRC_EXTRA
127 static inline uint16_t mavlink_msg_simstate_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
128 mavlink_message_t* msg,
129 float roll,
float pitch,
float yaw,
float xacc,
float yacc,
float zacc,
float xgyro,
float ygyro,
float zgyro,int32_t lat,int32_t lng)
131 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
154 packet.
xgyro = xgyro;
155 packet.
ygyro = ygyro;
156 packet.
zgyro = zgyro;
164 #if MAVLINK_CRC_EXTRA
179 static inline uint16_t mavlink_msg_simstate_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_simstate_t* simstate)
181 return mavlink_msg_simstate_pack(system_id, component_id, msg, simstate->
roll, simstate->
pitch, simstate->
yaw, simstate->
xacc, simstate->
yacc, simstate->
zacc, simstate->
xgyro, simstate->
ygyro, simstate->
zgyro, simstate->
lat, simstate->
lng);
193 static inline uint16_t mavlink_msg_simstate_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_simstate_t* simstate)
195 return mavlink_msg_simstate_pack_chan(system_id, component_id, chan, msg, simstate->
roll, simstate->
pitch, simstate->
yaw, simstate->
xacc, simstate->
yacc, simstate->
zacc, simstate->
xgyro, simstate->
ygyro, simstate->
zgyro, simstate->
lat, simstate->
lng);
214 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
216 static inline void mavlink_msg_simstate_send(
mavlink_channel_t chan,
float roll,
float pitch,
float yaw,
float xacc,
float yacc,
float zacc,
float xgyro,
float ygyro,
float zgyro, int32_t lat, int32_t lng)
218 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
232 #if MAVLINK_CRC_EXTRA
245 packet.
xgyro = xgyro;
246 packet.
ygyro = ygyro;
247 packet.
zgyro = zgyro;
251 #if MAVLINK_CRC_EXTRA
259 #if MAVLINK_MSG_ID_SIMSTATE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
267 static inline void mavlink_msg_simstate_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan,
float roll,
float pitch,
float yaw,
float xacc,
float yacc,
float zacc,
float xgyro,
float ygyro,
float zgyro, int32_t lat, int32_t lng)
269 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
270 char *buf = (
char *)msgbuf;
283 #if MAVLINK_CRC_EXTRA
296 packet->
xgyro = xgyro;
297 packet->
ygyro = ygyro;
298 packet->
zgyro = zgyro;
302 #if MAVLINK_CRC_EXTRA
321 static inline float mavlink_msg_simstate_get_roll(
const mavlink_message_t* msg)
323 return _MAV_RETURN_float(msg, 0);
331 static inline float mavlink_msg_simstate_get_pitch(
const mavlink_message_t* msg)
333 return _MAV_RETURN_float(msg, 4);
341 static inline float mavlink_msg_simstate_get_yaw(
const mavlink_message_t* msg)
343 return _MAV_RETURN_float(msg, 8);
351 static inline float mavlink_msg_simstate_get_xacc(
const mavlink_message_t* msg)
353 return _MAV_RETURN_float(msg, 12);
361 static inline float mavlink_msg_simstate_get_yacc(
const mavlink_message_t* msg)
363 return _MAV_RETURN_float(msg, 16);
371 static inline float mavlink_msg_simstate_get_zacc(
const mavlink_message_t* msg)
373 return _MAV_RETURN_float(msg, 20);
381 static inline float mavlink_msg_simstate_get_xgyro(
const mavlink_message_t* msg)
383 return _MAV_RETURN_float(msg, 24);
391 static inline float mavlink_msg_simstate_get_ygyro(
const mavlink_message_t* msg)
393 return _MAV_RETURN_float(msg, 28);
401 static inline float mavlink_msg_simstate_get_zgyro(
const mavlink_message_t* msg)
403 return _MAV_RETURN_float(msg, 32);
411 static inline int32_t mavlink_msg_simstate_get_lat(
const mavlink_message_t* msg)
413 return _MAV_RETURN_int32_t(msg, 36);
421 static inline int32_t mavlink_msg_simstate_get_lng(
const mavlink_message_t* msg)
423 return _MAV_RETURN_int32_t(msg, 40);
432 static inline void mavlink_msg_simstate_decode(
const mavlink_message_t* msg,
mavlink_simstate_t* simstate)
434 #if MAVLINK_NEED_BYTE_SWAP
435 simstate->
roll = mavlink_msg_simstate_get_roll(msg);
436 simstate->
pitch = mavlink_msg_simstate_get_pitch(msg);
437 simstate->
yaw = mavlink_msg_simstate_get_yaw(msg);
438 simstate->
xacc = mavlink_msg_simstate_get_xacc(msg);
439 simstate->
yacc = mavlink_msg_simstate_get_yacc(msg);
440 simstate->
zacc = mavlink_msg_simstate_get_zacc(msg);
441 simstate->
xgyro = mavlink_msg_simstate_get_xgyro(msg);
442 simstate->
ygyro = mavlink_msg_simstate_get_ygyro(msg);
443 simstate->
zgyro = mavlink_msg_simstate_get_zgyro(msg);
444 simstate->
lat = mavlink_msg_simstate_get_lat(msg);
445 simstate->
lng = mavlink_msg_simstate_get_lng(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
float pitch
Pitch angle (rad)
Definition: mavlink_msg_simstate.h:8
int32_t lat
Latitude in degrees * 1E7.
Definition: mavlink_msg_simstate.h:16
float roll
Roll angle (rad)
Definition: mavlink_msg_simstate.h:7
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 MAVLINK_MSG_ID_SIMSTATE
Definition: mavlink_msg_simstate.h:3
#define _mav_put_int32_t(buf, wire_offset, b)
Definition: protocol.h:142
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
#define MAVLINK_MSG_ID_SIMSTATE_LEN
Definition: mavlink_msg_simstate.h:20
int32_t lng
Longitude in degrees * 1E7.
Definition: mavlink_msg_simstate.h:17
mavlink_channel_t
Definition: mavlink_types.h:178
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
float xgyro
Angular speed around X axis rad/s.
Definition: mavlink_msg_simstate.h:13
float ygyro
Angular speed around Y axis rad/s.
Definition: mavlink_msg_simstate.h:14
float yacc
Y acceleration m/s/s.
Definition: mavlink_msg_simstate.h:11
struct __mavlink_simstate_t mavlink_simstate_t
#define MAVLINK_MSG_ID_SIMSTATE_CRC
Definition: mavlink_msg_simstate.h:23
int16_t pitch
Definition: accelerometer.h:52
float zacc
Z acceleration m/s/s.
Definition: mavlink_msg_simstate.h:12
int16_t yaw
Definition: sensors.h:31
float zgyro
Angular speed around Z axis rad/s.
Definition: mavlink_msg_simstate.h:15
float yaw
Yaw angle (rad)
Definition: mavlink_msg_simstate.h:9
float xacc
X acceleration m/s/s.
Definition: mavlink_msg_simstate.h:10
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
Definition: mavlink_msg_simstate.h:5
int16_t roll
Definition: accelerometer.h:51