Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Catapult

Module XML file: nav_catapult.xml

A 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

This example contains all possible configuration options, not all of them are mandatory!

1 <modules>
2  <load name="nav_catapult.xml">
3  <define name="NAV_CATAPULT_ACCELERATION_THRESHOLD" value="1.5" />
4  <define name="NAV_CATAPULT_MOTOR_DELAY" value="0.75" />
5  <define name="NAV_CATAPULT_HEADING_DELAY" value="3.0" />
6  <define name="NAV_CATAPULT_INITAL_PITCH" value="0.175" />
7  <define name="NAV_CATAPULT_INITIAL_THROTTLE" value="1.0" />
8  </load>
9 </modules>

Module configuration options

Define Options

  • name: NAV_CATAPULT_ACCELERATION_THRESHOLD value: 1.5
    Description: acceleration threshold in multiples of g
  • name: NAV_CATAPULT_MOTOR_DELAY value: 0.75
    Description: delay until motor is turned on in seconds
  • name: NAV_CATAPULT_HEADING_DELAY value: 3.0
    Description: delay until heading is unlocked in seconds
  • name: NAV_CATAPULT_INITAL_PITCH value: 0.175
    Description: inital pitch in radians (default 10deg)
  • name: NAV_CATAPULT_INITIAL_THROTTLE value: 1.0
    Description: initial throttle (0.0 to 1.0)

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_smooth" dir="nav">
<doc>
<description>
Catapult.
A 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
</description>
<define name="NAV_CATAPULT_ACCELERATION_THRESHOLD" value="1.5" description="acceleration threshold in multiples of g"/>
<define name="NAV_CATAPULT_MOTOR_DELAY" value="0.75" description="delay until motor is turned on in seconds"/>
<define name="NAV_CATAPULT_HEADING_DELAY" value="3.0" description="delay until heading is unlocked in seconds"/>
<define name="NAV_CATAPULT_INITAL_PITCH" value="0.175" description="inital pitch in radians (default 10deg)"/>
<define name="NAV_CATAPULT_INITIAL_THROTTLE" value="1.0" description="initial throttle (0.0 to 1.0)"/>
</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_acceleration_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_setup()"/>
<!-- 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>