Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
interface to TU Delft serial stereocam Include stereocam.xml to your airframe file. More...
#include "modules/stereocam/stereocam.h"
#include "mcu_periph/uart.h"
#include "subsystems/datalink/telemetry.h"
#include "modules/stereocam/stereoprotocol.h"
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} |
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.
#define BASELINE_STEREO_MM 60.0 |
Definition at line 58 of file stereocam.c.
Referenced by stereocam_disparity_to_meters().
#define BRANDSPUNTSAFSTAND_STEREO 118.0*6 |
Definition at line 59 of file stereocam.c.
Referenced by stereocam_disparity_to_meters().
#define SEND_STEREO TRUE |
Definition at line 34 of file stereocam.c.
#define STEREO_BUF_SIZE 1024 |
Definition at line 51 of file stereocam.c.
Referenced by stereocam_periodic().
#define STEREO_PORT (&((UART_LINK).device)) |
Definition at line 38 of file stereocam.c.
#define StereoGetch | ( | ) | STEREO_PORT ->get_byte(STEREO_PORT->periph) |
Definition at line 40 of file stereocam.c.
Referenced by stereocam_periodic().
void stereocam_disparity_to_meters | ( | uint8_t * | disparity, |
float * | distancesMeters, | ||
int | lengthArray | ||
) |
Definition at line 61 of file stereocam.c.
References BASELINE_STEREO_MM, and BRANDSPUNTSAFSTAND_STEREO.
Referenced by serial_update().
void stereocam_periodic | ( | void | ) |
Definition at line 97 of file stereocam.c.
References link_device::char_available, uint8array::data, DefaultChannel, DefaultDevice, extract_loc, freq_counter, frequency, uint8array::fresh, handleStereoPackage(), insert_loc, uint8array::len, uint8array::matrix_height, uint8array::matrix_width, msg_buf, msg_start, sys_time::nb_tick, link_device::periph, previous_time, ser_read_buf, STEREO_BUF_SIZE, StereoGetch, stereoprot_add(), and sys_time::ticks_per_sec.
void stereocam_start | ( | void | ) |
Definition at line 76 of file stereocam.c.
References extract_loc, freq_counter, frequency, uint8array::fresh, insert_loc, msg_start, sys_time::nb_tick, and previous_time.
void stereocam_stop | ( | void | ) |
Definition at line 93 of file stereocam.c.
uint16_t extract_loc |
Definition at line 54 of file stereocam.c.
Referenced by handleStereoPackage(), stereocam_periodic(), and stereocam_start().
uint16_t freq_counter = 0 |
Definition at line 46 of file stereocam.c.
Referenced by stereocam_periodic(), and stereocam_start().
uint8_t frequency = 0 |
Definition at line 47 of file stereocam.c.
Referenced by stereocam_periodic(), stereocam_start(), and stereocam_to_state().
uint16_t insert_loc |
Definition at line 54 of file stereocam.c.
Referenced by handleStereoPackage(), stereocam_periodic(), and stereocam_start().
struct link_device* linkdev = STEREO_PORT |
Definition at line 39 of file stereocam.c.
uint8_t msg_buf[STEREO_BUF_SIZE] |
Definition at line 55 of file stereocam.c.
Referenced by stereocam_periodic().
uint16_t msg_start |
Definition at line 54 of file stereocam.c.
Referenced by stereocam_periodic(), and stereocam_start().
MsgProperties msgProperties |
Definition at line 43 of file stereocam.c.
Referenced by handleStereoPackage().
uint32_t previous_time = 0 |
Definition at line 48 of file stereocam.c.
Referenced by stereocam_periodic(), and stereocam_start().
uint8_t ser_read_buf[STEREO_BUF_SIZE] |
Definition at line 53 of file stereocam.c.
Referenced by stereocam_periodic().
uint8array stereocam_data = {.len = 0, .data = msg_buf, .fresh = 0, .matrix_width = 0, .matrix_height = 0} |
Definition at line 56 of file stereocam.c.
Referenced by CN_escape_velocity(), CN_matrix_butterworth(), CN_matrix_Kalman_filter(), CN_potential_heading(), CN_potential_velocity(), CN_vector_escape_velocity(), CN_vector_velocity(), follow_me_periodic(), run_avoid_navigation_onvision(), serial_update(), stereo_avoid_run(), stereo_to_state_periodic(), and stereocam_to_state().