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.

488 lines
19 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #pragma once
  2. // MESSAGE AIRSPEED_AUTOCAL PACKING
  3. #define MAVLINK_MSG_ID_AIRSPEED_AUTOCAL 174
  4. MAVPACKED(
  5. typedef struct __mavlink_airspeed_autocal_t {
  6. float vx; /*< [m/s] GPS velocity north.*/
  7. float vy; /*< [m/s] GPS velocity east.*/
  8. float vz; /*< [m/s] GPS velocity down.*/
  9. float diff_pressure; /*< [Pa] Differential pressure.*/
  10. float EAS2TAS; /*< Estimated to true airspeed ratio.*/
  11. float ratio; /*< Airspeed ratio.*/
  12. float state_x; /*< EKF state x.*/
  13. float state_y; /*< EKF state y.*/
  14. float state_z; /*< EKF state z.*/
  15. float Pax; /*< EKF Pax.*/
  16. float Pby; /*< EKF Pby.*/
  17. float Pcz; /*< EKF Pcz.*/
  18. }) mavlink_airspeed_autocal_t;
  19. #define MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN 48
  20. #define MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN 48
  21. #define MAVLINK_MSG_ID_174_LEN 48
  22. #define MAVLINK_MSG_ID_174_MIN_LEN 48
  23. #define MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_CRC 167
  24. #define MAVLINK_MSG_ID_174_CRC 167
  25. #if MAVLINK_COMMAND_24BIT
  26. #define MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL { \
  27. 174, \
  28. "AIRSPEED_AUTOCAL", \
  29. 12, \
  30. { { "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_airspeed_autocal_t, vx) }, \
  31. { "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_airspeed_autocal_t, vy) }, \
  32. { "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_airspeed_autocal_t, vz) }, \
  33. { "diff_pressure", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_airspeed_autocal_t, diff_pressure) }, \
  34. { "EAS2TAS", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_airspeed_autocal_t, EAS2TAS) }, \
  35. { "ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_airspeed_autocal_t, ratio) }, \
  36. { "state_x", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_airspeed_autocal_t, state_x) }, \
  37. { "state_y", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_airspeed_autocal_t, state_y) }, \
  38. { "state_z", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_airspeed_autocal_t, state_z) }, \
  39. { "Pax", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_airspeed_autocal_t, Pax) }, \
  40. { "Pby", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_airspeed_autocal_t, Pby) }, \
  41. { "Pcz", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_airspeed_autocal_t, Pcz) }, \
  42. } \
  43. }
  44. #else
  45. #define MAVLINK_MESSAGE_INFO_AIRSPEED_AUTOCAL { \
  46. "AIRSPEED_AUTOCAL", \
  47. 12, \
  48. { { "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_airspeed_autocal_t, vx) }, \
  49. { "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_airspeed_autocal_t, vy) }, \
  50. { "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_airspeed_autocal_t, vz) }, \
  51. { "diff_pressure", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_airspeed_autocal_t, diff_pressure) }, \
  52. { "EAS2TAS", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_airspeed_autocal_t, EAS2TAS) }, \
  53. { "ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_airspeed_autocal_t, ratio) }, \
  54. { "state_x", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_airspeed_autocal_t, state_x) }, \
  55. { "state_y", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_airspeed_autocal_t, state_y) }, \
  56. { "state_z", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_airspeed_autocal_t, state_z) }, \
  57. { "Pax", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_airspeed_autocal_t, Pax) }, \
  58. { "Pby", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_airspeed_autocal_t, Pby) }, \
  59. { "Pcz", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_airspeed_autocal_t, Pcz) }, \
  60. } \
  61. }
  62. #endif
  63. /**
  64. * @brief Pack a airspeed_autocal message
  65. * @param system_id ID of this system
  66. * @param component_id ID of this component (e.g. 200 for IMU)
  67. * @param msg The MAVLink message to compress the data into
  68. *
  69. * @param vx [m/s] GPS velocity north.
  70. * @param vy [m/s] GPS velocity east.
  71. * @param vz [m/s] GPS velocity down.
  72. * @param diff_pressure [Pa] Differential pressure.
  73. * @param EAS2TAS Estimated to true airspeed ratio.
  74. * @param ratio Airspeed ratio.
  75. * @param state_x EKF state x.
  76. * @param state_y EKF state y.
  77. * @param state_z EKF state z.
  78. * @param Pax EKF Pax.
  79. * @param Pby EKF Pby.
  80. * @param Pcz EKF Pcz.
  81. * @return length of the message in bytes (excluding serial stream start sign)
  82. */
  83. static inline uint16_t mavlink_msg_airspeed_autocal_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
  84. float vx, float vy, float vz, float diff_pressure, float EAS2TAS, float ratio, float state_x, float state_y, float state_z, float Pax, float Pby, float Pcz)
  85. {
  86. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  87. char buf[MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN];
  88. _mav_put_float(buf, 0, vx);
  89. _mav_put_float(buf, 4, vy);
  90. _mav_put_float(buf, 8, vz);
  91. _mav_put_float(buf, 12, diff_pressure);
  92. _mav_put_float(buf, 16, EAS2TAS);
  93. _mav_put_float(buf, 20, ratio);
  94. _mav_put_float(buf, 24, state_x);
  95. _mav_put_float(buf, 28, state_y);
  96. _mav_put_float(buf, 32, state_z);
  97. _mav_put_float(buf, 36, Pax);
  98. _mav_put_float(buf, 40, Pby);
  99. _mav_put_float(buf, 44, Pcz);
  100. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN);
  101. #else
  102. mavlink_airspeed_autocal_t packet;
  103. packet.vx = vx;
  104. packet.vy = vy;
  105. packet.vz = vz;
  106. packet.diff_pressure = diff_pressure;
  107. packet.EAS2TAS = EAS2TAS;
  108. packet.ratio = ratio;
  109. packet.state_x = state_x;
  110. packet.state_y = state_y;
  111. packet.state_z = state_z;
  112. packet.Pax = Pax;
  113. packet.Pby = Pby;
  114. packet.Pcz = Pcz;
  115. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN);
  116. #endif
  117. msg->msgid = MAVLINK_MSG_ID_AIRSPEED_AUTOCAL;
  118. return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_CRC);
  119. }
  120. /**
  121. * @brief Pack a airspeed_autocal message on a channel
  122. * @param system_id ID of this system
  123. * @param component_id ID of this component (e.g. 200 for IMU)
  124. * @param chan The MAVLink channel this message will be sent over
  125. * @param msg The MAVLink message to compress the data into
  126. * @param vx [m/s] GPS velocity north.
  127. * @param vy [m/s] GPS velocity east.
  128. * @param vz [m/s] GPS velocity down.
  129. * @param diff_pressure [Pa] Differential pressure.
  130. * @param EAS2TAS Estimated to true airspeed ratio.
  131. * @param ratio Airspeed ratio.
  132. * @param state_x EKF state x.
  133. * @param state_y EKF state y.
  134. * @param state_z EKF state z.
  135. * @param Pax EKF Pax.
  136. * @param Pby EKF Pby.
  137. * @param Pcz EKF Pcz.
  138. * @return length of the message in bytes (excluding serial stream start sign)
  139. */
  140. static inline uint16_t mavlink_msg_airspeed_autocal_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
  141. mavlink_message_t* msg,
  142. float vx,float vy,float vz,float diff_pressure,float EAS2TAS,float ratio,float state_x,float state_y,float state_z,float Pax,float Pby,float Pcz)
  143. {
  144. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  145. char buf[MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN];
  146. _mav_put_float(buf, 0, vx);
  147. _mav_put_float(buf, 4, vy);
  148. _mav_put_float(buf, 8, vz);
  149. _mav_put_float(buf, 12, diff_pressure);
  150. _mav_put_float(buf, 16, EAS2TAS);
  151. _mav_put_float(buf, 20, ratio);
  152. _mav_put_float(buf, 24, state_x);
  153. _mav_put_float(buf, 28, state_y);
  154. _mav_put_float(buf, 32, state_z);
  155. _mav_put_float(buf, 36, Pax);
  156. _mav_put_float(buf, 40, Pby);
  157. _mav_put_float(buf, 44, Pcz);
  158. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN);
  159. #else
  160. mavlink_airspeed_autocal_t packet;
  161. packet.vx = vx;
  162. packet.vy = vy;
  163. packet.vz = vz;
  164. packet.diff_pressure = diff_pressure;
  165. packet.EAS2TAS = EAS2TAS;
  166. packet.ratio = ratio;
  167. packet.state_x = state_x;
  168. packet.state_y = state_y;
  169. packet.state_z = state_z;
  170. packet.Pax = Pax;
  171. packet.Pby = Pby;
  172. packet.Pcz = Pcz;
  173. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN);
  174. #endif
  175. msg->msgid = MAVLINK_MSG_ID_AIRSPEED_AUTOCAL;
  176. return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_CRC);
  177. }
  178. /**
  179. * @brief Encode a airspeed_autocal struct
  180. *
  181. * @param system_id ID of this system
  182. * @param component_id ID of this component (e.g. 200 for IMU)
  183. * @param msg The MAVLink message to compress the data into
  184. * @param airspeed_autocal C-struct to read the message contents from
  185. */
  186. static inline uint16_t mavlink_msg_airspeed_autocal_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_airspeed_autocal_t* airspeed_autocal)
  187. {
  188. return mavlink_msg_airspeed_autocal_pack(system_id, component_id, msg, airspeed_autocal->vx, airspeed_autocal->vy, airspeed_autocal->vz, airspeed_autocal->diff_pressure, airspeed_autocal->EAS2TAS, airspeed_autocal->ratio, airspeed_autocal->state_x, airspeed_autocal->state_y, airspeed_autocal->state_z, airspeed_autocal->Pax, airspeed_autocal->Pby, airspeed_autocal->Pcz);
  189. }
  190. /**
  191. * @brief Encode a airspeed_autocal struct on a channel
  192. *
  193. * @param system_id ID of this system
  194. * @param component_id ID of this component (e.g. 200 for IMU)
  195. * @param chan The MAVLink channel this message will be sent over
  196. * @param msg The MAVLink message to compress the data into
  197. * @param airspeed_autocal C-struct to read the message contents from
  198. */
  199. static inline uint16_t mavlink_msg_airspeed_autocal_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_airspeed_autocal_t* airspeed_autocal)
  200. {
  201. return mavlink_msg_airspeed_autocal_pack_chan(system_id, component_id, chan, msg, airspeed_autocal->vx, airspeed_autocal->vy, airspeed_autocal->vz, airspeed_autocal->diff_pressure, airspeed_autocal->EAS2TAS, airspeed_autocal->ratio, airspeed_autocal->state_x, airspeed_autocal->state_y, airspeed_autocal->state_z, airspeed_autocal->Pax, airspeed_autocal->Pby, airspeed_autocal->Pcz);
  202. }
  203. /**
  204. * @brief Send a airspeed_autocal message
  205. * @param chan MAVLink channel to send the message
  206. *
  207. * @param vx [m/s] GPS velocity north.
  208. * @param vy [m/s] GPS velocity east.
  209. * @param vz [m/s] GPS velocity down.
  210. * @param diff_pressure [Pa] Differential pressure.
  211. * @param EAS2TAS Estimated to true airspeed ratio.
  212. * @param ratio Airspeed ratio.
  213. * @param state_x EKF state x.
  214. * @param state_y EKF state y.
  215. * @param state_z EKF state z.
  216. * @param Pax EKF Pax.
  217. * @param Pby EKF Pby.
  218. * @param Pcz EKF Pcz.
  219. */
  220. #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
  221. static inline void mavlink_msg_airspeed_autocal_send(mavlink_channel_t chan, float vx, float vy, float vz, float diff_pressure, float EAS2TAS, float ratio, float state_x, float state_y, float state_z, float Pax, float Pby, float Pcz)
  222. {
  223. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  224. char buf[MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN];
  225. _mav_put_float(buf, 0, vx);
  226. _mav_put_float(buf, 4, vy);
  227. _mav_put_float(buf, 8, vz);
  228. _mav_put_float(buf, 12, diff_pressure);
  229. _mav_put_float(buf, 16, EAS2TAS);
  230. _mav_put_float(buf, 20, ratio);
  231. _mav_put_float(buf, 24, state_x);
  232. _mav_put_float(buf, 28, state_y);
  233. _mav_put_float(buf, 32, state_z);
  234. _mav_put_float(buf, 36, Pax);
  235. _mav_put_float(buf, 40, Pby);
  236. _mav_put_float(buf, 44, Pcz);
  237. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL, buf, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_CRC);
  238. #else
  239. mavlink_airspeed_autocal_t packet;
  240. packet.vx = vx;
  241. packet.vy = vy;
  242. packet.vz = vz;
  243. packet.diff_pressure = diff_pressure;
  244. packet.EAS2TAS = EAS2TAS;
  245. packet.ratio = ratio;
  246. packet.state_x = state_x;
  247. packet.state_y = state_y;
  248. packet.state_z = state_z;
  249. packet.Pax = Pax;
  250. packet.Pby = Pby;
  251. packet.Pcz = Pcz;
  252. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL, (const char *)&packet, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_CRC);
  253. #endif
  254. }
  255. /**
  256. * @brief Send a airspeed_autocal message
  257. * @param chan MAVLink channel to send the message
  258. * @param struct The MAVLink struct to serialize
  259. */
  260. static inline void mavlink_msg_airspeed_autocal_send_struct(mavlink_channel_t chan, const mavlink_airspeed_autocal_t* airspeed_autocal)
  261. {
  262. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  263. mavlink_msg_airspeed_autocal_send(chan, airspeed_autocal->vx, airspeed_autocal->vy, airspeed_autocal->vz, airspeed_autocal->diff_pressure, airspeed_autocal->EAS2TAS, airspeed_autocal->ratio, airspeed_autocal->state_x, airspeed_autocal->state_y, airspeed_autocal->state_z, airspeed_autocal->Pax, airspeed_autocal->Pby, airspeed_autocal->Pcz);
  264. #else
  265. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL, (const char *)airspeed_autocal, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_CRC);
  266. #endif
  267. }
  268. #if MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN <= MAVLINK_MAX_PAYLOAD_LEN
  269. /*
  270. This varient of _send() can be used to save stack space by re-using
  271. memory from the receive buffer. The caller provides a
  272. mavlink_message_t which is the size of a full mavlink message. This
  273. is usually the receive buffer for the channel, and allows a reply to an
  274. incoming message with minimum stack space usage.
  275. */
  276. static inline void mavlink_msg_airspeed_autocal_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float vx, float vy, float vz, float diff_pressure, float EAS2TAS, float ratio, float state_x, float state_y, float state_z, float Pax, float Pby, float Pcz)
  277. {
  278. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  279. char *buf = (char *)msgbuf;
  280. _mav_put_float(buf, 0, vx);
  281. _mav_put_float(buf, 4, vy);
  282. _mav_put_float(buf, 8, vz);
  283. _mav_put_float(buf, 12, diff_pressure);
  284. _mav_put_float(buf, 16, EAS2TAS);
  285. _mav_put_float(buf, 20, ratio);
  286. _mav_put_float(buf, 24, state_x);
  287. _mav_put_float(buf, 28, state_y);
  288. _mav_put_float(buf, 32, state_z);
  289. _mav_put_float(buf, 36, Pax);
  290. _mav_put_float(buf, 40, Pby);
  291. _mav_put_float(buf, 44, Pcz);
  292. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL, buf, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_CRC);
  293. #else
  294. mavlink_airspeed_autocal_t *packet = (mavlink_airspeed_autocal_t *)msgbuf;
  295. packet->vx = vx;
  296. packet->vy = vy;
  297. packet->vz = vz;
  298. packet->diff_pressure = diff_pressure;
  299. packet->EAS2TAS = EAS2TAS;
  300. packet->ratio = ratio;
  301. packet->state_x = state_x;
  302. packet->state_y = state_y;
  303. packet->state_z = state_z;
  304. packet->Pax = Pax;
  305. packet->Pby = Pby;
  306. packet->Pcz = Pcz;
  307. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL, (const char *)packet, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_CRC);
  308. #endif
  309. }
  310. #endif
  311. #endif
  312. // MESSAGE AIRSPEED_AUTOCAL UNPACKING
  313. /**
  314. * @brief Get field vx from airspeed_autocal message
  315. *
  316. * @return [m/s] GPS velocity north.
  317. */
  318. static inline float mavlink_msg_airspeed_autocal_get_vx(const mavlink_message_t* msg)
  319. {
  320. return _MAV_RETURN_float(msg, 0);
  321. }
  322. /**
  323. * @brief Get field vy from airspeed_autocal message
  324. *
  325. * @return [m/s] GPS velocity east.
  326. */
  327. static inline float mavlink_msg_airspeed_autocal_get_vy(const mavlink_message_t* msg)
  328. {
  329. return _MAV_RETURN_float(msg, 4);
  330. }
  331. /**
  332. * @brief Get field vz from airspeed_autocal message
  333. *
  334. * @return [m/s] GPS velocity down.
  335. */
  336. static inline float mavlink_msg_airspeed_autocal_get_vz(const mavlink_message_t* msg)
  337. {
  338. return _MAV_RETURN_float(msg, 8);
  339. }
  340. /**
  341. * @brief Get field diff_pressure from airspeed_autocal message
  342. *
  343. * @return [Pa] Differential pressure.
  344. */
  345. static inline float mavlink_msg_airspeed_autocal_get_diff_pressure(const mavlink_message_t* msg)
  346. {
  347. return _MAV_RETURN_float(msg, 12);
  348. }
  349. /**
  350. * @brief Get field EAS2TAS from airspeed_autocal message
  351. *
  352. * @return Estimated to true airspeed ratio.
  353. */
  354. static inline float mavlink_msg_airspeed_autocal_get_EAS2TAS(const mavlink_message_t* msg)
  355. {
  356. return _MAV_RETURN_float(msg, 16);
  357. }
  358. /**
  359. * @brief Get field ratio from airspeed_autocal message
  360. *
  361. * @return Airspeed ratio.
  362. */
  363. static inline float mavlink_msg_airspeed_autocal_get_ratio(const mavlink_message_t* msg)
  364. {
  365. return _MAV_RETURN_float(msg, 20);
  366. }
  367. /**
  368. * @brief Get field state_x from airspeed_autocal message
  369. *
  370. * @return EKF state x.
  371. */
  372. static inline float mavlink_msg_airspeed_autocal_get_state_x(const mavlink_message_t* msg)
  373. {
  374. return _MAV_RETURN_float(msg, 24);
  375. }
  376. /**
  377. * @brief Get field state_y from airspeed_autocal message
  378. *
  379. * @return EKF state y.
  380. */
  381. static inline float mavlink_msg_airspeed_autocal_get_state_y(const mavlink_message_t* msg)
  382. {
  383. return _MAV_RETURN_float(msg, 28);
  384. }
  385. /**
  386. * @brief Get field state_z from airspeed_autocal message
  387. *
  388. * @return EKF state z.
  389. */
  390. static inline float mavlink_msg_airspeed_autocal_get_state_z(const mavlink_message_t* msg)
  391. {
  392. return _MAV_RETURN_float(msg, 32);
  393. }
  394. /**
  395. * @brief Get field Pax from airspeed_autocal message
  396. *
  397. * @return EKF Pax.
  398. */
  399. static inline float mavlink_msg_airspeed_autocal_get_Pax(const mavlink_message_t* msg)
  400. {
  401. return _MAV_RETURN_float(msg, 36);
  402. }
  403. /**
  404. * @brief Get field Pby from airspeed_autocal message
  405. *
  406. * @return EKF Pby.
  407. */
  408. static inline float mavlink_msg_airspeed_autocal_get_Pby(const mavlink_message_t* msg)
  409. {
  410. return _MAV_RETURN_float(msg, 40);
  411. }
  412. /**
  413. * @brief Get field Pcz from airspeed_autocal message
  414. *
  415. * @return EKF Pcz.
  416. */
  417. static inline float mavlink_msg_airspeed_autocal_get_Pcz(const mavlink_message_t* msg)
  418. {
  419. return _MAV_RETURN_float(msg, 44);
  420. }
  421. /**
  422. * @brief Decode a airspeed_autocal message into a struct
  423. *
  424. * @param msg The message to decode
  425. * @param airspeed_autocal C-struct to decode the message contents into
  426. */
  427. static inline void mavlink_msg_airspeed_autocal_decode(const mavlink_message_t* msg, mavlink_airspeed_autocal_t* airspeed_autocal)
  428. {
  429. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  430. airspeed_autocal->vx = mavlink_msg_airspeed_autocal_get_vx(msg);
  431. airspeed_autocal->vy = mavlink_msg_airspeed_autocal_get_vy(msg);
  432. airspeed_autocal->vz = mavlink_msg_airspeed_autocal_get_vz(msg);
  433. airspeed_autocal->diff_pressure = mavlink_msg_airspeed_autocal_get_diff_pressure(msg);
  434. airspeed_autocal->EAS2TAS = mavlink_msg_airspeed_autocal_get_EAS2TAS(msg);
  435. airspeed_autocal->ratio = mavlink_msg_airspeed_autocal_get_ratio(msg);
  436. airspeed_autocal->state_x = mavlink_msg_airspeed_autocal_get_state_x(msg);
  437. airspeed_autocal->state_y = mavlink_msg_airspeed_autocal_get_state_y(msg);
  438. airspeed_autocal->state_z = mavlink_msg_airspeed_autocal_get_state_z(msg);
  439. airspeed_autocal->Pax = mavlink_msg_airspeed_autocal_get_Pax(msg);
  440. airspeed_autocal->Pby = mavlink_msg_airspeed_autocal_get_Pby(msg);
  441. airspeed_autocal->Pcz = mavlink_msg_airspeed_autocal_get_Pcz(msg);
  442. #else
  443. uint8_t len = msg->len < MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN? msg->len : MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN;
  444. memset(airspeed_autocal, 0, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN);
  445. memcpy(airspeed_autocal, _MAV_PAYLOAD(msg), len);
  446. #endif
  447. }