Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
digital_cam_common module

Digital Photo Camera Triggering, common interface

This module controls triggering of an attached external digital camera. It can trigger photos based on GPS distance, time or circle radius in both fixedwings and rotorcraft. The specific way to trigger the camera is implemented in specific modules.

Example for airframe file

Add to your firmware section:

<module name="digital_cam_common"/>

Module configuration options

Airframe file section

  • section name: DIGITAL_CAM prefix: DC_
    • name AUTOSHOOT_PERIOD value: 1.0
      Description: time period for DC_AUTOSHOOT_PERIODIC in seconds
    • name AUTOSHOOT_DISTANCE_INTERVAL value: 50
      Description: distance interval for DC_AUTOSHOOT_DISTANCE in meters
    • name AUTOSHOOT_SURVEY_INTERVAL value: 50
      Description: distance interval for DC_AUTOSHOOT_SURVEY in meters
    • name SHOT_SYNC_SEND value: TRUE|FALSE
      Description: send DC_SHOT message when photo was taken (default: TRUE)
    • name SHOT_EXTRA_DL value: TRUE|FALSE
      Description: send DC_SHOT message other extra datalink like companion CPU (default: FALSE, requires DC_SHOT_SYNC_SEND)

Module functions

Init Functions

These initialization functions are called once on startup.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw digital_cam_common.xml file:

<!DOCTYPE module SYSTEM "./module.dtd">
<module name="digital_cam_common" dir="digital_cam">
<doc>
<description>
Digital Photo Camera Triggering, common interface
This module controls triggering of an attached external digital camera.
It can trigger photos based on GPS distance, time or circle radius in both fixedwings and rotorcraft.
The specific way to trigger the camera is implemented in specific modules.
</description>
<section name="DIGITAL_CAM" prefix="DC_">
<define name="AUTOSHOOT_PERIOD" value="1.0" description="time period for DC_AUTOSHOOT_PERIODIC in seconds"/>
<define name="AUTOSHOOT_DISTANCE_INTERVAL" value="50" description="distance interval for DC_AUTOSHOOT_DISTANCE in meters"/>
<define name="AUTOSHOOT_SURVEY_INTERVAL" value="50" description="distance interval for DC_AUTOSHOOT_SURVEY in meters"/>
<define name="SHOT_SYNC_SEND" value="TRUE|FALSE" description="send DC_SHOT message when photo was taken (default: TRUE)"/>
<define name="SHOT_EXTRA_DL" value="TRUE|FALSE" description="send DC_SHOT message other extra datalink like companion CPU (default: FALSE, requires DC_SHOT_SYNC_SEND)"/>
</section>
</doc>
<settings>
<dl_settings name="control">
<dl_settings name="dc">
<dl_setting max="20" min="0" step="0.1" module="digital_cam/dc" handler="set_expo" var="dc_exposure" shortname="exposure"/>
<dl_setting max="255" min="0" step="1" module="digital_cam/dc" var="0" handler="send_command" shortname="Shutter">
<strip_button name="Photo" icon="digital-camera.png" value="32" group="maindc"/>
<strip_button name="Power" icon="off.png" value="111" group="maindc"/>
<strip_button name="ZoomIn" icon="zoom.png" value="116" group="dczoom"/>
<strip_button name="ZoomOut" icon="zoom.png" value="119" group="dczoom"/>
</dl_setting>
<dl_setting max="3" min="0" step="1" var="dc_autoshoot" values="STOP|PERIODIC|DISTANCE|EXT_TRIG|SURVEY|CIRCLE">
<strip_button name="Start Autoshoot" icon="dcstart.png" value="1" group="dcauto"/>
<strip_button name="Stop Autoshoot" icon="dcstart.png" value="0" group="dcauto"/>
</dl_setting>
<dl_setting max="60" min="0.1" step="0.5" var="dc_autoshoot_period" shortname="Periodic" param="DC_AUTOSHOOT_PERIOD" unit="sec"/>
<dl_setting max="255" min="0" step="1" var="dc_distance_interval" shortname="dist" param="DC_AUTOSHOOT_DISTANCE_INTERVAL" unit="meter"/>
<dl_setting max="250" min="0" step="5" module="digital_cam/dc" var="dc_survey_interval" handler="Survey" shortname="Survey-Interval"/>
<dl_setting max="90" min="5" step="5" module="digital_cam/dc" var="dc_circle_interval" handler="Circle" shortname="Circle-Interval"/>
<dl_setting max="1" min="0" step="1" var="dc_cam_tracing" shortname="Cam-Tracing"/>
</dl_settings>
</dl_settings>
</settings>
<dep>
<provides>digital_cam</provides>
</dep>
<header>
<file name="dc.h"/>
</header>
<init fun="dc_init()"/>
<makefile>
<define name="DIGITAL_CAM" />
<file name="dc.c"/>
<test firmware="rotorcraft">
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart0"/>
<define name="USE_UART0"/>
</test>
</makefile>
</module>