37 #define MAVLINK_OPTICAL_FLOW_MSG_ID 100
39 #define MAVLINK_OPTICAL_FLOW_LEN 26
42 #define PX4FLOW_NOISE 0.5
78 #include "pprzlink/messages.h"
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
bool optical_flow_available
struct mavlink_optical_flow optical_flow
static void decode_optical_flow_msg(struct mavlink_message *msg)
Mavlink v1.0 message structure.
void px4flow_downlink(void)
Downlink message for debug.
driver for the optical flow sensor PX4FLOW
Main include for ABI (AirBorneInterface).
int16_t flow_x
Flow in pixels in x-sensor direction.
#define MAVLINK_OPTICAL_FLOW_MSG_ID
#define PX4FLOW_VELOCITY_ID
float flow_comp_m_x
Flow in meters in x-sensor direction, angular-speed compensated.
float ground_distance
Ground distance in meters. Positive value: distance known. Negative value: Unknown distance...
static void mavlink_register_msg(struct mavlink_transport *t, struct mavlink_msg_req *req)
Register a callback for a mavlink message.
uint8_t sensor_id
Sensor ID.
struct mavlink_message msg
Mavlink message.
void(* callback)(struct mavlink_message *msg)
Callback function.
uint8_t quality
Optical flow quality / confidence. 0: bad, 255: maximum quality.
float flow_comp_m_y
Flow in meters in y-sensor direction, angular-speed compensated.
#define DefaultChannel
SITL.
struct mavlink_transport mavlink_tp
Structure to submit a callback.
uint8_t msg_id
Requested message ID.
Common code for AP and FBW telemetry.
struct mavlink_msg_req req
Mavlink optical flow structure.
uint8_t msg[10]
Buffer used for general comunication over SPI (out buffer)
int16_t flow_y
Flow in pixels in y-sensor direction.
simple decoder of mavlink message
void px4flow_init(void)
Initialization function.