APM:Libraries
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Linux::OpticalFlow_Onboard Class Reference

#include <OpticalFlow_Onboard.h>

Inheritance diagram for Linux::OpticalFlow_Onboard:
[legend]
Collaboration diagram for Linux::OpticalFlow_Onboard:
[legend]

Public Member Functions

void init ()
 
bool read (AP_HAL::OpticalFlow::Data_Frame &frame)
 
void push_gyro (float gyro_x, float gyro_y, float dt)
 
void push_gyro_bias (float gyro_bias_x, float gyro_bias_y)
 

Private Member Functions

void _run_optflow ()
 
void _get_integrated_gyros (uint64_t timestamp, GyroSample &gyro)
 

Static Private Member Functions

static void * _read_thread (void *arg)
 

Private Attributes

VideoIn_videoin
 
VideoIn::Frame _last_video_frame
 
PWM_Sysfs_Base_pwm
 
CameraSensor_camerasensor
 
Flow_PX4_flow
 
pthread_t _thread
 
pthread_mutex_t _mutex
 
bool _initialized
 
bool _data_available
 
bool _crop_by_software
 
bool _shrink_by_software
 
uint32_t _camera_output_width
 
uint32_t _camera_output_height
 
uint32_t _width
 
uint32_t _height
 
uint32_t _format
 
uint32_t _bytesperline
 
uint32_t _sizeimage
 
float _pixel_flow_x_integral
 
float _pixel_flow_y_integral
 
float _gyro_x_integral
 
float _gyro_y_integral
 
uint64_t _integration_timespan
 
uint8_t _surface_quality
 
Vector2f _last_gyro_rate
 
Vector2f _gyro_bias
 
Vector2f _integrated_gyro
 
uint64_t _last_integration_time
 
ObjectBuffer< GyroSample > * _gyro_ring_buffer
 

Detailed Description

Definition at line 37 of file OpticalFlow_Onboard.h.

Member Function Documentation

◆ _get_integrated_gyros()

void OpticalFlow_Onboard::_get_integrated_gyros ( uint64_t  timestamp,
GyroSample gyro 
)
private

Definition at line 241 of file OpticalFlow_Onboard.cpp.

Referenced by _run_optflow().

Here is the caller graph for this function:

◆ _read_thread()

void * OpticalFlow_Onboard::_read_thread ( void *  arg)
staticprivate

Definition at line 259 of file OpticalFlow_Onboard.cpp.

Referenced by init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _run_optflow()

void OpticalFlow_Onboard::_run_optflow ( )
private

Definition at line 267 of file OpticalFlow_Onboard.cpp.

Referenced by _read_thread().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void OpticalFlow_Onboard::init ( void  )
virtual

Implements AP_HAL::OpticalFlow.

Definition at line 43 of file OpticalFlow_Onboard.cpp.

Here is the call graph for this function:

◆ push_gyro()

void OpticalFlow_Onboard::push_gyro ( float  gyro_x,
float  gyro_y,
float  dt 
)
virtual

Implements AP_HAL::OpticalFlow.

Definition at line 223 of file OpticalFlow_Onboard.cpp.

Here is the call graph for this function:

◆ push_gyro_bias()

void OpticalFlow_Onboard::push_gyro_bias ( float  gyro_bias_x,
float  gyro_bias_y 
)
virtual

Implements AP_HAL::OpticalFlow.

Definition at line 253 of file OpticalFlow_Onboard.cpp.

◆ read()

bool OpticalFlow_Onboard::read ( AP_HAL::OpticalFlow::Data_Frame frame)
virtual

Implements AP_HAL::OpticalFlow.

Definition at line 196 of file OpticalFlow_Onboard.cpp.

Member Data Documentation

◆ _bytesperline

uint32_t Linux::OpticalFlow_Onboard::_bytesperline
private

Definition at line 64 of file OpticalFlow_Onboard.h.

Referenced by init().

◆ _camera_output_height

uint32_t Linux::OpticalFlow_Onboard::_camera_output_height
private

Definition at line 60 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and init().

◆ _camera_output_width

uint32_t Linux::OpticalFlow_Onboard::_camera_output_width
private

Definition at line 59 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and init().

◆ _camerasensor

CameraSensor* Linux::OpticalFlow_Onboard::_camerasensor
private

Definition at line 51 of file OpticalFlow_Onboard.h.

Referenced by init().

◆ _crop_by_software

bool Linux::OpticalFlow_Onboard::_crop_by_software
private

Definition at line 57 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and init().

◆ _data_available

bool Linux::OpticalFlow_Onboard::_data_available
private

Definition at line 56 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and read().

◆ _flow

Flow_PX4* Linux::OpticalFlow_Onboard::_flow
private

Definition at line 52 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and init().

◆ _format

uint32_t Linux::OpticalFlow_Onboard::_format
private

Definition at line 63 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and init().

◆ _gyro_bias

Vector2f Linux::OpticalFlow_Onboard::_gyro_bias
private

Definition at line 73 of file OpticalFlow_Onboard.h.

Referenced by push_gyro(), and push_gyro_bias().

◆ _gyro_ring_buffer

ObjectBuffer<GyroSample>* Linux::OpticalFlow_Onboard::_gyro_ring_buffer
private

Definition at line 76 of file OpticalFlow_Onboard.h.

Referenced by _get_integrated_gyros(), init(), and push_gyro().

◆ _gyro_x_integral

float Linux::OpticalFlow_Onboard::_gyro_x_integral
private

Definition at line 68 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and read().

◆ _gyro_y_integral

float Linux::OpticalFlow_Onboard::_gyro_y_integral
private

Definition at line 69 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and read().

◆ _height

uint32_t Linux::OpticalFlow_Onboard::_height
private

Definition at line 62 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and init().

◆ _initialized

bool Linux::OpticalFlow_Onboard::_initialized
private

Definition at line 55 of file OpticalFlow_Onboard.h.

Referenced by init().

◆ _integrated_gyro

Vector2f Linux::OpticalFlow_Onboard::_integrated_gyro
private

Definition at line 74 of file OpticalFlow_Onboard.h.

Referenced by push_gyro().

◆ _integration_timespan

uint64_t Linux::OpticalFlow_Onboard::_integration_timespan
private

Definition at line 70 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and read().

◆ _last_gyro_rate

Vector2f Linux::OpticalFlow_Onboard::_last_gyro_rate
private

Definition at line 72 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow().

◆ _last_integration_time

uint64_t Linux::OpticalFlow_Onboard::_last_integration_time
private

Definition at line 75 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow().

◆ _last_video_frame

VideoIn::Frame Linux::OpticalFlow_Onboard::_last_video_frame
private

Definition at line 49 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow().

◆ _mutex

pthread_mutex_t Linux::OpticalFlow_Onboard::_mutex
private

Definition at line 54 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), init(), and read().

◆ _pixel_flow_x_integral

float Linux::OpticalFlow_Onboard::_pixel_flow_x_integral
private

Definition at line 66 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and read().

◆ _pixel_flow_y_integral

float Linux::OpticalFlow_Onboard::_pixel_flow_y_integral
private

Definition at line 67 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and read().

◆ _pwm

PWM_Sysfs_Base* Linux::OpticalFlow_Onboard::_pwm
private

Definition at line 50 of file OpticalFlow_Onboard.h.

Referenced by init().

◆ _shrink_by_software

bool Linux::OpticalFlow_Onboard::_shrink_by_software
private

Definition at line 58 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and init().

◆ _sizeimage

uint32_t Linux::OpticalFlow_Onboard::_sizeimage
private

Definition at line 65 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and init().

◆ _surface_quality

uint8_t Linux::OpticalFlow_Onboard::_surface_quality
private

Definition at line 71 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and read().

◆ _thread

pthread_t Linux::OpticalFlow_Onboard::_thread
private

Definition at line 53 of file OpticalFlow_Onboard.h.

Referenced by init().

◆ _videoin

VideoIn* Linux::OpticalFlow_Onboard::_videoin
private

Definition at line 48 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and init().

◆ _width

uint32_t Linux::OpticalFlow_Onboard::_width
private

Definition at line 61 of file OpticalFlow_Onboard.h.

Referenced by _run_optflow(), and init().


The documentation for this class was generated from the following files: