2 // MESSAGE LOCAL_POSITION_NED_COV PACKING
4 #define MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV 64
7 typedef struct __mavlink_local_position_ned_cov_t
{
8 uint64_t time_usec
; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/
9 float x
; /*< [m] X Position*/
10 float y
; /*< [m] Y Position*/
11 float z
; /*< [m] Z Position*/
12 float vx
; /*< [m/s] X Speed*/
13 float vy
; /*< [m/s] Y Speed*/
14 float vz
; /*< [m/s] Z Speed*/
15 float ax
; /*< [m/s/s] X Acceleration*/
16 float ay
; /*< [m/s/s] Y Acceleration*/
17 float az
; /*< [m/s/s] Z Acceleration*/
18 float covariance
[45]; /*< Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array.*/
19 uint8_t estimator_type
; /*< Class id of the estimator this estimate originated from.*/
20 } mavlink_local_position_ned_cov_t
;
22 #define MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN 225
23 #define MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_MIN_LEN 225
24 #define MAVLINK_MSG_ID_64_LEN 225
25 #define MAVLINK_MSG_ID_64_MIN_LEN 225
27 #define MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC 191
28 #define MAVLINK_MSG_ID_64_CRC 191
30 #define MAVLINK_MSG_LOCAL_POSITION_NED_COV_FIELD_COVARIANCE_LEN 45
32 #if MAVLINK_COMMAND_24BIT
33 #define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV { \
35 "LOCAL_POSITION_NED_COV", \
37 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_local_position_ned_cov_t, time_usec) }, \
38 { "estimator_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 224, offsetof(mavlink_local_position_ned_cov_t, estimator_type) }, \
39 { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_ned_cov_t, x) }, \
40 { "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_ned_cov_t, y) }, \
41 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_local_position_ned_cov_t, z) }, \
42 { "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_local_position_ned_cov_t, vx) }, \
43 { "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_local_position_ned_cov_t, vy) }, \
44 { "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_local_position_ned_cov_t, vz) }, \
45 { "ax", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_local_position_ned_cov_t, ax) }, \
46 { "ay", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_local_position_ned_cov_t, ay) }, \
47 { "az", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_local_position_ned_cov_t, az) }, \
48 { "covariance", NULL, MAVLINK_TYPE_FLOAT, 45, 44, offsetof(mavlink_local_position_ned_cov_t, covariance) }, \
52 #define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_NED_COV { \
53 "LOCAL_POSITION_NED_COV", \
55 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_local_position_ned_cov_t, time_usec) }, \
56 { "estimator_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 224, offsetof(mavlink_local_position_ned_cov_t, estimator_type) }, \
57 { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_ned_cov_t, x) }, \
58 { "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_ned_cov_t, y) }, \
59 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_local_position_ned_cov_t, z) }, \
60 { "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_local_position_ned_cov_t, vx) }, \
61 { "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_local_position_ned_cov_t, vy) }, \
62 { "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_local_position_ned_cov_t, vz) }, \
63 { "ax", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_local_position_ned_cov_t, ax) }, \
64 { "ay", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_local_position_ned_cov_t, ay) }, \
65 { "az", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_local_position_ned_cov_t, az) }, \
66 { "covariance", NULL, MAVLINK_TYPE_FLOAT, 45, 44, offsetof(mavlink_local_position_ned_cov_t, covariance) }, \
72 * @brief Pack a local_position_ned_cov message
73 * @param system_id ID of this system
74 * @param component_id ID of this component (e.g. 200 for IMU)
75 * @param msg The MAVLink message to compress the data into
77 * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
78 * @param estimator_type Class id of the estimator this estimate originated from.
79 * @param x [m] X Position
80 * @param y [m] Y Position
81 * @param z [m] Z Position
82 * @param vx [m/s] X Speed
83 * @param vy [m/s] Y Speed
84 * @param vz [m/s] Z Speed
85 * @param ax [m/s/s] X Acceleration
86 * @param ay [m/s/s] Y Acceleration
87 * @param az [m/s/s] Z Acceleration
88 * @param covariance Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array.
89 * @return length of the message in bytes (excluding serial stream start sign)
91 static inline uint16_t mavlink_msg_local_position_ned_cov_pack(uint8_t system_id
, uint8_t component_id
, mavlink_message_t
* msg
,
92 uint64_t time_usec
, uint8_t estimator_type
, float x
, float y
, float z
, float vx
, float vy
, float vz
, float ax
, float ay
, float az
, const float *covariance
)
94 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
95 char buf
[MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
];
96 _mav_put_uint64_t(buf
, 0, time_usec
);
97 _mav_put_float(buf
, 8, x
);
98 _mav_put_float(buf
, 12, y
);
99 _mav_put_float(buf
, 16, z
);
100 _mav_put_float(buf
, 20, vx
);
101 _mav_put_float(buf
, 24, vy
);
102 _mav_put_float(buf
, 28, vz
);
103 _mav_put_float(buf
, 32, ax
);
104 _mav_put_float(buf
, 36, ay
);
105 _mav_put_float(buf
, 40, az
);
106 _mav_put_uint8_t(buf
, 224, estimator_type
);
107 _mav_put_float_array(buf
, 44, covariance
, 45);
108 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), buf
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
);
110 mavlink_local_position_ned_cov_t packet
;
111 packet
.time_usec
= time_usec
;
121 packet
.estimator_type
= estimator_type
;
122 mav_array_memcpy(packet
.covariance
, covariance
, sizeof(float)*45);
123 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), &packet
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
);
126 msg
->msgid
= MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV
;
127 return mavlink_finalize_message(msg
, system_id
, component_id
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_MIN_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC
);
131 * @brief Pack a local_position_ned_cov message on a channel
132 * @param system_id ID of this system
133 * @param component_id ID of this component (e.g. 200 for IMU)
134 * @param chan The MAVLink channel this message will be sent over
135 * @param msg The MAVLink message to compress the data into
136 * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
137 * @param estimator_type Class id of the estimator this estimate originated from.
138 * @param x [m] X Position
139 * @param y [m] Y Position
140 * @param z [m] Z Position
141 * @param vx [m/s] X Speed
142 * @param vy [m/s] Y Speed
143 * @param vz [m/s] Z Speed
144 * @param ax [m/s/s] X Acceleration
145 * @param ay [m/s/s] Y Acceleration
146 * @param az [m/s/s] Z Acceleration
147 * @param covariance Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array.
148 * @return length of the message in bytes (excluding serial stream start sign)
150 static inline uint16_t mavlink_msg_local_position_ned_cov_pack_chan(uint8_t system_id
, uint8_t component_id
, uint8_t chan
,
151 mavlink_message_t
* msg
,
152 uint64_t time_usec
,uint8_t estimator_type
,float x
,float y
,float z
,float vx
,float vy
,float vz
,float ax
,float ay
,float az
,const float *covariance
)
154 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
155 char buf
[MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
];
156 _mav_put_uint64_t(buf
, 0, time_usec
);
157 _mav_put_float(buf
, 8, x
);
158 _mav_put_float(buf
, 12, y
);
159 _mav_put_float(buf
, 16, z
);
160 _mav_put_float(buf
, 20, vx
);
161 _mav_put_float(buf
, 24, vy
);
162 _mav_put_float(buf
, 28, vz
);
163 _mav_put_float(buf
, 32, ax
);
164 _mav_put_float(buf
, 36, ay
);
165 _mav_put_float(buf
, 40, az
);
166 _mav_put_uint8_t(buf
, 224, estimator_type
);
167 _mav_put_float_array(buf
, 44, covariance
, 45);
168 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), buf
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
);
170 mavlink_local_position_ned_cov_t packet
;
171 packet
.time_usec
= time_usec
;
181 packet
.estimator_type
= estimator_type
;
182 mav_array_memcpy(packet
.covariance
, covariance
, sizeof(float)*45);
183 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), &packet
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
);
186 msg
->msgid
= MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV
;
187 return mavlink_finalize_message_chan(msg
, system_id
, component_id
, chan
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_MIN_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC
);
191 * @brief Encode a local_position_ned_cov struct
193 * @param system_id ID of this system
194 * @param component_id ID of this component (e.g. 200 for IMU)
195 * @param msg The MAVLink message to compress the data into
196 * @param local_position_ned_cov C-struct to read the message contents from
198 static inline uint16_t mavlink_msg_local_position_ned_cov_encode(uint8_t system_id
, uint8_t component_id
, mavlink_message_t
* msg
, const mavlink_local_position_ned_cov_t
* local_position_ned_cov
)
200 return mavlink_msg_local_position_ned_cov_pack(system_id
, component_id
, msg
, local_position_ned_cov
->time_usec
, local_position_ned_cov
->estimator_type
, local_position_ned_cov
->x
, local_position_ned_cov
->y
, local_position_ned_cov
->z
, local_position_ned_cov
->vx
, local_position_ned_cov
->vy
, local_position_ned_cov
->vz
, local_position_ned_cov
->ax
, local_position_ned_cov
->ay
, local_position_ned_cov
->az
, local_position_ned_cov
->covariance
);
204 * @brief Encode a local_position_ned_cov struct on a channel
206 * @param system_id ID of this system
207 * @param component_id ID of this component (e.g. 200 for IMU)
208 * @param chan The MAVLink channel this message will be sent over
209 * @param msg The MAVLink message to compress the data into
210 * @param local_position_ned_cov C-struct to read the message contents from
212 static inline uint16_t mavlink_msg_local_position_ned_cov_encode_chan(uint8_t system_id
, uint8_t component_id
, uint8_t chan
, mavlink_message_t
* msg
, const mavlink_local_position_ned_cov_t
* local_position_ned_cov
)
214 return mavlink_msg_local_position_ned_cov_pack_chan(system_id
, component_id
, chan
, msg
, local_position_ned_cov
->time_usec
, local_position_ned_cov
->estimator_type
, local_position_ned_cov
->x
, local_position_ned_cov
->y
, local_position_ned_cov
->z
, local_position_ned_cov
->vx
, local_position_ned_cov
->vy
, local_position_ned_cov
->vz
, local_position_ned_cov
->ax
, local_position_ned_cov
->ay
, local_position_ned_cov
->az
, local_position_ned_cov
->covariance
);
218 * @brief Send a local_position_ned_cov message
219 * @param chan MAVLink channel to send the message
221 * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
222 * @param estimator_type Class id of the estimator this estimate originated from.
223 * @param x [m] X Position
224 * @param y [m] Y Position
225 * @param z [m] Z Position
226 * @param vx [m/s] X Speed
227 * @param vy [m/s] Y Speed
228 * @param vz [m/s] Z Speed
229 * @param ax [m/s/s] X Acceleration
230 * @param ay [m/s/s] Y Acceleration
231 * @param az [m/s/s] Z Acceleration
232 * @param covariance Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array.
234 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
236 static inline void mavlink_msg_local_position_ned_cov_send(mavlink_channel_t chan
, uint64_t time_usec
, uint8_t estimator_type
, float x
, float y
, float z
, float vx
, float vy
, float vz
, float ax
, float ay
, float az
, const float *covariance
)
238 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
239 char buf
[MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
];
240 _mav_put_uint64_t(buf
, 0, time_usec
);
241 _mav_put_float(buf
, 8, x
);
242 _mav_put_float(buf
, 12, y
);
243 _mav_put_float(buf
, 16, z
);
244 _mav_put_float(buf
, 20, vx
);
245 _mav_put_float(buf
, 24, vy
);
246 _mav_put_float(buf
, 28, vz
);
247 _mav_put_float(buf
, 32, ax
);
248 _mav_put_float(buf
, 36, ay
);
249 _mav_put_float(buf
, 40, az
);
250 _mav_put_uint8_t(buf
, 224, estimator_type
);
251 _mav_put_float_array(buf
, 44, covariance
, 45);
252 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV
, buf
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_MIN_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC
);
254 mavlink_local_position_ned_cov_t packet
;
255 packet
.time_usec
= time_usec
;
265 packet
.estimator_type
= estimator_type
;
266 mav_array_memcpy(packet
.covariance
, covariance
, sizeof(float)*45);
267 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV
, (const char *)&packet
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_MIN_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC
);
272 * @brief Send a local_position_ned_cov message
273 * @param chan MAVLink channel to send the message
274 * @param struct The MAVLink struct to serialize
276 static inline void mavlink_msg_local_position_ned_cov_send_struct(mavlink_channel_t chan
, const mavlink_local_position_ned_cov_t
* local_position_ned_cov
)
278 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
279 mavlink_msg_local_position_ned_cov_send(chan
, local_position_ned_cov
->time_usec
, local_position_ned_cov
->estimator_type
, local_position_ned_cov
->x
, local_position_ned_cov
->y
, local_position_ned_cov
->z
, local_position_ned_cov
->vx
, local_position_ned_cov
->vy
, local_position_ned_cov
->vz
, local_position_ned_cov
->ax
, local_position_ned_cov
->ay
, local_position_ned_cov
->az
, local_position_ned_cov
->covariance
);
281 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV
, (const char *)local_position_ned_cov
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_MIN_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC
);
285 #if MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN <= MAVLINK_MAX_PAYLOAD_LEN
287 This varient of _send() can be used to save stack space by re-using
288 memory from the receive buffer. The caller provides a
289 mavlink_message_t which is the size of a full mavlink message. This
290 is usually the receive buffer for the channel, and allows a reply to an
291 incoming message with minimum stack space usage.
293 static inline void mavlink_msg_local_position_ned_cov_send_buf(mavlink_message_t
*msgbuf
, mavlink_channel_t chan
, uint64_t time_usec
, uint8_t estimator_type
, float x
, float y
, float z
, float vx
, float vy
, float vz
, float ax
, float ay
, float az
, const float *covariance
)
295 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
296 char *buf
= (char *)msgbuf
;
297 _mav_put_uint64_t(buf
, 0, time_usec
);
298 _mav_put_float(buf
, 8, x
);
299 _mav_put_float(buf
, 12, y
);
300 _mav_put_float(buf
, 16, z
);
301 _mav_put_float(buf
, 20, vx
);
302 _mav_put_float(buf
, 24, vy
);
303 _mav_put_float(buf
, 28, vz
);
304 _mav_put_float(buf
, 32, ax
);
305 _mav_put_float(buf
, 36, ay
);
306 _mav_put_float(buf
, 40, az
);
307 _mav_put_uint8_t(buf
, 224, estimator_type
);
308 _mav_put_float_array(buf
, 44, covariance
, 45);
309 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV
, buf
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_MIN_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC
);
311 mavlink_local_position_ned_cov_t
*packet
= (mavlink_local_position_ned_cov_t
*)msgbuf
;
312 packet
->time_usec
= time_usec
;
322 packet
->estimator_type
= estimator_type
;
323 mav_array_memcpy(packet
->covariance
, covariance
, sizeof(float)*45);
324 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV
, (const char *)packet
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_MIN_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_CRC
);
331 // MESSAGE LOCAL_POSITION_NED_COV UNPACKING
335 * @brief Get field time_usec from local_position_ned_cov message
337 * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
339 static inline uint64_t mavlink_msg_local_position_ned_cov_get_time_usec(const mavlink_message_t
* msg
)
341 return _MAV_RETURN_uint64_t(msg
, 0);
345 * @brief Get field estimator_type from local_position_ned_cov message
347 * @return Class id of the estimator this estimate originated from.
349 static inline uint8_t mavlink_msg_local_position_ned_cov_get_estimator_type(const mavlink_message_t
* msg
)
351 return _MAV_RETURN_uint8_t(msg
, 224);
355 * @brief Get field x from local_position_ned_cov message
357 * @return [m] X Position
359 static inline float mavlink_msg_local_position_ned_cov_get_x(const mavlink_message_t
* msg
)
361 return _MAV_RETURN_float(msg
, 8);
365 * @brief Get field y from local_position_ned_cov message
367 * @return [m] Y Position
369 static inline float mavlink_msg_local_position_ned_cov_get_y(const mavlink_message_t
* msg
)
371 return _MAV_RETURN_float(msg
, 12);
375 * @brief Get field z from local_position_ned_cov message
377 * @return [m] Z Position
379 static inline float mavlink_msg_local_position_ned_cov_get_z(const mavlink_message_t
* msg
)
381 return _MAV_RETURN_float(msg
, 16);
385 * @brief Get field vx from local_position_ned_cov message
387 * @return [m/s] X Speed
389 static inline float mavlink_msg_local_position_ned_cov_get_vx(const mavlink_message_t
* msg
)
391 return _MAV_RETURN_float(msg
, 20);
395 * @brief Get field vy from local_position_ned_cov message
397 * @return [m/s] Y Speed
399 static inline float mavlink_msg_local_position_ned_cov_get_vy(const mavlink_message_t
* msg
)
401 return _MAV_RETURN_float(msg
, 24);
405 * @brief Get field vz from local_position_ned_cov message
407 * @return [m/s] Z Speed
409 static inline float mavlink_msg_local_position_ned_cov_get_vz(const mavlink_message_t
* msg
)
411 return _MAV_RETURN_float(msg
, 28);
415 * @brief Get field ax from local_position_ned_cov message
417 * @return [m/s/s] X Acceleration
419 static inline float mavlink_msg_local_position_ned_cov_get_ax(const mavlink_message_t
* msg
)
421 return _MAV_RETURN_float(msg
, 32);
425 * @brief Get field ay from local_position_ned_cov message
427 * @return [m/s/s] Y Acceleration
429 static inline float mavlink_msg_local_position_ned_cov_get_ay(const mavlink_message_t
* msg
)
431 return _MAV_RETURN_float(msg
, 36);
435 * @brief Get field az from local_position_ned_cov message
437 * @return [m/s/s] Z Acceleration
439 static inline float mavlink_msg_local_position_ned_cov_get_az(const mavlink_message_t
* msg
)
441 return _MAV_RETURN_float(msg
, 40);
445 * @brief Get field covariance from local_position_ned_cov message
447 * @return Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array.
449 static inline uint16_t mavlink_msg_local_position_ned_cov_get_covariance(const mavlink_message_t
* msg
, float *covariance
)
451 return _MAV_RETURN_float_array(msg
, covariance
, 45, 44);
455 * @brief Decode a local_position_ned_cov message into a struct
457 * @param msg The message to decode
458 * @param local_position_ned_cov C-struct to decode the message contents into
460 static inline void mavlink_msg_local_position_ned_cov_decode(const mavlink_message_t
* msg
, mavlink_local_position_ned_cov_t
* local_position_ned_cov
)
462 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
463 local_position_ned_cov
->time_usec
= mavlink_msg_local_position_ned_cov_get_time_usec(msg
);
464 local_position_ned_cov
->x
= mavlink_msg_local_position_ned_cov_get_x(msg
);
465 local_position_ned_cov
->y
= mavlink_msg_local_position_ned_cov_get_y(msg
);
466 local_position_ned_cov
->z
= mavlink_msg_local_position_ned_cov_get_z(msg
);
467 local_position_ned_cov
->vx
= mavlink_msg_local_position_ned_cov_get_vx(msg
);
468 local_position_ned_cov
->vy
= mavlink_msg_local_position_ned_cov_get_vy(msg
);
469 local_position_ned_cov
->vz
= mavlink_msg_local_position_ned_cov_get_vz(msg
);
470 local_position_ned_cov
->ax
= mavlink_msg_local_position_ned_cov_get_ax(msg
);
471 local_position_ned_cov
->ay
= mavlink_msg_local_position_ned_cov_get_ay(msg
);
472 local_position_ned_cov
->az
= mavlink_msg_local_position_ned_cov_get_az(msg
);
473 mavlink_msg_local_position_ned_cov_get_covariance(msg
, local_position_ned_cov
->covariance
);
474 local_position_ned_cov
->estimator_type
= mavlink_msg_local_position_ned_cov_get_estimator_type(msg
);
476 uint8_t len
= msg
->len
< MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
? msg
->len
: MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
;
477 memset(local_position_ned_cov
, 0, MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV_LEN
);
478 memcpy(local_position_ned_cov
, _MAV_PAYLOAD(msg
), len
);