3 #define MAVLINK_MSG_ID_AHRS2 178
15 #define MAVLINK_MSG_ID_AHRS2_LEN 24
16 #define MAVLINK_MSG_ID_178_LEN 24
18 #define MAVLINK_MSG_ID_AHRS2_CRC 47
19 #define MAVLINK_MSG_ID_178_CRC 47
23 #define MAVLINK_MESSAGE_INFO_AHRS2 { \
26 { { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_ahrs2_t, roll) }, \
27 { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_ahrs2_t, pitch) }, \
28 { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_ahrs2_t, yaw) }, \
29 { "altitude", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_ahrs2_t, altitude) }, \
30 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_ahrs2_t, lat) }, \
31 { "lng", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_ahrs2_t, lng) }, \
50 static inline uint16_t mavlink_msg_ahrs2_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
51 float roll,
float pitch,
float yaw,
float altitude, int32_t lat, int32_t lng)
53 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
97 static inline uint16_t mavlink_msg_ahrs2_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
98 mavlink_message_t* msg,
99 float roll,
float pitch,
float yaw,
float altitude,int32_t lat,int32_t lng)
101 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
124 #if MAVLINK_CRC_EXTRA
139 static inline uint16_t mavlink_msg_ahrs2_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_ahrs2_t* ahrs2)
141 return mavlink_msg_ahrs2_pack(system_id, component_id, msg, ahrs2->
roll, ahrs2->
pitch, ahrs2->
yaw, ahrs2->
altitude, ahrs2->
lat, ahrs2->
lng);
153 static inline uint16_t mavlink_msg_ahrs2_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_ahrs2_t* ahrs2)
155 return mavlink_msg_ahrs2_pack_chan(system_id, component_id, chan, msg, ahrs2->
roll, ahrs2->
pitch, ahrs2->
yaw, ahrs2->
altitude, ahrs2->
lat, ahrs2->
lng);
169 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
171 static inline void mavlink_msg_ahrs2_send(
mavlink_channel_t chan,
float roll,
float pitch,
float yaw,
float altitude, int32_t lat, int32_t lng)
173 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
182 #if MAVLINK_CRC_EXTRA
196 #if MAVLINK_CRC_EXTRA
204 #if MAVLINK_MSG_ID_AHRS2_LEN <= MAVLINK_MAX_PAYLOAD_LEN
212 static inline void mavlink_msg_ahrs2_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan,
float roll,
float pitch,
float yaw,
float altitude, int32_t lat, int32_t lng)
214 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
215 char *buf = (
char *)msgbuf;
223 #if MAVLINK_CRC_EXTRA
237 #if MAVLINK_CRC_EXTRA
256 static inline float mavlink_msg_ahrs2_get_roll(
const mavlink_message_t* msg)
258 return _MAV_RETURN_float(msg, 0);
266 static inline float mavlink_msg_ahrs2_get_pitch(
const mavlink_message_t* msg)
268 return _MAV_RETURN_float(msg, 4);
276 static inline float mavlink_msg_ahrs2_get_yaw(
const mavlink_message_t* msg)
278 return _MAV_RETURN_float(msg, 8);
286 static inline float mavlink_msg_ahrs2_get_altitude(
const mavlink_message_t* msg)
288 return _MAV_RETURN_float(msg, 12);
296 static inline int32_t mavlink_msg_ahrs2_get_lat(
const mavlink_message_t* msg)
298 return _MAV_RETURN_int32_t(msg, 16);
306 static inline int32_t mavlink_msg_ahrs2_get_lng(
const mavlink_message_t* msg)
308 return _MAV_RETURN_int32_t(msg, 20);
317 static inline void mavlink_msg_ahrs2_decode(
const mavlink_message_t* msg,
mavlink_ahrs2_t* ahrs2)
319 #if MAVLINK_NEED_BYTE_SWAP
320 ahrs2->
roll = mavlink_msg_ahrs2_get_roll(msg);
321 ahrs2->
pitch = mavlink_msg_ahrs2_get_pitch(msg);
322 ahrs2->
yaw = mavlink_msg_ahrs2_get_yaw(msg);
323 ahrs2->
altitude = mavlink_msg_ahrs2_get_altitude(msg);
324 ahrs2->
lat = mavlink_msg_ahrs2_get_lat(msg);
325 ahrs2->
lng = mavlink_msg_ahrs2_get_lng(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
#define MAVLINK_MSG_ID_AHRS2_CRC
Definition: mavlink_msg_ahrs2.h:18
#define MAVLINK_MSG_ID_AHRS2
Definition: mavlink_msg_ahrs2.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
struct __mavlink_ahrs2_t mavlink_ahrs2_t
#define _mav_put_int32_t(buf, wire_offset, b)
Definition: protocol.h:142
float yaw
Yaw angle (rad)
Definition: mavlink_msg_ahrs2.h:9
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
float roll
Roll angle (rad)
Definition: mavlink_msg_ahrs2.h:7
mavlink_channel_t
Definition: mavlink_types.h:178
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
int32_t lng
Longitude in degrees * 1E7.
Definition: mavlink_msg_ahrs2.h:12
#define MAVLINK_MSG_ID_AHRS2_LEN
Definition: mavlink_msg_ahrs2.h:15
int16_t pitch
Definition: accelerometer.h:52
Definition: mavlink_msg_ahrs2.h:5
int16_t yaw
Definition: sensors.h:31
float pitch
Pitch angle (rad)
Definition: mavlink_msg_ahrs2.h:8
float altitude
Altitude (MSL)
Definition: mavlink_msg_ahrs2.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
int32_t lat
Latitude in degrees * 1E7.
Definition: mavlink_msg_ahrs2.h:11
int16_t roll
Definition: accelerometer.h:51