3 #define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW 114
21 #define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN 44
22 #define MAVLINK_MSG_ID_114_LEN 44
24 #define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC 237
25 #define MAVLINK_MSG_ID_114_CRC 237
29 #define MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW { \
32 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_optical_flow_t, time_usec) }, \
33 { "integration_time_us", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_hil_optical_flow_t, integration_time_us) }, \
34 { "integrated_x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_hil_optical_flow_t, integrated_x) }, \
35 { "integrated_y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_hil_optical_flow_t, integrated_y) }, \
36 { "integrated_xgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_hil_optical_flow_t, integrated_xgyro) }, \
37 { "integrated_ygyro", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_hil_optical_flow_t, integrated_ygyro) }, \
38 { "integrated_zgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_hil_optical_flow_t, integrated_zgyro) }, \
39 { "time_delta_distance_us", NULL, MAVLINK_TYPE_UINT32_T, 0, 32, offsetof(mavlink_hil_optical_flow_t, time_delta_distance_us) }, \
40 { "distance", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_hil_optical_flow_t, distance) }, \
41 { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_hil_optical_flow_t, temperature) }, \
42 { "sensor_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_hil_optical_flow_t, sensor_id) }, \
43 { "quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_hil_optical_flow_t, quality) }, \
68 static inline uint16_t mavlink_msg_hil_optical_flow_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
69 uint64_t time_usec, uint8_t sensor_id, uint32_t integration_time_us,
float integrated_x,
float integrated_y,
float integrated_xgyro,
float integrated_ygyro,
float integrated_zgyro, int16_t temperature, uint8_t quality, uint32_t time_delta_distance_us,
float distance)
71 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
106 #if MAVLINK_CRC_EXTRA
133 static inline uint16_t mavlink_msg_hil_optical_flow_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
134 mavlink_message_t* msg,
135 uint64_t time_usec,uint8_t sensor_id,uint32_t integration_time_us,
float integrated_x,
float integrated_y,
float integrated_xgyro,
float integrated_ygyro,
float integrated_zgyro,int16_t temperature,uint8_t quality,uint32_t time_delta_distance_us,
float distance)
137 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
172 #if MAVLINK_CRC_EXTRA
187 static inline uint16_t mavlink_msg_hil_optical_flow_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_hil_optical_flow_t* hil_optical_flow)
189 return mavlink_msg_hil_optical_flow_pack(system_id, component_id, msg, hil_optical_flow->
time_usec, hil_optical_flow->
sensor_id, hil_optical_flow->
integration_time_us, hil_optical_flow->
integrated_x, hil_optical_flow->
integrated_y, hil_optical_flow->
integrated_xgyro, hil_optical_flow->
integrated_ygyro, hil_optical_flow->
integrated_zgyro, hil_optical_flow->
temperature, hil_optical_flow->
quality, hil_optical_flow->
time_delta_distance_us, hil_optical_flow->
distance);
201 static inline uint16_t mavlink_msg_hil_optical_flow_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_hil_optical_flow_t* hil_optical_flow)
203 return mavlink_msg_hil_optical_flow_pack_chan(system_id, component_id, chan, msg, hil_optical_flow->
time_usec, hil_optical_flow->
sensor_id, hil_optical_flow->
integration_time_us, hil_optical_flow->
integrated_x, hil_optical_flow->
integrated_y, hil_optical_flow->
integrated_xgyro, hil_optical_flow->
integrated_ygyro, hil_optical_flow->
integrated_zgyro, hil_optical_flow->
temperature, hil_optical_flow->
quality, hil_optical_flow->
time_delta_distance_us, hil_optical_flow->
distance);
223 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
225 static inline void mavlink_msg_hil_optical_flow_send(
mavlink_channel_t chan, uint64_t time_usec, uint8_t sensor_id, uint32_t integration_time_us,
float integrated_x,
float integrated_y,
float integrated_xgyro,
float integrated_ygyro,
float integrated_zgyro, int16_t temperature, uint8_t quality, uint32_t time_delta_distance_us,
float distance)
227 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
242 #if MAVLINK_CRC_EXTRA
262 #if MAVLINK_CRC_EXTRA
270 #if MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN <= MAVLINK_MAX_PAYLOAD_LEN
278 static inline void mavlink_msg_hil_optical_flow_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint64_t time_usec, uint8_t sensor_id, uint32_t integration_time_us,
float integrated_x,
float integrated_y,
float integrated_xgyro,
float integrated_ygyro,
float integrated_zgyro, int16_t temperature, uint8_t quality, uint32_t time_delta_distance_us,
float distance)
280 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
281 char *buf = (
char *)msgbuf;
295 #if MAVLINK_CRC_EXTRA
315 #if MAVLINK_CRC_EXTRA
334 static inline uint64_t mavlink_msg_hil_optical_flow_get_time_usec(
const mavlink_message_t* msg)
336 return _MAV_RETURN_uint64_t(msg, 0);
344 static inline uint8_t mavlink_msg_hil_optical_flow_get_sensor_id(
const mavlink_message_t* msg)
354 static inline uint32_t mavlink_msg_hil_optical_flow_get_integration_time_us(
const mavlink_message_t* msg)
356 return _MAV_RETURN_uint32_t(msg, 8);
364 static inline float mavlink_msg_hil_optical_flow_get_integrated_x(
const mavlink_message_t* msg)
366 return _MAV_RETURN_float(msg, 12);
374 static inline float mavlink_msg_hil_optical_flow_get_integrated_y(
const mavlink_message_t* msg)
376 return _MAV_RETURN_float(msg, 16);
384 static inline float mavlink_msg_hil_optical_flow_get_integrated_xgyro(
const mavlink_message_t* msg)
386 return _MAV_RETURN_float(msg, 20);
394 static inline float mavlink_msg_hil_optical_flow_get_integrated_ygyro(
const mavlink_message_t* msg)
396 return _MAV_RETURN_float(msg, 24);
404 static inline float mavlink_msg_hil_optical_flow_get_integrated_zgyro(
const mavlink_message_t* msg)
406 return _MAV_RETURN_float(msg, 28);
414 static inline int16_t mavlink_msg_hil_optical_flow_get_temperature(
const mavlink_message_t* msg)
416 return _MAV_RETURN_int16_t(msg, 40);
424 static inline uint8_t mavlink_msg_hil_optical_flow_get_quality(
const mavlink_message_t* msg)
434 static inline uint32_t mavlink_msg_hil_optical_flow_get_time_delta_distance_us(
const mavlink_message_t* msg)
436 return _MAV_RETURN_uint32_t(msg, 32);
444 static inline float mavlink_msg_hil_optical_flow_get_distance(
const mavlink_message_t* msg)
446 return _MAV_RETURN_float(msg, 36);
455 static inline void mavlink_msg_hil_optical_flow_decode(
const mavlink_message_t* msg,
mavlink_hil_optical_flow_t* hil_optical_flow)
457 #if MAVLINK_NEED_BYTE_SWAP
458 hil_optical_flow->
time_usec = mavlink_msg_hil_optical_flow_get_time_usec(msg);
459 hil_optical_flow->
integration_time_us = mavlink_msg_hil_optical_flow_get_integration_time_us(msg);
460 hil_optical_flow->
integrated_x = mavlink_msg_hil_optical_flow_get_integrated_x(msg);
461 hil_optical_flow->
integrated_y = mavlink_msg_hil_optical_flow_get_integrated_y(msg);
462 hil_optical_flow->
integrated_xgyro = mavlink_msg_hil_optical_flow_get_integrated_xgyro(msg);
463 hil_optical_flow->
integrated_ygyro = mavlink_msg_hil_optical_flow_get_integrated_ygyro(msg);
464 hil_optical_flow->
integrated_zgyro = mavlink_msg_hil_optical_flow_get_integrated_zgyro(msg);
466 hil_optical_flow->
distance = mavlink_msg_hil_optical_flow_get_distance(msg);
467 hil_optical_flow->
temperature = mavlink_msg_hil_optical_flow_get_temperature(msg);
468 hil_optical_flow->
sensor_id = mavlink_msg_hil_optical_flow_get_sensor_id(msg);
469 hil_optical_flow->
quality = mavlink_msg_hil_optical_flow_get_quality(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
int16_t temperature
Temperature * 100 in centi-degrees Celsius.
Definition: mavlink_msg_hil_optical_flow.h:16
float integrated_zgyro
RH rotation around Z axis (rad)
Definition: mavlink_msg_hil_optical_flow.h:13
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
#define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW
Definition: mavlink_msg_hil_optical_flow.h:3
MAVLINK_HELPER uint16_t mavlink_finalize_message(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t length)
Finalize a MAVLink message with MAVLINK_COMM_0 as default channel.
Definition: mavlink_helpers.h:105
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _mav_put_uint64_t(buf, wire_offset, b)
Definition: protocol.h:143
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
uint32_t time_delta_distance_us
Time in microseconds since the distance was sampled.
Definition: mavlink_msg_hil_optical_flow.h:14
mavlink_channel_t
Definition: mavlink_types.h:178
#define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC
Definition: mavlink_msg_hil_optical_flow.h:24
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
float distance
Distance to the center of the flow field in meters. Positive value (including zero): distance known...
Definition: mavlink_msg_hil_optical_flow.h:15
#define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN
Definition: mavlink_msg_hil_optical_flow.h:21
struct __mavlink_hil_optical_flow_t mavlink_hil_optical_flow_t
Definition: mavlink_msg_hil_optical_flow.h:5
float integrated_y
Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow...
Definition: mavlink_msg_hil_optical_flow.h:10
float integrated_ygyro
RH rotation around Y axis (rad)
Definition: mavlink_msg_hil_optical_flow.h:12
uint64_t time_usec
Timestamp (microseconds, synced to UNIX time or since system boot)
Definition: mavlink_msg_hil_optical_flow.h:7
float integrated_x
Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow...
Definition: mavlink_msg_hil_optical_flow.h:9
uint8_t quality
Optical flow quality / confidence. 0: no valid flow, 255: maximum quality.
Definition: mavlink_msg_hil_optical_flow.h:18
uint8_t sensor_id
Sensor ID.
Definition: mavlink_msg_hil_optical_flow.h:17
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t chan, uint8_t length)
Finalize a MAVLink message with channel assignment.
Definition: mavlink_helpers.h:71
uint32_t integration_time_us
Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obt...
Definition: mavlink_msg_hil_optical_flow.h:8
#define _mav_put_int16_t(buf, wire_offset, b)
Definition: protocol.h:140
float integrated_xgyro
RH rotation around X axis (rad)
Definition: mavlink_msg_hil_optical_flow.h:11
#define _mav_put_uint32_t(buf, wire_offset, b)
Definition: protocol.h:141