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

Follow a certain AC_ID using traffic_info.

Only for rotorcraft firmware.

Example for airframe file

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

1 <module name="traffic_info"/>
2 <module name="follow">
3  <define name="FOLLOW_AC_ID" />
4  <define name="FOLLOW_WAYPOINT_ID" />
5  <define name="FOLLOW_OFFSET_X" value="0" />
6  <define name="FOLLOW_OFFSET_Y" value="0" />
7  <define name="FOLLOW_OFFSET_Z" value="0" />
8 </module>

Module configuration options

Define Options

  • name: FOLLOW_AC_ID value: None
    Description: the aircraft ID which it has to follow
  • name: FOLLOW_WAYPOINT_ID value: None
    Description: the waypoint ID which it has to change
  • name: FOLLOW_OFFSET_X value: 0
    Description: the x offset in ENU (meters) from the plane
  • name: FOLLOW_OFFSET_Y value: 0
    Description: the y offset in ENU (meters) from the plane
  • name: FOLLOW_OFFSET_Z value: 0
    Description: the z offset in ENU (meters) from the plane

Dependencies

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.

  • follow_wp()
    • Frequency in Hz: 5
    • Autorun: FALSE
      Periodic function is started by user command.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw follow.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="follow" dir="multi">
<doc>
<description>
Follow a certain AC_ID using traffic_info.
Only for rotorcraft firmware.
</description>
<define name="FOLLOW_AC_ID" description="the aircraft ID which it has to follow"/>
<define name="FOLLOW_WAYPOINT_ID" description="the waypoint ID which it has to change"/>
<define name="FOLLOW_OFFSET_X" value="0" description="the x offset in ENU (meters) from the plane"/>
<define name="FOLLOW_OFFSET_Y" value="0" description="the y offset in ENU (meters) from the plane"/>
<define name="FOLLOW_OFFSET_Z" value="0" description="the z offset in ENU (meters) from the plane"/>
</doc>
<depends>traffic_info</depends>
<header>
<file name="follow.h"/>
</header>
<init fun="follow_init()"/>
<periodic fun="follow_wp()" freq="5" autorun="FALSE"/>
<makefile>
<file name="follow.c"/>
</makefile>
</module>