4#define MAVLINK_MSG_ID_ESTIMATOR_STATUS 230
7typedef struct __mavlink_estimator_status_t {
10 float pos_horiz_ratio;
15 float pos_horiz_accuracy;
16 float pos_vert_accuracy;
18}) mavlink_estimator_status_t;
20#define MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN 42
21#define MAVLINK_MSG_ID_ESTIMATOR_STATUS_MIN_LEN 42
22#define MAVLINK_MSG_ID_230_LEN 42
23#define MAVLINK_MSG_ID_230_MIN_LEN 42
25#define MAVLINK_MSG_ID_ESTIMATOR_STATUS_CRC 163
26#define MAVLINK_MSG_ID_230_CRC 163
30#if MAVLINK_COMMAND_24BIT
31#define MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS { \
35 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_estimator_status_t, time_usec) }, \
36 { "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_estimator_status_t, flags) }, \
37 { "vel_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_estimator_status_t, vel_ratio) }, \
38 { "pos_horiz_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_estimator_status_t, pos_horiz_ratio) }, \
39 { "pos_vert_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_estimator_status_t, pos_vert_ratio) }, \
40 { "mag_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_estimator_status_t, mag_ratio) }, \
41 { "hagl_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_estimator_status_t, hagl_ratio) }, \
42 { "tas_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_estimator_status_t, tas_ratio) }, \
43 { "pos_horiz_accuracy", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_estimator_status_t, pos_horiz_accuracy) }, \
44 { "pos_vert_accuracy", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_estimator_status_t, pos_vert_accuracy) }, \
48#define MAVLINK_MESSAGE_INFO_ESTIMATOR_STATUS { \
51 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_estimator_status_t, time_usec) }, \
52 { "flags", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_estimator_status_t, flags) }, \
53 { "vel_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_estimator_status_t, vel_ratio) }, \
54 { "pos_horiz_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_estimator_status_t, pos_horiz_ratio) }, \
55 { "pos_vert_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_estimator_status_t, pos_vert_ratio) }, \
56 { "mag_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_estimator_status_t, mag_ratio) }, \
57 { "hagl_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_estimator_status_t, hagl_ratio) }, \
58 { "tas_ratio", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_estimator_status_t, tas_ratio) }, \
59 { "pos_horiz_accuracy", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_estimator_status_t, pos_horiz_accuracy) }, \
60 { "pos_vert_accuracy", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_estimator_status_t, pos_vert_accuracy) }, \
83static inline uint16_t mavlink_msg_estimator_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
84 uint64_t time_usec, uint16_t flags,
float vel_ratio,
float pos_horiz_ratio,
float pos_vert_ratio,
float mag_ratio,
float hagl_ratio,
float tas_ratio,
float pos_horiz_accuracy,
float pos_vert_accuracy)
86#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
87 char buf[MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN];
88 _mav_put_uint64_t(buf, 0, time_usec);
89 _mav_put_float(buf, 8, vel_ratio);
90 _mav_put_float(buf, 12, pos_horiz_ratio);
91 _mav_put_float(buf, 16, pos_vert_ratio);
92 _mav_put_float(buf, 20, mag_ratio);
93 _mav_put_float(buf, 24, hagl_ratio);
94 _mav_put_float(buf, 28, tas_ratio);
95 _mav_put_float(buf, 32, pos_horiz_accuracy);
96 _mav_put_float(buf, 36, pos_vert_accuracy);
97 _mav_put_uint16_t(buf, 40, flags);
99 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN);
101 mavlink_estimator_status_t packet;
102 packet.time_usec = time_usec;
103 packet.vel_ratio = vel_ratio;
104 packet.pos_horiz_ratio = pos_horiz_ratio;
105 packet.pos_vert_ratio = pos_vert_ratio;
106 packet.mag_ratio = mag_ratio;
107 packet.hagl_ratio = hagl_ratio;
108 packet.tas_ratio = tas_ratio;
109 packet.pos_horiz_accuracy = pos_horiz_accuracy;
110 packet.pos_vert_accuracy = pos_vert_accuracy;
111 packet.flags = flags;
113 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN);
116 msg->msgid = MAVLINK_MSG_ID_ESTIMATOR_STATUS;
117 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESTIMATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_CRC);
138static inline uint16_t mavlink_msg_estimator_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
139 mavlink_message_t* msg,
140 uint64_t time_usec,uint16_t flags,
float vel_ratio,
float pos_horiz_ratio,
float pos_vert_ratio,
float mag_ratio,
float hagl_ratio,
float tas_ratio,
float pos_horiz_accuracy,
float pos_vert_accuracy)
142#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
143 char buf[MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN];
144 _mav_put_uint64_t(buf, 0, time_usec);
145 _mav_put_float(buf, 8, vel_ratio);
146 _mav_put_float(buf, 12, pos_horiz_ratio);
147 _mav_put_float(buf, 16, pos_vert_ratio);
148 _mav_put_float(buf, 20, mag_ratio);
149 _mav_put_float(buf, 24, hagl_ratio);
150 _mav_put_float(buf, 28, tas_ratio);
151 _mav_put_float(buf, 32, pos_horiz_accuracy);
152 _mav_put_float(buf, 36, pos_vert_accuracy);
153 _mav_put_uint16_t(buf, 40, flags);
155 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN);
157 mavlink_estimator_status_t packet;
158 packet.time_usec = time_usec;
159 packet.vel_ratio = vel_ratio;
160 packet.pos_horiz_ratio = pos_horiz_ratio;
161 packet.pos_vert_ratio = pos_vert_ratio;
162 packet.mag_ratio = mag_ratio;
163 packet.hagl_ratio = hagl_ratio;
164 packet.tas_ratio = tas_ratio;
165 packet.pos_horiz_accuracy = pos_horiz_accuracy;
166 packet.pos_vert_accuracy = pos_vert_accuracy;
167 packet.flags = flags;
169 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN);
172 msg->msgid = MAVLINK_MSG_ID_ESTIMATOR_STATUS;
173 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ESTIMATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_CRC);
184static inline uint16_t mavlink_msg_estimator_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_estimator_status_t* estimator_status)
186 return mavlink_msg_estimator_status_pack(system_id, component_id, msg, estimator_status->time_usec, estimator_status->flags, estimator_status->vel_ratio, estimator_status->pos_horiz_ratio, estimator_status->pos_vert_ratio, estimator_status->mag_ratio, estimator_status->hagl_ratio, estimator_status->tas_ratio, estimator_status->pos_horiz_accuracy, estimator_status->pos_vert_accuracy);
198static inline uint16_t mavlink_msg_estimator_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_estimator_status_t* estimator_status)
200 return mavlink_msg_estimator_status_pack_chan(system_id, component_id, chan, msg, estimator_status->time_usec, estimator_status->flags, estimator_status->vel_ratio, estimator_status->pos_horiz_ratio, estimator_status->pos_vert_ratio, estimator_status->mag_ratio, estimator_status->hagl_ratio, estimator_status->tas_ratio, estimator_status->pos_horiz_accuracy, estimator_status->pos_vert_accuracy);
218#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
220static inline void mavlink_msg_estimator_status_send(mavlink_channel_t chan, uint64_t time_usec, uint16_t flags,
float vel_ratio,
float pos_horiz_ratio,
float pos_vert_ratio,
float mag_ratio,
float hagl_ratio,
float tas_ratio,
float pos_horiz_accuracy,
float pos_vert_accuracy)
222#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
223 char buf[MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN];
224 _mav_put_uint64_t(buf, 0, time_usec);
225 _mav_put_float(buf, 8, vel_ratio);
226 _mav_put_float(buf, 12, pos_horiz_ratio);
227 _mav_put_float(buf, 16, pos_vert_ratio);
228 _mav_put_float(buf, 20, mag_ratio);
229 _mav_put_float(buf, 24, hagl_ratio);
230 _mav_put_float(buf, 28, tas_ratio);
231 _mav_put_float(buf, 32, pos_horiz_accuracy);
232 _mav_put_float(buf, 36, pos_vert_accuracy);
233 _mav_put_uint16_t(buf, 40, flags);
235 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESTIMATOR_STATUS, buf, MAVLINK_MSG_ID_ESTIMATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_CRC);
237 mavlink_estimator_status_t packet;
238 packet.time_usec = time_usec;
239 packet.vel_ratio = vel_ratio;
240 packet.pos_horiz_ratio = pos_horiz_ratio;
241 packet.pos_vert_ratio = pos_vert_ratio;
242 packet.mag_ratio = mag_ratio;
243 packet.hagl_ratio = hagl_ratio;
244 packet.tas_ratio = tas_ratio;
245 packet.pos_horiz_accuracy = pos_horiz_accuracy;
246 packet.pos_vert_accuracy = pos_vert_accuracy;
247 packet.flags = flags;
249 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESTIMATOR_STATUS, (
const char *)&packet, MAVLINK_MSG_ID_ESTIMATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_CRC);
258static inline void mavlink_msg_estimator_status_send_struct(mavlink_channel_t chan,
const mavlink_estimator_status_t* estimator_status)
260#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
261 mavlink_msg_estimator_status_send(chan, estimator_status->time_usec, estimator_status->flags, estimator_status->vel_ratio, estimator_status->pos_horiz_ratio, estimator_status->pos_vert_ratio, estimator_status->mag_ratio, estimator_status->hagl_ratio, estimator_status->tas_ratio, estimator_status->pos_horiz_accuracy, estimator_status->pos_vert_accuracy);
263 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESTIMATOR_STATUS, (
const char *)estimator_status, MAVLINK_MSG_ID_ESTIMATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_CRC);
267#if MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
275static inline void mavlink_msg_estimator_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint16_t flags,
float vel_ratio,
float pos_horiz_ratio,
float pos_vert_ratio,
float mag_ratio,
float hagl_ratio,
float tas_ratio,
float pos_horiz_accuracy,
float pos_vert_accuracy)
277#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
278 char *buf = (
char *)msgbuf;
279 _mav_put_uint64_t(buf, 0, time_usec);
280 _mav_put_float(buf, 8, vel_ratio);
281 _mav_put_float(buf, 12, pos_horiz_ratio);
282 _mav_put_float(buf, 16, pos_vert_ratio);
283 _mav_put_float(buf, 20, mag_ratio);
284 _mav_put_float(buf, 24, hagl_ratio);
285 _mav_put_float(buf, 28, tas_ratio);
286 _mav_put_float(buf, 32, pos_horiz_accuracy);
287 _mav_put_float(buf, 36, pos_vert_accuracy);
288 _mav_put_uint16_t(buf, 40, flags);
290 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESTIMATOR_STATUS, buf, MAVLINK_MSG_ID_ESTIMATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_CRC);
292 mavlink_estimator_status_t *packet = (mavlink_estimator_status_t *)msgbuf;
293 packet->time_usec = time_usec;
294 packet->vel_ratio = vel_ratio;
295 packet->pos_horiz_ratio = pos_horiz_ratio;
296 packet->pos_vert_ratio = pos_vert_ratio;
297 packet->mag_ratio = mag_ratio;
298 packet->hagl_ratio = hagl_ratio;
299 packet->tas_ratio = tas_ratio;
300 packet->pos_horiz_accuracy = pos_horiz_accuracy;
301 packet->pos_vert_accuracy = pos_vert_accuracy;
302 packet->flags = flags;
304 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESTIMATOR_STATUS, (
const char *)packet, MAVLINK_MSG_ID_ESTIMATOR_STATUS_MIN_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN, MAVLINK_MSG_ID_ESTIMATOR_STATUS_CRC);
319static inline uint64_t mavlink_msg_estimator_status_get_time_usec(
const mavlink_message_t* msg)
321 return _MAV_RETURN_uint64_t(msg, 0);
329static inline uint16_t mavlink_msg_estimator_status_get_flags(
const mavlink_message_t* msg)
331 return _MAV_RETURN_uint16_t(msg, 40);
339static inline float mavlink_msg_estimator_status_get_vel_ratio(
const mavlink_message_t* msg)
341 return _MAV_RETURN_float(msg, 8);
349static inline float mavlink_msg_estimator_status_get_pos_horiz_ratio(
const mavlink_message_t* msg)
351 return _MAV_RETURN_float(msg, 12);
359static inline float mavlink_msg_estimator_status_get_pos_vert_ratio(
const mavlink_message_t* msg)
361 return _MAV_RETURN_float(msg, 16);
369static inline float mavlink_msg_estimator_status_get_mag_ratio(
const mavlink_message_t* msg)
371 return _MAV_RETURN_float(msg, 20);
379static inline float mavlink_msg_estimator_status_get_hagl_ratio(
const mavlink_message_t* msg)
381 return _MAV_RETURN_float(msg, 24);
389static inline float mavlink_msg_estimator_status_get_tas_ratio(
const mavlink_message_t* msg)
391 return _MAV_RETURN_float(msg, 28);
399static inline float mavlink_msg_estimator_status_get_pos_horiz_accuracy(
const mavlink_message_t* msg)
401 return _MAV_RETURN_float(msg, 32);
409static inline float mavlink_msg_estimator_status_get_pos_vert_accuracy(
const mavlink_message_t* msg)
411 return _MAV_RETURN_float(msg, 36);
420static inline void mavlink_msg_estimator_status_decode(
const mavlink_message_t* msg, mavlink_estimator_status_t* estimator_status)
422#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
423 estimator_status->time_usec = mavlink_msg_estimator_status_get_time_usec(msg);
424 estimator_status->vel_ratio = mavlink_msg_estimator_status_get_vel_ratio(msg);
425 estimator_status->pos_horiz_ratio = mavlink_msg_estimator_status_get_pos_horiz_ratio(msg);
426 estimator_status->pos_vert_ratio = mavlink_msg_estimator_status_get_pos_vert_ratio(msg);
427 estimator_status->mag_ratio = mavlink_msg_estimator_status_get_mag_ratio(msg);
428 estimator_status->hagl_ratio = mavlink_msg_estimator_status_get_hagl_ratio(msg);
429 estimator_status->tas_ratio = mavlink_msg_estimator_status_get_tas_ratio(msg);
430 estimator_status->pos_horiz_accuracy = mavlink_msg_estimator_status_get_pos_horiz_accuracy(msg);
431 estimator_status->pos_vert_accuracy = mavlink_msg_estimator_status_get_pos_vert_accuracy(msg);
432 estimator_status->flags = mavlink_msg_estimator_status_get_flags(msg);
434 uint8_t len = msg->len < MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN? msg->len : MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN;
435 memset(estimator_status, 0, MAVLINK_MSG_ID_ESTIMATOR_STATUS_LEN);
436 memcpy(estimator_status, _MAV_PAYLOAD(msg), len);