Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Camera control for rotorcraft

Module XML file: rotorcraft_cam.xml

The camera is controled by the heading of the vehicle for pan and can be controlled by a servo for tilt if defined.

Module configuration options

Airframe file section

  • section name: CAM prefix: ROTORCRAFT_CAM_
    • name DEFAULT_MODE value: MODE_NONE|MODE_MANUAL|MODE_HEADING|MODE_WP
      Description: Select default mode (default: MODE_NONE)
    • name CAM_ON value: handler
      Description: Handler to power on the camera ({} to disable)
    • name CAM_OFF value: handler
      Description: Handler to power off the camera ({} to disable)
    • name TILT_SERVO value: name
      Description: Servo name for tilt control (no tilt control if not defined)
    • name TILT_ANGLE_MIN value: angle
      Description: Tilt angle corresponding to the servo min position
    • name TILT_ANGLE_MAX value: angle
      Description: Tilt angle corresponding to the servo max position
    • name USE_PAN value: TRUE|FALSE
      Description: Enable pan control with heading (default: TRUE)
    • name TRACK_WP value: WP_XXX
      Description: Enable waypoint tracking mode on the selected WP (default: enable if waypoint CAM is defined)
    • name STICK_TILT_INC value: angle/stick_input
      Description: Sensitivity of the datalink stick tilt control (default: 10 deg)
    • name STICK_PAN_INC value: angle/stick_input
      Description: Sensitivity of the datalink stick pan control (default: 20 deg)

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.

  • rotorcraft_cam_periodic()
    • Frequency in Hz: 10.
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw rotorcraft_cam.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="rotorcraft_cam" dir="cam_control">
<doc>
<description>
Camera control for rotorcraft.
The camera is controled by the heading of the vehicle for pan and can be controlled by a servo for tilt if defined.
</description>
<section name="CAM" prefix="ROTORCRAFT_CAM_">
<define name="DEFAULT_MODE" value="MODE_NONE|MODE_MANUAL|MODE_HEADING|MODE_WP" description="Select default mode (default: MODE_NONE)"/>
<define name="CAM_ON" value="handler" description="Handler to power on the camera ({} to disable)"/>
<define name="CAM_OFF" value="handler" description="Handler to power off the camera ({} to disable)"/>
<define name="TILT_SERVO" value="name" description="Servo name for tilt control (no tilt control if not defined)"/>
<define name="TILT_ANGLE_MIN" value="angle" description="Tilt angle corresponding to the servo min position"/>
<define name="TILT_ANGLE_MAX" value="angle" description="Tilt angle corresponding to the servo max position"/>
<define name="USE_PAN" value="TRUE|FALSE" description="Enable pan control with heading (default: TRUE)"/>
<define name="TRACK_WP" value="WP_XXX" description="Enable waypoint tracking mode on the selected WP (default: enable if waypoint CAM is defined)"/>
<define name="STICK_TILT_INC" value="angle/stick_input" description="Sensitivity of the datalink stick tilt control (default: 10 deg)"/>
<define name="STICK_PAN_INC" value="angle/stick_input" description="Sensitivity of the datalink stick pan control (default: 20 deg)"/>
</section>
</doc>
<header>
<file name="rotorcraft_cam.h"/>
</header>
<init fun="rotorcraft_cam_init()"/>
<periodic fun="rotorcraft_cam_periodic()" freq="10."/>
<datalink message="ROTORCRAFT_CAM_STICK" fun="ROTORCRAFT_CAM_STICK_PARSE(dl_buffer)"/>
<makefile>
<define name="USE_CAM"/>
<file name="rotorcraft_cam.c"/>
</makefile>
</module>