3 #define MAVLINK_MSG_ID_OPTICAL_FLOW_RAD 106
21 #define MAVLINK_MSG_ID_OPTICAL_FLOW_RAD_LEN 44
22 #define MAVLINK_MSG_ID_106_LEN 44
24 #define MAVLINK_MSG_ID_OPTICAL_FLOW_RAD_CRC 138
25 #define MAVLINK_MSG_ID_106_CRC 138
29 #define MAVLINK_MESSAGE_INFO_OPTICAL_FLOW_RAD { \
32 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_optical_flow_rad_t, time_usec) }, \
33 { "integration_time_us", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_optical_flow_rad_t, integration_time_us) }, \
34 { "integrated_x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_optical_flow_rad_t, integrated_x) }, \
35 { "integrated_y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_optical_flow_rad_t, integrated_y) }, \
36 { "integrated_xgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_optical_flow_rad_t, integrated_xgyro) }, \
37 { "integrated_ygyro", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_optical_flow_rad_t, integrated_ygyro) }, \
38 { "integrated_zgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_optical_flow_rad_t, integrated_zgyro) }, \
39 { "time_delta_distance_us", NULL, MAVLINK_TYPE_UINT32_T, 0, 32, offsetof(mavlink_optical_flow_rad_t, time_delta_distance_us) }, \
40 { "distance", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_optical_flow_rad_t, distance) }, \
41 { "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 40, offsetof(mavlink_optical_flow_rad_t, temperature) }, \
42 { "sensor_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_optical_flow_rad_t, sensor_id) }, \
43 { "quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_optical_flow_rad_t, quality) }, \
68 static inline uint16_t mavlink_msg_optical_flow_rad_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_optical_flow_rad_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_optical_flow_rad_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_optical_flow_rad_t* optical_flow_rad)
189 return mavlink_msg_optical_flow_rad_pack(system_id, component_id, msg, optical_flow_rad->
time_usec, optical_flow_rad->
sensor_id, optical_flow_rad->
integration_time_us, optical_flow_rad->
integrated_x, optical_flow_rad->
integrated_y, optical_flow_rad->
integrated_xgyro, optical_flow_rad->
integrated_ygyro, optical_flow_rad->
integrated_zgyro, optical_flow_rad->
temperature, optical_flow_rad->
quality, optical_flow_rad->
time_delta_distance_us, optical_flow_rad->
distance);
201 static inline uint16_t mavlink_msg_optical_flow_rad_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_optical_flow_rad_t* optical_flow_rad)
203 return mavlink_msg_optical_flow_rad_pack_chan(system_id, component_id, chan, msg, optical_flow_rad->
time_usec, optical_flow_rad->
sensor_id, optical_flow_rad->
integration_time_us, optical_flow_rad->
integrated_x, optical_flow_rad->
integrated_y, optical_flow_rad->
integrated_xgyro, optical_flow_rad->
integrated_ygyro, optical_flow_rad->
integrated_zgyro, optical_flow_rad->
temperature, optical_flow_rad->
quality, optical_flow_rad->
time_delta_distance_us, optical_flow_rad->
distance);
223 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
225 static inline void mavlink_msg_optical_flow_rad_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_OPTICAL_FLOW_RAD_LEN <= MAVLINK_MAX_PAYLOAD_LEN
278 static inline void mavlink_msg_optical_flow_rad_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_optical_flow_rad_get_time_usec(
const mavlink_message_t* msg)
336 return _MAV_RETURN_uint64_t(msg, 0);
344 static inline uint8_t mavlink_msg_optical_flow_rad_get_sensor_id(
const mavlink_message_t* msg)
354 static inline uint32_t mavlink_msg_optical_flow_rad_get_integration_time_us(
const mavlink_message_t* msg)
356 return _MAV_RETURN_uint32_t(msg, 8);
364 static inline float mavlink_msg_optical_flow_rad_get_integrated_x(
const mavlink_message_t* msg)
366 return _MAV_RETURN_float(msg, 12);
374 static inline float mavlink_msg_optical_flow_rad_get_integrated_y(
const mavlink_message_t* msg)
376 return _MAV_RETURN_float(msg, 16);
384 static inline float mavlink_msg_optical_flow_rad_get_integrated_xgyro(
const mavlink_message_t* msg)
386 return _MAV_RETURN_float(msg, 20);
394 static inline float mavlink_msg_optical_flow_rad_get_integrated_ygyro(
const mavlink_message_t* msg)
396 return _MAV_RETURN_float(msg, 24);
404 static inline float mavlink_msg_optical_flow_rad_get_integrated_zgyro(
const mavlink_message_t* msg)
406 return _MAV_RETURN_float(msg, 28);
414 static inline int16_t mavlink_msg_optical_flow_rad_get_temperature(
const mavlink_message_t* msg)
416 return _MAV_RETURN_int16_t(msg, 40);
424 static inline uint8_t mavlink_msg_optical_flow_rad_get_quality(
const mavlink_message_t* msg)
434 static inline uint32_t mavlink_msg_optical_flow_rad_get_time_delta_distance_us(
const mavlink_message_t* msg)
436 return _MAV_RETURN_uint32_t(msg, 32);
444 static inline float mavlink_msg_optical_flow_rad_get_distance(
const mavlink_message_t* msg)
446 return _MAV_RETURN_float(msg, 36);
455 static inline void mavlink_msg_optical_flow_rad_decode(
const mavlink_message_t* msg,
mavlink_optical_flow_rad_t* optical_flow_rad)
457 #if MAVLINK_NEED_BYTE_SWAP
458 optical_flow_rad->
time_usec = mavlink_msg_optical_flow_rad_get_time_usec(msg);
459 optical_flow_rad->
integration_time_us = mavlink_msg_optical_flow_rad_get_integration_time_us(msg);
460 optical_flow_rad->
integrated_x = mavlink_msg_optical_flow_rad_get_integrated_x(msg);
461 optical_flow_rad->
integrated_y = mavlink_msg_optical_flow_rad_get_integrated_y(msg);
462 optical_flow_rad->
integrated_xgyro = mavlink_msg_optical_flow_rad_get_integrated_xgyro(msg);
463 optical_flow_rad->
integrated_ygyro = mavlink_msg_optical_flow_rad_get_integrated_ygyro(msg);
464 optical_flow_rad->
integrated_zgyro = mavlink_msg_optical_flow_rad_get_integrated_zgyro(msg);
466 optical_flow_rad->
distance = mavlink_msg_optical_flow_rad_get_distance(msg);
467 optical_flow_rad->
temperature = mavlink_msg_optical_flow_rad_get_temperature(msg);
468 optical_flow_rad->
sensor_id = mavlink_msg_optical_flow_rad_get_sensor_id(msg);
469 optical_flow_rad->
quality = mavlink_msg_optical_flow_rad_get_quality(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
uint32_t integration_time_us
Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obt...
Definition: mavlink_msg_optical_flow_rad.h:8
#define MAVLINK_MSG_ID_OPTICAL_FLOW_RAD
Definition: mavlink_msg_optical_flow_rad.h:3
#define MAVLINK_MSG_ID_OPTICAL_FLOW_RAD_LEN
Definition: mavlink_msg_optical_flow_rad.h:21
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
uint8_t quality
Optical flow quality / confidence. 0: no valid flow, 255: maximum quality.
Definition: mavlink_msg_optical_flow_rad.h:18
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 MAVLINK_MSG_ID_OPTICAL_FLOW_RAD_CRC
Definition: mavlink_msg_optical_flow_rad.h:24
#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
float integrated_xgyro
RH rotation around X axis (rad)
Definition: mavlink_msg_optical_flow_rad.h:11
uint8_t sensor_id
Sensor ID.
Definition: mavlink_msg_optical_flow_rad.h:17
mavlink_channel_t
Definition: mavlink_types.h:178
Definition: mavlink_msg_optical_flow_rad.h:5
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
float integrated_x
Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow...
Definition: mavlink_msg_optical_flow_rad.h:9
float integrated_y
Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow...
Definition: mavlink_msg_optical_flow_rad.h:10
float integrated_zgyro
RH rotation around Z axis (rad)
Definition: mavlink_msg_optical_flow_rad.h:13
uint32_t time_delta_distance_us
Time in microseconds since the distance was sampled.
Definition: mavlink_msg_optical_flow_rad.h:14
float distance
Distance to the center of the flow field in meters. Positive value (including zero): distance known...
Definition: mavlink_msg_optical_flow_rad.h:15
uint64_t time_usec
Timestamp (microseconds, synced to UNIX time or since system boot)
Definition: mavlink_msg_optical_flow_rad.h:7
int16_t temperature
Temperature * 100 in centi-degrees Celsius.
Definition: mavlink_msg_optical_flow_rad.h:16
struct __mavlink_optical_flow_rad_t mavlink_optical_flow_rad_t
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
#define _mav_put_int16_t(buf, wire_offset, b)
Definition: protocol.h:140
float integrated_ygyro
RH rotation around Y axis (rad)
Definition: mavlink_msg_optical_flow_rad.h:12
#define _mav_put_uint32_t(buf, wire_offset, b)
Definition: protocol.h:141