Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stereocam.c File Reference

interface to TU Delft serial stereocam Include stereocam.xml to your airframe file. More...

+ Include dependency graph for stereocam.c:

Go to the source code of this file.

Macros

#define SEND_STEREO   TRUE
 
#define STEREO_PORT   (&((UART_LINK).device))
 
#define StereoGetch()   STEREO_PORT ->get_byte(STEREO_PORT->periph)
 
#define STEREO_BUF_SIZE   1024
 
#define BASELINE_STEREO_MM   60.0
 
#define BRANDSPUNTSAFSTAND_STEREO   118.0*6
 

Functions

void stereocam_disparity_to_meters (uint8_t *disparity, float *distancesMeters, int lengthArray)
 
void stereocam_start (void)
 
void stereocam_stop (void)
 
void stereocam_periodic (void)
 

Variables

struct link_device * linkdev = STEREO_PORT
 
MsgProperties msgProperties
 
uint16_t freq_counter = 0
 
uint8_t frequency = 0
 
uint32_t previous_time = 0
 
uint8_t ser_read_buf [STEREO_BUF_SIZE]
 
uint16_t insert_loc
 
uint16_t extract_loc
 
uint16_t msg_start
 
uint8_t msg_buf [STEREO_BUF_SIZE]
 
uint8array stereocam_data = {.len = 0, .data = msg_buf, .fresh = 0, .matrix_width = 0, .matrix_height = 0}
 

Detailed Description

interface to TU Delft serial stereocam Include stereocam.xml to your airframe file.

Parameters STEREO_PORT, STEREO_BAUD, SEND_STEREO and STEREO_BUF_SIZE should be configured with stereocam.xml.

Definition in file stereocam.c.

Macro Definition Documentation

#define BASELINE_STEREO_MM   60.0

Definition at line 59 of file stereocam.c.

Referenced by stereocam_disparity_to_meters().

#define BRANDSPUNTSAFSTAND_STEREO   118.0*6

Definition at line 60 of file stereocam.c.

Referenced by stereocam_disparity_to_meters().

#define SEND_STEREO   TRUE

Definition at line 35 of file stereocam.c.

#define STEREO_BUF_SIZE   1024

Definition at line 52 of file stereocam.c.

Referenced by stereocam_periodic().

#define STEREO_PORT   (&((UART_LINK).device))

Definition at line 39 of file stereocam.c.

#define StereoGetch ( )    STEREO_PORT ->get_byte(STEREO_PORT->periph)

Definition at line 41 of file stereocam.c.

Referenced by stereocam_periodic().

Function Documentation

void stereocam_disparity_to_meters ( uint8_t disparity,
float *  distancesMeters,
int  lengthArray 
)

Definition at line 62 of file stereocam.c.

References BASELINE_STEREO_MM, and BRANDSPUNTSAFSTAND_STEREO.

Referenced by serial_update().

+ Here is the caller graph for this function:

void stereocam_start ( void  )
void stereocam_stop ( void  )

Definition at line 94 of file stereocam.c.

Variable Documentation

uint16_t extract_loc

Definition at line 55 of file stereocam.c.

Referenced by handleStereoPackage(), stereocam_periodic(), and stereocam_start().

uint16_t freq_counter = 0

Definition at line 47 of file stereocam.c.

Referenced by stereocam_periodic(), and stereocam_start().

uint8_t frequency = 0
uint16_t insert_loc

Definition at line 55 of file stereocam.c.

Referenced by handleStereoPackage(), stereocam_periodic(), and stereocam_start().

struct link_device* linkdev = STEREO_PORT

Definition at line 40 of file stereocam.c.

Referenced by stereocam_periodic().

Definition at line 56 of file stereocam.c.

Referenced by stereocam_periodic().

uint16_t msg_start

Definition at line 55 of file stereocam.c.

Referenced by stereocam_periodic(), and stereocam_start().

MsgProperties msgProperties

Definition at line 44 of file stereocam.c.

Referenced by handleStereoPackage().

uint32_t previous_time = 0

Definition at line 49 of file stereocam.c.

Referenced by stereocam_periodic(), and stereocam_start().

uint8_t ser_read_buf[STEREO_BUF_SIZE]

Definition at line 54 of file stereocam.c.

Referenced by stereocam_periodic().