RflySimSDK v3.08
RflySimSDK说明文档
载入中...
搜索中...
未找到
mavlink_msg_global_position_int_cov.h
1#pragma once
2// MESSAGE GLOBAL_POSITION_INT_COV PACKING
3
4#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV 63
5
6MAVPACKED(
7typedef struct __mavlink_global_position_int_cov_t {
8 uint64_t time_usec; /*< Timestamp (microseconds since system boot or since UNIX epoch)*/
9 int32_t lat; /*< Latitude, expressed as degrees * 1E7*/
10 int32_t lon; /*< Longitude, expressed as degrees * 1E7*/
11 int32_t alt; /*< Altitude in meters, expressed as * 1000 (millimeters), above MSL*/
12 int32_t relative_alt; /*< Altitude above ground in meters, expressed as * 1000 (millimeters)*/
13 float vx; /*< Ground X Speed (Latitude), expressed as m/s*/
14 float vy; /*< Ground Y Speed (Longitude), expressed as m/s*/
15 float vz; /*< Ground Z Speed (Altitude), expressed as m/s*/
16 float covariance[36]; /*< Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.)*/
17 uint8_t estimator_type; /*< Class id of the estimator this estimate originated from.*/
18}) mavlink_global_position_int_cov_t;
19
20#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN 181
21#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_MIN_LEN 181
22#define MAVLINK_MSG_ID_63_LEN 181
23#define MAVLINK_MSG_ID_63_MIN_LEN 181
24
25#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_CRC 119
26#define MAVLINK_MSG_ID_63_CRC 119
27
28#define MAVLINK_MSG_GLOBAL_POSITION_INT_COV_FIELD_COVARIANCE_LEN 36
29
30#if MAVLINK_COMMAND_24BIT
31#define MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV { \
32 63, \
33 "GLOBAL_POSITION_INT_COV", \
34 10, \
35 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_global_position_int_cov_t, time_usec) }, \
36 { "estimator_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 180, offsetof(mavlink_global_position_int_cov_t, estimator_type) }, \
37 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_global_position_int_cov_t, lat) }, \
38 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_global_position_int_cov_t, lon) }, \
39 { "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_global_position_int_cov_t, alt) }, \
40 { "relative_alt", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_global_position_int_cov_t, relative_alt) }, \
41 { "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_global_position_int_cov_t, vx) }, \
42 { "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_global_position_int_cov_t, vy) }, \
43 { "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_global_position_int_cov_t, vz) }, \
44 { "covariance", NULL, MAVLINK_TYPE_FLOAT, 36, 36, offsetof(mavlink_global_position_int_cov_t, covariance) }, \
45 } \
46}
47#else
48#define MAVLINK_MESSAGE_INFO_GLOBAL_POSITION_INT_COV { \
49 "GLOBAL_POSITION_INT_COV", \
50 10, \
51 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_global_position_int_cov_t, time_usec) }, \
52 { "estimator_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 180, offsetof(mavlink_global_position_int_cov_t, estimator_type) }, \
53 { "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_global_position_int_cov_t, lat) }, \
54 { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_global_position_int_cov_t, lon) }, \
55 { "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_global_position_int_cov_t, alt) }, \
56 { "relative_alt", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_global_position_int_cov_t, relative_alt) }, \
57 { "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_global_position_int_cov_t, vx) }, \
58 { "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_global_position_int_cov_t, vy) }, \
59 { "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_global_position_int_cov_t, vz) }, \
60 { "covariance", NULL, MAVLINK_TYPE_FLOAT, 36, 36, offsetof(mavlink_global_position_int_cov_t, covariance) }, \
61 } \
62}
63#endif
64
65/**
66 * @brief Pack a global_position_int_cov message
67 * @param system_id ID of this system
68 * @param component_id ID of this component (e.g. 200 for IMU)
69 * @param msg The MAVLink message to compress the data into
70 *
71 * @param time_usec Timestamp (microseconds since system boot or since UNIX epoch)
72 * @param estimator_type Class id of the estimator this estimate originated from.
73 * @param lat Latitude, expressed as degrees * 1E7
74 * @param lon Longitude, expressed as degrees * 1E7
75 * @param alt Altitude in meters, expressed as * 1000 (millimeters), above MSL
76 * @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
77 * @param vx Ground X Speed (Latitude), expressed as m/s
78 * @param vy Ground Y Speed (Longitude), expressed as m/s
79 * @param vz Ground Z Speed (Altitude), expressed as m/s
80 * @param covariance Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.)
81 * @return length of the message in bytes (excluding serial stream start sign)
82 */
83static inline uint16_t mavlink_msg_global_position_int_cov_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
84 uint64_t time_usec, uint8_t estimator_type, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, float vx, float vy, float vz, const float *covariance)
85{
86#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
87 char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN];
88 _mav_put_uint64_t(buf, 0, time_usec);
89 _mav_put_int32_t(buf, 8, lat);
90 _mav_put_int32_t(buf, 12, lon);
91 _mav_put_int32_t(buf, 16, alt);
92 _mav_put_int32_t(buf, 20, relative_alt);
93 _mav_put_float(buf, 24, vx);
94 _mav_put_float(buf, 28, vy);
95 _mav_put_float(buf, 32, vz);
96 _mav_put_uint8_t(buf, 180, estimator_type);
97 _mav_put_float_array(buf, 36, covariance, 36);
98 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN);
99#else
100 mavlink_global_position_int_cov_t packet;
101 packet.time_usec = time_usec;
102 packet.lat = lat;
103 packet.lon = lon;
104 packet.alt = alt;
105 packet.relative_alt = relative_alt;
106 packet.vx = vx;
107 packet.vy = vy;
108 packet.vz = vz;
109 packet.estimator_type = estimator_type;
110 mav_array_memcpy(packet.covariance, covariance, sizeof(float)*36);
111 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN);
112#endif
113
114 msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV;
115 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_MIN_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_CRC);
116}
117
118/**
119 * @brief Pack a global_position_int_cov message on a channel
120 * @param system_id ID of this system
121 * @param component_id ID of this component (e.g. 200 for IMU)
122 * @param chan The MAVLink channel this message will be sent over
123 * @param msg The MAVLink message to compress the data into
124 * @param time_usec Timestamp (microseconds since system boot or since UNIX epoch)
125 * @param estimator_type Class id of the estimator this estimate originated from.
126 * @param lat Latitude, expressed as degrees * 1E7
127 * @param lon Longitude, expressed as degrees * 1E7
128 * @param alt Altitude in meters, expressed as * 1000 (millimeters), above MSL
129 * @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
130 * @param vx Ground X Speed (Latitude), expressed as m/s
131 * @param vy Ground Y Speed (Longitude), expressed as m/s
132 * @param vz Ground Z Speed (Altitude), expressed as m/s
133 * @param covariance Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.)
134 * @return length of the message in bytes (excluding serial stream start sign)
135 */
136static inline uint16_t mavlink_msg_global_position_int_cov_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
137 mavlink_message_t* msg,
138 uint64_t time_usec,uint8_t estimator_type,int32_t lat,int32_t lon,int32_t alt,int32_t relative_alt,float vx,float vy,float vz,const float *covariance)
139{
140#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
141 char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN];
142 _mav_put_uint64_t(buf, 0, time_usec);
143 _mav_put_int32_t(buf, 8, lat);
144 _mav_put_int32_t(buf, 12, lon);
145 _mav_put_int32_t(buf, 16, alt);
146 _mav_put_int32_t(buf, 20, relative_alt);
147 _mav_put_float(buf, 24, vx);
148 _mav_put_float(buf, 28, vy);
149 _mav_put_float(buf, 32, vz);
150 _mav_put_uint8_t(buf, 180, estimator_type);
151 _mav_put_float_array(buf, 36, covariance, 36);
152 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN);
153#else
154 mavlink_global_position_int_cov_t packet;
155 packet.time_usec = time_usec;
156 packet.lat = lat;
157 packet.lon = lon;
158 packet.alt = alt;
159 packet.relative_alt = relative_alt;
160 packet.vx = vx;
161 packet.vy = vy;
162 packet.vz = vz;
163 packet.estimator_type = estimator_type;
164 mav_array_memcpy(packet.covariance, covariance, sizeof(float)*36);
165 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN);
166#endif
167
168 msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV;
169 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_MIN_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_CRC);
170}
171
172/**
173 * @brief Encode a global_position_int_cov struct
174 *
175 * @param system_id ID of this system
176 * @param component_id ID of this component (e.g. 200 for IMU)
177 * @param msg The MAVLink message to compress the data into
178 * @param global_position_int_cov C-struct to read the message contents from
179 */
180static inline uint16_t mavlink_msg_global_position_int_cov_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_global_position_int_cov_t* global_position_int_cov)
181{
182 return mavlink_msg_global_position_int_cov_pack(system_id, component_id, msg, global_position_int_cov->time_usec, global_position_int_cov->estimator_type, global_position_int_cov->lat, global_position_int_cov->lon, global_position_int_cov->alt, global_position_int_cov->relative_alt, global_position_int_cov->vx, global_position_int_cov->vy, global_position_int_cov->vz, global_position_int_cov->covariance);
183}
184
185/**
186 * @brief Encode a global_position_int_cov struct on a channel
187 *
188 * @param system_id ID of this system
189 * @param component_id ID of this component (e.g. 200 for IMU)
190 * @param chan The MAVLink channel this message will be sent over
191 * @param msg The MAVLink message to compress the data into
192 * @param global_position_int_cov C-struct to read the message contents from
193 */
194static inline uint16_t mavlink_msg_global_position_int_cov_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_global_position_int_cov_t* global_position_int_cov)
195{
196 return mavlink_msg_global_position_int_cov_pack_chan(system_id, component_id, chan, msg, global_position_int_cov->time_usec, global_position_int_cov->estimator_type, global_position_int_cov->lat, global_position_int_cov->lon, global_position_int_cov->alt, global_position_int_cov->relative_alt, global_position_int_cov->vx, global_position_int_cov->vy, global_position_int_cov->vz, global_position_int_cov->covariance);
197}
198
199/**
200 * @brief Send a global_position_int_cov message
201 * @param chan MAVLink channel to send the message
202 *
203 * @param time_usec Timestamp (microseconds since system boot or since UNIX epoch)
204 * @param estimator_type Class id of the estimator this estimate originated from.
205 * @param lat Latitude, expressed as degrees * 1E7
206 * @param lon Longitude, expressed as degrees * 1E7
207 * @param alt Altitude in meters, expressed as * 1000 (millimeters), above MSL
208 * @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
209 * @param vx Ground X Speed (Latitude), expressed as m/s
210 * @param vy Ground Y Speed (Longitude), expressed as m/s
211 * @param vz Ground Z Speed (Altitude), expressed as m/s
212 * @param covariance Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.)
213 */
214#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
215
216static inline void mavlink_msg_global_position_int_cov_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t estimator_type, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, float vx, float vy, float vz, const float *covariance)
217{
218#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
219 char buf[MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN];
220 _mav_put_uint64_t(buf, 0, time_usec);
221 _mav_put_int32_t(buf, 8, lat);
222 _mav_put_int32_t(buf, 12, lon);
223 _mav_put_int32_t(buf, 16, alt);
224 _mav_put_int32_t(buf, 20, relative_alt);
225 _mav_put_float(buf, 24, vx);
226 _mav_put_float(buf, 28, vy);
227 _mav_put_float(buf, 32, vz);
228 _mav_put_uint8_t(buf, 180, estimator_type);
229 _mav_put_float_array(buf, 36, covariance, 36);
230 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV, buf, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_MIN_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_CRC);
231#else
232 mavlink_global_position_int_cov_t packet;
233 packet.time_usec = time_usec;
234 packet.lat = lat;
235 packet.lon = lon;
236 packet.alt = alt;
237 packet.relative_alt = relative_alt;
238 packet.vx = vx;
239 packet.vy = vy;
240 packet.vz = vz;
241 packet.estimator_type = estimator_type;
242 mav_array_memcpy(packet.covariance, covariance, sizeof(float)*36);
243 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV, (const char *)&packet, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_MIN_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_CRC);
244#endif
245}
246
247/**
248 * @brief Send a global_position_int_cov message
249 * @param chan MAVLink channel to send the message
250 * @param struct The MAVLink struct to serialize
251 */
252static inline void mavlink_msg_global_position_int_cov_send_struct(mavlink_channel_t chan, const mavlink_global_position_int_cov_t* global_position_int_cov)
253{
254#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
255 mavlink_msg_global_position_int_cov_send(chan, global_position_int_cov->time_usec, global_position_int_cov->estimator_type, global_position_int_cov->lat, global_position_int_cov->lon, global_position_int_cov->alt, global_position_int_cov->relative_alt, global_position_int_cov->vx, global_position_int_cov->vy, global_position_int_cov->vz, global_position_int_cov->covariance);
256#else
257 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV, (const char *)global_position_int_cov, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_MIN_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_CRC);
258#endif
259}
260
261#if MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN <= MAVLINK_MAX_PAYLOAD_LEN
262/*
263 This varient of _send() can be used to save stack space by re-using
264 memory from the receive buffer. The caller provides a
265 mavlink_message_t which is the size of a full mavlink message. This
266 is usually the receive buffer for the channel, and allows a reply to an
267 incoming message with minimum stack space usage.
268 */
269static inline void mavlink_msg_global_position_int_cov_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint8_t estimator_type, int32_t lat, int32_t lon, int32_t alt, int32_t relative_alt, float vx, float vy, float vz, const float *covariance)
270{
271#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
272 char *buf = (char *)msgbuf;
273 _mav_put_uint64_t(buf, 0, time_usec);
274 _mav_put_int32_t(buf, 8, lat);
275 _mav_put_int32_t(buf, 12, lon);
276 _mav_put_int32_t(buf, 16, alt);
277 _mav_put_int32_t(buf, 20, relative_alt);
278 _mav_put_float(buf, 24, vx);
279 _mav_put_float(buf, 28, vy);
280 _mav_put_float(buf, 32, vz);
281 _mav_put_uint8_t(buf, 180, estimator_type);
282 _mav_put_float_array(buf, 36, covariance, 36);
283 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV, buf, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_MIN_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_CRC);
284#else
285 mavlink_global_position_int_cov_t *packet = (mavlink_global_position_int_cov_t *)msgbuf;
286 packet->time_usec = time_usec;
287 packet->lat = lat;
288 packet->lon = lon;
289 packet->alt = alt;
290 packet->relative_alt = relative_alt;
291 packet->vx = vx;
292 packet->vy = vy;
293 packet->vz = vz;
294 packet->estimator_type = estimator_type;
295 mav_array_memcpy(packet->covariance, covariance, sizeof(float)*36);
296 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV, (const char *)packet, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_MIN_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_CRC);
297#endif
298}
299#endif
300
301#endif
302
303// MESSAGE GLOBAL_POSITION_INT_COV UNPACKING
304
305
306/**
307 * @brief Get field time_usec from global_position_int_cov message
308 *
309 * @return Timestamp (microseconds since system boot or since UNIX epoch)
310 */
311static inline uint64_t mavlink_msg_global_position_int_cov_get_time_usec(const mavlink_message_t* msg)
312{
313 return _MAV_RETURN_uint64_t(msg, 0);
314}
315
316/**
317 * @brief Get field estimator_type from global_position_int_cov message
318 *
319 * @return Class id of the estimator this estimate originated from.
320 */
321static inline uint8_t mavlink_msg_global_position_int_cov_get_estimator_type(const mavlink_message_t* msg)
322{
323 return _MAV_RETURN_uint8_t(msg, 180);
324}
325
326/**
327 * @brief Get field lat from global_position_int_cov message
328 *
329 * @return Latitude, expressed as degrees * 1E7
330 */
331static inline int32_t mavlink_msg_global_position_int_cov_get_lat(const mavlink_message_t* msg)
332{
333 return _MAV_RETURN_int32_t(msg, 8);
334}
335
336/**
337 * @brief Get field lon from global_position_int_cov message
338 *
339 * @return Longitude, expressed as degrees * 1E7
340 */
341static inline int32_t mavlink_msg_global_position_int_cov_get_lon(const mavlink_message_t* msg)
342{
343 return _MAV_RETURN_int32_t(msg, 12);
344}
345
346/**
347 * @brief Get field alt from global_position_int_cov message
348 *
349 * @return Altitude in meters, expressed as * 1000 (millimeters), above MSL
350 */
351static inline int32_t mavlink_msg_global_position_int_cov_get_alt(const mavlink_message_t* msg)
352{
353 return _MAV_RETURN_int32_t(msg, 16);
354}
355
356/**
357 * @brief Get field relative_alt from global_position_int_cov message
358 *
359 * @return Altitude above ground in meters, expressed as * 1000 (millimeters)
360 */
361static inline int32_t mavlink_msg_global_position_int_cov_get_relative_alt(const mavlink_message_t* msg)
362{
363 return _MAV_RETURN_int32_t(msg, 20);
364}
365
366/**
367 * @brief Get field vx from global_position_int_cov message
368 *
369 * @return Ground X Speed (Latitude), expressed as m/s
370 */
371static inline float mavlink_msg_global_position_int_cov_get_vx(const mavlink_message_t* msg)
372{
373 return _MAV_RETURN_float(msg, 24);
374}
375
376/**
377 * @brief Get field vy from global_position_int_cov message
378 *
379 * @return Ground Y Speed (Longitude), expressed as m/s
380 */
381static inline float mavlink_msg_global_position_int_cov_get_vy(const mavlink_message_t* msg)
382{
383 return _MAV_RETURN_float(msg, 28);
384}
385
386/**
387 * @brief Get field vz from global_position_int_cov message
388 *
389 * @return Ground Z Speed (Altitude), expressed as m/s
390 */
391static inline float mavlink_msg_global_position_int_cov_get_vz(const mavlink_message_t* msg)
392{
393 return _MAV_RETURN_float(msg, 32);
394}
395
396/**
397 * @brief Get field covariance from global_position_int_cov message
398 *
399 * @return Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.)
400 */
401static inline uint16_t mavlink_msg_global_position_int_cov_get_covariance(const mavlink_message_t* msg, float *covariance)
402{
403 return _MAV_RETURN_float_array(msg, covariance, 36, 36);
404}
405
406/**
407 * @brief Decode a global_position_int_cov message into a struct
408 *
409 * @param msg The message to decode
410 * @param global_position_int_cov C-struct to decode the message contents into
411 */
412static inline void mavlink_msg_global_position_int_cov_decode(const mavlink_message_t* msg, mavlink_global_position_int_cov_t* global_position_int_cov)
413{
414#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
415 global_position_int_cov->time_usec = mavlink_msg_global_position_int_cov_get_time_usec(msg);
416 global_position_int_cov->lat = mavlink_msg_global_position_int_cov_get_lat(msg);
417 global_position_int_cov->lon = mavlink_msg_global_position_int_cov_get_lon(msg);
418 global_position_int_cov->alt = mavlink_msg_global_position_int_cov_get_alt(msg);
419 global_position_int_cov->relative_alt = mavlink_msg_global_position_int_cov_get_relative_alt(msg);
420 global_position_int_cov->vx = mavlink_msg_global_position_int_cov_get_vx(msg);
421 global_position_int_cov->vy = mavlink_msg_global_position_int_cov_get_vy(msg);
422 global_position_int_cov->vz = mavlink_msg_global_position_int_cov_get_vz(msg);
423 mavlink_msg_global_position_int_cov_get_covariance(msg, global_position_int_cov->covariance);
424 global_position_int_cov->estimator_type = mavlink_msg_global_position_int_cov_get_estimator_type(msg);
425#else
426 uint8_t len = msg->len < MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN? msg->len : MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN;
427 memset(global_position_int_cov, 0, MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV_LEN);
428 memcpy(global_position_int_cov, _MAV_PAYLOAD(msg), len);
429#endif
430}