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 module

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.

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="stereocam">
2  <define name="SEND_STEREO" value="TRUE|FALSE" />
3  <define name="STEREO_BUF_SIZE" value="NUM" />
4  <configure name="STEREO_UART" value="UARTX" />
5  <configure name="STEREO_BAUD" value="BXXXXX" />
6 </module>

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"/>
<configure name="STEREO_UART" case="upper|lower"/>
<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>