mavlink_msg_vk_mosaich_gps_raw.h 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776
  1. #pragma once
  2. // MESSAGE VK_MOSAICH_GPS_RAW PACKING
  3. #define MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW 53007
  4. typedef struct __mavlink_vk_mosaich_gps_raw_t {
  5. uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since
  6. system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system
  7. boot) by checking for the magnitude of the number.*/
  8. int32_t lat; /*< [degE7] Latitude (WGS84, EGM96 ellipsoid)*/
  9. int32_t lon; /*< [degE7] Longitude (WGS84, EGM96 ellipsoid)*/
  10. float ellipsoid_alt; /*< [m] Altitude (Ellipsoild). Positive for up.*/
  11. float ve; /*< [m/s] Ease speed in m/s.*/
  12. float vn; /*< [m/s] North speed in m/s.*/
  13. float vu; /*< [m/s] Up speed in m/s.*/
  14. float yaw; /*< [deg] Attitude euler yaw.*/
  15. float pitch; /*< [deg] Attitude euler pitch.*/
  16. uint16_t h_acc; /*< [cm] Position uncertainty.*/
  17. uint16_t v_acc; /*< [cm] Altitude uncertainty.*/
  18. uint8_t fix_type; /*< GPS fix type.*/
  19. uint8_t psv_num; /*< Number of satellites for positioning ANT*/
  20. uint8_t pvt_err; /*< refer to mosaic_h reference page 308*/
  21. uint8_t pvt_mode; /*< refer to mosaic_h reference page 308*/
  22. uint8_t hsv_num; /*< Number of satellites for heading ANT*/
  23. uint8_t att_err; /*< refer to mosaic_h reference page 336.*/
  24. uint8_t att_mode; /*< refer to mosaic_h reference page 336.*/
  25. uint8_t reserved; /*< reserved*/
  26. } mavlink_vk_mosaich_gps_raw_t;
  27. #define MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN 52
  28. #define MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN 52
  29. #define MAVLINK_MSG_ID_53007_LEN 52
  30. #define MAVLINK_MSG_ID_53007_MIN_LEN 52
  31. #define MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC 113
  32. #define MAVLINK_MSG_ID_53007_CRC 113
  33. #if MAVLINK_COMMAND_24BIT
  34. #define MAVLINK_MESSAGE_INFO_VK_MOSAICH_GPS_RAW { \
  35. 53007, \
  36. "VK_MOSAICH_GPS_RAW", \
  37. 19, \
  38. { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_vk_mosaich_gps_raw_t, time_usec) }, \
  39. { "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_vk_mosaich_gps_raw_t, fix_type) }, \
  40. { "psv_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_vk_mosaich_gps_raw_t, psv_num) }, \
  41. { "pvt_err", NULL, MAVLINK_TYPE_UINT8_T, 0, 46, offsetof(mavlink_vk_mosaich_gps_raw_t, pvt_err) }, \
  42. { "pvt_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 47, offsetof(mavlink_vk_mosaich_gps_raw_t, pvt_mode) }, \
  43. { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_mosaich_gps_raw_t, lat) }, \
  44. { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_vk_mosaich_gps_raw_t, lon) }, \
  45. { "ellipsoid_alt", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vk_mosaich_gps_raw_t, ellipsoid_alt) }, \
  46. { "ve", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vk_mosaich_gps_raw_t, ve) }, \
  47. { "vn", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_vk_mosaich_gps_raw_t, vn) }, \
  48. { "vu", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_vk_mosaich_gps_raw_t, vu) }, \
  49. { "h_acc", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_vk_mosaich_gps_raw_t, h_acc) }, \
  50. { "v_acc", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_vk_mosaich_gps_raw_t, v_acc) }, \
  51. { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_vk_mosaich_gps_raw_t, yaw) }, \
  52. { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_vk_mosaich_gps_raw_t, pitch) }, \
  53. { "hsv_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 48, offsetof(mavlink_vk_mosaich_gps_raw_t, hsv_num) }, \
  54. { "att_err", NULL, MAVLINK_TYPE_UINT8_T, 0, 49, offsetof(mavlink_vk_mosaich_gps_raw_t, att_err) }, \
  55. { "att_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 50, offsetof(mavlink_vk_mosaich_gps_raw_t, att_mode) }, \
  56. { "reserved", NULL, MAVLINK_TYPE_UINT8_T, 0, 51, offsetof(mavlink_vk_mosaich_gps_raw_t, reserved) }, \
  57. } \
  58. }
  59. #else
  60. #define MAVLINK_MESSAGE_INFO_VK_MOSAICH_GPS_RAW { \
  61. "VK_MOSAICH_GPS_RAW", \
  62. 19, \
  63. { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_vk_mosaich_gps_raw_t, time_usec) }, \
  64. { "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_vk_mosaich_gps_raw_t, fix_type) }, \
  65. { "psv_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_vk_mosaich_gps_raw_t, psv_num) }, \
  66. { "pvt_err", NULL, MAVLINK_TYPE_UINT8_T, 0, 46, offsetof(mavlink_vk_mosaich_gps_raw_t, pvt_err) }, \
  67. { "pvt_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 47, offsetof(mavlink_vk_mosaich_gps_raw_t, pvt_mode) }, \
  68. { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_vk_mosaich_gps_raw_t, lat) }, \
  69. { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_vk_mosaich_gps_raw_t, lon) }, \
  70. { "ellipsoid_alt", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vk_mosaich_gps_raw_t, ellipsoid_alt) }, \
  71. { "ve", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_vk_mosaich_gps_raw_t, ve) }, \
  72. { "vn", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_vk_mosaich_gps_raw_t, vn) }, \
  73. { "vu", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_vk_mosaich_gps_raw_t, vu) }, \
  74. { "h_acc", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_vk_mosaich_gps_raw_t, h_acc) }, \
  75. { "v_acc", NULL, MAVLINK_TYPE_UINT16_T, 0, 42, offsetof(mavlink_vk_mosaich_gps_raw_t, v_acc) }, \
  76. { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_vk_mosaich_gps_raw_t, yaw) }, \
  77. { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_vk_mosaich_gps_raw_t, pitch) }, \
  78. { "hsv_num", NULL, MAVLINK_TYPE_UINT8_T, 0, 48, offsetof(mavlink_vk_mosaich_gps_raw_t, hsv_num) }, \
  79. { "att_err", NULL, MAVLINK_TYPE_UINT8_T, 0, 49, offsetof(mavlink_vk_mosaich_gps_raw_t, att_err) }, \
  80. { "att_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 50, offsetof(mavlink_vk_mosaich_gps_raw_t, att_mode) }, \
  81. { "reserved", NULL, MAVLINK_TYPE_UINT8_T, 0, 51, offsetof(mavlink_vk_mosaich_gps_raw_t, reserved) }, \
  82. } \
  83. }
  84. #endif
  85. /**
  86. * @brief Pack a vk_mosaich_gps_raw message
  87. * @param system_id ID of this system
  88. * @param component_id ID of this component (e.g. 200 for IMU)
  89. * @param msg The MAVLink message to compress the data into
  90. *
  91. * @param time_usec [us] Timestamp (UNIX Epoch time or time since
  92. system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system
  93. boot) by checking for the magnitude of the number.
  94. * @param fix_type GPS fix type.
  95. * @param psv_num Number of satellites for positioning ANT
  96. * @param pvt_err refer to mosaic_h reference page 308
  97. * @param pvt_mode refer to mosaic_h reference page 308
  98. * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid)
  99. * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid)
  100. * @param ellipsoid_alt [m] Altitude (Ellipsoild). Positive for up.
  101. * @param ve [m/s] Ease speed in m/s.
  102. * @param vn [m/s] North speed in m/s.
  103. * @param vu [m/s] Up speed in m/s.
  104. * @param h_acc [cm] Position uncertainty.
  105. * @param v_acc [cm] Altitude uncertainty.
  106. * @param yaw [deg] Attitude euler yaw.
  107. * @param pitch [deg] Attitude euler pitch.
  108. * @param hsv_num Number of satellites for heading ANT
  109. * @param att_err refer to mosaic_h reference page 336.
  110. * @param att_mode refer to mosaic_h reference page 336.
  111. * @param reserved reserved
  112. * @return length of the message in bytes (excluding serial stream start sign)
  113. */
  114. static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
  115. uint64_t time_usec, uint8_t fix_type, uint8_t psv_num, uint8_t pvt_err, uint8_t pvt_mode, int32_t lat, int32_t lon, float ellipsoid_alt, float ve, float vn, float vu, uint16_t h_acc, uint16_t v_acc, float yaw, float pitch, uint8_t hsv_num, uint8_t att_err, uint8_t att_mode, uint8_t reserved)
  116. {
  117. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  118. char buf[MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN];
  119. _mav_put_uint64_t(buf, 0, time_usec);
  120. _mav_put_int32_t(buf, 8, lat);
  121. _mav_put_int32_t(buf, 12, lon);
  122. _mav_put_float(buf, 16, ellipsoid_alt);
  123. _mav_put_float(buf, 20, ve);
  124. _mav_put_float(buf, 24, vn);
  125. _mav_put_float(buf, 28, vu);
  126. _mav_put_float(buf, 32, yaw);
  127. _mav_put_float(buf, 36, pitch);
  128. _mav_put_uint16_t(buf, 40, h_acc);
  129. _mav_put_uint16_t(buf, 42, v_acc);
  130. _mav_put_uint8_t(buf, 44, fix_type);
  131. _mav_put_uint8_t(buf, 45, psv_num);
  132. _mav_put_uint8_t(buf, 46, pvt_err);
  133. _mav_put_uint8_t(buf, 47, pvt_mode);
  134. _mav_put_uint8_t(buf, 48, hsv_num);
  135. _mav_put_uint8_t(buf, 49, att_err);
  136. _mav_put_uint8_t(buf, 50, att_mode);
  137. _mav_put_uint8_t(buf, 51, reserved);
  138. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN);
  139. #else
  140. mavlink_vk_mosaich_gps_raw_t packet;
  141. packet.time_usec = time_usec;
  142. packet.lat = lat;
  143. packet.lon = lon;
  144. packet.ellipsoid_alt = ellipsoid_alt;
  145. packet.ve = ve;
  146. packet.vn = vn;
  147. packet.vu = vu;
  148. packet.yaw = yaw;
  149. packet.pitch = pitch;
  150. packet.h_acc = h_acc;
  151. packet.v_acc = v_acc;
  152. packet.fix_type = fix_type;
  153. packet.psv_num = psv_num;
  154. packet.pvt_err = pvt_err;
  155. packet.pvt_mode = pvt_mode;
  156. packet.hsv_num = hsv_num;
  157. packet.att_err = att_err;
  158. packet.att_mode = att_mode;
  159. packet.reserved = reserved;
  160. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN);
  161. #endif
  162. msg->msgid = MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW;
  163. return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC);
  164. }
  165. /**
  166. * @brief Pack a vk_mosaich_gps_raw message
  167. * @param system_id ID of this system
  168. * @param component_id ID of this component (e.g. 200 for IMU)
  169. * @param status MAVLink status structure
  170. * @param msg The MAVLink message to compress the data into
  171. *
  172. * @param time_usec [us] Timestamp (UNIX Epoch time or time since
  173. system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system
  174. boot) by checking for the magnitude of the number.
  175. * @param fix_type GPS fix type.
  176. * @param psv_num Number of satellites for positioning ANT
  177. * @param pvt_err refer to mosaic_h reference page 308
  178. * @param pvt_mode refer to mosaic_h reference page 308
  179. * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid)
  180. * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid)
  181. * @param ellipsoid_alt [m] Altitude (Ellipsoild). Positive for up.
  182. * @param ve [m/s] Ease speed in m/s.
  183. * @param vn [m/s] North speed in m/s.
  184. * @param vu [m/s] Up speed in m/s.
  185. * @param h_acc [cm] Position uncertainty.
  186. * @param v_acc [cm] Altitude uncertainty.
  187. * @param yaw [deg] Attitude euler yaw.
  188. * @param pitch [deg] Attitude euler pitch.
  189. * @param hsv_num Number of satellites for heading ANT
  190. * @param att_err refer to mosaic_h reference page 336.
  191. * @param att_mode refer to mosaic_h reference page 336.
  192. * @param reserved reserved
  193. * @return length of the message in bytes (excluding serial stream start sign)
  194. */
  195. static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
  196. uint64_t time_usec, uint8_t fix_type, uint8_t psv_num, uint8_t pvt_err, uint8_t pvt_mode, int32_t lat, int32_t lon, float ellipsoid_alt, float ve, float vn, float vu, uint16_t h_acc, uint16_t v_acc, float yaw, float pitch, uint8_t hsv_num, uint8_t att_err, uint8_t att_mode, uint8_t reserved)
  197. {
  198. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  199. char buf[MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN];
  200. _mav_put_uint64_t(buf, 0, time_usec);
  201. _mav_put_int32_t(buf, 8, lat);
  202. _mav_put_int32_t(buf, 12, lon);
  203. _mav_put_float(buf, 16, ellipsoid_alt);
  204. _mav_put_float(buf, 20, ve);
  205. _mav_put_float(buf, 24, vn);
  206. _mav_put_float(buf, 28, vu);
  207. _mav_put_float(buf, 32, yaw);
  208. _mav_put_float(buf, 36, pitch);
  209. _mav_put_uint16_t(buf, 40, h_acc);
  210. _mav_put_uint16_t(buf, 42, v_acc);
  211. _mav_put_uint8_t(buf, 44, fix_type);
  212. _mav_put_uint8_t(buf, 45, psv_num);
  213. _mav_put_uint8_t(buf, 46, pvt_err);
  214. _mav_put_uint8_t(buf, 47, pvt_mode);
  215. _mav_put_uint8_t(buf, 48, hsv_num);
  216. _mav_put_uint8_t(buf, 49, att_err);
  217. _mav_put_uint8_t(buf, 50, att_mode);
  218. _mav_put_uint8_t(buf, 51, reserved);
  219. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN);
  220. #else
  221. mavlink_vk_mosaich_gps_raw_t packet;
  222. packet.time_usec = time_usec;
  223. packet.lat = lat;
  224. packet.lon = lon;
  225. packet.ellipsoid_alt = ellipsoid_alt;
  226. packet.ve = ve;
  227. packet.vn = vn;
  228. packet.vu = vu;
  229. packet.yaw = yaw;
  230. packet.pitch = pitch;
  231. packet.h_acc = h_acc;
  232. packet.v_acc = v_acc;
  233. packet.fix_type = fix_type;
  234. packet.psv_num = psv_num;
  235. packet.pvt_err = pvt_err;
  236. packet.pvt_mode = pvt_mode;
  237. packet.hsv_num = hsv_num;
  238. packet.att_err = att_err;
  239. packet.att_mode = att_mode;
  240. packet.reserved = reserved;
  241. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN);
  242. #endif
  243. msg->msgid = MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW;
  244. #if MAVLINK_CRC_EXTRA
  245. return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC);
  246. #else
  247. return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN);
  248. #endif
  249. }
  250. /**
  251. * @brief Pack a vk_mosaich_gps_raw message on a channel
  252. * @param system_id ID of this system
  253. * @param component_id ID of this component (e.g. 200 for IMU)
  254. * @param chan The MAVLink channel this message will be sent over
  255. * @param msg The MAVLink message to compress the data into
  256. * @param time_usec [us] Timestamp (UNIX Epoch time or time since
  257. system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system
  258. boot) by checking for the magnitude of the number.
  259. * @param fix_type GPS fix type.
  260. * @param psv_num Number of satellites for positioning ANT
  261. * @param pvt_err refer to mosaic_h reference page 308
  262. * @param pvt_mode refer to mosaic_h reference page 308
  263. * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid)
  264. * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid)
  265. * @param ellipsoid_alt [m] Altitude (Ellipsoild). Positive for up.
  266. * @param ve [m/s] Ease speed in m/s.
  267. * @param vn [m/s] North speed in m/s.
  268. * @param vu [m/s] Up speed in m/s.
  269. * @param h_acc [cm] Position uncertainty.
  270. * @param v_acc [cm] Altitude uncertainty.
  271. * @param yaw [deg] Attitude euler yaw.
  272. * @param pitch [deg] Attitude euler pitch.
  273. * @param hsv_num Number of satellites for heading ANT
  274. * @param att_err refer to mosaic_h reference page 336.
  275. * @param att_mode refer to mosaic_h reference page 336.
  276. * @param reserved reserved
  277. * @return length of the message in bytes (excluding serial stream start sign)
  278. */
  279. static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
  280. mavlink_message_t* msg,
  281. uint64_t time_usec,uint8_t fix_type,uint8_t psv_num,uint8_t pvt_err,uint8_t pvt_mode,int32_t lat,int32_t lon,float ellipsoid_alt,float ve,float vn,float vu,uint16_t h_acc,uint16_t v_acc,float yaw,float pitch,uint8_t hsv_num,uint8_t att_err,uint8_t att_mode,uint8_t reserved)
  282. {
  283. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  284. char buf[MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN];
  285. _mav_put_uint64_t(buf, 0, time_usec);
  286. _mav_put_int32_t(buf, 8, lat);
  287. _mav_put_int32_t(buf, 12, lon);
  288. _mav_put_float(buf, 16, ellipsoid_alt);
  289. _mav_put_float(buf, 20, ve);
  290. _mav_put_float(buf, 24, vn);
  291. _mav_put_float(buf, 28, vu);
  292. _mav_put_float(buf, 32, yaw);
  293. _mav_put_float(buf, 36, pitch);
  294. _mav_put_uint16_t(buf, 40, h_acc);
  295. _mav_put_uint16_t(buf, 42, v_acc);
  296. _mav_put_uint8_t(buf, 44, fix_type);
  297. _mav_put_uint8_t(buf, 45, psv_num);
  298. _mav_put_uint8_t(buf, 46, pvt_err);
  299. _mav_put_uint8_t(buf, 47, pvt_mode);
  300. _mav_put_uint8_t(buf, 48, hsv_num);
  301. _mav_put_uint8_t(buf, 49, att_err);
  302. _mav_put_uint8_t(buf, 50, att_mode);
  303. _mav_put_uint8_t(buf, 51, reserved);
  304. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN);
  305. #else
  306. mavlink_vk_mosaich_gps_raw_t packet;
  307. packet.time_usec = time_usec;
  308. packet.lat = lat;
  309. packet.lon = lon;
  310. packet.ellipsoid_alt = ellipsoid_alt;
  311. packet.ve = ve;
  312. packet.vn = vn;
  313. packet.vu = vu;
  314. packet.yaw = yaw;
  315. packet.pitch = pitch;
  316. packet.h_acc = h_acc;
  317. packet.v_acc = v_acc;
  318. packet.fix_type = fix_type;
  319. packet.psv_num = psv_num;
  320. packet.pvt_err = pvt_err;
  321. packet.pvt_mode = pvt_mode;
  322. packet.hsv_num = hsv_num;
  323. packet.att_err = att_err;
  324. packet.att_mode = att_mode;
  325. packet.reserved = reserved;
  326. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN);
  327. #endif
  328. msg->msgid = MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW;
  329. return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC);
  330. }
  331. /**
  332. * @brief Encode a vk_mosaich_gps_raw struct
  333. *
  334. * @param system_id ID of this system
  335. * @param component_id ID of this component (e.g. 200 for IMU)
  336. * @param msg The MAVLink message to compress the data into
  337. * @param vk_mosaich_gps_raw C-struct to read the message contents from
  338. */
  339. static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_mosaich_gps_raw_t* vk_mosaich_gps_raw)
  340. {
  341. return mavlink_msg_vk_mosaich_gps_raw_pack(system_id, component_id, msg, vk_mosaich_gps_raw->time_usec, vk_mosaich_gps_raw->fix_type, vk_mosaich_gps_raw->psv_num, vk_mosaich_gps_raw->pvt_err, vk_mosaich_gps_raw->pvt_mode, vk_mosaich_gps_raw->lat, vk_mosaich_gps_raw->lon, vk_mosaich_gps_raw->ellipsoid_alt, vk_mosaich_gps_raw->ve, vk_mosaich_gps_raw->vn, vk_mosaich_gps_raw->vu, vk_mosaich_gps_raw->h_acc, vk_mosaich_gps_raw->v_acc, vk_mosaich_gps_raw->yaw, vk_mosaich_gps_raw->pitch, vk_mosaich_gps_raw->hsv_num, vk_mosaich_gps_raw->att_err, vk_mosaich_gps_raw->att_mode, vk_mosaich_gps_raw->reserved);
  342. }
  343. /**
  344. * @brief Encode a vk_mosaich_gps_raw struct on a channel
  345. *
  346. * @param system_id ID of this system
  347. * @param component_id ID of this component (e.g. 200 for IMU)
  348. * @param chan The MAVLink channel this message will be sent over
  349. * @param msg The MAVLink message to compress the data into
  350. * @param vk_mosaich_gps_raw C-struct to read the message contents from
  351. */
  352. static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_mosaich_gps_raw_t* vk_mosaich_gps_raw)
  353. {
  354. return mavlink_msg_vk_mosaich_gps_raw_pack_chan(system_id, component_id, chan, msg, vk_mosaich_gps_raw->time_usec, vk_mosaich_gps_raw->fix_type, vk_mosaich_gps_raw->psv_num, vk_mosaich_gps_raw->pvt_err, vk_mosaich_gps_raw->pvt_mode, vk_mosaich_gps_raw->lat, vk_mosaich_gps_raw->lon, vk_mosaich_gps_raw->ellipsoid_alt, vk_mosaich_gps_raw->ve, vk_mosaich_gps_raw->vn, vk_mosaich_gps_raw->vu, vk_mosaich_gps_raw->h_acc, vk_mosaich_gps_raw->v_acc, vk_mosaich_gps_raw->yaw, vk_mosaich_gps_raw->pitch, vk_mosaich_gps_raw->hsv_num, vk_mosaich_gps_raw->att_err, vk_mosaich_gps_raw->att_mode, vk_mosaich_gps_raw->reserved);
  355. }
  356. /**
  357. * @brief Encode a vk_mosaich_gps_raw struct with provided status structure
  358. *
  359. * @param system_id ID of this system
  360. * @param component_id ID of this component (e.g. 200 for IMU)
  361. * @param status MAVLink status structure
  362. * @param msg The MAVLink message to compress the data into
  363. * @param vk_mosaich_gps_raw C-struct to read the message contents from
  364. */
  365. static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_mosaich_gps_raw_t* vk_mosaich_gps_raw)
  366. {
  367. return mavlink_msg_vk_mosaich_gps_raw_pack_status(system_id, component_id, _status, msg, vk_mosaich_gps_raw->time_usec, vk_mosaich_gps_raw->fix_type, vk_mosaich_gps_raw->psv_num, vk_mosaich_gps_raw->pvt_err, vk_mosaich_gps_raw->pvt_mode, vk_mosaich_gps_raw->lat, vk_mosaich_gps_raw->lon, vk_mosaich_gps_raw->ellipsoid_alt, vk_mosaich_gps_raw->ve, vk_mosaich_gps_raw->vn, vk_mosaich_gps_raw->vu, vk_mosaich_gps_raw->h_acc, vk_mosaich_gps_raw->v_acc, vk_mosaich_gps_raw->yaw, vk_mosaich_gps_raw->pitch, vk_mosaich_gps_raw->hsv_num, vk_mosaich_gps_raw->att_err, vk_mosaich_gps_raw->att_mode, vk_mosaich_gps_raw->reserved);
  368. }
  369. /**
  370. * @brief Send a vk_mosaich_gps_raw message
  371. * @param chan MAVLink channel to send the message
  372. *
  373. * @param time_usec [us] Timestamp (UNIX Epoch time or time since
  374. system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system
  375. boot) by checking for the magnitude of the number.
  376. * @param fix_type GPS fix type.
  377. * @param psv_num Number of satellites for positioning ANT
  378. * @param pvt_err refer to mosaic_h reference page 308
  379. * @param pvt_mode refer to mosaic_h reference page 308
  380. * @param lat [degE7] Latitude (WGS84, EGM96 ellipsoid)
  381. * @param lon [degE7] Longitude (WGS84, EGM96 ellipsoid)
  382. * @param ellipsoid_alt [m] Altitude (Ellipsoild). Positive for up.
  383. * @param ve [m/s] Ease speed in m/s.
  384. * @param vn [m/s] North speed in m/s.
  385. * @param vu [m/s] Up speed in m/s.
  386. * @param h_acc [cm] Position uncertainty.
  387. * @param v_acc [cm] Altitude uncertainty.
  388. * @param yaw [deg] Attitude euler yaw.
  389. * @param pitch [deg] Attitude euler pitch.
  390. * @param hsv_num Number of satellites for heading ANT
  391. * @param att_err refer to mosaic_h reference page 336.
  392. * @param att_mode refer to mosaic_h reference page 336.
  393. * @param reserved reserved
  394. */
  395. #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
  396. static inline void mavlink_msg_vk_mosaich_gps_raw_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t fix_type, uint8_t psv_num, uint8_t pvt_err, uint8_t pvt_mode, int32_t lat, int32_t lon, float ellipsoid_alt, float ve, float vn, float vu, uint16_t h_acc, uint16_t v_acc, float yaw, float pitch, uint8_t hsv_num, uint8_t att_err, uint8_t att_mode, uint8_t reserved)
  397. {
  398. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  399. char buf[MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN];
  400. _mav_put_uint64_t(buf, 0, time_usec);
  401. _mav_put_int32_t(buf, 8, lat);
  402. _mav_put_int32_t(buf, 12, lon);
  403. _mav_put_float(buf, 16, ellipsoid_alt);
  404. _mav_put_float(buf, 20, ve);
  405. _mav_put_float(buf, 24, vn);
  406. _mav_put_float(buf, 28, vu);
  407. _mav_put_float(buf, 32, yaw);
  408. _mav_put_float(buf, 36, pitch);
  409. _mav_put_uint16_t(buf, 40, h_acc);
  410. _mav_put_uint16_t(buf, 42, v_acc);
  411. _mav_put_uint8_t(buf, 44, fix_type);
  412. _mav_put_uint8_t(buf, 45, psv_num);
  413. _mav_put_uint8_t(buf, 46, pvt_err);
  414. _mav_put_uint8_t(buf, 47, pvt_mode);
  415. _mav_put_uint8_t(buf, 48, hsv_num);
  416. _mav_put_uint8_t(buf, 49, att_err);
  417. _mav_put_uint8_t(buf, 50, att_mode);
  418. _mav_put_uint8_t(buf, 51, reserved);
  419. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW, buf, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC);
  420. #else
  421. mavlink_vk_mosaich_gps_raw_t packet;
  422. packet.time_usec = time_usec;
  423. packet.lat = lat;
  424. packet.lon = lon;
  425. packet.ellipsoid_alt = ellipsoid_alt;
  426. packet.ve = ve;
  427. packet.vn = vn;
  428. packet.vu = vu;
  429. packet.yaw = yaw;
  430. packet.pitch = pitch;
  431. packet.h_acc = h_acc;
  432. packet.v_acc = v_acc;
  433. packet.fix_type = fix_type;
  434. packet.psv_num = psv_num;
  435. packet.pvt_err = pvt_err;
  436. packet.pvt_mode = pvt_mode;
  437. packet.hsv_num = hsv_num;
  438. packet.att_err = att_err;
  439. packet.att_mode = att_mode;
  440. packet.reserved = reserved;
  441. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW, (const char *)&packet, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC);
  442. #endif
  443. }
  444. /**
  445. * @brief Send a vk_mosaich_gps_raw message
  446. * @param chan MAVLink channel to send the message
  447. * @param struct The MAVLink struct to serialize
  448. */
  449. static inline void mavlink_msg_vk_mosaich_gps_raw_send_struct(mavlink_channel_t chan, const mavlink_vk_mosaich_gps_raw_t* vk_mosaich_gps_raw)
  450. {
  451. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  452. mavlink_msg_vk_mosaich_gps_raw_send(chan, vk_mosaich_gps_raw->time_usec, vk_mosaich_gps_raw->fix_type, vk_mosaich_gps_raw->psv_num, vk_mosaich_gps_raw->pvt_err, vk_mosaich_gps_raw->pvt_mode, vk_mosaich_gps_raw->lat, vk_mosaich_gps_raw->lon, vk_mosaich_gps_raw->ellipsoid_alt, vk_mosaich_gps_raw->ve, vk_mosaich_gps_raw->vn, vk_mosaich_gps_raw->vu, vk_mosaich_gps_raw->h_acc, vk_mosaich_gps_raw->v_acc, vk_mosaich_gps_raw->yaw, vk_mosaich_gps_raw->pitch, vk_mosaich_gps_raw->hsv_num, vk_mosaich_gps_raw->att_err, vk_mosaich_gps_raw->att_mode, vk_mosaich_gps_raw->reserved);
  453. #else
  454. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW, (const char *)vk_mosaich_gps_raw, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC);
  455. #endif
  456. }
  457. #if MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN <= MAVLINK_MAX_PAYLOAD_LEN
  458. /*
  459. This variant of _send() can be used to save stack space by re-using
  460. memory from the receive buffer. The caller provides a
  461. mavlink_message_t which is the size of a full mavlink message. This
  462. is usually the receive buffer for the channel, and allows a reply to an
  463. incoming message with minimum stack space usage.
  464. */
  465. static inline void mavlink_msg_vk_mosaich_gps_raw_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint8_t fix_type, uint8_t psv_num, uint8_t pvt_err, uint8_t pvt_mode, int32_t lat, int32_t lon, float ellipsoid_alt, float ve, float vn, float vu, uint16_t h_acc, uint16_t v_acc, float yaw, float pitch, uint8_t hsv_num, uint8_t att_err, uint8_t att_mode, uint8_t reserved)
  466. {
  467. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  468. char *buf = (char *)msgbuf;
  469. _mav_put_uint64_t(buf, 0, time_usec);
  470. _mav_put_int32_t(buf, 8, lat);
  471. _mav_put_int32_t(buf, 12, lon);
  472. _mav_put_float(buf, 16, ellipsoid_alt);
  473. _mav_put_float(buf, 20, ve);
  474. _mav_put_float(buf, 24, vn);
  475. _mav_put_float(buf, 28, vu);
  476. _mav_put_float(buf, 32, yaw);
  477. _mav_put_float(buf, 36, pitch);
  478. _mav_put_uint16_t(buf, 40, h_acc);
  479. _mav_put_uint16_t(buf, 42, v_acc);
  480. _mav_put_uint8_t(buf, 44, fix_type);
  481. _mav_put_uint8_t(buf, 45, psv_num);
  482. _mav_put_uint8_t(buf, 46, pvt_err);
  483. _mav_put_uint8_t(buf, 47, pvt_mode);
  484. _mav_put_uint8_t(buf, 48, hsv_num);
  485. _mav_put_uint8_t(buf, 49, att_err);
  486. _mav_put_uint8_t(buf, 50, att_mode);
  487. _mav_put_uint8_t(buf, 51, reserved);
  488. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW, buf, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC);
  489. #else
  490. mavlink_vk_mosaich_gps_raw_t *packet = (mavlink_vk_mosaich_gps_raw_t *)msgbuf;
  491. packet->time_usec = time_usec;
  492. packet->lat = lat;
  493. packet->lon = lon;
  494. packet->ellipsoid_alt = ellipsoid_alt;
  495. packet->ve = ve;
  496. packet->vn = vn;
  497. packet->vu = vu;
  498. packet->yaw = yaw;
  499. packet->pitch = pitch;
  500. packet->h_acc = h_acc;
  501. packet->v_acc = v_acc;
  502. packet->fix_type = fix_type;
  503. packet->psv_num = psv_num;
  504. packet->pvt_err = pvt_err;
  505. packet->pvt_mode = pvt_mode;
  506. packet->hsv_num = hsv_num;
  507. packet->att_err = att_err;
  508. packet->att_mode = att_mode;
  509. packet->reserved = reserved;
  510. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW, (const char *)packet, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_MIN_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_CRC);
  511. #endif
  512. }
  513. #endif
  514. #endif
  515. // MESSAGE VK_MOSAICH_GPS_RAW UNPACKING
  516. /**
  517. * @brief Get field time_usec from vk_mosaich_gps_raw message
  518. *
  519. * @return [us] Timestamp (UNIX Epoch time or time since
  520. system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system
  521. boot) by checking for the magnitude of the number.
  522. */
  523. static inline uint64_t mavlink_msg_vk_mosaich_gps_raw_get_time_usec(const mavlink_message_t* msg)
  524. {
  525. return _MAV_RETURN_uint64_t(msg, 0);
  526. }
  527. /**
  528. * @brief Get field fix_type from vk_mosaich_gps_raw message
  529. *
  530. * @return GPS fix type.
  531. */
  532. static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_fix_type(const mavlink_message_t* msg)
  533. {
  534. return _MAV_RETURN_uint8_t(msg, 44);
  535. }
  536. /**
  537. * @brief Get field psv_num from vk_mosaich_gps_raw message
  538. *
  539. * @return Number of satellites for positioning ANT
  540. */
  541. static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_psv_num(const mavlink_message_t* msg)
  542. {
  543. return _MAV_RETURN_uint8_t(msg, 45);
  544. }
  545. /**
  546. * @brief Get field pvt_err from vk_mosaich_gps_raw message
  547. *
  548. * @return refer to mosaic_h reference page 308
  549. */
  550. static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_pvt_err(const mavlink_message_t* msg)
  551. {
  552. return _MAV_RETURN_uint8_t(msg, 46);
  553. }
  554. /**
  555. * @brief Get field pvt_mode from vk_mosaich_gps_raw message
  556. *
  557. * @return refer to mosaic_h reference page 308
  558. */
  559. static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_pvt_mode(const mavlink_message_t* msg)
  560. {
  561. return _MAV_RETURN_uint8_t(msg, 47);
  562. }
  563. /**
  564. * @brief Get field lat from vk_mosaich_gps_raw message
  565. *
  566. * @return [degE7] Latitude (WGS84, EGM96 ellipsoid)
  567. */
  568. static inline int32_t mavlink_msg_vk_mosaich_gps_raw_get_lat(const mavlink_message_t* msg)
  569. {
  570. return _MAV_RETURN_int32_t(msg, 8);
  571. }
  572. /**
  573. * @brief Get field lon from vk_mosaich_gps_raw message
  574. *
  575. * @return [degE7] Longitude (WGS84, EGM96 ellipsoid)
  576. */
  577. static inline int32_t mavlink_msg_vk_mosaich_gps_raw_get_lon(const mavlink_message_t* msg)
  578. {
  579. return _MAV_RETURN_int32_t(msg, 12);
  580. }
  581. /**
  582. * @brief Get field ellipsoid_alt from vk_mosaich_gps_raw message
  583. *
  584. * @return [m] Altitude (Ellipsoild). Positive for up.
  585. */
  586. static inline float mavlink_msg_vk_mosaich_gps_raw_get_ellipsoid_alt(const mavlink_message_t* msg)
  587. {
  588. return _MAV_RETURN_float(msg, 16);
  589. }
  590. /**
  591. * @brief Get field ve from vk_mosaich_gps_raw message
  592. *
  593. * @return [m/s] Ease speed in m/s.
  594. */
  595. static inline float mavlink_msg_vk_mosaich_gps_raw_get_ve(const mavlink_message_t* msg)
  596. {
  597. return _MAV_RETURN_float(msg, 20);
  598. }
  599. /**
  600. * @brief Get field vn from vk_mosaich_gps_raw message
  601. *
  602. * @return [m/s] North speed in m/s.
  603. */
  604. static inline float mavlink_msg_vk_mosaich_gps_raw_get_vn(const mavlink_message_t* msg)
  605. {
  606. return _MAV_RETURN_float(msg, 24);
  607. }
  608. /**
  609. * @brief Get field vu from vk_mosaich_gps_raw message
  610. *
  611. * @return [m/s] Up speed in m/s.
  612. */
  613. static inline float mavlink_msg_vk_mosaich_gps_raw_get_vu(const mavlink_message_t* msg)
  614. {
  615. return _MAV_RETURN_float(msg, 28);
  616. }
  617. /**
  618. * @brief Get field h_acc from vk_mosaich_gps_raw message
  619. *
  620. * @return [cm] Position uncertainty.
  621. */
  622. static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_get_h_acc(const mavlink_message_t* msg)
  623. {
  624. return _MAV_RETURN_uint16_t(msg, 40);
  625. }
  626. /**
  627. * @brief Get field v_acc from vk_mosaich_gps_raw message
  628. *
  629. * @return [cm] Altitude uncertainty.
  630. */
  631. static inline uint16_t mavlink_msg_vk_mosaich_gps_raw_get_v_acc(const mavlink_message_t* msg)
  632. {
  633. return _MAV_RETURN_uint16_t(msg, 42);
  634. }
  635. /**
  636. * @brief Get field yaw from vk_mosaich_gps_raw message
  637. *
  638. * @return [deg] Attitude euler yaw.
  639. */
  640. static inline float mavlink_msg_vk_mosaich_gps_raw_get_yaw(const mavlink_message_t* msg)
  641. {
  642. return _MAV_RETURN_float(msg, 32);
  643. }
  644. /**
  645. * @brief Get field pitch from vk_mosaich_gps_raw message
  646. *
  647. * @return [deg] Attitude euler pitch.
  648. */
  649. static inline float mavlink_msg_vk_mosaich_gps_raw_get_pitch(const mavlink_message_t* msg)
  650. {
  651. return _MAV_RETURN_float(msg, 36);
  652. }
  653. /**
  654. * @brief Get field hsv_num from vk_mosaich_gps_raw message
  655. *
  656. * @return Number of satellites for heading ANT
  657. */
  658. static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_hsv_num(const mavlink_message_t* msg)
  659. {
  660. return _MAV_RETURN_uint8_t(msg, 48);
  661. }
  662. /**
  663. * @brief Get field att_err from vk_mosaich_gps_raw message
  664. *
  665. * @return refer to mosaic_h reference page 336.
  666. */
  667. static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_att_err(const mavlink_message_t* msg)
  668. {
  669. return _MAV_RETURN_uint8_t(msg, 49);
  670. }
  671. /**
  672. * @brief Get field att_mode from vk_mosaich_gps_raw message
  673. *
  674. * @return refer to mosaic_h reference page 336.
  675. */
  676. static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_att_mode(const mavlink_message_t* msg)
  677. {
  678. return _MAV_RETURN_uint8_t(msg, 50);
  679. }
  680. /**
  681. * @brief Get field reserved from vk_mosaich_gps_raw message
  682. *
  683. * @return reserved
  684. */
  685. static inline uint8_t mavlink_msg_vk_mosaich_gps_raw_get_reserved(const mavlink_message_t* msg)
  686. {
  687. return _MAV_RETURN_uint8_t(msg, 51);
  688. }
  689. /**
  690. * @brief Decode a vk_mosaich_gps_raw message into a struct
  691. *
  692. * @param msg The message to decode
  693. * @param vk_mosaich_gps_raw C-struct to decode the message contents into
  694. */
  695. static inline void mavlink_msg_vk_mosaich_gps_raw_decode(const mavlink_message_t* msg, mavlink_vk_mosaich_gps_raw_t* vk_mosaich_gps_raw)
  696. {
  697. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  698. vk_mosaich_gps_raw->time_usec = mavlink_msg_vk_mosaich_gps_raw_get_time_usec(msg);
  699. vk_mosaich_gps_raw->lat = mavlink_msg_vk_mosaich_gps_raw_get_lat(msg);
  700. vk_mosaich_gps_raw->lon = mavlink_msg_vk_mosaich_gps_raw_get_lon(msg);
  701. vk_mosaich_gps_raw->ellipsoid_alt = mavlink_msg_vk_mosaich_gps_raw_get_ellipsoid_alt(msg);
  702. vk_mosaich_gps_raw->ve = mavlink_msg_vk_mosaich_gps_raw_get_ve(msg);
  703. vk_mosaich_gps_raw->vn = mavlink_msg_vk_mosaich_gps_raw_get_vn(msg);
  704. vk_mosaich_gps_raw->vu = mavlink_msg_vk_mosaich_gps_raw_get_vu(msg);
  705. vk_mosaich_gps_raw->yaw = mavlink_msg_vk_mosaich_gps_raw_get_yaw(msg);
  706. vk_mosaich_gps_raw->pitch = mavlink_msg_vk_mosaich_gps_raw_get_pitch(msg);
  707. vk_mosaich_gps_raw->h_acc = mavlink_msg_vk_mosaich_gps_raw_get_h_acc(msg);
  708. vk_mosaich_gps_raw->v_acc = mavlink_msg_vk_mosaich_gps_raw_get_v_acc(msg);
  709. vk_mosaich_gps_raw->fix_type = mavlink_msg_vk_mosaich_gps_raw_get_fix_type(msg);
  710. vk_mosaich_gps_raw->psv_num = mavlink_msg_vk_mosaich_gps_raw_get_psv_num(msg);
  711. vk_mosaich_gps_raw->pvt_err = mavlink_msg_vk_mosaich_gps_raw_get_pvt_err(msg);
  712. vk_mosaich_gps_raw->pvt_mode = mavlink_msg_vk_mosaich_gps_raw_get_pvt_mode(msg);
  713. vk_mosaich_gps_raw->hsv_num = mavlink_msg_vk_mosaich_gps_raw_get_hsv_num(msg);
  714. vk_mosaich_gps_raw->att_err = mavlink_msg_vk_mosaich_gps_raw_get_att_err(msg);
  715. vk_mosaich_gps_raw->att_mode = mavlink_msg_vk_mosaich_gps_raw_get_att_mode(msg);
  716. vk_mosaich_gps_raw->reserved = mavlink_msg_vk_mosaich_gps_raw_get_reserved(msg);
  717. #else
  718. uint8_t len = msg->len < MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN? msg->len : MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN;
  719. memset(vk_mosaich_gps_raw, 0, MAVLINK_MSG_ID_VK_MOSAICH_GPS_RAW_LEN);
  720. memcpy(vk_mosaich_gps_raw, _MAV_PAYLOAD(msg), len);
  721. #endif
  722. }