Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
StereoCamera read and decode

Module XML file: stereocam.xml

Module to read and decode messages from the TU Delft stereo camera over uart. The stereo camera is designed and produced by Christophe de Wagter from the TU Delft. Baud rates tested include B38400, B230400, B921600. If entire images are being sent, it is recommended to use a STEREO_BAUD of B921600 and a STEREO_BUF_SIZE of 32768.

Example for airframe file

This example contains all possible configuration options, not all of them are mandatory!

1 <modules>
2  <load name="stereocam.xml">
3  <define name="SEND_STEREO" value="TRUE|FALSE" />
4  <define name="STEREO_BUF_SIZE" value="NUM" />
5  <configure name="STEREO_UART" value="UARTX" />
6  <configure name="STEREO_BAUD" value="BXXXXX" />
7  </load>
8 </modules>

Module configuration options

Configure Options

  • name: STEREO_UART value: UARTX
    Description: Sets the UART port number of the connected camera (required)
  • name: STEREO_BAUD value: BXXXXX
    Description: Sets the BAUD rate of the connected camera (required: must be same as camera)

Define Options

  • name: SEND_STEREO value: TRUE|FALSE
    Description: If TRUE, a copy of received messages is sent to the ground station over the datalink (default: TRUE)
  • name: STEREO_BUF_SIZE value: NUM
    Description: Size of the receiving buffer, must be at least as large as the message being sent (default: 1024)

Module functions

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw stereocam.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="stereocam" dir="stereocam">
<doc>
<description>
StereoCamera read and decode.
Module to read and decode messages from the TU Delft stereo camera over uart.
The stereo camera is designed and produced by Christophe de Wagter from the TU Delft.
Baud rates tested include B38400, B230400, B921600.
If entire images are being sent, it is recommended to use a STEREO_BAUD of B921600 and a STEREO_BUF_SIZE of 32768.
</description>
<configure name="STEREO_UART" value="UARTX" description="Sets the UART port number of the connected camera (required)"/>
<configure name="STEREO_BAUD" value="BXXXXX" description="Sets the BAUD rate of the connected camera (required: must be same as camera)"/>
<define name="SEND_STEREO" value="TRUE|FALSE" description="If TRUE, a copy of received messages is sent to the ground station over the datalink (default: TRUE)"/>
<define name="STEREO_BUF_SIZE" value="NUM" description="Size of the receiving buffer, must be at least as large as the message being sent (default: 1024)"/>
</doc>
<header>
<file name="stereocam.h"/>
</header>
<periodic fun="stereocam_periodic()" start="stereocam_start()" stop="stereocam_stop()" autorun="TRUE" freq="512"/>
<makefile>
<file name="stereoprotocol.c" dir="modules/stereocam"/>
<raw>
STEREO_UART_LOWER=$(shell echo $(STEREO_UART) | tr A-Z a-z)
STEREO_UART_UPPER=$(shell echo $(STEREO_UART) | tr a-z A-Z)
</raw>
<define name="USE_$(STEREO_UART_UPPER)"/>
<define name="UART_LINK" value="$(STEREO_UART_LOWER)"/>
<define name="$(STEREO_UART_UPPER)_BAUD" value="$(STEREO_BAUD)"/>
<file name="stereocam.c"/>
</makefile>
</module>