You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

438 lines
15 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #pragma once
  2. // MESSAGE AHRS3 PACKING
  3. #define MAVLINK_MSG_ID_AHRS3 182
  4. MAVPACKED(
  5. typedef struct __mavlink_ahrs3_t {
  6. float roll; /*< [rad] Roll angle.*/
  7. float pitch; /*< [rad] Pitch angle.*/
  8. float yaw; /*< [rad] Yaw angle.*/
  9. float altitude; /*< [m] Altitude (MSL).*/
  10. int32_t lat; /*< [degE7] Latitude.*/
  11. int32_t lng; /*< [degE7] Longitude.*/
  12. float v1; /*< Test variable1.*/
  13. float v2; /*< Test variable2.*/
  14. float v3; /*< Test variable3.*/
  15. float v4; /*< Test variable4.*/
  16. }) mavlink_ahrs3_t;
  17. #define MAVLINK_MSG_ID_AHRS3_LEN 40
  18. #define MAVLINK_MSG_ID_AHRS3_MIN_LEN 40
  19. #define MAVLINK_MSG_ID_182_LEN 40
  20. #define MAVLINK_MSG_ID_182_MIN_LEN 40
  21. #define MAVLINK_MSG_ID_AHRS3_CRC 229
  22. #define MAVLINK_MSG_ID_182_CRC 229
  23. #if MAVLINK_COMMAND_24BIT
  24. #define MAVLINK_MESSAGE_INFO_AHRS3 { \
  25. 182, \
  26. "AHRS3", \
  27. 10, \
  28. { { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_ahrs3_t, roll) }, \
  29. { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_ahrs3_t, pitch) }, \
  30. { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_ahrs3_t, yaw) }, \
  31. { "altitude", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_ahrs3_t, altitude) }, \
  32. { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_ahrs3_t, lat) }, \
  33. { "lng", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_ahrs3_t, lng) }, \
  34. { "v1", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_ahrs3_t, v1) }, \
  35. { "v2", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_ahrs3_t, v2) }, \
  36. { "v3", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_ahrs3_t, v3) }, \
  37. { "v4", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_ahrs3_t, v4) }, \
  38. } \
  39. }
  40. #else
  41. #define MAVLINK_MESSAGE_INFO_AHRS3 { \
  42. "AHRS3", \
  43. 10, \
  44. { { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_ahrs3_t, roll) }, \
  45. { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_ahrs3_t, pitch) }, \
  46. { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_ahrs3_t, yaw) }, \
  47. { "altitude", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_ahrs3_t, altitude) }, \
  48. { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_ahrs3_t, lat) }, \
  49. { "lng", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_ahrs3_t, lng) }, \
  50. { "v1", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_ahrs3_t, v1) }, \
  51. { "v2", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_ahrs3_t, v2) }, \
  52. { "v3", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_ahrs3_t, v3) }, \
  53. { "v4", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_ahrs3_t, v4) }, \
  54. } \
  55. }
  56. #endif
  57. /**
  58. * @brief Pack a ahrs3 message
  59. * @param system_id ID of this system
  60. * @param component_id ID of this component (e.g. 200 for IMU)
  61. * @param msg The MAVLink message to compress the data into
  62. *
  63. * @param roll [rad] Roll angle.
  64. * @param pitch [rad] Pitch angle.
  65. * @param yaw [rad] Yaw angle.
  66. * @param altitude [m] Altitude (MSL).
  67. * @param lat [degE7] Latitude.
  68. * @param lng [degE7] Longitude.
  69. * @param v1 Test variable1.
  70. * @param v2 Test variable2.
  71. * @param v3 Test variable3.
  72. * @param v4 Test variable4.
  73. * @return length of the message in bytes (excluding serial stream start sign)
  74. */
  75. static inline uint16_t mavlink_msg_ahrs3_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
  76. float roll, float pitch, float yaw, float altitude, int32_t lat, int32_t lng, float v1, float v2, float v3, float v4)
  77. {
  78. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  79. char buf[MAVLINK_MSG_ID_AHRS3_LEN];
  80. _mav_put_float(buf, 0, roll);
  81. _mav_put_float(buf, 4, pitch);
  82. _mav_put_float(buf, 8, yaw);
  83. _mav_put_float(buf, 12, altitude);
  84. _mav_put_int32_t(buf, 16, lat);
  85. _mav_put_int32_t(buf, 20, lng);
  86. _mav_put_float(buf, 24, v1);
  87. _mav_put_float(buf, 28, v2);
  88. _mav_put_float(buf, 32, v3);
  89. _mav_put_float(buf, 36, v4);
  90. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AHRS3_LEN);
  91. #else
  92. mavlink_ahrs3_t packet;
  93. packet.roll = roll;
  94. packet.pitch = pitch;
  95. packet.yaw = yaw;
  96. packet.altitude = altitude;
  97. packet.lat = lat;
  98. packet.lng = lng;
  99. packet.v1 = v1;
  100. packet.v2 = v2;
  101. packet.v3 = v3;
  102. packet.v4 = v4;
  103. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AHRS3_LEN);
  104. #endif
  105. msg->msgid = MAVLINK_MSG_ID_AHRS3;
  106. return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AHRS3_MIN_LEN, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
  107. }
  108. /**
  109. * @brief Pack a ahrs3 message on a channel
  110. * @param system_id ID of this system
  111. * @param component_id ID of this component (e.g. 200 for IMU)
  112. * @param chan The MAVLink channel this message will be sent over
  113. * @param msg The MAVLink message to compress the data into
  114. * @param roll [rad] Roll angle.
  115. * @param pitch [rad] Pitch angle.
  116. * @param yaw [rad] Yaw angle.
  117. * @param altitude [m] Altitude (MSL).
  118. * @param lat [degE7] Latitude.
  119. * @param lng [degE7] Longitude.
  120. * @param v1 Test variable1.
  121. * @param v2 Test variable2.
  122. * @param v3 Test variable3.
  123. * @param v4 Test variable4.
  124. * @return length of the message in bytes (excluding serial stream start sign)
  125. */
  126. static inline uint16_t mavlink_msg_ahrs3_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
  127. mavlink_message_t* msg,
  128. float roll,float pitch,float yaw,float altitude,int32_t lat,int32_t lng,float v1,float v2,float v3,float v4)
  129. {
  130. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  131. char buf[MAVLINK_MSG_ID_AHRS3_LEN];
  132. _mav_put_float(buf, 0, roll);
  133. _mav_put_float(buf, 4, pitch);
  134. _mav_put_float(buf, 8, yaw);
  135. _mav_put_float(buf, 12, altitude);
  136. _mav_put_int32_t(buf, 16, lat);
  137. _mav_put_int32_t(buf, 20, lng);
  138. _mav_put_float(buf, 24, v1);
  139. _mav_put_float(buf, 28, v2);
  140. _mav_put_float(buf, 32, v3);
  141. _mav_put_float(buf, 36, v4);
  142. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AHRS3_LEN);
  143. #else
  144. mavlink_ahrs3_t packet;
  145. packet.roll = roll;
  146. packet.pitch = pitch;
  147. packet.yaw = yaw;
  148. packet.altitude = altitude;
  149. packet.lat = lat;
  150. packet.lng = lng;
  151. packet.v1 = v1;
  152. packet.v2 = v2;
  153. packet.v3 = v3;
  154. packet.v4 = v4;
  155. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AHRS3_LEN);
  156. #endif
  157. msg->msgid = MAVLINK_MSG_ID_AHRS3;
  158. return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AHRS3_MIN_LEN, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
  159. }
  160. /**
  161. * @brief Encode a ahrs3 struct
  162. *
  163. * @param system_id ID of this system
  164. * @param component_id ID of this component (e.g. 200 for IMU)
  165. * @param msg The MAVLink message to compress the data into
  166. * @param ahrs3 C-struct to read the message contents from
  167. */
  168. static inline uint16_t mavlink_msg_ahrs3_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_ahrs3_t* ahrs3)
  169. {
  170. return mavlink_msg_ahrs3_pack(system_id, component_id, msg, ahrs3->roll, ahrs3->pitch, ahrs3->yaw, ahrs3->altitude, ahrs3->lat, ahrs3->lng, ahrs3->v1, ahrs3->v2, ahrs3->v3, ahrs3->v4);
  171. }
  172. /**
  173. * @brief Encode a ahrs3 struct on a channel
  174. *
  175. * @param system_id ID of this system
  176. * @param component_id ID of this component (e.g. 200 for IMU)
  177. * @param chan The MAVLink channel this message will be sent over
  178. * @param msg The MAVLink message to compress the data into
  179. * @param ahrs3 C-struct to read the message contents from
  180. */
  181. static inline uint16_t mavlink_msg_ahrs3_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_ahrs3_t* ahrs3)
  182. {
  183. return mavlink_msg_ahrs3_pack_chan(system_id, component_id, chan, msg, ahrs3->roll, ahrs3->pitch, ahrs3->yaw, ahrs3->altitude, ahrs3->lat, ahrs3->lng, ahrs3->v1, ahrs3->v2, ahrs3->v3, ahrs3->v4);
  184. }
  185. /**
  186. * @brief Send a ahrs3 message
  187. * @param chan MAVLink channel to send the message
  188. *
  189. * @param roll [rad] Roll angle.
  190. * @param pitch [rad] Pitch angle.
  191. * @param yaw [rad] Yaw angle.
  192. * @param altitude [m] Altitude (MSL).
  193. * @param lat [degE7] Latitude.
  194. * @param lng [degE7] Longitude.
  195. * @param v1 Test variable1.
  196. * @param v2 Test variable2.
  197. * @param v3 Test variable3.
  198. * @param v4 Test variable4.
  199. */
  200. #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
  201. static inline void mavlink_msg_ahrs3_send(mavlink_channel_t chan, float roll, float pitch, float yaw, float altitude, int32_t lat, int32_t lng, float v1, float v2, float v3, float v4)
  202. {
  203. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  204. char buf[MAVLINK_MSG_ID_AHRS3_LEN];
  205. _mav_put_float(buf, 0, roll);
  206. _mav_put_float(buf, 4, pitch);
  207. _mav_put_float(buf, 8, yaw);
  208. _mav_put_float(buf, 12, altitude);
  209. _mav_put_int32_t(buf, 16, lat);
  210. _mav_put_int32_t(buf, 20, lng);
  211. _mav_put_float(buf, 24, v1);
  212. _mav_put_float(buf, 28, v2);
  213. _mav_put_float(buf, 32, v3);
  214. _mav_put_float(buf, 36, v4);
  215. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, buf, MAVLINK_MSG_ID_AHRS3_MIN_LEN, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
  216. #else
  217. mavlink_ahrs3_t packet;
  218. packet.roll = roll;
  219. packet.pitch = pitch;
  220. packet.yaw = yaw;
  221. packet.altitude = altitude;
  222. packet.lat = lat;
  223. packet.lng = lng;
  224. packet.v1 = v1;
  225. packet.v2 = v2;
  226. packet.v3 = v3;
  227. packet.v4 = v4;
  228. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, (const char *)&packet, MAVLINK_MSG_ID_AHRS3_MIN_LEN, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
  229. #endif
  230. }
  231. /**
  232. * @brief Send a ahrs3 message
  233. * @param chan MAVLink channel to send the message
  234. * @param struct The MAVLink struct to serialize
  235. */
  236. static inline void mavlink_msg_ahrs3_send_struct(mavlink_channel_t chan, const mavlink_ahrs3_t* ahrs3)
  237. {
  238. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  239. mavlink_msg_ahrs3_send(chan, ahrs3->roll, ahrs3->pitch, ahrs3->yaw, ahrs3->altitude, ahrs3->lat, ahrs3->lng, ahrs3->v1, ahrs3->v2, ahrs3->v3, ahrs3->v4);
  240. #else
  241. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, (const char *)ahrs3, MAVLINK_MSG_ID_AHRS3_MIN_LEN, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
  242. #endif
  243. }
  244. #if MAVLINK_MSG_ID_AHRS3_LEN <= MAVLINK_MAX_PAYLOAD_LEN
  245. /*
  246. This varient of _send() can be used to save stack space by re-using
  247. memory from the receive buffer. The caller provides a
  248. mavlink_message_t which is the size of a full mavlink message. This
  249. is usually the receive buffer for the channel, and allows a reply to an
  250. incoming message with minimum stack space usage.
  251. */
  252. static inline void mavlink_msg_ahrs3_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float roll, float pitch, float yaw, float altitude, int32_t lat, int32_t lng, float v1, float v2, float v3, float v4)
  253. {
  254. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  255. char *buf = (char *)msgbuf;
  256. _mav_put_float(buf, 0, roll);
  257. _mav_put_float(buf, 4, pitch);
  258. _mav_put_float(buf, 8, yaw);
  259. _mav_put_float(buf, 12, altitude);
  260. _mav_put_int32_t(buf, 16, lat);
  261. _mav_put_int32_t(buf, 20, lng);
  262. _mav_put_float(buf, 24, v1);
  263. _mav_put_float(buf, 28, v2);
  264. _mav_put_float(buf, 32, v3);
  265. _mav_put_float(buf, 36, v4);
  266. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, buf, MAVLINK_MSG_ID_AHRS3_MIN_LEN, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
  267. #else
  268. mavlink_ahrs3_t *packet = (mavlink_ahrs3_t *)msgbuf;
  269. packet->roll = roll;
  270. packet->pitch = pitch;
  271. packet->yaw = yaw;
  272. packet->altitude = altitude;
  273. packet->lat = lat;
  274. packet->lng = lng;
  275. packet->v1 = v1;
  276. packet->v2 = v2;
  277. packet->v3 = v3;
  278. packet->v4 = v4;
  279. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, (const char *)packet, MAVLINK_MSG_ID_AHRS3_MIN_LEN, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
  280. #endif
  281. }
  282. #endif
  283. #endif
  284. // MESSAGE AHRS3 UNPACKING
  285. /**
  286. * @brief Get field roll from ahrs3 message
  287. *
  288. * @return [rad] Roll angle.
  289. */
  290. static inline float mavlink_msg_ahrs3_get_roll(const mavlink_message_t* msg)
  291. {
  292. return _MAV_RETURN_float(msg, 0);
  293. }
  294. /**
  295. * @brief Get field pitch from ahrs3 message
  296. *
  297. * @return [rad] Pitch angle.
  298. */
  299. static inline float mavlink_msg_ahrs3_get_pitch(const mavlink_message_t* msg)
  300. {
  301. return _MAV_RETURN_float(msg, 4);
  302. }
  303. /**
  304. * @brief Get field yaw from ahrs3 message
  305. *
  306. * @return [rad] Yaw angle.
  307. */
  308. static inline float mavlink_msg_ahrs3_get_yaw(const mavlink_message_t* msg)
  309. {
  310. return _MAV_RETURN_float(msg, 8);
  311. }
  312. /**
  313. * @brief Get field altitude from ahrs3 message
  314. *
  315. * @return [m] Altitude (MSL).
  316. */
  317. static inline float mavlink_msg_ahrs3_get_altitude(const mavlink_message_t* msg)
  318. {
  319. return _MAV_RETURN_float(msg, 12);
  320. }
  321. /**
  322. * @brief Get field lat from ahrs3 message
  323. *
  324. * @return [degE7] Latitude.
  325. */
  326. static inline int32_t mavlink_msg_ahrs3_get_lat(const mavlink_message_t* msg)
  327. {
  328. return _MAV_RETURN_int32_t(msg, 16);
  329. }
  330. /**
  331. * @brief Get field lng from ahrs3 message
  332. *
  333. * @return [degE7] Longitude.
  334. */
  335. static inline int32_t mavlink_msg_ahrs3_get_lng(const mavlink_message_t* msg)
  336. {
  337. return _MAV_RETURN_int32_t(msg, 20);
  338. }
  339. /**
  340. * @brief Get field v1 from ahrs3 message
  341. *
  342. * @return Test variable1.
  343. */
  344. static inline float mavlink_msg_ahrs3_get_v1(const mavlink_message_t* msg)
  345. {
  346. return _MAV_RETURN_float(msg, 24);
  347. }
  348. /**
  349. * @brief Get field v2 from ahrs3 message
  350. *
  351. * @return Test variable2.
  352. */
  353. static inline float mavlink_msg_ahrs3_get_v2(const mavlink_message_t* msg)
  354. {
  355. return _MAV_RETURN_float(msg, 28);
  356. }
  357. /**
  358. * @brief Get field v3 from ahrs3 message
  359. *
  360. * @return Test variable3.
  361. */
  362. static inline float mavlink_msg_ahrs3_get_v3(const mavlink_message_t* msg)
  363. {
  364. return _MAV_RETURN_float(msg, 32);
  365. }
  366. /**
  367. * @brief Get field v4 from ahrs3 message
  368. *
  369. * @return Test variable4.
  370. */
  371. static inline float mavlink_msg_ahrs3_get_v4(const mavlink_message_t* msg)
  372. {
  373. return _MAV_RETURN_float(msg, 36);
  374. }
  375. /**
  376. * @brief Decode a ahrs3 message into a struct
  377. *
  378. * @param msg The message to decode
  379. * @param ahrs3 C-struct to decode the message contents into
  380. */
  381. static inline void mavlink_msg_ahrs3_decode(const mavlink_message_t* msg, mavlink_ahrs3_t* ahrs3)
  382. {
  383. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  384. ahrs3->roll = mavlink_msg_ahrs3_get_roll(msg);
  385. ahrs3->pitch = mavlink_msg_ahrs3_get_pitch(msg);
  386. ahrs3->yaw = mavlink_msg_ahrs3_get_yaw(msg);
  387. ahrs3->altitude = mavlink_msg_ahrs3_get_altitude(msg);
  388. ahrs3->lat = mavlink_msg_ahrs3_get_lat(msg);
  389. ahrs3->lng = mavlink_msg_ahrs3_get_lng(msg);
  390. ahrs3->v1 = mavlink_msg_ahrs3_get_v1(msg);
  391. ahrs3->v2 = mavlink_msg_ahrs3_get_v2(msg);
  392. ahrs3->v3 = mavlink_msg_ahrs3_get_v3(msg);
  393. ahrs3->v4 = mavlink_msg_ahrs3_get_v4(msg);
  394. #else
  395. uint8_t len = msg->len < MAVLINK_MSG_ID_AHRS3_LEN? msg->len : MAVLINK_MSG_ID_AHRS3_LEN;
  396. memset(ahrs3, 0, MAVLINK_MSG_ID_AHRS3_LEN);
  397. memcpy(ahrs3, _MAV_PAYLOAD(msg), len);
  398. #endif
  399. }