Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
digital_cam_video module

Digital Photo Camera Triggering (using embedded video)

This module controls triggering of an embedded digital camera on a linux based autopilot. This particular version triggers the video_rtp_stream.xml module to store jpeg images. It can trigger photos based on GPS distance, time or circle radius in both fixedwings and rotorcraft.

Example for airframe file

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

<module name="digital_cam_video">
b'<define name="DC_AUTOSHOOT_PERIOD" value="0.5" />\n '
b'<define name="DC_AUTOSHOOT_DISTANCE_INTERVAL" value="50" />\n '
b'<define name="DC_SHOT_SYNC_SEND" value="TRUE|FALSE" />\n '
</module>

Module configuration options

Define Options

  • name: DC_AUTOSHOOT_PERIOD value: 0.5
    Description: time period for DC_AUTOSHOOT_PERIODIC in seconds
  • name: DC_AUTOSHOOT_DISTANCE_INTERVAL value: 50
    Description: grid in meters
  • name: DC_SHOT_SYNC_SEND value: TRUE|FALSE
    Description: send DC_SHOT message when photo was taken (default: TRUE)

Module functions

Init Functions

These initialization functions are called once on startup.

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 digital_cam_video.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="digital_cam_video" dir="digital_cam">
<doc>
<description>
Digital Photo Camera Triggering (using embedded video)
This module controls triggering of an embedded digital camera on a linux based autopilot. This particular version triggers the video_rtp_stream.xml module to store jpeg images.
It can trigger photos based on GPS distance, time or circle radius in both fixedwings and rotorcraft.
</description>
<define name="DC_AUTOSHOOT_PERIOD" value="0.5" description="time period for DC_AUTOSHOOT_PERIODIC in seconds"/>
<define name="DC_AUTOSHOOT_DISTANCE_INTERVAL" value="50" description="grid in meters"/>
<define name="DC_SHOT_SYNC_SEND" value="TRUE|FALSE" description="send DC_SHOT message when photo was taken (default: TRUE)"/>
</doc>
<settings>
<dl_settings name="control">
<dl_settings name="dc">
<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="dc"/>
</dl_setting>
<dl_setting max="3" min="0" step="1" var="dc_autoshoot" values="STOP|PERIODIC|DISTANCE|EXT_TRIG">
<strip_button name="Start Autoshoot" icon="dcstart.png" value="1" group="dc"/>
<strip_button name="Stop Autoshoot" icon="dcstop.png" value="0" group="dc"/>
</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>
<depends>video_capture</depends>
<conflicts>digital_cam,digital_cam_servo,digital_cam_i2c,digital_cam_uart</conflicts>
</dep>
<header>
<file name="video_cam_ctrl.h"/>
<file name="dc.h"/>
</header>
<init fun="digital_cam_video_init()"/>
<periodic fun="digital_cam_video_periodic()" freq="10" autorun="TRUE"/>
<makefile target="ap">
<define name="DIGITAL_CAM" />
<file name="video_cam_ctrl.c"/>
<file name="dc.c"/>
</makefile>
</module>