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
nav_catapult module

Catapult launch timing system.

  • Phase 1: Zero Roll, Climb Pitch, Zero Throttle
  • Phase 2: After detecting the Start Acceleration
    Zero Roll, Climb Pitch, Full Throttle
  • Phase 3: After getting the GPS heading (time based)
    Place climb 300m in front of us
    GoTo(climb)

Example for airframe file

Add to your firmware section:

1 <module name="nav_catapult"/>

Module configuration options

Airframe file section

  • section name: CATAPULT prefix: NAV_CATAPULT_
    • name ACCELERATION_THRESHOLD value: 1.5
      Description: acceleration threshold in multiples of g
    • name ACCELERATION_DETECTION value: 5
      Description: number acceleration measurments above threshold for launch detection
    • name MOTOR_DELAY value: 0.75
      Description: delay until motor is turned on in seconds
    • name HEADING_DELAY value: 3.0
      Description: delay until heading is unlocked in seconds
    • name INITIAL_PITCH value: 0.175
      Description: inital pitch in radians (default 10deg)
    • name INITIAL_THROTTLE value: 1.0
      Description: initial throttle (0.0 to 1.0)
    • name CLIMB_DISTANCE value: 300
      Description: distance of the climb waypoint in front of the catapult
    • name TIMEOUT value: 30.
      Description: timeout to disarm the high freq module

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

<!DOCTYPE module SYSTEM "module.dtd">
<module name="nav_catapult" dir="nav">
<doc>
<description>
Catapult launch timing system.
- Phase 1: Zero Roll, Climb Pitch, Zero Throttle
- Phase 2: After detecting the Start Acceleration\n
Zero Roll, Climb Pitch, Full Throttle
- Phase 3: After getting the GPS heading (time based)\n
Place climb 300m in front of us\n
GoTo(climb)\n
<!--
Block example:
@verbatim
<block name="Catapult Take-Off">
<exception cond="GetPosAlt() > GetAltRef()+25" deroute="Standby"/>
<set value="0" var="kill_throttle"/>
<set value="0" var="autopilot_flight_time"/>
<call fun="nav_catapult_run(WP_CLIMB)"/>
</block>
@endverbatim
-->
</description>
<section name="CATAPULT" prefix="NAV_CATAPULT_">
<define name="ACCELERATION_THRESHOLD" value="1.5" description="acceleration threshold in multiples of g" unit="g"/>
<define name="ACCELERATION_DETECTION" value="5" description="number acceleration measurments above threshold for launch detection"/>
<define name="MOTOR_DELAY" value="0.75" description="delay until motor is turned on in seconds" unit="s"/>
<define name="HEADING_DELAY" value="3.0" description="delay until heading is unlocked in seconds" unit="s"/>
<define name="INITIAL_PITCH" value="0.175" description="inital pitch in radians (default 10deg)" unit="rad"/>
<define name="INITIAL_THROTTLE" value="1.0" description="initial throttle (0.0 to 1.0)" unit="%"/>
<define name="CLIMB_DISTANCE" value="300" description="distance of the climb waypoint in front of the catapult" unit="m"/>
<define name="TIMEOUT" value="30." description="timeout to disarm the high freq module" unit="s"/>
</section>
</doc>
<settings>
<dl_settings name="control">
<dl_settings name="catapult">
<dl_setting max="5.0" min="0.05" step="0.05" module="nav/nav_catapult" var="nav_catapult.motor_delay" shortname="Motor Delay" param="NAV_CATAPULT_MOTOR_DELAY" unit="seconds"/>
<dl_setting max="3.0" min="-3.0" step="0.1" var="nav_catapult.accel_threshold" shortname="G-Threshold" param="NAV_CATAPULT_ACCELERATION_THRESHOLD" unit="g"/>
<dl_setting max="10." min="0.25" step="0.05" var="nav_catapult.heading_delay" shortname="Heading-Delay" param="NAV_CATAPULT_HEADING_DELAY" unit="seconds"/>
<dl_setting max="40" min="-20" step="0.5" var="nav_catapult.initial_pitch" shortname="TO Pitch" param="NAV_CATAPULT_INITIAL_PITCH" unit="rad" alt_unit="deg"/>
<dl_setting max="1.0" min="0.0" step="0.01" var="nav_catapult.initial_throttle" shortname="TO Gas" param="NAV_CATAPULT_INITIAL_THROTTLE" unit="percent"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="nav_catapult.h"/>
</header>
<init fun="nav_catapult_init()"/>
<!-- Run High Rate Lauch Detector -->
<periodic fun="nav_catapult_highrate_module()" autorun="TRUE"/>
<makefile target="ap|sim|nps">
<file name="nav_catapult.c"/>
</makefile>
</module>