Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
mission_common module

Common interface for mission control.

This module parse datalink commands for basic navigation routines and store them in a queue.

Example for airframe file

Add to your firmware section:

<module name="mission_common"/>

Module configuration options

Airframe file section

  • section name: MISSION prefix: MISSION_
    • name ELEMENT_NB value: 20
      Description: maximum number of elements in the mission queue
    • name REGISTER_NB value: 6
      Description: maximum number of custom elemets to register
    • name CHECK_UNIQUE_ID value: TRUE|FALSE
      Description: check before inserting that all elements ID are unique in the queue (default: TRUE)
    • name ALT_PROXIMITY value: distance
      Description: if defined, enforce a vertical proximity to validate the target points (default: undefined)
    • name WAIT_TIMEOUT value: time
      Description: time in waiting pattern when queue is empty before ending the mission (default: fixedwing=120, rotorcraft=30)

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.

Datalink Functions

Whenever the specified datalink message is received, the corresponing handler function is called.

  • on message MISSION_GOTO_WP call mission_parse_GOTO_WP(buf)
  • on message MISSION_GOTO_WP_LLA call mission_parse_GOTO_WP_LLA(buf)
  • on message MISSION_CIRCLE call mission_parse_CIRCLE(buf)
  • on message MISSION_CIRCLE_LLA call mission_parse_CIRCLE_LLA(buf)
  • on message MISSION_SEGMENT call mission_parse_SEGMENT(buf)
  • on message MISSION_SEGMENT_LLA call mission_parse_SEGMENT_LLA(buf)
  • on message MISSION_PATH call mission_parse_PATH(buf)
  • on message MISSION_PATH_LLA call mission_parse_PATH_LLA(buf)
  • on message MISSION_CUSTOM call mission_parse_CUSTOM(buf)
  • on message MISSION_UPDATE call mission_parse_UPDATE(buf)
  • on message GOTO_MISSION call mission_parse_GOTO_MISSION(buf)
  • on message NEXT_MISSION call mission_parse_NEXT_MISSION(buf)
  • on message END_MISSION call mission_parse_END_MISSION(buf)

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw mission_common.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="mission_common" dir="mission" task="control">
<doc>
<description>
Common interface for mission control.
This module parse datalink commands for basic navigation routines
and store them in a queue.
</description>
<section name="MISSION" prefix="MISSION_">
<define name="ELEMENT_NB" value="20" description="maximum number of elements in the mission queue"/>
<define name="REGISTER_NB" value="6" description="maximum number of custom elemets to register"/>
<define name="CHECK_UNIQUE_ID" value="TRUE|FALSE" description="check before inserting that all elements ID are unique in the queue (default: TRUE)"/>
<define name="ALT_PROXIMITY" value="distance" unit="m" description="if defined, enforce a vertical proximity to validate the target points (default: undefined)"/>
<define name="WAIT_TIMEOUT" value="time" unit="s" description="time in waiting pattern when queue is empty before ending the mission (default: fixedwing=120, rotorcraft=30)"/>
</section>
</doc>
<header>
<file name="mission_common.h"/>
</header>
<init fun="mission_init()"/>
<periodic fun="mission_status_report()" freq="2" autorun="TRUE"/>
<datalink message="MISSION_GOTO_WP" fun="mission_parse_GOTO_WP(buf)"/>
<datalink message="MISSION_GOTO_WP_LLA" fun="mission_parse_GOTO_WP_LLA(buf)"/>
<datalink message="MISSION_CIRCLE" fun="mission_parse_CIRCLE(buf)"/>
<datalink message="MISSION_CIRCLE_LLA" fun="mission_parse_CIRCLE_LLA(buf)"/>
<datalink message="MISSION_SEGMENT" fun="mission_parse_SEGMENT(buf)"/>
<datalink message="MISSION_SEGMENT_LLA" fun="mission_parse_SEGMENT_LLA(buf)"/>
<datalink message="MISSION_PATH" fun="mission_parse_PATH(buf)"/>
<datalink message="MISSION_PATH_LLA" fun="mission_parse_PATH_LLA(buf)"/>
<datalink message="MISSION_CUSTOM" fun="mission_parse_CUSTOM(buf)"/>
<datalink message="MISSION_UPDATE" fun="mission_parse_UPDATE(buf)"/>
<datalink message="GOTO_MISSION" fun="mission_parse_GOTO_MISSION(buf)"/>
<datalink message="NEXT_MISSION" fun="mission_parse_NEXT_MISSION(buf)"/>
<datalink message="END_MISSION" fun="mission_parse_END_MISSION(buf)"/>
<makefile>
<define name="USE_MISSION"/>
<file name="mission_common.c"/>
<test firmware="fixedwing">
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart0"/>
<define name="USE_UART0"/>
</test>
</makefile>
</module>