<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Flixr</id>
	<title>PaparazziUAV - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Flixr"/>
	<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/wiki/Special:Contributions/Flixr"/>
	<updated>2026-04-30T07:52:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=New_Gaia&amp;diff=24124</id>
		<title>New Gaia</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=New_Gaia&amp;diff=24124"/>
		<updated>2018-11-22T20:41:36Z</updated>

		<summary type="html">&lt;p&gt;Flixr: internal link label for test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Webpage currently incomplete)&lt;br /&gt;
&lt;br /&gt;
New Gaia is an update of the current gaia agent.&lt;br /&gt;
&lt;br /&gt;
This system has been developed by an ENAC team of 4 students from the IENAC10S promo. It enables one to generate a complex environment with several meteorological phenomena.&lt;br /&gt;
&lt;br /&gt;
= Presentation =&lt;br /&gt;
&lt;br /&gt;
== Functionalities ==&lt;br /&gt;
&lt;br /&gt;
Fully connected to the Paparazzi simulator through the IVY middleware, New Gaia allows the user to add elements of a realistic meteorological environment to the current simulation thanks to an adapted GUI. The initial version of the program proposes three meteorological phenomena : thermal columns, turbulences and a vertical profile. Also are all the parameters of the simulation taken into account in order to offer the most complete customization capability : several UAVs, geographic coordinates, the background map, etc.&lt;br /&gt;
&lt;br /&gt;
The models of the phenomena have been chosen based on two characteristics that are the way they can represent reality and a low resources need. For more details, please check the documentation.&lt;br /&gt;
&lt;br /&gt;
Finally some misc have been implemented to reuse the functionalities of the current gaia agent like the simulation speed control.&lt;br /&gt;
&lt;br /&gt;
== The project ==&lt;br /&gt;
&lt;br /&gt;
It has been a two-month long project proposed by the ENAC micro-drones lab to the 2nd year of the IENAC S formation, and designed within the ENAC infrastructures in Toulouse. To know more about us, please check [[New_Gaia#About_us|About us]].&lt;br /&gt;
&lt;br /&gt;
= How to get New Gaia ? =&lt;br /&gt;
&lt;br /&gt;
The installation described here is for debian-like systems (typically Ubuntu). Thank you for sharing your experience on others systems!&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
In order to compile the files with the included makefile, you need JDK 1.6.0_24. And in order to run the file, you need the JRE 1.6.0_24 (included in the JDK). They can be found at [http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html].&lt;br /&gt;
&lt;br /&gt;
Please note that New_Gaia uses JDOM version 2.0.1 to generate XML files and the ivy package designed for java. They are included as jar files in the application, so you don't have to download them.&lt;br /&gt;
&lt;br /&gt;
== The source code ==&lt;br /&gt;
Get the [https://github.com/paparazzi/new_gaia source code] from our Github repository.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
To compile the files, we wrote a makefile for you. Simply enter &amp;quot;make&amp;quot; to do so.&lt;br /&gt;
&lt;br /&gt;
= How to use New Gaia ? =&lt;br /&gt;
&lt;br /&gt;
== Finding the maps files ==&lt;br /&gt;
New_Gaia can display a background that helps (a lot) to set the thermal columns where one wants. To do so, New_Gaia uses the same files that Paparazzi. That's why the background must be filled thanks to Paparazzi before it can be used by New_Gaia. (These .jpg files are located in the /var/maps directory of Paparazzi)&lt;br /&gt;
&lt;br /&gt;
== Finding the SRTM files ==&lt;br /&gt;
The SRTM files used to determine the influence of the terrain on the meteorological phenomena can be found at [http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/]&lt;br /&gt;
&lt;br /&gt;
== Executing the application ==&lt;br /&gt;
Once the application is compiled, you can run it with the command &amp;quot;make run&amp;quot;. As a student project, this application doesn't appear in the &amp;quot;Tools&amp;quot; menu of Paparazzi, that's why it's necessary to run it manually in a terminal.&lt;br /&gt;
&lt;br /&gt;
New_Gaia handles three main meteorological phenomena : thermal columns, the wind and turbulences. Each phenomenon can be customized thanks to the interface :&lt;br /&gt;
&lt;br /&gt;
[[File:Phenomenes.png|900px]]&lt;br /&gt;
&lt;br /&gt;
=== Thermal Columns ===&lt;br /&gt;
&lt;br /&gt;
Let's begin with the thermal columns. To create a thermal column, click on the appropriate button and click somewhere on the map : a column with its initial parameters is created.&lt;br /&gt;
As you can see on the properties panel on the right, a lateral view of the column is displayed. Two areas are shown : a gray one, in which up-wind blows and a white one in which down-wind blows. Please note that the &amp;quot;radius&amp;quot; of a column refers to the radius of its up-wind area.&lt;br /&gt;
&lt;br /&gt;
[[File:Thermal_column.png|900px]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Maximum Vertical Speed&amp;quot; property refers to the speed of the wind at the center of the thermal column, this speed decreases then and becomes negative (down-wind area).&lt;br /&gt;
&lt;br /&gt;
You can set the radius of the thermal column thanks to the handler on the left of the column. The height of the column is then calculated : the larger the column is, the higher it is.&lt;br /&gt;
&lt;br /&gt;
=== Vertical Profile ===&lt;br /&gt;
&lt;br /&gt;
The second meteorological phenomenon that can be set to customize the state of the weather is the vertical profile. It represents the speed and direction of the wind functions of height.&lt;br /&gt;
&lt;br /&gt;
[[File:Vertical profile1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
The wind speed consists in a polylinear function linking the highest point (or handler), the lowest point and the points you may create. Each point represents a height, a speed and a direction used to determine the wind functions of the heigth.&lt;br /&gt;
To create a new point, simply left click in the vertical profile area. To erase a point, right click on it. Please note that the highest and lowest points can't be erased. Except of the highest point, a point's height can't be modified. If the height of a point doesn't satisfy you, erase it and create a new one. Nevertheless, a point's speed can be modified. To do so, move the point with a drag'n'drop.&lt;br /&gt;
&lt;br /&gt;
[[File:Vertical profile2.png|900px]]&lt;br /&gt;
&lt;br /&gt;
Finally, the layer of the atmosphere between 0 and 150m is influenced by the terrain and thus can't be modified.&lt;br /&gt;
&lt;br /&gt;
The following image is an example of a wind turning along the altitude from East to West :&lt;br /&gt;
&lt;br /&gt;
[[File:Vertical profile3.png|900px]]&lt;br /&gt;
&lt;br /&gt;
=== Turbulences ===&lt;br /&gt;
&lt;br /&gt;
The last meteorological phenomenon represents turbulences. This one is quite simple : it consists in random components added to the wind on the three axis. The level of turbulences is depicted by 4 values :&lt;br /&gt;
&lt;br /&gt;
*  0 = no turbulences&lt;br /&gt;
*  1 = low turbulences&lt;br /&gt;
*  2 = medium turbulences&lt;br /&gt;
*  3 = severe turbulences&lt;br /&gt;
&lt;br /&gt;
[[File:Turbulences.png|900px]]&lt;br /&gt;
&lt;br /&gt;
= About us =&lt;br /&gt;
&lt;br /&gt;
The team is composed by four students from the IENAC10S promo :&lt;br /&gt;
&lt;br /&gt;
* BENREJEB Ons, developer,&lt;br /&gt;
* OTT Alexandra, developer,&lt;br /&gt;
* CARRIERE Sébastien, developer,&lt;br /&gt;
* EBRO Hugo, project lead, developer.&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=DevGuide/Releasing&amp;diff=23914</id>
		<title>DevGuide/Releasing</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=DevGuide/Releasing&amp;diff=23914"/>
		<updated>2017-11-12T13:59:14Z</updated>

		<summary type="html">&lt;p&gt;Flixr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Create new release =&lt;br /&gt;
&lt;br /&gt;
First of course the [https://github.com/paparazzi/paparazzi/blob/master/CHANGELOG.md CHANGELOG] should be updated.&lt;br /&gt;
&lt;br /&gt;
Stable release series have an even MINOR number, ongoing development has an uneven MINOR number.&lt;br /&gt;
&lt;br /&gt;
A stable release is generally done with the following steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;creating an annotated tag with &amp;lt;tt&amp;gt;vMAJOR.MINOR.PATCH_stable&amp;lt;/tt&amp;gt; in git. If it is the first release of a MAJOR.MINOR series, also create the vMAJOR.MINOR branch.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the release on https://github.com/paparazzi/paparazzi/releases&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;As the tarballs that github automatically creates don't include the submodules, run&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./make_release_tarball.sh&lt;br /&gt;
mv paparazzi.tar paparazzi_vMAJOR.MINOR.PATCH_stable.tar&lt;br /&gt;
gzip paparazzi_vMAJOR.MINOR.PATCH_stable.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and upload this tarball to the github release&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Update docs if a new stable branch: adjust [https://github.com/paparazzi/paparazzi.github.com/blob/master/index.html index.html] and add the branch to the [https://gist.github.com/flixr/4989376 pprz-update-dox.sh] script on odin.paparazziuav.org&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=DevGuide/Releasing&amp;diff=23913</id>
		<title>DevGuide/Releasing</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=DevGuide/Releasing&amp;diff=23913"/>
		<updated>2017-11-12T13:53:58Z</updated>

		<summary type="html">&lt;p&gt;Flixr: how to create a release&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Create new release =&lt;br /&gt;
&lt;br /&gt;
First of course the [https://github.com/paparazzi/paparazzi/blob/master/CHANGELOG.md CHANGELOG] should be updated.&lt;br /&gt;
&lt;br /&gt;
Stable release series have an even MINOR number, ongoing development has an uneven MINOR number.&lt;br /&gt;
&lt;br /&gt;
A stable release is generally done with the following steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;creating an annotated tag with &amp;lt;tt&amp;gt;vMAJOR.MINOR.PATCH_stable&amp;lt;/tt&amp;gt; in git. If it is the first release of a MAJOR.MINOR series, also create the vMAJOR.MINOR branch.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the release on https://github.com/paparazzi/paparazzi/releases&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;As the tarballs that github automatically creates don't include the submodules, run&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
./make_release_tarball.sh&lt;br /&gt;
mv paparazzi.tar paparazzi_vMAJOR.MINOR.PATCH_stable.tar&lt;br /&gt;
gzip paparazzi_vMAJOR.MINOR.PATCH_stable.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and upload this tarball to the github release&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Update docs if a new stable branch: adjust [https://github.com/paparazzi/paparazzi.github.com/blob/master/index.html index.html] and add the branch to the [https://gist.github.com/flixr/4989376 pprz-update-dox.sh] script on odin.paparazziuav.org&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Developer_Guide&amp;diff=23912</id>
		<title>Developer Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Developer_Guide&amp;diff=23912"/>
		<updated>2017-11-12T13:30:00Z</updated>

		<summary type="html">&lt;p&gt;Flixr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
By the time you land on this page, you probably want to enhance the Paparazzi project, that is really good for your karma and really appreciated by the Paparazzi community. We welcome contributions and improvements to the documentation.&lt;br /&gt;
[[Image:FixIt.jpg|right|FixIt]]&lt;br /&gt;
&lt;br /&gt;
See also [[Doxygen]] for documentation close to the code.&lt;br /&gt;
&lt;br /&gt;
==[[Contributing|Contributing]]==&lt;br /&gt;
You would like to contribute, but are not sure how, then [[Contributing|this is the page to visit]]&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/CodeEditors|Code Editing]]==&lt;br /&gt;
How to setup your IDE for use with the source code&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/LearningToProgram|Learning to Program]]==&lt;br /&gt;
Improve your Paparazzi code in OCAML,C,C++ and Python&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/AircraftBuildProcess|Aircraft build process and code generation]]==&lt;br /&gt;
Description of the (rather complicated) build system and code generation regarding the airborne firmwares&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/DesignOverview|Design Overview]]==&lt;br /&gt;
Attempt at a longer walk through the airborne code architecture&lt;br /&gt;
&lt;br /&gt;
==[[FirmwareArchitecture|Firmware Architecture]]==&lt;br /&gt;
Attempt at brief overview of the firmware architecture with modules and subsystems&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/Communications|Communications]]==&lt;br /&gt;
How telemetry and datalink is done&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/CommunicationsNew|Communications (Proposed New system)]]==&lt;br /&gt;
How the telemetry and datalink works&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/Server_GCS_com|Server-GCS communications]]==&lt;br /&gt;
How the Server and the Ground Control Station interact with each other&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/Values|Values]]==&lt;br /&gt;
A short walk through the system and how values are handled&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/Settings|Settings]]==&lt;br /&gt;
Settings is the generic mechanism that allows to set and get the value of any variable of the embedded code.&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/Mathlib|Paparazzi Math Library]]==&lt;br /&gt;
The custom Paparazzi math library written in C and how to use it in external programs&lt;br /&gt;
&lt;br /&gt;
==[[Reference/bootloader]]==&lt;br /&gt;
All of the questions and answers about the bootloader, but were afraid to ask&lt;br /&gt;
&lt;br /&gt;
===[[Lpc21iap|LPC USB firmware]]===&lt;br /&gt;
All of the answers to the Paparazzi USB bootloader of question you never dared to ask&lt;br /&gt;
&lt;br /&gt;
====[[Lpc21BootloaderUpload|Upload Bootloader for LPC21xx]]====&lt;br /&gt;
How to [[[[Lpc21BootloaderUpload|upload the Bootloader]] to a LPC2148 processor based Autopilot board like the TWOG&lt;br /&gt;
&lt;br /&gt;
===[[Luftboot|Upload the luftboot bootloader]]===&lt;br /&gt;
How to upload the Bootloader to a STM32 processor based Autopilot board like the [[Elle0]] or [[Lisa/M]]&lt;br /&gt;
&lt;br /&gt;
===[[DFU|Upload with DFU (with native or custom dfu bootloader)]]===&lt;br /&gt;
Using the native (embedded in ROM) or custom (e.g. [[Luftboot]] or [[KroozSD#Bootloader|KroozSD]]==) bootloader to upload Paparazzi code&lt;br /&gt;
&lt;br /&gt;
===[[STLink|Upload with STLink via SWD (without Bootloader)]]===&lt;br /&gt;
General ST-LinkV2 page.&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/GDB_OpenOCD_Debug|GDB OpenOCD Debug]]==&lt;br /&gt;
Using GDB or OpenOCD to directly flash and debug Hardware&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/USB-Serial|USB-Serial]]==&lt;br /&gt;
Using a USB connection instead of UART for use with telemetry&lt;br /&gt;
&lt;br /&gt;
==[[ControlTheory]]==&lt;br /&gt;
All [[ControlTheory|information you are looking for about the harsh reality of Control Theory]] needed to let your aircraft fly&lt;br /&gt;
&lt;br /&gt;
==[[Demystified/Altitude and Height|Altitude and Height]]==&lt;br /&gt;
Altitude and Height demystified&lt;br /&gt;
&lt;br /&gt;
==[[Abi|AirBorne Interface ABI]]==&lt;br /&gt;
Presentation of the airborne communication system&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/StateInterface]]==&lt;br /&gt;
A stateinterface is a stateinterface is a stateinterface, [[DevGuide/StateInterface|poems aside read more about what the stateinterface entails here]]&lt;br /&gt;
&lt;br /&gt;
==[[RT_Paparazzi]]==&lt;br /&gt;
[[RT_Paparazzi|Real Time Paparazzi]] how-to and guidelines&lt;br /&gt;
&lt;br /&gt;
==[[Builds|Continuous Integration builds]]==&lt;br /&gt;
Info on the [[Builds|Continuous Integration builds]] (CI) server&lt;br /&gt;
&lt;br /&gt;
==[[Coding Standards]]==&lt;br /&gt;
JPL (Jet Propulsion Laboratory) released their own coding standards (can be downloaded for free here: [http://lars-lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf JPL C Coding Standards and Guidelines]). They include MISRA-C rules and directives, but add their own rules on top of that. They also specify different levels of compliance (LOC) because not always it is necessary to comply with all of the rules. Anyway, they are making things that go to space, so we can definitely learn something about good coding practices from them.&lt;br /&gt;
&lt;br /&gt;
==[[DevGuide/Releasing]]==&lt;br /&gt;
Info for maintainers on how to create a new release.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&amp;diff=23825</id>
		<title>Installation/Linux</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&amp;diff=23825"/>
		<updated>2017-08-24T18:46:59Z</updated>

		<summary type="html">&lt;p&gt;Flixr: added debian stretch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Installation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This page only describes the installation of the prerequisite tools and dependencies on Debian/Ubuntu needed for Paparazzi.&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''See the general [[Installation]] page for how to [[Installation#Getting_the_Source_Code|download Paparazzi]] and [[Installation#Launching_the_Software|launching it]] after you followed the instructions here.'''&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi is very easily installed on any laptop or workstation running [http://www.ubuntu.com/ Ubuntu], [http://www.debian.org/ Debian] (or any of their derivatives).&lt;br /&gt;
&lt;br /&gt;
The steps required to install the software needed to be able to let your UAS fly &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation/Linux#Installation_of_dependencies|Install the basic Paparazzi dependencies]] and the [[Installation/Linux#ARM_embedded_toolchain|ARM cross compiling toolchain.]]&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation#Getting_the_Source_Code|Download the source code from the source repository.]]&lt;br /&gt;
&amp;lt;li&amp;gt;Allow access to your PC hardware connection by adding appropriate [[Udev]] rules.&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation#Launching_the_Software|Compile the binaries from the sources and launch the software.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Users of other Linux flavors than a recent Ubuntu or Debian and anyone needing manual control of each individual package can [[Installation/Manual|install them independently]].&lt;br /&gt;
&lt;br /&gt;
===For the impatient===&lt;br /&gt;
&lt;br /&gt;
For Ubuntu add the [https://launchpad.net/~paparazzi-uav/+archive/ppa paparazzi-uav ppa] &amp;lt;tt&amp;gt;sudo add-apt-repository ppa:paparazzi-uav/ppa&amp;lt;/tt&amp;gt; and install the &amp;lt;tt&amp;gt;paparazzi-dev&amp;lt;/tt&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
Since Paparazzi v5.0 the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] is recommended.&lt;br /&gt;
Available as of Ubuntu 14.04, on older versions it can be [[Installation/Linux#ARM_embedded_toolchain|installed via tarball]].&lt;br /&gt;
&lt;br /&gt;
Or just use the [[Installation#Quickstart_on_Ubuntu_12.04|Quickstart for Ubuntu 12.04 LTS]].&lt;br /&gt;
&lt;br /&gt;
== Installation video Tutorials ==&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtubehd|SshFJrBuku8}} {{#ev:youtubehd|eW0PCSjrP78}}&lt;br /&gt;
&lt;br /&gt;
== Installation of dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu ===&lt;br /&gt;
'''Binary packages for Ubuntu are available for the ''i386'', ''amd64'' and ''armhf'' architectures.'''&lt;br /&gt;
&lt;br /&gt;
Add the installation sources for the Paparazzi software packages. Run from a terminal:&lt;br /&gt;
 sudo add-apt-repository ppa:paparazzi-uav/ppa&lt;br /&gt;
&lt;br /&gt;
Then update the systems package inventory and install the main Paparazzi software dependencies. This will take some time.&lt;br /&gt;
 sudo apt-get update &lt;br /&gt;
 sudo apt-get install paparazzi-dev&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
'''Binary packages for Debian are available for the ''i386'' and ''amd64'' architectures. ''armhf'' packages seem to be currently not supported by the OpenSUSE build service.'''&lt;br /&gt;
&lt;br /&gt;
For Debian Wheezy (7.0), Jessie (8.0) and Stretch (9.0) packages are built using the [http://openbuildservice.org/ Open Build Service (OBS)] on [https://build.opensuse.org/project/show?project=home%3Aflixr%3Apaparazzi-uav OpenSUSE Build Service project home:flixr:paparazzi-uav]&lt;br /&gt;
&lt;br /&gt;
[http://software.opensuse.org/download/package?project=home:flixr:paparazzi-uav&amp;amp;package=paparazzi-dev Install paparazzi-dev]&lt;br /&gt;
&lt;br /&gt;
First add the key:&lt;br /&gt;
 wget -q &amp;quot;http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_9.0/Release.key&amp;quot; -O- | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
Add the appropriate repo, depending on your Debian version to sources.list&lt;br /&gt;
 echo &amp;quot;deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_9.0/ ./&amp;quot; | tee -a /etc/apt/sources.list&lt;br /&gt;
 echo &amp;quot;deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_8.0/ ./&amp;quot; | tee -a /etc/apt/sources.list&lt;br /&gt;
 echo &amp;quot;deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_7.0/ ./&amp;quot; | tee -a /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Update the systems package inventory and install the main Paparazzi software dependencies.&lt;br /&gt;
 sudo apt-get update &lt;br /&gt;
 sudo apt-get install paparazzi-dev&lt;br /&gt;
&lt;br /&gt;
== ARM embedded toolchain ==&lt;br /&gt;
&lt;br /&gt;
For current Paparazzi versions (v5.0 and above) the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] is recommended, which also supports the STM32F4 with FPU (hardware floating point).&lt;br /&gt;
&lt;br /&gt;
=== gcc-arm-none-eabi as Debian/Ubuntu package ===&lt;br /&gt;
&lt;br /&gt;
'''This is the recommended method'''&lt;br /&gt;
&lt;br /&gt;
Note that there are actually two '''different''' toolchains available!&lt;br /&gt;
* [https://launchpad.net/gcc-arm-embedded/ ARM gcc-arm-embedded toolchain] with Debian package name ''gcc-arm-embedded''&lt;br /&gt;
** includes libstdc++ and newlib-nano&lt;br /&gt;
* [https://packages.debian.org/jessie/gcc-arm-none-eabi Debian gcc-arm-none-eabi toolchain]&lt;br /&gt;
** does not include libstdc++&lt;br /&gt;
** does not include newlib-nano&lt;br /&gt;
&lt;br /&gt;
Both toolchains ''should'' work for most use-cases (if you don't need C++ or nano specs), although the [https://launchpad.net/gcc-arm-embedded/ ARM gcc-arm-embedded toolchain] is better tested.&lt;br /&gt;
&lt;br /&gt;
==== gcc-arm-embedded toolchain ====&lt;br /&gt;
&lt;br /&gt;
'''This is the recommended toolchain'''&lt;br /&gt;
&lt;br /&gt;
On ''most'' Ubuntu versions the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] can be installed as a debian package from the [https://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa ppa]:&lt;br /&gt;
 sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install gcc-arm-embedded&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
Previously there was a PPA by terry.guo that contained this toolchain under the package name ''gcc-arm-none-eabi''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
See https://launchpad.net/gcc-arm-embedded/+announcement/13824 for details on how to switch the newer &lt;br /&gt;
PPA and package. &lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gcc-arm-none-eabi Debian toolchain ====&lt;br /&gt;
&lt;br /&gt;
Current Debian ('''jessie''') and Ubuntu (14.04 '''trusty''' and later) releases have the gcc-arm-none-eabi package in the official repositories ('''universe'''), and can be installed with:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi&lt;br /&gt;
&lt;br /&gt;
=== ARM gcc-arm-embedded tarball ===&lt;br /&gt;
Another way is to download and unpack the tarball and add it to your PATH:&lt;br /&gt;
&lt;br /&gt;
* Download gcc-arm-none-eabi-*-*-linux.tar.bz2 from [https://launchpad.net/gcc-arm-embedded/+download External Downloads] section of ARM gcc-arm-embedded project&lt;br /&gt;
* Unpack it to a directory of your choice&lt;br /&gt;
* Add the bin folder in to your PATH&lt;br /&gt;
&lt;br /&gt;
e.g.:&lt;br /&gt;
 cd ~&lt;br /&gt;
 wget https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2&lt;br /&gt;
 sudo tar -vjxf gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2 -C /opt&lt;br /&gt;
 rm -r gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2&lt;br /&gt;
 exportline=&amp;quot;PATH=$PATH:/opt/gcc-arm-none-eabi-4_7-2013q2/bin&amp;quot;&lt;br /&gt;
 if grep -Fxq &amp;quot;$exportline&amp;quot; ~/.profile; then echo nothing to do ; else echo $exportline &amp;gt;&amp;gt; ~/.profile; fi&lt;br /&gt;
 source ~/.profile&lt;br /&gt;
&lt;br /&gt;
The file .profile will be sourced in every bash after logging out and in again. Until then,&lt;br /&gt;
 source ~/.profile&lt;br /&gt;
can be used for every bash individually.&lt;br /&gt;
&lt;br /&gt;
If you can not access your toolchain with PATH working, look a the [[Installation/Linux#Troubleshooting]].&lt;br /&gt;
&lt;br /&gt;
=== Old toolchain for Paparazzi v4.x and earlier ===&lt;br /&gt;
&lt;br /&gt;
'''For Paparazzi v4.x''' and earlier you need to install the &amp;lt;tt&amp;gt;paparazzi-arm-multilib&amp;lt;/tt&amp;gt; package. It has support for both ARM7 (i.e. Tiny,TWOG,YAPA autopilot boards) as well as STM32F1 (i.e. LISA boards).&amp;lt;br&amp;gt;&lt;br /&gt;
'''This toolchain does not properly support STM32F4 based autopilots!!'''&lt;br /&gt;
&lt;br /&gt;
You can install it explicitly with:&lt;br /&gt;
 sudo apt-get install paparazzi-arm-multilib&lt;br /&gt;
&lt;br /&gt;
== Optional Packages ==&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;b&amp;gt;lpc21isp&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;openocd&amp;lt;/b&amp;gt; are normally '''automatically installed''' as they are recommended packages of paparazzi-dev, '''if not''' you can manually install them via:&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install lpc21isp openocd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;lpc21isp&amp;lt;/tt&amp;gt; is needed to serially flash the LPC2148 based autopilots (e.g. bootloader for tiny, twog, umarim), &amp;lt;tt&amp;gt;openocd&amp;lt;/tt&amp;gt; is for flashing via JTAG (e.g. for Lisa boards) and debugging.&lt;br /&gt;
&lt;br /&gt;
== Installing and running Paparazzi ==&lt;br /&gt;
&lt;br /&gt;
Please see [[Installation#Getting_the_Source_Code|Getting the Source Code on the general Installation page]] for details on downloading the Paparazzi source code, compiling and running it.&lt;br /&gt;
&lt;br /&gt;
== Udev rules ==&lt;br /&gt;
&lt;br /&gt;
Add the appropriate [[Udev]] rule (available in fhe file ''50-paparazzi.rules'') to the USB handler.  Simply copy as root &amp;lt;tt&amp;gt;conf/system/udev/rules/50-paparazzi.rules&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;/etc/udev/rules.d/&amp;lt;/tt&amp;gt;, e.g in a terminal:&lt;br /&gt;
&lt;br /&gt;
 cd &amp;lt;your paparazzi directory&amp;gt;&lt;br /&gt;
 sudo cp conf/system/udev/rules/50-paparazzi.rules /etc/udev/rules.d/&lt;br /&gt;
 sudo udevadm control --reload-rules&lt;br /&gt;
&lt;br /&gt;
See the [[Udev]] page for more details.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== No access rights for USB devices ===&lt;br /&gt;
&lt;br /&gt;
Some Linux distributions, don't allow standard (non admin) users to directly access the USB bus by default. On recent Ubuntu/Debian versions the first/main user is already a member of the ''plugdev'' group which should be sufficient for most cases.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have problems, make yourself a member of the ''plugdev'' and ''dialout'' groups:&lt;br /&gt;
&lt;br /&gt;
 sudo adduser &amp;lt;your login&amp;gt; plugdev&lt;br /&gt;
 sudo adduser &amp;lt;your login&amp;gt; dialout&lt;br /&gt;
&lt;br /&gt;
Logout and login again.&lt;br /&gt;
&lt;br /&gt;
=== arm-none-eabi-gcc: Command not found ===&lt;br /&gt;
Appeared on Debian Wheezy 7 (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)&amp;lt;br/&amp;gt;&lt;br /&gt;
If this error occurs, maybe the [https://packages.debian.org/de/wheezy/ia32-libs ia32-libs] are missing.&lt;br /&gt;
&lt;br /&gt;
Enable multiarch and install ia32-libs:&lt;br /&gt;
 dpkg --add-architecture i386&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install ia32-libs&lt;br /&gt;
&lt;br /&gt;
=== arm-linux-gnueabi-gcc cross-compiler not found ===&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu ===&lt;br /&gt;
 apt-get install gcc-arm-linux-gnueabi&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
Starting with jessie, there were [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771496#41 some changes] to the way cross-compilers are set up. To make it work you will have to add armel architecture and pick up some crossbuild tools.&lt;br /&gt;
&lt;br /&gt;
First edit your /etc/apt/sources.list and add the following line, to enable the emdebian repo:&lt;br /&gt;
 deb http://emdebian.org/tools/debian/ jessie main&lt;br /&gt;
&lt;br /&gt;
Run the following command in your terminal to add the keys for it&lt;br /&gt;
 curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
Then you could add armel architecture and fetch the missing cross-compiler packages&lt;br /&gt;
 dpkg --add-architecture armel&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install crossbuild-essential-armel&lt;br /&gt;
&lt;br /&gt;
You could find out more about cross-toolchains in jessie on debian [https://wiki.debian.org/CrossToolchains wiki page].&lt;br /&gt;
&lt;br /&gt;
Note that some of your repos might not mirror embedded architectures, which would give you an error when you try to update the sources. In that case you will have to specify which architecture you do want from them by editing the corresponding entry in your sources.list file, in a way described [https://wiki.debian.org/Multiarch/HOWTO here]. Like in this example with the crunchbang repo you could specify it by adding [arch=amd64,i386] to the line, so you only enable amd64 and i386 architectures:&lt;br /&gt;
 deb [arch=amd64,i386] http://packages.crunchbang.org/waldorf waldorf main&lt;br /&gt;
&lt;br /&gt;
===arm-none-eabi-gdb: error with libncurses.so.5===&lt;br /&gt;
Appeared on Xubuntu 14.04 LTS (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)&amp;lt;br/&amp;gt;&lt;br /&gt;
Terminal output: arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory&lt;br /&gt;
&lt;br /&gt;
If this error occurs, maybe [http://packages.ubuntu.com/search?keywords=lib32ncurses5 lib32ncurses5] is missing. &amp;lt;br/&amp;gt;&lt;br /&gt;
Found on [https://answers.launchpad.net/gcc-arm-embedded/+question/226680 launchpad q&amp;amp;a]&lt;br /&gt;
&lt;br /&gt;
=== FTDI serial adapter not working on old Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
On older Linux distributions (not needed for lucid and later), the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get remove brltty&lt;br /&gt;
&lt;br /&gt;
=== Code not starting on autopilot after changing gcc ===&lt;br /&gt;
&lt;br /&gt;
If you changed the toolchain (e.g. installed a new one for having FPU-Support for the F4), you need to run&lt;br /&gt;
&lt;br /&gt;
 make clean &amp;amp;&amp;amp; make&lt;br /&gt;
&lt;br /&gt;
in sw/ext in order to rebuild the libs. Otherwise the embedded code can behave strange (most likely not start)&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/FromScratch&amp;diff=23683</id>
		<title>Installation/FromScratch</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/FromScratch&amp;diff=23683"/>
		<updated>2017-05-13T19:14:45Z</updated>

		<summary type="html">&lt;p&gt;Flixr: boa package is not needed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Installation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
'''Users of recent Debian/Ubuntu distributions are advised to use the binary packages as described in [[Installation/Linux]].'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;'''WARNING! Only use if you are proficient in working with Linux!'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
Users of other Linux flavors or anyone needing manual control of each individual package can install them independently. &amp;lt;br/&amp;gt;&lt;br /&gt;
The list of dependencies of the Debian package is located in the [https://github.com/paparazzi/paparazzi-portability-support/blob/master/debian/paparazzi-dev/debian/control &amp;lt;tt&amp;gt;debian/control&amp;lt;/tt&amp;gt;] file and may help users of other distributions.&lt;br /&gt;
&lt;br /&gt;
Some corresponding source tarballs can be downloaded from [https://launchpad.net/~paparazzi-uav/+archive/ppa/+packages paparazzi-uav ppa] on launchpad. (maybe building the packages from source is more reliable in view of dependencies)&lt;br /&gt;
&lt;br /&gt;
For distributions using RPM packaging, the [http://packages.debian.org/unstable/source/alien alien] tool can be used to convert a .deb package into a .rpm package.&lt;br /&gt;
&lt;br /&gt;
As with all Wiki pages, also this page is a work in progress. Try to be a big help to the Paparazzi project and improve this page whenever you can. If you have a distribution different from Ubuntu which doesn't satisfy any other dependency and have instructions about compiling it, packaging it, feel free to add any reference on how to do that on this wikipage.&lt;br /&gt;
&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this page is to clarify about which version of each piece of software has to be compiled, where to find that software, patches needed to make it compile on Linux, maybe even FreeBSD or OSX.&lt;br /&gt;
&lt;br /&gt;
== Fedora 19  ==&lt;br /&gt;
&lt;br /&gt;
To build paparazzi-uav on Fedora 19, you must install the next packages from the official repository:&lt;br /&gt;
* ocaml&lt;br /&gt;
* ocaml-findlib&lt;br /&gt;
* ocaml-xml-light&lt;br /&gt;
* ocaml-ocamlnet&lt;br /&gt;
* ocaml-lablgtk-devel&lt;br /&gt;
* libxml2-devel&lt;br /&gt;
* SDL-devel&lt;br /&gt;
* libusb-devel&lt;br /&gt;
&lt;br /&gt;
Paparazzi-uav needs to include some ocaml headers when it compiles the simulator, then please be sure that they are included. If not, edit sw/simulator/Makefile and add:&lt;br /&gt;
&lt;br /&gt;
  CAML_CFLAGS = -I/usr/lib64/ocaml&lt;br /&gt;
&lt;br /&gt;
The following packages must be built from source code (they are not included in the official repository): &lt;br /&gt;
* ivy-c &lt;br /&gt;
* ivy-ocaml &lt;br /&gt;
&lt;br /&gt;
Paparazzi-uav was successfully compiled using ivy-c 3.14 (downloaded from SVN repository, revision #3602) and ivy-ocaml 1.2. Please note that the ivy-c version is an unstable version!&lt;br /&gt;
&lt;br /&gt;
Additionally, you need install the next RPMs to build ivy-c:&lt;br /&gt;
* pcre-devel&lt;br /&gt;
* libXt-devel&lt;br /&gt;
* tcl-devel&lt;br /&gt;
* glib2-devel&lt;br /&gt;
&lt;br /&gt;
Don't forget to set the environment variable PKG_CONFIG before building ivy-ocaml, e.g:&lt;br /&gt;
&lt;br /&gt;
  $ export PKG_CONFIG=/usr/local/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
== Fedora 24  ==&lt;br /&gt;
NOTE: Built upon Fedora 19 instruction, unnecessary instructions may occour.&lt;br /&gt;
&lt;br /&gt;
1. Install dependencies:&lt;br /&gt;
  $ sudo dnf install ocaml ocaml-findlib ocaml-xml-light ocaml-ocamlnet ocaml-lablgtk-devel ocaml-camlp4-devel libxml2-devel SDL-devel libusb-devel pcre-devel libXt-devel tcl-devel tk-devel glib2-devel gsl-devel&lt;br /&gt;
&lt;br /&gt;
2. Edit the PKG_CONFIG_PATH variable in your ~/.bashrc file to accomondate /usr/local/lib/pkgconfig/ (default for ivy libs)&lt;br /&gt;
&lt;br /&gt;
3. Edit all the ivy specific .pc files in /usr/local/lib/pkgconfig, changing line 3 from &amp;quot;libdir=${exec_prefix}/lib&amp;quot; to &amp;quot;libdir=${exec_prefix}/lib64&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Install ivy-python via pip and compile and istall ivy-c and ivy-ocaml from source as shown [[Installation/FromScratch#IVY]]&lt;br /&gt;
&lt;br /&gt;
Note: dependencies for compiling ivy-c and ivy-ocaml are already covered above (except toolchain!).&lt;br /&gt;
&lt;br /&gt;
5. Compile and install [[JSBSim|JSBsim from source]]&lt;br /&gt;
&lt;br /&gt;
Hacks: Link libivy and libJSBsim after compiling&lt;br /&gt;
  $ sudo ln -s /usr/local/lib64/libivy.so /usr/local/lib64/libivy.so.3 /usr/lib&lt;br /&gt;
  $ sudo ln -s /opt/jsbsim/lib/libJSBSim.so.0 /usr/lib&lt;br /&gt;
  $ sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
== Arch Linux ==&lt;br /&gt;
&lt;br /&gt;
This is a dirty hacked together (not really according to &amp;quot;the Arch Way&amp;quot;) install, but works on a fresh installed Archbang GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: following issues '''&lt;br /&gt;
# Only written and tested for Archbang and Manjaro, not tested on vanilla Arch Linux yet. &lt;br /&gt;
# It seems that the error &amp;quot;unbound module GnoCanvas&amp;quot; can be resolved by installing lablgtk2 via yaourt first and then conf-gnomecanvas over opam.&lt;br /&gt;
# No symlink from liblglibivy.so.3 and liblglibivy.so.3 to libglibivy.so.3.15, so can't find these files.&lt;br /&gt;
# If pkg-config can't find some .pc files, a pkg-config path might not be set and exported properly. Use &amp;quot;pkg-config --variable pc_path pkg-config&amp;quot; to check if the path containing the ''ivy-c.pc'', ''ivy-glib.pc'' and ''ivy-tcl.pc'' files is found.&lt;br /&gt;
# &amp;quot;ocamlfind: Package `netclient' not found&amp;quot; -&amp;gt; seems that the opam packages need to be installed in a specific order... (try ocamlnet first, then lablgtk.2.16) &lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
# Up to date system&lt;br /&gt;
#* pacman -Syyu&lt;br /&gt;
# Install Yaourt&lt;br /&gt;
#*https://astrofloyd.wordpress.com/2015/01/17/installing-yaourt-on-arch-linux/&lt;br /&gt;
&lt;br /&gt;
'''Install Paparazzi:'''&lt;br /&gt;
# Packages base-devel, yajl and general dependencies&lt;br /&gt;
#: &amp;lt;pre&amp;gt;# pacman -S base-devel yajl subversion git libusb pcre ocaml camlp4 tcl tk python python-pip sdl glade&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Check if the PKG_CONFIG_PATH points to ''/usr/local/lib/pkgconfig'', otherwise set and export it&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ echo 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/' &amp;gt;&amp;gt; ~/.bashrc&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Build and install Ivy-C from Source&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ svn checkout https://svn.tls.cena.fr/svn/ivy/ivy-c/trunk /home/$USER/temp/ivy-c &amp;amp;#10;$ cd /home/$USER/temp/ivy-c/src &amp;amp;#10;$ make &amp;amp;#10;$ sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
# '''Dirty''' All the ivy libs are installed in ''/usr/local/lib64'' and not ''/usr/local/lib'' as the .pc files point to currently. &amp;lt;br/&amp;gt;&lt;br /&gt;
#:Change in the third line (libdir) in the ivy-c.pc, ivy-glib.pc and ivy-tcl.pc file from ''lib'' to ''lib64'' and the fourth line (includedir) from ''include'' to ''include/Ivy''&lt;br /&gt;
# '''Dirty'''For libgivy, libivy and libtclivy (.so and .so.3 ending) is a link directing to the lib with .so.3.15 availaible, but not for libglibivy. &amp;lt;br/&amp;gt;&lt;br /&gt;
#Create these links for libglibivy&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ sudo ln -s /usr/local/lib64/libglibivy.so.3.15 /usr/local/lib64/libglibivy.so &amp;amp;#10;$ sudo ln -s /usr/local/lib64/libglibivy.so.3.15 /usr/local/lib64/libglibivy.so.3&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Install opam (OCaml packet manager) via yaourt&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ yaourt -S opam&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Initialize opam&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ opam init &amp;amp;#10;$ f &amp;amp;#10;$ ~/.bashrc &amp;amp;#10;$ echo 'eval `opam config env`' &amp;gt;&amp;gt; ~/.bashrc&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Install and pin lablgtk.2.16.0 (2.18.0 will not work)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ opam install -v lablgtk.2.16.0 &amp;amp;#10;$ opam pin add lablgtk 2.16.0&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Install OCaml packets via opam&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ opam install ocamlfind ocamlnet xml-light pcre ivy&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: If this fails at Ivy related parts check the notes on top of this guide.&lt;br /&gt;
# Install ivy-python via pip&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ sudo pip install ivy-python&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Install the Toolchain for Paparazzi (e.g. [https://aur.archlinux.org/packages/gcc-arm-none-eabi-bin/ gcc-arm-none-eabi-bin] from the AUR)&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ sudo pacman -S gcc-arm-none-eabi-bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optional:&lt;br /&gt;
&lt;br /&gt;
# Install flashing utilities if needed&lt;br /&gt;
 $ yaourt stlink-git dfu-util&lt;br /&gt;
# Install [[JSBSim]] for [[NPS]]&lt;br /&gt;
&lt;br /&gt;
[[Installation#Getting_the_Source_Code|Download]] and [[Installation#Launching_the_Software|build Paparazzi]]&lt;br /&gt;
&lt;br /&gt;
== Installing the Cross compiler toolchain ==&lt;br /&gt;
&lt;br /&gt;
There are currently two different toolchains available that can be used on Linux based systems with Paparazzi. For more information see [[Installation/Linux#ARM_embedded_toolchain]]&lt;br /&gt;
&lt;br /&gt;
== Installing OCaml packages using OPAM ==&lt;br /&gt;
&lt;br /&gt;
One possibility to install and manage OCaml packages is [http://opam.ocamlpro.com/ OPAM (OCaml Package Manager)]:&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Please first check the official [http://opam.ocaml.org/doc/Install.html OPAM install guide] for the simplest method.'''&amp;lt;br/&amp;gt;&lt;br /&gt;
To install it from the latest git tree run:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;git clone https://github.com/OCamlPro/opam.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 cd opam&lt;br /&gt;
 ./configure &amp;amp;&amp;amp; make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
 opam init&lt;br /&gt;
 eval `opam config env`&lt;br /&gt;
&lt;br /&gt;
Update your shell environment as per opam init's instructions. E.g. add to your ''~/.profile'':&lt;br /&gt;
 eval `opam config env`&lt;br /&gt;
&lt;br /&gt;
Build and install OCaml libs:&lt;br /&gt;
 opam install ocamlfind xml-light pcre ocamlnet&lt;br /&gt;
 opam install -v lablgtk&lt;br /&gt;
&lt;br /&gt;
==  IVY ==&lt;br /&gt;
&lt;br /&gt;
IVY is a simple protocol and a set of open-source libraries and programs that allows applications to broadcast information through text messages, with a subscription mechanism based on regular expressions. The project can be found at: http://www.eei.cena.fr/products/ivy/  &lt;br /&gt;
&lt;br /&gt;
In the paparazzi project, Ivy is used to send telemetry data to where ever you want.&lt;br /&gt;
&lt;br /&gt;
NOTE: Do not confuse this IVY with the Apache Ivy project. &lt;br /&gt;
&lt;br /&gt;
=== Ivy-python ===&lt;br /&gt;
&lt;br /&gt;
The ivy-python package makes it possible to use the IVY libraries from within the Python programming language. The ivy-python package is architecture independent, so it can be downloaded from the Ubuntu or Debian paparazzi repository.&lt;br /&gt;
&lt;br /&gt;
The easiest way to instally it on non Debian based systems is using [https://pip.pypa.io/ pip] to install the [https://pypi.python.org/pypi/ivy-python ivy-python package] from [https://pypi.python.org/pypi PyPi - the Python Package Index].&lt;br /&gt;
 pip install ivy-python&lt;br /&gt;
&lt;br /&gt;
Or install from the source repository via &lt;br /&gt;
 &lt;br /&gt;
 git clone https://gitlab.com/ivybus/ivy-python.git&lt;br /&gt;
 cd ivy-python&lt;br /&gt;
 ./setup.py install&lt;br /&gt;
&lt;br /&gt;
=== Ivy-c ===&lt;br /&gt;
&lt;br /&gt;
To be able to use ivy-c, the libraries need to be installed. &lt;br /&gt;
&lt;br /&gt;
Required packages (Debian based):&lt;br /&gt;
* tk-dev&lt;br /&gt;
* libpcre3-dev&lt;br /&gt;
* libxt-dev&lt;br /&gt;
* pkg-config&lt;br /&gt;
* libglib2.0-dev&lt;br /&gt;
&lt;br /&gt;
Download source, compile and install libraries:&lt;br /&gt;
&lt;br /&gt;
 # mkdir -p /opt/ivy-c &lt;br /&gt;
 # cd /opt/ivy-c&lt;br /&gt;
 # svn co https://svn.tls.cena.fr/svn/ivy/ivy-c/trunk&lt;br /&gt;
 # cd /opt/ivy-c/trunk/src&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
It is possible you get errors of the test module when compiling, just ignore the messages, it is not important for the Paparazzi project. Contact the IVY team to help them also to resolve also the testing makefile issue.&lt;br /&gt;
&lt;br /&gt;
==== troubleshooting ====&lt;br /&gt;
&lt;br /&gt;
Error message:&lt;br /&gt;
 gcc -c -O2 -Wall -Wshadow -fPIC -I/usr/include/tcl8.4 -DTCL_CHANNEL_INTEGRATION  ivytcl.c&lt;br /&gt;
 ivytcl.c:28:17: fatal error: tcl.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
The Makefile cannot read the tcl-dev version you have installed and assumes that version 8.4 is installed, but can't find the appropriate folder.&amp;lt;br/&amp;gt;&lt;br /&gt;
Edit the line 57 of the Makefile from TCLVERS=8.4 according to your installed version, or just delete the 8.4, both work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can't find 64bit libs:&lt;br /&gt;
Your ivy libs were probably installed to /usr/local/lib64 and you have to make symbolic links so that they will be found:&lt;br /&gt;
 $ sudo ln -s /usr/local/lib64/libivy.so /usr/local/lib64/libivy.so.3 /usr/lib&lt;br /&gt;
or &lt;br /&gt;
 sudo ln -s /usr/local/lib64/libivy.so /usr/local/lib64/libivy.so.3 /usr/local/lib&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you get an error relating to ivytestready.c, make the following changes:&lt;br /&gt;
 mkdir /opt/ivy-c/trunk/tools/Ivy&lt;br /&gt;
 cd /opt/ivy-c/trunk/tools/Ivy&lt;br /&gt;
 cp ../../src/ivy.h .&lt;br /&gt;
 cp ../../src/ivyloop.h .&lt;br /&gt;
 cp ../../src/ivysocket.h .&lt;br /&gt;
 cp ../../src/timer.h .&lt;br /&gt;
 cd ~/develop/ivy-c/trunk/src&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
This copies files from the src directory to the Ivy folder in tools which did not appear after running svn above.&lt;br /&gt;
&lt;br /&gt;
=== Ivy-OCaml ===&lt;br /&gt;
&lt;br /&gt;
ivy-ocaml provides OCaml bindings for ivy-c and is needed for most of the ground segment agents that are written in OCaml like [[Server]] and [[GCS]].&lt;br /&gt;
&lt;br /&gt;
Download source, compile and install libraries:&lt;br /&gt;
&lt;br /&gt;
 # mkdir -p /opt/ivy-ocaml&lt;br /&gt;
 # cd /opt/ivy-ocaml&lt;br /&gt;
 # svn co https://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk&lt;br /&gt;
 # cd /opt/ivy-ocaml/trunk&lt;br /&gt;
 # make&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
==== ivy-ocaml via OPAM ====&lt;br /&gt;
Or use OPAM: While the source repository and debian package is named ''ivy-ocaml'', in OPAM it is only named ''ivy'' (since it is obviously for OCaml).&lt;br /&gt;
&lt;br /&gt;
 $ opam update&lt;br /&gt;
 $ opam install ivy&lt;br /&gt;
&lt;br /&gt;
== LPC21ISP ==&lt;br /&gt;
&lt;br /&gt;
lpc21isp is only needed to serially flash the LPC2148 based autopilots (e.g. [[Lpc21BootloaderUpload bootloader]] for tiny, twog, umarim). LPC21ISP is an in-circuit programming (ISP) tool for the microcontroller used on the Paparazzi autopilot boards. The lpc21isp project is hosted on sourceforge and one can find the source packages and information at http://sourceforge.net/projects/lpc21isp/ &lt;br /&gt;
&lt;br /&gt;
Get the SVN version via&lt;br /&gt;
 &lt;br /&gt;
 $ mkdir -p /opt/lpc21isp&lt;br /&gt;
 $ cd /opt/lpc21isp&lt;br /&gt;
 $ svn co https://lpc21isp.svn.sourceforge.net/svnroot/lpc21isp lpc21&lt;br /&gt;
&lt;br /&gt;
To compile go into the source directory and then do&lt;br /&gt;
&lt;br /&gt;
 $ cd lpc21&lt;br /&gt;
 $ make -f Makefile clean all&lt;br /&gt;
&lt;br /&gt;
To install&lt;br /&gt;
&lt;br /&gt;
 $ exportline=&amp;quot;PATH=$PATH:/opt/lpc21isp&amp;quot;&lt;br /&gt;
 $ if grep -Fxq &amp;quot;$exportline&amp;quot; ~/.profile; then echo nothing to do ; else echo $exportline &amp;gt;&amp;gt; ~/.profile; fi&lt;br /&gt;
 $ source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Paparazzi-dev Debian/Ubuntu packages ==&lt;br /&gt;
&lt;br /&gt;
For Ubuntu users, you can install the following packages from standard repository. You can just copy the line(s) and paste into your terminal. But do not copy the $ sign, this symbol is just added on this page to show that it is to be pasted at a normal terminal prompt.&lt;br /&gt;
&lt;br /&gt;
=== Whole lot in one ===&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install ocaml libcamlimages-ocaml liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev \&lt;br /&gt;
                       liblablgtk2-gnome-ocaml-dev libxml-light-ocaml-dev libocamlnet-ocaml-dev libpcre-ocaml \&lt;br /&gt;
                       libpcre-ocaml-dev libgnomecanvas2-0 libgnomecanvas2-dev libglade2-0 libglade2-dev make build-essential \&lt;br /&gt;
                       git gnuplot m4 libtool libftdi-dev libmpfr-dev tcl8.5-dev xutils-dev&lt;br /&gt;
&lt;br /&gt;
=== Ocaml and libraries ===&lt;br /&gt;
&lt;br /&gt;
Ocaml, short for Objective Caml is the most popular variant of the Caml language. The Paparazzi Ground Control Station (GCS) and some of it's tools are crafted in this language.&lt;br /&gt;
&lt;br /&gt;
* ocaml, ocaml-camlimages-devel, ocaml-lablgtk2-devel, ocaml-xml-light-devel, ocamlnet-ocaml-devel&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install ocaml libcamlimages-ocaml liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev \&lt;br /&gt;
                        liblablgtk2-gnome-ocaml-dev libxml-light-ocaml-dev libocamlnet-ocaml-dev&lt;br /&gt;
&lt;br /&gt;
=== Gnome canvas Library ===&lt;br /&gt;
&lt;br /&gt;
The GnomeCanvas is an engine for structured graphics that offers a rich imaging model, high performance rendering, and a powerful, high level API. This widget can be used for flexible display of graphics and for creating interactive user interface elements.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libgnomecanvas2-0 libgnomecanvas2-dev&lt;br /&gt;
&lt;br /&gt;
=== USB Library ===&lt;br /&gt;
&lt;br /&gt;
The libusb project aims to create a library for use by user level applications to access USB devices regardless of OS. [http://www.libusb.org]&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libusb-dev&lt;br /&gt;
&lt;br /&gt;
=== Ocaml PCRE ===&lt;br /&gt;
&lt;br /&gt;
This OCaml-library interfaces the PCRE (Perl-compatibility regular expressions) C library. it can be used for matching regular expressions which are written in Perl style.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libpcre-ocaml libpcre-ocaml-dev&lt;br /&gt;
&lt;br /&gt;
=== Glade Library ===&lt;br /&gt;
&lt;br /&gt;
Libglade is a library that performs a similar job to the C source output routines in the GLADE user interface builder. Whereas GLADE's output routines create C source code that must be compiled, libglade builds the interface from an XML file (GLADE's save format) at runtime. This can allow modifying the user interface without recompiling.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libglade2-0 libglade2-dev&lt;br /&gt;
&lt;br /&gt;
=== Tcl/Tk ===&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install tcl-dev&lt;br /&gt;
&lt;br /&gt;
Also the some utils are required to compile and  install Ivy.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install xutils-dev&lt;br /&gt;
&lt;br /&gt;
=== Make ===&lt;br /&gt;
&lt;br /&gt;
GNU Make is an utility which controls the generation of executables and other target files of a program from the program's source files. &lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install make&lt;br /&gt;
&lt;br /&gt;
=== Build essential ===&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install build-essential&lt;br /&gt;
&lt;br /&gt;
=== Libtool ===&lt;br /&gt;
&lt;br /&gt;
GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries behind a consistent, portable interface. Creating the files for Paparazzi software building becomes less cumbersome by using this tool.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libtool&lt;br /&gt;
&lt;br /&gt;
=== libpcre3-dev ===&lt;br /&gt;
&lt;br /&gt;
Required for compiling Ivy-C.&lt;br /&gt;
&lt;br /&gt;
 $ apt-get install libpcre3-dev&lt;br /&gt;
&lt;br /&gt;
=== Git Client ===&lt;br /&gt;
&lt;br /&gt;
Git is a version control system. Version control systems allow many individuals to collaborate on the Paparazzi source code. This is needed to retrieve the latest sourcecode from various packages and Paparazzi sourcecode itself.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install git&lt;br /&gt;
&lt;br /&gt;
=== Subversion ===&lt;br /&gt;
&lt;br /&gt;
Version control system, required for cloning the ivy packages.&lt;br /&gt;
&lt;br /&gt;
 $ apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
=== GNU Plot ===&lt;br /&gt;
&lt;br /&gt;
A command-line driven interactive plotting program. Unknow if it is used&lt;br /&gt;
 &lt;br /&gt;
 $ sudo apt-get install gnuplot&lt;br /&gt;
&lt;br /&gt;
=== Meld ===&lt;br /&gt;
&lt;br /&gt;
Meld is a graphical front end to the diff program. It provides a side-by-side view of the differences between two files. It is used by the Paparazzi Center when configuration changes are not yet saved and the option comes along where one either can keep or view changes made in aircraft- and other configuration files.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install meld&lt;br /&gt;
&lt;br /&gt;
=== FTDI library ===&lt;br /&gt;
&lt;br /&gt;
libftdi is a library that talks to FTDI's 232 type chips, including the popular bitbang mode, using libusb. A library to be able to use with a debugging Autopilot hardware boards.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libftdi-dev &lt;br /&gt;
&lt;br /&gt;
=== MPFR library ===&lt;br /&gt;
&lt;br /&gt;
The MPFR library is a C library for multiple-precision floating-point computations with correct rounding. MPFR is based on the GMP multiple-precision library. The main goal of MPFR is to provide a library for multiple-precision floating-point computation which is both efficient and has a well-defined semantics.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libmpfr-dev&lt;br /&gt;
&lt;br /&gt;
=== ImageMagick ===&lt;br /&gt;
&lt;br /&gt;
ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. Being able to modify image based map pictures is a feature that may come in handy one time.&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install imagemagick&lt;br /&gt;
&lt;br /&gt;
=== Optional on an older OS ===&lt;br /&gt;
&lt;br /&gt;
If you have an older OS distribution it never hurts to install the following...&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install libx11-6 libx11-dev texinfo libncurses5 libncursesw5 libncursesw5-dev zlibc&lt;br /&gt;
&lt;br /&gt;
== Paparazzi Main sourcecode ==&lt;br /&gt;
&lt;br /&gt;
See the main [[Installation#Getting_the_Source_Code]] page&lt;br /&gt;
&lt;br /&gt;
TIP: &lt;br /&gt;
If you get the File &amp;quot;pprz.mli&amp;quot;, line 149, characters 78-89: Error: Unbound type constructor Ivy.binding&lt;br /&gt;
...this happens when IVY libraries are not yet installed. How to do this, read the part on installing IVY on this page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Useful links ==&lt;br /&gt;
&lt;br /&gt;
https://launchpad.net/gcc-arm-embedded/&lt;br /&gt;
&lt;br /&gt;
https://github.com/paparazzi/paparazzi-portability-support&lt;br /&gt;
&lt;br /&gt;
http://wiki.ubuntuusers.de/GNU_arm-toolchain&lt;br /&gt;
&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/ARM-Options.html#ARM-Options&lt;br /&gt;
&lt;br /&gt;
http://mcuprogramming.com/forum/arm/gnu-arm-toolchain-installer/&lt;br /&gt;
&lt;br /&gt;
http://www.ethernut.de/en/documents/cross-toolchain-osx.html&lt;br /&gt;
&lt;br /&gt;
http://www.hermann-uwe.de/blog/building-an-arm-cross-toolchain-with-binutils-gcc-newlib-and-gdb-from-source&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:Developer_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=New_Gaia&amp;diff=23431</id>
		<title>New Gaia</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=New_Gaia&amp;diff=23431"/>
		<updated>2017-01-05T20:35:28Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* The project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Webpage currently incomplete)&lt;br /&gt;
&lt;br /&gt;
New Gaia is an update of the current gaia agent.&lt;br /&gt;
&lt;br /&gt;
This system has been developed by an ENAC team of 4 students from the IENAC10S promo. It enables one to generate a complex environment with several meteorological phenomena.&lt;br /&gt;
&lt;br /&gt;
= Presentation =&lt;br /&gt;
&lt;br /&gt;
== Functionalities ==&lt;br /&gt;
&lt;br /&gt;
Fully connected to the Paparazzi simulator through the IVY middleware, New Gaia allows the user to add elements of a realistic meteorological environment to the current simulation thanks to an adapted GUI. The initial version of the program proposes three meteorological phenomena : thermal columns, turbulences and a vertical profile. Also are all the parameters of the simulation taken into account in order to offer the most complete customization capability : several UAVs, geographic coordinates, the background map, etc.&lt;br /&gt;
&lt;br /&gt;
The models of the phenomena have been chosen based on two characteritics that are the way they can represent reality and a low resources need. For more details, please check the documentation.&lt;br /&gt;
&lt;br /&gt;
Finally some misc have been implemented to reuse the functionalities of the current gaia agent like the simulation speed control.&lt;br /&gt;
&lt;br /&gt;
== The project ==&lt;br /&gt;
&lt;br /&gt;
It has been a two-month long project proposed by the ENAC micro-drones lab to the 2nd year of the IENAC S formation, and designed within the ENAC infrastructures in Toulouse. To know more about us, please check [[New_Gaia#About_us]].&lt;br /&gt;
&lt;br /&gt;
= How to get New Gaia ? =&lt;br /&gt;
&lt;br /&gt;
The installation described here is for debian-like systems (typically Ubuntu). Thank you for sharing your experience on others systems!&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
In order to compile the files with the included makefile, you need JDK 1.6.0_24. And in order to run the file, you need the JRE 1.6.0_24 (included in the JDK). They can be found at [http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html].&lt;br /&gt;
&lt;br /&gt;
Please note that New_Gaia uses JDOM version 2.0.1 to generate XML files and the ivy package designed for java. They are included as jar files in the application, so you don't have to download them.&lt;br /&gt;
&lt;br /&gt;
== The source code ==&lt;br /&gt;
Get the [https://github.com/paparazzi/new_gaia source code] from our Github repository.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
To compile the files, we wrote a makefile for you. Simply enter &amp;quot;make&amp;quot; to do so.&lt;br /&gt;
&lt;br /&gt;
= How to use New Gaia ? =&lt;br /&gt;
&lt;br /&gt;
== Finding the maps files ==&lt;br /&gt;
New_Gaia can display a background that helps (a lot) to set the thermal columns where one wants. To do so, New_Gaia uses the same files that Paparazzi. That's why the background must be filled thanks to Paparazzi before it can be used by New_Gaia. (These .jpg files are located in the /var/maps directory of Paparazzi)&lt;br /&gt;
&lt;br /&gt;
== Finding the SRTM files ==&lt;br /&gt;
The SRTM files used to determine the influence of the terrain on the meteorological phenomena can be found at [http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/]&lt;br /&gt;
&lt;br /&gt;
== Executing the application ==&lt;br /&gt;
Once the application is compilated, you can run it with the command &amp;quot;make run&amp;quot;. As a student project, this application doesn't appear in the &amp;quot;Tools&amp;quot; menu of Paparazzi, that's why it's necessary to run it manually in a terminal.&lt;br /&gt;
&lt;br /&gt;
New_Gaia handles three main meteorological phenomena : thermal columns, the wind and turbulences. Each phenomenon can be customized thanks to the interface :&lt;br /&gt;
&lt;br /&gt;
[[File:Phenomenes.png|900px]]&lt;br /&gt;
&lt;br /&gt;
=== Thermal Columns ===&lt;br /&gt;
&lt;br /&gt;
Let's begin with the thermal columns. To create a thermal column, click on the appropriate button and click somewhere on the map : a column with its initial parameters is created.&lt;br /&gt;
As you can see on the properties panel on the right, a lateral view of the column is displayed. Two areas are shown : a gray one, in which up-wind blows and a white one in which down-wind blows. Please note that the &amp;quot;radius&amp;quot; of a column refers to the radius of its up-wind area.&lt;br /&gt;
&lt;br /&gt;
[[File:Thermal_column.png|900px]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Maximum Vertical Speed&amp;quot; property refers to the speed of the wind at the center of the thermal column, this speed decreases then and becomes negative (down-wind area).&lt;br /&gt;
&lt;br /&gt;
You can set the radius of the thermal column thanks to the handler on the left of the column. The height of the column is then calculated : the larger the column is, the heigher it is.&lt;br /&gt;
&lt;br /&gt;
=== Verticale Profile ===&lt;br /&gt;
&lt;br /&gt;
The second meteorological phenomenon that can be set to customize the state ot the weather is the vertical profile. It represents the speed and direction of the wind functions of height.&lt;br /&gt;
&lt;br /&gt;
[[File:Vertical profile1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
The wind speed consists in a polylinear function linking the heighest point (or handler), the lowest point and the points you may create. Each point represents a height, a speed and a direction used to determine the wind functions of the heigth.&lt;br /&gt;
To create a new point, simply left click in the verticale profile area. To erase a point, right click on it. Please note that the highest and lowest points can't be erased. Except of the heighest point, a point's height can't be modified. If the height of a point doesn't satisfy you, erase it and create a new one. Nevertheless, a point's speed can be modified. To do so, move the point with a drag'n'drop.&lt;br /&gt;
&lt;br /&gt;
[[File:Vertical profile2.png|900px]]&lt;br /&gt;
&lt;br /&gt;
Finally, the layer of the atmosphere between 0 and 150m is influenced by the terrain and thus can't be modified.&lt;br /&gt;
&lt;br /&gt;
The following image is an example of a wind turning along the altitude from East to West :&lt;br /&gt;
&lt;br /&gt;
[[File:Vertical profile3.png|900px]]&lt;br /&gt;
&lt;br /&gt;
=== Turbulences ===&lt;br /&gt;
&lt;br /&gt;
The last meteorological phenomenon represents turbulences. This one is quite simple : it consists in random components added to the wind on the three axis. The level of turbulences is depicted by 4 values :&lt;br /&gt;
&lt;br /&gt;
*  0 = no turbulences&lt;br /&gt;
*  1 = low turbulences&lt;br /&gt;
*  2 = medium turbulences&lt;br /&gt;
*  3 = severe turbulences&lt;br /&gt;
&lt;br /&gt;
[[File:Turbulences.png|900px]]&lt;br /&gt;
&lt;br /&gt;
= About us =&lt;br /&gt;
&lt;br /&gt;
The team is composed by four students from the IENAC10S promo :&lt;br /&gt;
&lt;br /&gt;
* BENREJEB Ons, developer,&lt;br /&gt;
* OTT Alexandra, developer,&lt;br /&gt;
* CARRIERE Sébastien, developer,&lt;br /&gt;
* EBRO Hugo, project lead, developer.&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=New_Gaia&amp;diff=23430</id>
		<title>New Gaia</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=New_Gaia&amp;diff=23430"/>
		<updated>2017-01-05T20:35:13Z</updated>

		<summary type="html">&lt;p&gt;Flixr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Webpage currently incomplete)&lt;br /&gt;
&lt;br /&gt;
New Gaia is an update of the current gaia agent.&lt;br /&gt;
&lt;br /&gt;
This system has been developed by an ENAC team of 4 students from the IENAC10S promo. It enables one to generate a complex environment with several meteorological phenomena.&lt;br /&gt;
&lt;br /&gt;
= Presentation =&lt;br /&gt;
&lt;br /&gt;
== Functionalities ==&lt;br /&gt;
&lt;br /&gt;
Fully connected to the Paparazzi simulator through the IVY middleware, New Gaia allows the user to add elements of a realistic meteorological environment to the current simulation thanks to an adapted GUI. The initial version of the program proposes three meteorological phenomena : thermal columns, turbulences and a vertical profile. Also are all the parameters of the simulation taken into account in order to offer the most complete customization capability : several UAVs, geographic coordinates, the background map, etc.&lt;br /&gt;
&lt;br /&gt;
The models of the phenomena have been chosen based on two characteritics that are the way they can represent reality and a low resources need. For more details, please check the documentation.&lt;br /&gt;
&lt;br /&gt;
Finally some misc have been implemented to reuse the functionalities of the current gaia agent like the simulation speed control.&lt;br /&gt;
&lt;br /&gt;
== The project ==&lt;br /&gt;
&lt;br /&gt;
It has been a two-month long project proposed by the ENAC micro-drones lab to the 2nd year of the IENAC S formation, and designed within the ENAC infrastructures in Toulouse. To know more about us, please check [[[New_Gaia#About_us]].&lt;br /&gt;
&lt;br /&gt;
= How to get New Gaia ? =&lt;br /&gt;
&lt;br /&gt;
The installation described here is for debian-like systems (typically Ubuntu). Thank you for sharing your experience on others systems!&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
In order to compile the files with the included makefile, you need JDK 1.6.0_24. And in order to run the file, you need the JRE 1.6.0_24 (included in the JDK). They can be found at [http://www.oracle.com/technetwork/java/javase/downloads/jdk6-downloads-1637591.html].&lt;br /&gt;
&lt;br /&gt;
Please note that New_Gaia uses JDOM version 2.0.1 to generate XML files and the ivy package designed for java. They are included as jar files in the application, so you don't have to download them.&lt;br /&gt;
&lt;br /&gt;
== The source code ==&lt;br /&gt;
Get the [https://github.com/paparazzi/new_gaia source code] from our Github repository.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
To compile the files, we wrote a makefile for you. Simply enter &amp;quot;make&amp;quot; to do so.&lt;br /&gt;
&lt;br /&gt;
= How to use New Gaia ? =&lt;br /&gt;
&lt;br /&gt;
== Finding the maps files ==&lt;br /&gt;
New_Gaia can display a background that helps (a lot) to set the thermal columns where one wants. To do so, New_Gaia uses the same files that Paparazzi. That's why the background must be filled thanks to Paparazzi before it can be used by New_Gaia. (These .jpg files are located in the /var/maps directory of Paparazzi)&lt;br /&gt;
&lt;br /&gt;
== Finding the SRTM files ==&lt;br /&gt;
The SRTM files used to determine the influence of the terrain on the meteorological phenomena can be found at [http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/]&lt;br /&gt;
&lt;br /&gt;
== Executing the application ==&lt;br /&gt;
Once the application is compilated, you can run it with the command &amp;quot;make run&amp;quot;. As a student project, this application doesn't appear in the &amp;quot;Tools&amp;quot; menu of Paparazzi, that's why it's necessary to run it manually in a terminal.&lt;br /&gt;
&lt;br /&gt;
New_Gaia handles three main meteorological phenomena : thermal columns, the wind and turbulences. Each phenomenon can be customized thanks to the interface :&lt;br /&gt;
&lt;br /&gt;
[[File:Phenomenes.png|900px]]&lt;br /&gt;
&lt;br /&gt;
=== Thermal Columns ===&lt;br /&gt;
&lt;br /&gt;
Let's begin with the thermal columns. To create a thermal column, click on the appropriate button and click somewhere on the map : a column with its initial parameters is created.&lt;br /&gt;
As you can see on the properties panel on the right, a lateral view of the column is displayed. Two areas are shown : a gray one, in which up-wind blows and a white one in which down-wind blows. Please note that the &amp;quot;radius&amp;quot; of a column refers to the radius of its up-wind area.&lt;br /&gt;
&lt;br /&gt;
[[File:Thermal_column.png|900px]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Maximum Vertical Speed&amp;quot; property refers to the speed of the wind at the center of the thermal column, this speed decreases then and becomes negative (down-wind area).&lt;br /&gt;
&lt;br /&gt;
You can set the radius of the thermal column thanks to the handler on the left of the column. The height of the column is then calculated : the larger the column is, the heigher it is.&lt;br /&gt;
&lt;br /&gt;
=== Verticale Profile ===&lt;br /&gt;
&lt;br /&gt;
The second meteorological phenomenon that can be set to customize the state ot the weather is the vertical profile. It represents the speed and direction of the wind functions of height.&lt;br /&gt;
&lt;br /&gt;
[[File:Vertical profile1.png|900px]]&lt;br /&gt;
&lt;br /&gt;
The wind speed consists in a polylinear function linking the heighest point (or handler), the lowest point and the points you may create. Each point represents a height, a speed and a direction used to determine the wind functions of the heigth.&lt;br /&gt;
To create a new point, simply left click in the verticale profile area. To erase a point, right click on it. Please note that the highest and lowest points can't be erased. Except of the heighest point, a point's height can't be modified. If the height of a point doesn't satisfy you, erase it and create a new one. Nevertheless, a point's speed can be modified. To do so, move the point with a drag'n'drop.&lt;br /&gt;
&lt;br /&gt;
[[File:Vertical profile2.png|900px]]&lt;br /&gt;
&lt;br /&gt;
Finally, the layer of the atmosphere between 0 and 150m is influenced by the terrain and thus can't be modified.&lt;br /&gt;
&lt;br /&gt;
The following image is an example of a wind turning along the altitude from East to West :&lt;br /&gt;
&lt;br /&gt;
[[File:Vertical profile3.png|900px]]&lt;br /&gt;
&lt;br /&gt;
=== Turbulences ===&lt;br /&gt;
&lt;br /&gt;
The last meteorological phenomenon represents turbulences. This one is quite simple : it consists in random components added to the wind on the three axis. The level of turbulences is depicted by 4 values :&lt;br /&gt;
&lt;br /&gt;
*  0 = no turbulences&lt;br /&gt;
*  1 = low turbulences&lt;br /&gt;
*  2 = medium turbulences&lt;br /&gt;
*  3 = severe turbulences&lt;br /&gt;
&lt;br /&gt;
[[File:Turbulences.png|900px]]&lt;br /&gt;
&lt;br /&gt;
= About us =&lt;br /&gt;
&lt;br /&gt;
The team is composed by four students from the IENAC10S promo :&lt;br /&gt;
&lt;br /&gt;
* BENREJEB Ons, developer,&lt;br /&gt;
* OTT Alexandra, developer,&lt;br /&gt;
* CARRIERE Sébastien, developer,&lt;br /&gt;
* EBRO Hugo, project lead, developer.&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Bebop&amp;diff=23427</id>
		<title>Bebop</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Bebop&amp;diff=23427"/>
		<updated>2016-12-27T08:58:28Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Video */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float: right; width: 15%&amp;quot;&amp;gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Autopilots&amp;lt;/categorytree&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; width: 45%; overflow: hidden&amp;quot;&amp;gt;[[Image:Parrot-bebop-drone-new-03.jpeg|right|500px|Parrot Bebop]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; width: 40%&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
By default the [http://www.parrot.com/usa/products/bebop-drone/ Bebop] from [http://www.parrot.com/ Parrot] is a Wifi controlled flying quadrotor, designed to be controlled with an Android or iOS device. &lt;br /&gt;
&lt;br /&gt;
'''No more restrictions''' as from now; with a few simple clicks you can '''run Paparazzi on the Bebop''' and have full autonomous flight and much more!&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
What you need: &lt;br /&gt;
# A bebop drone (1 or 2) with the newest firmware &lt;br /&gt;
# A joystick (example: http://www.hobbyking.com/hobbyking/store/__20951__Hobbyking_6CH_RC_Flight_Simulator_System_Mode_2_.html&lt;br /&gt;
# A laptop with Ubuntu, or a virtual box. You can download one here: https://mega.nz/#!1JpTiTjS!GdAHpa-_FAQAFPNypp3a3Up0B0yo1kYLXi3YLMXSAoo}. The password for this virtual box is &amp;quot;mavlabcourse&amp;quot; (the same as the username). &lt;br /&gt;
&lt;br /&gt;
Steps you will need to follow: &lt;br /&gt;
# Install Paparazzi: http://wiki.paparazziuav.org/wiki/Installation . This is already done on the provided virtual box&lt;br /&gt;
# Start paparazzi with the default configuration&lt;br /&gt;
# Power up your Bebop.&lt;br /&gt;
# If you have a Bebop 2 or a Bebop 1 with firmware v3.2.0 or higher press the '''on/off button four times''' in short fast after powerup&lt;br /&gt;
# Make a Wifi connection with your PC and the Bebop &lt;br /&gt;
# In the Paparazzi center choose &amp;quot;Bebop&amp;quot; Or &amp;quot;Bebop2&amp;quot; in the airframe dropdown menu&lt;br /&gt;
# Press &amp;quot;Upload&amp;quot;&lt;br /&gt;
# Select Flight UDP in the session menu&lt;br /&gt;
# Press execute&lt;br /&gt;
&lt;br /&gt;
Voila, you will get telemetry from the Bebop. Now it is up to you how and where to fly.&lt;br /&gt;
Useful things to watch are: &lt;br /&gt;
# The video series here: https://www.youtube.com/watch?v=eojAPZvT1Ck . Although it is made for the ARDrone the steps are very similar for the bebop drone. &lt;br /&gt;
# This site has several documents on how to program something for your drone:  http://mavlabcourse.tk/  . Although these documents assume you have an indoor flight area, you can also fly outside with the internal GPS of the Bebop. &lt;br /&gt;
&lt;br /&gt;
Do you need help with any of the steps? Please visit us at https://gitter.im/paparazzi/discuss&lt;br /&gt;
&lt;br /&gt;
= Features =&lt;br /&gt;
== Connectivity ==&lt;br /&gt;
* Wi-Fi antennas: MIMO dual-band with 2 double-set of dipole antennas for 2.4 and 5 GHz&lt;br /&gt;
* Sending power: Up to 26 dBm&lt;br /&gt;
* Signal range: N/A&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
* 4 Brushless Outrunner motors&lt;br /&gt;
* Glass fiber reinforced (15%) ABS structure&lt;br /&gt;
* High-resistance EPP outdoor hull: Clip and unclip easily to adapt to indoor and outdoor flight, protects the propellers against potential bumps, can be removed to reduce wind factor&lt;br /&gt;
* Three-blade auto-block propellers in Polycarbonate with fast disassembly system&lt;br /&gt;
* Anti-vibration bumpers&lt;br /&gt;
&lt;br /&gt;
=== Full Motor details ===&lt;br /&gt;
&lt;br /&gt;
In case for a simor motor model&lt;br /&gt;
&lt;br /&gt;
* Magnets: 12&lt;br /&gt;
* Stators: 9&lt;br /&gt;
* Layers of stator metal: 15&lt;br /&gt;
&lt;br /&gt;
* Copper windings: 34&lt;br /&gt;
* Copper diameter: 0.29mm&lt;br /&gt;
* Copper resistance: over 50 cm wire ~0.3 ohm&lt;br /&gt;
&lt;br /&gt;
Dimentions:&lt;br /&gt;
* Flange height 7.67mm&lt;br /&gt;
* Flange dia22.7mm&lt;br /&gt;
* Axis length 19.4mm&lt;br /&gt;
* Axis dia 1.9 mm&lt;br /&gt;
* Statorheight 5.55mm&lt;br /&gt;
* Stator diam 18.33mm&lt;br /&gt;
&lt;br /&gt;
Weight:&lt;br /&gt;
* Flange weight 3.05g&lt;br /&gt;
* Flange and magnets 5.15g (Magnet ~ 1.5mm thick on a Flange dia22.7mm)&lt;br /&gt;
* Magnet only (and the glue) 2.1g&lt;br /&gt;
&lt;br /&gt;
== Camera ==&lt;br /&gt;
* Camera with &amp;quot;Fisheye&amp;quot; lens 180° 1/2,3&amp;quot;: 6 optical elements and 14 Mega pixels sensor&lt;br /&gt;
* Video stabilization: Digital on 3-axes&lt;br /&gt;
* Video definition: 1920x1080p (30fps)&lt;br /&gt;
* Photo definition: 3800x3188 pixels&lt;br /&gt;
* Video encoding: H264&lt;br /&gt;
* Photo file format: RAW, DNG&lt;br /&gt;
* Internal memory: Flash 8 GB&lt;br /&gt;
* Extended memory: Micro USB&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
* Lithium Polymer 1200 mAh&lt;br /&gt;
* Flight time: Around 12 minutes&lt;br /&gt;
&lt;br /&gt;
== Processor ==&lt;br /&gt;
* Motherboard:&lt;br /&gt;
** Parrot P7 dual-core CPU Cortex A9&lt;br /&gt;
** Quad core GPU&lt;br /&gt;
** 8Gb flash memory&lt;br /&gt;
* All fixed on a magnesium shelf that acts as electromagnetic shielding and in the same run as a heat sink for heat dissipation and cooling of the all the onboard processors&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
* 3-axes magnetometer (AKM 8963)&lt;br /&gt;
* 3-axes gyroscope (MPU 6050)&lt;br /&gt;
* 3-axes accelerometer (MPU 6050)&lt;br /&gt;
* Optical-flow sensor (Fig.8): Vertical stabilization camera (Every 16 milliseconds, an image of the ground is taken and compared to the previous one to determine the speed of the Bebop Drone)&lt;br /&gt;
* Ultrasound sensor (Analyzes the flight altitude up to 8 meters)&lt;br /&gt;
* Pressure sensor (MS 5607)&lt;br /&gt;
&lt;br /&gt;
== Geo-location ==&lt;br /&gt;
* GNSS (GPS + GLONASS + Galileo, [http://www.furuno.com/en/products/gnss-module/GN-87 Furuno GN-87F])&lt;br /&gt;
&lt;br /&gt;
== Dimensions ==&lt;br /&gt;
* 28x32x3.6cm without the hull&lt;br /&gt;
* 33x38x3.6cm with the hull&lt;br /&gt;
&lt;br /&gt;
== Weight ==&lt;br /&gt;
* 380g without the hull&lt;br /&gt;
* 400g with the hull&lt;br /&gt;
&lt;br /&gt;
== OS/Software ==&lt;br /&gt;
* Operating system: Linux (kernel 3.4.11 #3 SMP PREEMPT)&lt;br /&gt;
* glibc: (Sourcery CodeBench Lite 2012.03-57) 2.15&lt;br /&gt;
* libstdc++: GLIBCXX_3.4 - GLIBCXX_3.4.16&lt;br /&gt;
&lt;br /&gt;
= Pinout =&lt;br /&gt;
== GPIO ==&lt;br /&gt;
* 6			Fans Enable&lt;br /&gt;
* 9			WiFi Reset&lt;br /&gt;
* 73			P7MU IRQ&lt;br /&gt;
* 81			GPS Power Enable&lt;br /&gt;
* 85			Fan Enable&lt;br /&gt;
* 89			VCAM FSYNC gyro&lt;br /&gt;
* 90			HCAM FSYNC gyro&lt;br /&gt;
* 91			DRDY MPU6050&lt;br /&gt;
* 124			Magneto interrupt&lt;br /&gt;
* 128			(video) Slew rate??&lt;br /&gt;
* 129		VCAM enable&lt;br /&gt;
* 130			(video) Slew rate??&lt;br /&gt;
* 132		HCAM enable&lt;br /&gt;
* 199		BLDC micro-controller reset (forces it into bootloader) ON/OFF&lt;br /&gt;
* 200		US Pulse level&lt;br /&gt;
* 201		On/Off button (default monitor to files running: /bin/onoffbutton)&lt;br /&gt;
* 202		USB Host mode pin 3V3 (HOST_MODE_3V3)&lt;br /&gt;
* 203		USB Host mode on&lt;br /&gt;
* 204		USB0 OC&lt;br /&gt;
&lt;br /&gt;
== PWM ==&lt;br /&gt;
* 6			Heating resistor for warming IMU sensors (125000ns period, 0ns duty)&lt;br /&gt;
* 8			MPU6050 clock (31510ns period, 15258ns duty) Desired frequency is 32768kHz with 50% duty cycle (period=30517us). Period was set empirically to 31517 to get a 5ms data ready period. Desired frequency is slightly modified to synchronize camera and IMU&lt;br /&gt;
* 9			Vertical camera clock (23ns period = 43MHz)&lt;br /&gt;
* 11			Horizontal camera lock (77ns period = 13MHz)&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
* I2C-0&lt;br /&gt;
** FPGA&lt;br /&gt;
** P7MU          &lt;br /&gt;
** EEPROM     Unknown EEPROM for Front camera calibration (addr 0x55)&lt;br /&gt;
** MT9f002      CMOS Digital Image Sensor (1/2.3 inch 14Mp, front camera) [http://www.onsemi.com/PowerSolutions/product.do?id=MT9F002 MT9f002] (addr 0x10)&lt;br /&gt;
** MT9v117     CMOS Digital Image Sensor (1/6 inch VGA, bottom camera) [http://www.aptina.com/assets/downloadDocument.do?id=553 MT9v117] (addr 0x5d)&lt;br /&gt;
* I2C-1&lt;br /&gt;
** Cypress       Motor Controller (Parrot BLDC) [[Bebop/BLDC]] (addr 0x08)&lt;br /&gt;
** AKM8963    Magnetometer [http://www.akm.com/akm/en/file/datasheet/AK8963.pdf AK8963]&lt;br /&gt;
** MS5607      Barometer [http://meas-spec.com/product/pressure/MS5607-02BA03.aspx MS5607]&lt;br /&gt;
* I2C-2&lt;br /&gt;
** MPU6050    Gyro + Accel [http://invensense.com/mems/gyro/documents/RM-MPU-6000A.pdf MPU6050] (rotation changed in version 2)&lt;br /&gt;
&lt;br /&gt;
== SPI ==&lt;br /&gt;
* spidev1.0 Sonar (Only data pin connected for generating pulses)&lt;br /&gt;
&lt;br /&gt;
== UART ==&lt;br /&gt;
* ttyPA1          GPS (Furuno GN-87F on v1 and Ublox Neo M8N on v2)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* /dev/hx280 Hantro (On2) Video encoder. Hantro chip video encoder used for the HCAM.&lt;br /&gt;
* /sys/bus/iio/devices/iio:device0 (p7mu-adc_2) Sonar ADC&lt;br /&gt;
&lt;br /&gt;
=  Actuators =&lt;br /&gt;
The Bebop has 4 Brushless motors, which are controlled by the cypress chip on I2C-1. This Cypress chip contains custom made firmware(BLDC) by Parrot, which can be automatically updated using a bootloader in the ESC part of the mainboard.&lt;br /&gt;
The firmware from Parrot contains a nice closed loop RPM control, which is automatically tuned inside the factory. &lt;br /&gt;
Since version 2 Parrot changed the order and rotation direction of the motors.&lt;br /&gt;
&lt;br /&gt;
For more information about how to communicate with the BLDC look at [[Bebop/BLDC]]. Or take a look at the &amp;quot;bebop&amp;quot; actuator inside the &amp;lt;code&amp;gt;airborne/boards/bebop/&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
= Onboard applications =&lt;br /&gt;
&lt;br /&gt;
The original programs on the Bebop&lt;br /&gt;
&lt;br /&gt;
* /usr/bin/dragon-prog		Main program that controls the drone&lt;br /&gt;
* /bin/watchdog.sh			Checks if Dragon is still running and reboots dragon-prog if it somehow would not be running anymore &lt;br /&gt;
&lt;br /&gt;
* BLDC_Test_Bench				Controls the Brushless Motor Controllers for testing and playing sounds etc.&lt;br /&gt;
* bcmwl						Everything with wifi&lt;br /&gt;
* diagnostic					Outputs sensor diagnostic&lt;br /&gt;
* mk3_camera_eeprom                     Reads the front camera EEPROM&lt;br /&gt;
* config_mt9v117                              Configure the bottom camera&lt;br /&gt;
&lt;br /&gt;
= Cross compiler =&lt;br /&gt;
For the Bebop you need to use a recent version GNU gcc-arm-linux-gnueabi (Ubuntu/Linaro 4.7.4-2ubuntu1) 4.7.4 provided with Ubuntu since 14.04 LTS.&lt;br /&gt;
&lt;br /&gt;
[http://electronics.stackexchange.com/questions/21594/is-code-sourcery-g-lite-still-a-viable-projectIn the past you could also crosscompile with Sourcery CodeBench Lite 2012.03-57 for ARM GNU/Linux from &amp;lt;s&amp;gt;Greedy&amp;lt;/s&amp;gt; Mentor Graphics, previously called codesourcery. However the open'ness there is nowhere to be found anymore, so we'll say &amp;quot;No thanks&amp;quot; to Codesourcery ,now &amp;lt;s&amp;gt;Greedy&amp;lt;/s&amp;gt; Mentor&amp;quot;]&lt;br /&gt;
but if you [http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2012.03-57-arm-none-linux-gnueabi.bin insist] , feel &amp;lt;s&amp;gt;free&amp;lt;/s&amp;gt; restricted.&lt;br /&gt;
&lt;br /&gt;
= Tips &amp;amp; Tricks =&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
Make sure the [http://docs.paparazziuav.org/latest/module__video_rtp_stream.html video_rtp_stream.xml] module enabled in the airframe. &lt;br /&gt;
Receive a video stream with e.g. avplay, vlc or a python app:	&lt;br /&gt;
 $ avplay -loglevel quiet -max_delay 50 -fflags nobuffer rtp://192.168.42.1:5000&lt;br /&gt;
 $ vlc ~/paparazzi/var/sdp_tmp/192.168.42.1/stream.sdp&lt;br /&gt;
 $ ~/paparazzi/sw/tools/rtp_viewer/rtp_viewer.py&lt;br /&gt;
&lt;br /&gt;
== Factory Reset ==&lt;br /&gt;
You can reset the Parrot Bebop Drone to factory settings. You '''will''' loose all your photos and movies recorded on your Bebop.&lt;br /&gt;
To do this you need to press and hold the power button for 10 seconds. The LED will blink green and orange for a while, then green and the drone will shutdown.&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
It is not important which firmware you use for Paparazzi to fly. Note that we test flew the Bebop with Firmware v1.98.11 and v2.0.57&lt;br /&gt;
&lt;br /&gt;
Note that  v3.2.0 is the latest Firmware know as of 20160413 and PPRZ video stream does not work. Feel free to fix it and make a pull request.&lt;br /&gt;
If even newer firmware is available please report any (if any) issues found related to the firmware.&lt;br /&gt;
&lt;br /&gt;
= Using the MicroUSB for serial data =&lt;br /&gt;
&lt;br /&gt;
The Bebop has this tiny USB connector just above the power button. This USB connector can also be used with help of a USB to Serial FTDI conversion board.&lt;br /&gt;
To use the driver in current firmware OTG serving should be off. More information, photos, connection examples, sourcode and real life example of how to use this port.&lt;br /&gt;
&lt;br /&gt;
[[Category:Autopilots]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Pixhawk&amp;diff=23422</id>
		<title>Pixhawk</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Pixhawk&amp;diff=23422"/>
		<updated>2016-12-13T19:15:28Z</updated>

		<summary type="html">&lt;p&gt;Flixr: use wiki links!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float: right; width: 45%; overflow: hidden&amp;quot;&amp;gt;[[File:Pixhawk 1 v2.4.jpg|thumb|Pixhawk 1 v2.4]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Paparazzi on Pixhawk=&lt;br /&gt;
&lt;br /&gt;
The Pixhawk is an open hardware autopilot that was originally developed by ETHZ in the [https://pixhawk.ethz.ch/ PIXHAWK project]. Paparazzi now supports the Pixhawk and the firmware can be uploaded through the orignal PX4 custom bootloader, which happens directly through the USB port of the Pixhawk. This means that it is possible to easily switch between the Paparazzi AP and other projects that support the Pixhawk hardware (i.e. PX4 and APM). &lt;br /&gt;
&lt;br /&gt;
It is also possible to directly upload to the Pixhawk by means of the JTAG port, but this is not recommended as it involves soldering and permanently removes the PX4 bootloader (which means reverting to PX4 or APM firmware is complicated). Therefor, this wiki focuses on flashing through the PX4 bootloader.&lt;br /&gt;
&lt;br /&gt;
An step-by-step example on flying Paparazzi with a Pixhawk can be found on the [[Iris]] page.&lt;br /&gt;
&lt;br /&gt;
=Intro=&lt;br /&gt;
&lt;br /&gt;
This page is intended as a guide on how to get the Paparazzi autopilot running on a Pixhawk board. For the specifications and pin-out details we recommend to look at the [https://pixhawk.org/modules/pixhawk Pixhawk site]. Details on how to flash the board with Paparazzi can be found [[#Flashing|below]]. A complete step by step example on how to get a drone flying with Paparazzi + Pixhawk is provided with the [[Iris]] drone. A list of features that are currently (not) supported in Paparazzi can be found [[#Features|here]].&lt;br /&gt;
&lt;br /&gt;
The Pixhawk consists of the PX4IO (designed around a stm32f1) and the PX4FMU (designed around a stm32f4), which are glued together in one pcb. Uploading of the autopilot (which runs only on the PX4FMU) happens directly from computer over USB to the PX4FMU, by means of the PX4 bootloader. In the original PX4 and APM Pixhawk software, the compiled PX4IO code (which runs the Fly By Wire) is embedded with the PX4FMU code, and the PX4FMU code would flash the PX4IO board at startup. But, in Paparazzi, the PX4IO is flashed from the computer --&amp;gt; USB -&amp;gt; PX4FMU --&amp;gt; internal UART --&amp;gt; PX4IO, directly from Paparazzi Center. This means PX4IO board can be flashed without changing the autopilot, and vice versa.&lt;br /&gt;
&lt;br /&gt;
=Getting started=&lt;br /&gt;
&lt;br /&gt;
In short, the steps you'll need to run through are roughly the following:&lt;br /&gt;
&lt;br /&gt;
*1. Define your aircraft and settings for the Pixhawk (e.g. see the [https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/TUDELFT/tudelft_iris_indi.xml Iris airframe] )&lt;br /&gt;
*2. Connect the Pixhawk via USB to your computer, and upload the AP firmware&lt;br /&gt;
*3. Replug the USB, and upload the FBW code. Replug USB again.&lt;br /&gt;
&lt;br /&gt;
Details on steps 2 and 3 can be found in [[#Flashing|Flashing]]. Details on step 1 can be found [[#Airframe config|further below]].&lt;br /&gt;
&lt;br /&gt;
=Flashing=&lt;br /&gt;
[[File:Build AP.jpg|thumb|Figure 2; building the AP]]&lt;br /&gt;
[[File:Upload AP.jpg|thumb|Figure 3; flashing the AP]]&lt;br /&gt;
[[File:Build FBW.jpg|thumb|Figure 4; building the FBW]]&lt;br /&gt;
[[File:Upload FBW.jpg|thumb|Figure 5; flashing the FBW]]&lt;br /&gt;
&lt;br /&gt;
In order to flash the Pixhawk, both the AP (AutoPilot on the PX4FMU)  and the FBW (Fly By Wire on the PX4IO) have to be flashed. Paparazzi uses the default PX4 bootloader to upload and flash the code in both systems, but the FBW is flashed through the AP. This means that at least for the first time, the AP has to be flashed with Paparazzi first.&lt;br /&gt;
&lt;br /&gt;
* To flash the AP (See figure 2 and 3):&lt;br /&gt;
** Select your aircraft (1).&lt;br /&gt;
** Select the AP (2).&lt;br /&gt;
** Click the build button (3). &lt;br /&gt;
** After the compilation was completed successfully (4), plug in the USB cable to computer and the Pixhawk.&lt;br /&gt;
** After 5 seconds click upload (5). &lt;br /&gt;
** You should see &amp;quot;upload successful&amp;quot; (6). &lt;br /&gt;
&lt;br /&gt;
* To flash the FBW  (See figure 4 and 5): &lt;br /&gt;
** Select FBW (7).&lt;br /&gt;
** Click the build button (8).&lt;br /&gt;
** After the compilation was completed successfully (9), plug in the USB cable to computer and the Pixhawk.&lt;br /&gt;
** After 5 seconds click upload (10). &lt;br /&gt;
** You should see &amp;quot;upload successful&amp;quot; (11). &lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* After flashing the FBW, it is required to re-power the Pixhawk. &lt;br /&gt;
* The flashing of the FBW is disabled 20 seconds after power up. Re-power to reset the time. &lt;br /&gt;
* Whether the current code is APM, PX4 or Paparazzi, the flashing steps remain the same.&lt;br /&gt;
* In case of problems such as in figure 6, most of the time it can be solved by re-powering the Pixhawk (e.g. re-plugging the USB, and removing the battery), wait for 5 seconds for the computer to recognize the USB device, and click the upload button again.&lt;br /&gt;
&lt;br /&gt;
[[File:Upload problems.jpg|thumb|Figure 6; upload problems]]&lt;br /&gt;
&lt;br /&gt;
=Airframe config=&lt;br /&gt;
&lt;br /&gt;
In order to fly a drone with the Pixhawk system in paparazzi, some Pixhawk specific configuration is required. &lt;br /&gt;
&lt;br /&gt;
* Define seperate &amp;lt;firmware&amp;gt;'s for both the fbw and the ap:&lt;br /&gt;
{{Box Code|conf/airframes/&amp;lt;yourairframe&amp;gt;.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;target name=&amp;quot;ap&amp;quot; board=&amp;quot;px4fmu_2.4&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
And:&lt;br /&gt;
{{Box Code|conf/airframes/&amp;lt;yourairframe&amp;gt;.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;target name=&amp;quot;fbw&amp;quot; board=&amp;quot;px4io_2.4&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Configure the interMCU communication to use UART 6 at the AP:&lt;br /&gt;
{{Box Code|conf/airframes/&amp;lt;yourairframe&amp;gt;.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;module name=&amp;quot;intermcu&amp;quot; type=&amp;quot;uart&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;configure name=&amp;quot;INTERMCU_PORT&amp;quot; value=&amp;quot;UART6&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;configure name=&amp;quot;INTERMCU_BAUD&amp;quot; value=&amp;quot;B1500000&amp;quot; /&amp;gt; &amp;lt;!-- This is only during first 10s start up, afterwards it is set to 230400--&amp;gt;&lt;br /&gt;
&amp;lt;/module&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
And at the FBW:&lt;br /&gt;
{{Box Code|conf/airframes/&amp;lt;yourairframe&amp;gt;.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;INTERMCU_LOST_CNT&amp;quot; value=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;module name=&amp;quot;intermcu&amp;quot; type=&amp;quot;uart&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;configure name=&amp;quot;INTERMCU_PORT&amp;quot; value=&amp;quot;UART2&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;configure name=&amp;quot;INTERMCU_BAUD&amp;quot; value=&amp;quot;B1500000&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/module&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
Configuration of the baud at 1500000 is strongly recommended, as this will remain backwards compatible with the PX4 code and bootloader. However, in Paparazzi the baud rate is slowed down to 230400 10s after start up, as the Pixhawk hardware actually does not seem to support flawless data transfers at those speeds. At least not in Paparazzi.&lt;br /&gt;
*Define the IMU to be:&lt;br /&gt;
{{Box Code|conf/airframes/&amp;lt;yourairframe&amp;gt;.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;module name=&amp;quot;imu&amp;quot; type=&amp;quot;px4fmu_v2.4&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
Which uses the l3gd20 gyro and the lsm303d accelero. The Pixhawk has two IMU's, so alternatively you can also use the MPU6000 IMU:&lt;br /&gt;
{{Box Code|conf/airframes/&amp;lt;yourairframe&amp;gt;.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;module name=&amp;quot;imu&amp;quot; type=&amp;quot;mpu6000&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
*Add the px4_flash module:&lt;br /&gt;
{{Box Code|conf/airframes/&amp;lt;yourairframe&amp;gt;.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;modules main_freq=&amp;quot;512&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;module name=&amp;quot;px4_flash&amp;quot; /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
This enables uploading through the PX4 bootloading and activates the usb-serial device after startup.&lt;br /&gt;
&lt;br /&gt;
=Videos=&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|h44Np-O_X0w|200|left}} Paparazzi UAV Pixhawk support teaser - Video by the [http://mavlab.lr.tudelft.nl/ TU Delft MAVLab]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
&lt;br /&gt;
The features that are currently supported by Paparazzi are the following:&lt;br /&gt;
*The dual processor setup (main stm32f4 and co stm32f1 processor), in a AP (AutoPilot) + FBW (Fly By Wire)&lt;br /&gt;
*Dual IMU (selectable from airframe config)&lt;br /&gt;
**MPU6000, 3axis acc + gyro + magneto&lt;br /&gt;
**LSM303 3-axis acc + magneto, L3G 3-axis gyro&lt;br /&gt;
*External GPS + Magneto&lt;br /&gt;
*8+6 pwm outputs (8 on FBW, 6 on AP)&lt;br /&gt;
*Arm button led denotes mode info&lt;br /&gt;
*Spektrum RC, including binding through software&lt;br /&gt;
*PPM RC&lt;br /&gt;
&lt;br /&gt;
The features that are not yet supported by Paparazzi are the following:&lt;br /&gt;
*The multicolor led&lt;br /&gt;
*The buzzer&lt;br /&gt;
*The on-board arm button&lt;br /&gt;
*The SD card SDIO &lt;br /&gt;
*SBus out, RC downlink (e.g. gps info, battery info)&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Iris&amp;diff=23421</id>
		<title>Iris</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Iris&amp;diff=23421"/>
		<updated>2016-12-13T19:11:11Z</updated>

		<summary type="html">&lt;p&gt;Flixr: use wiki links!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Iris.jpg|thumb|The 3DR Iris+ with 3DR radio and 3DR RC receiver]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Iris+ drone was manufactured by 3DR and is based around the Pixhawk autopilot. Paparazzi [[Pixhawk|supports]] the Pixhawk hardware, and this page serves as simple step-by-step guide to get a Pixhawk based drone flying on with the Paparazzi autopilot. In this example, only standard Pixhawk hardware is used, as it comes delivered with the stock Iris.&lt;br /&gt;
&lt;br /&gt;
= Getting the Iris flight ready=&lt;br /&gt;
&lt;br /&gt;
You'll need:&lt;br /&gt;
# The stock Iris drone, (equipped with the Pixhawk), &lt;br /&gt;
# Its stock 3DR radio's and 3DR RC. &lt;br /&gt;
# The Pixhawk should still contain the PX4 / APM bootloader. &lt;br /&gt;
# A computer with Paparazzi [[Installation|installed]].&lt;br /&gt;
# A micro USB cable.&lt;br /&gt;
# Optional: the 3DR Tarrot Gimbal and a GoPro 3.&lt;br /&gt;
&lt;br /&gt;
Steps you will need to perform: &lt;br /&gt;
# Plug in the USB cable to the Iris. &amp;lt;b&amp;gt;Remove the props. Leave the battery disconnected.&amp;lt;/b&amp;gt;&lt;br /&gt;
# Flash both the AP and FBW. See [[Pixhawk#Flashing|here] ]&lt;br /&gt;
# Power cycle the Pixhawk (e.g. replug USB).&lt;br /&gt;
# Make sure to set the target to AP again, and build. Uploading is not necessary, this step is required to prevent md5 checksum errors.&lt;br /&gt;
# Plug in the 3DR radio to the computer. Select the &amp;lt;i&amp;gt;Flight USB0 @57600&amp;lt;/i&amp;gt; session in Paparazzi Center, and click execute. Paparazzi GCS will start.&lt;br /&gt;
# [[ImuCalibration|Calibrating the Magnetometer]] and [[#Calibrate the ESCs | calibrate the ESCs]] of the Iris+.&lt;br /&gt;
&lt;br /&gt;
==Calibrate the ESCs==&lt;br /&gt;
The original PX4 firmware calibrates the ESCs automatically, paparazzi does not support this. Therefor it is needed to calibrate the ESCs manually. For this two options are available:&lt;br /&gt;
* Calibrate by using a servo tester&lt;br /&gt;
* Calibrate using &amp;lt;i&amp;gt; mode RC direct&amp;lt;/i&amp;gt;&lt;br /&gt;
The first option requires the user to have a servo tester, open up the Iris+ and disconnect wires. Therefor, this wiki describes the second option.&lt;br /&gt;
&lt;br /&gt;
In order to use the &amp;lt;i&amp;gt;RC direct mode&amp;lt;/i&amp;gt;, a change is required in the airframe xml configuration. Comment or temporarily remove the following line:&lt;br /&gt;
{{Box Code|conf/airframes/TUDELFT/tudelft_iris_indi.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;FBW_MODE_AUTO_ONLY&amp;quot; value=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
Optionally: change the following lines in the section AUTOPILOT:&lt;br /&gt;
{{Box Code|conf/airframes/TUDELFT/tudelft_iris_indi.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;MODE_STARTUP&amp;quot; value=&amp;quot;AP_MODE_ATTITUDE_DIRECT&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;MODE_MANUAL&amp;quot; value=&amp;quot;AP_MODE_ATTITUDE_DIRECT&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
to:&lt;br /&gt;
{{Box Code|conf/airframes/TUDELFT/tudelft_iris_indi.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;MODE_STARTUP&amp;quot; value=&amp;quot;AP_MODE_RC_DIRECT&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;MODE_MANUAL&amp;quot; value=&amp;quot;AP_MODE_RC_DIRECT&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
This last step is not required, but properly communicates the new mode to the GCS software.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: for safety it is &amp;lt;i&amp;gt;strongly&amp;lt;/i&amp;gt; recommended to remove the propellers &amp;lt;/b&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3DRRC.jpg|thumb|Close up of the 3DR RC receiver. 1) The manual Kill switch. 2) The Gimbal control. 3) The mode switch.]]&lt;br /&gt;
Build and upload the FBW firmware, and if the optional steps were taken, also build and upload the AP. &lt;br /&gt;
&lt;br /&gt;
The system is now ready to calibrate the ESCs. Perform the following steps:&lt;br /&gt;
* Power off the Iris+&lt;br /&gt;
* On the RC&lt;br /&gt;
** Set the set radio mode (switch 3 in figure 2) to &amp;lt;i&amp;gt;std&amp;lt;/i&amp;gt;&lt;br /&gt;
** Disable manual kill by setting the kill switch (switch 1 in figure 2) to &amp;lt;i&amp;gt;on&amp;lt;/i&amp;gt;&lt;br /&gt;
** Put the throttle to max.&lt;br /&gt;
** Turn on the RC&lt;br /&gt;
* Plug in the usb cable to the Iris+. The AP can now boot. &lt;br /&gt;
* Wait approximately 10 seconds until the leds blinks slow (once per second).&lt;br /&gt;
* Plug in the battery to the Iris+ (with props removed!). You should hear a beep coming from the ESCs.&lt;br /&gt;
* On the RC, put the throttle to zero. You should hear confirmation beeps from the ESCs.&lt;br /&gt;
* Validate the range of the throttle stick by slowly throttling up to max. The motors should spin accordingly.&lt;br /&gt;
* Revert the changes made to the airframe xml, and upload the firmware(s).&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Iris&amp;diff=23420</id>
		<title>Iris</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Iris&amp;diff=23420"/>
		<updated>2016-12-13T19:09:43Z</updated>

		<summary type="html">&lt;p&gt;Flixr: use wiki links!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Iris.jpg|thumb|The 3DR Iris+ with 3DR radio and 3DR RC receiver]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Iris+ drone was manufactured by 3DR and is based around the Pixhawk autopilot. Paparazzi [[Pixhawk|supports]] the Pixhawk hardware, and this page serves as simple step-by-step guide to get a Pixhawk based drone flying on with the Paparazzi autopilot. In this example, only standard Pixhawk hardware is used, as it comes delivered with the stock Iris.&lt;br /&gt;
&lt;br /&gt;
= Getting the Iris flight ready=&lt;br /&gt;
&lt;br /&gt;
You'll need:&lt;br /&gt;
# The stock Iris drone, (equipped with the Pixhawk), &lt;br /&gt;
# Its stock 3DR radio's and 3DR RC. &lt;br /&gt;
# The Pixhawk should still contain the PX4 / APM bootloader. &lt;br /&gt;
# A computer with Paparazzi [http://wiki.paparazziuav.org/wiki/Installation installed].&lt;br /&gt;
# A micro USB cable.&lt;br /&gt;
# Optional: the 3DR Tarrot Gimbal and a GoPro 3.&lt;br /&gt;
&lt;br /&gt;
Steps you will need to perform: &lt;br /&gt;
# Plug in the USB cable to the Iris. &amp;lt;b&amp;gt;Remove the props. Leave the battery disconnected.&amp;lt;/b&amp;gt;&lt;br /&gt;
# Flash both the AP and FBW. See [https://wiki.paparazziuav.org/wiki/Pixhawk#Flashing here] &lt;br /&gt;
# Power cycle the Pixhawk (e.g. replug USB).&lt;br /&gt;
# Make sure to set the target to AP again, and build. Uploading is not necessary, this step is required to prevent md5 checksum errors.&lt;br /&gt;
# Plug in the 3DR radio to the computer. Select the &amp;lt;i&amp;gt;Flight USB0 @57600&amp;lt;/i&amp;gt; session in Paparazzi Center, and click execute. Paparazzi GCS will start.&lt;br /&gt;
# [https://wiki.paparazziuav.org/wiki/ImuCalibration Calibrating the Magnetometer] and [[#Calibrate the ESCs | calibrate the ESCs]] of the Iris+.&lt;br /&gt;
&lt;br /&gt;
==Calibrate the ESCs==&lt;br /&gt;
The original PX4 firmware calibrates the ESCs automatically, paparazzi does not support this. Therefor it is needed to calibrate the ESCs manually. For this two options are available:&lt;br /&gt;
* Calibrate by using a servo tester&lt;br /&gt;
* Calibrate using &amp;lt;i&amp;gt; mode RC direct&amp;lt;/i&amp;gt;&lt;br /&gt;
The first option requires the user to have a servo tester, open up the Iris+ and disconnect wires. Therefor, this wiki describes the second option.&lt;br /&gt;
&lt;br /&gt;
In order to use the &amp;lt;i&amp;gt;RC direct mode&amp;lt;/i&amp;gt;, a change is required in the airframe xml configuration. Comment or temporarily remove the following line:&lt;br /&gt;
{{Box Code|conf/airframes/TUDELFT/tudelft_iris_indi.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;FBW_MODE_AUTO_ONLY&amp;quot; value=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
Optionally: change the following lines in the section AUTOPILOT:&lt;br /&gt;
{{Box Code|conf/airframes/TUDELFT/tudelft_iris_indi.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;MODE_STARTUP&amp;quot; value=&amp;quot;AP_MODE_ATTITUDE_DIRECT&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;MODE_MANUAL&amp;quot; value=&amp;quot;AP_MODE_ATTITUDE_DIRECT&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
to:&lt;br /&gt;
{{Box Code|conf/airframes/TUDELFT/tudelft_iris_indi.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;MODE_STARTUP&amp;quot; value=&amp;quot;AP_MODE_RC_DIRECT&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;define name=&amp;quot;MODE_MANUAL&amp;quot; value=&amp;quot;AP_MODE_RC_DIRECT&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
This last step is not required, but properly communicates the new mode to the GCS software.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Important: for safety it is &amp;lt;i&amp;gt;strongly&amp;lt;/i&amp;gt; recommended to remove the propellers &amp;lt;/b&amp;gt; &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:3DRRC.jpg|thumb|Close up of the 3DR RC receiver. 1) The manual Kill switch. 2) The Gimbal control. 3) The mode switch.]]&lt;br /&gt;
Build and upload the FBW firmware, and if the optional steps were taken, also build and upload the AP. &lt;br /&gt;
&lt;br /&gt;
The system is now ready to calibrate the ESCs. Perform the following steps:&lt;br /&gt;
* Power off the Iris+&lt;br /&gt;
* On the RC&lt;br /&gt;
** Set the set radio mode (switch 3 in figure 2) to &amp;lt;i&amp;gt;std&amp;lt;/i&amp;gt;&lt;br /&gt;
** Disable manual kill by setting the kill switch (switch 1 in figure 2) to &amp;lt;i&amp;gt;on&amp;lt;/i&amp;gt;&lt;br /&gt;
** Put the throttle to max.&lt;br /&gt;
** Turn on the RC&lt;br /&gt;
* Plug in the usb cable to the Iris+. The AP can now boot. &lt;br /&gt;
* Wait approximately 10 seconds until the leds blinks slow (once per second).&lt;br /&gt;
* Plug in the battery to the Iris+ (with props removed!). You should hear a beep coming from the ESCs.&lt;br /&gt;
* On the RC, put the throttle to zero. You should hear confirmation beeps from the ESCs.&lt;br /&gt;
* Validate the range of the throttle stick by slowly throttling up to max. The motors should spin accordingly.&lt;br /&gt;
* Revert the changes made to the airframe xml, and upload the firmware(s).&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=23348</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=23348"/>
		<updated>2016-10-02T08:12:18Z</updated>

		<summary type="html">&lt;p&gt;Flixr: v5.10 released&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
[[Image:Welcome to paparazziuav.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{Hotbar}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[http://paparazziuav.org Paparazzi UAV]''' (Unmanned Aerial Vehicle) is an open-source drone hardware and software project encompassing autopilot systems and ground station software for multicopters/multirotors, fixed-wing, helicopters and hybrid aircraft that was founded in 2003. [http://paparazziuav.org Paparazzi UAV] was designed with autonomous flight as the primary focus and manual flying as the secondary. From the beginning it was designed with portability in mind and the ability to control multiple aircraft within the same system. Paparazzi features a dynamic flight plan system that is defined by mission states and using way points as “variables”. This makes it easy to create very complex fully automated missions without the operators intervention. For more project information, [[General|see here]].&lt;br /&gt;
&lt;br /&gt;
{{P Header Box|color=#D51D00|size=100%|&amp;lt;center&amp;gt;Legal Disclaimer&amp;lt;/center&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The Paparazzi software source and hardware design is distributed without any guarantee. Before flying, please refer to your country's national aviation regulation for Unmanned Aerial Systems, or the one of the country you intend to overfly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Left column start --&amp;gt;&lt;br /&gt;
{{P Topic Table|{{P Header Box|ico=favicon32.png|[[General]]}} &lt;br /&gt;
{{:General/Index}}&lt;br /&gt;
{{P Header Box|ico=Gear.png|[[Hardware]]}} &lt;br /&gt;
{{:Hardware/Index}}&lt;br /&gt;
{{P Header Box|ico=Code.png|[[Software]]}} &lt;br /&gt;
{{:Software/Index}}&lt;br /&gt;
{{P Header Box|ico=favicon32.png|[[Miscellaneous]]}} &lt;br /&gt;
{{:Miscellaneous/Index}}&lt;br /&gt;
&amp;lt;!-- Right column start --&amp;gt;&lt;br /&gt;
|{{P Release|v5.10_stable|v5.10}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Blog posts --&amp;gt;&lt;br /&gt;
{{P Header Box|ico=RSS.png|[http://blog.paparazziuav.org Paparazzi UAV Blog]}}&lt;br /&gt;
&amp;lt;rss max=10 item-max-length=&amp;quot;1000&amp;quot;&amp;gt;http://feeds.feedburner.com/PaparazziBlog&amp;lt;/rss&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Youtube Video Playlist --&amp;gt;&lt;br /&gt;
{{P Header Box|ico=Video.png|Video Collection}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{#ev:youtubeplaylist|PLekU8nVT6qLm3oOudER7WVuj2plH_aU4u}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Subsystem/stabilization&amp;diff=23347</id>
		<title>Subsystem/stabilization</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Subsystem/stabilization&amp;diff=23347"/>
		<updated>2016-09-26T18:31:12Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Rate Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages hideprefix=always&amp;gt;Subsystems&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
== Stabilization subsystem ==&lt;br /&gt;
The ''stabilization'' subsystem provides the attitude controller for rotorcrafts.&lt;br /&gt;
&lt;br /&gt;
Currently possible attitude ''stabilization'' subsystem types are&lt;br /&gt;
* ''[[Subsystem/stabilization#Quaternion|int_quat]]''&lt;br /&gt;
* ''[[Subsystem/stabilization#Quaternion|float_quat]]''&lt;br /&gt;
* ''[[Subsystem/stabilization#Euler|int_euler]]''&lt;br /&gt;
* ''[[Subsystem/stabilization#Euler|float_euler]]''&lt;br /&gt;
* ''[[Subsystem/stabilization#INDI|indi]]''&lt;br /&gt;
&lt;br /&gt;
== Attitude Control Implementations ==&lt;br /&gt;
There are several different attitude control algorithm implementations.&lt;br /&gt;
&lt;br /&gt;
They use the same ''STABILIZATION_ATTITUDE'' xml configuration section:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;section name=&amp;quot;STABILIZATION_ATTITUDE&amp;quot; prefix=&amp;quot;STABILIZATION_ATTITUDE_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- setpoints --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;SP_MAX_PHI&amp;quot;     value=&amp;quot;45.&amp;quot; unit=&amp;quot;deg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;SP_MAX_THETA&amp;quot;   value=&amp;quot;45.&amp;quot; unit=&amp;quot;deg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;SP_MAX_R&amp;quot;       value=&amp;quot;90.&amp;quot; unit=&amp;quot;deg/s&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DEADBAND_A&amp;quot;     value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DEADBAND_E&amp;quot;     value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DEADBAND_R&amp;quot;     value=&amp;quot;250&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- reference --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_OMEGA_P&amp;quot;  value=&amp;quot;800&amp;quot; unit=&amp;quot;deg/s&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_ZETA_P&amp;quot;   value=&amp;quot;0.85&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_MAX_P&amp;quot;    value=&amp;quot;400.&amp;quot; unit=&amp;quot;deg/s&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_MAX_PDOT&amp;quot; value=&amp;quot;RadOfDeg(8000.)&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_OMEGA_Q&amp;quot;  value=&amp;quot;800&amp;quot; unit=&amp;quot;deg/s&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_ZETA_Q&amp;quot;   value=&amp;quot;0.85&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_MAX_Q&amp;quot;    value=&amp;quot;400.&amp;quot; unit=&amp;quot;deg/s&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_MAX_QDOT&amp;quot; value=&amp;quot;RadOfDeg(8000.)&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_OMEGA_R&amp;quot;  value=&amp;quot;500&amp;quot; unit=&amp;quot;deg/s&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_ZETA_R&amp;quot;   value=&amp;quot;0.85&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_MAX_R&amp;quot;    value=&amp;quot;180.&amp;quot; unit=&amp;quot;deg/s&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_MAX_RDOT&amp;quot; value=&amp;quot;RadOfDeg(1800.)&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- feedback --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;PHI_PGAIN&amp;quot;  value=&amp;quot;1000&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;PHI_DGAIN&amp;quot;  value=&amp;quot;400&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;PHI_IGAIN&amp;quot;  value=&amp;quot;200&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;define name=&amp;quot;THETA_PGAIN&amp;quot;  value=&amp;quot;1000&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;THETA_DGAIN&amp;quot;  value=&amp;quot;400&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;THETA_IGAIN&amp;quot;  value=&amp;quot;200&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;define name=&amp;quot;PSI_PGAIN&amp;quot;  value=&amp;quot;500&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;PSI_DGAIN&amp;quot;  value=&amp;quot;300&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;PSI_IGAIN&amp;quot;  value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- feedforward --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;PHI_DDGAIN&amp;quot;   value=&amp;quot;300&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;THETA_DDGAIN&amp;quot; value=&amp;quot;300&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;PSI_DDGAIN&amp;quot;   value=&amp;quot;300&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; ''SP_MAX_*'': maximum ''PHI''/''THETA'' (roll/pitch) angles and maximum angular velocity ''R'' around yaw axis&lt;br /&gt;
; ''DEADBAND_*'': RC stick deadband around the center for ''A'',''E'',''R'' (roll,pitch,yaw)&lt;br /&gt;
; ''REF_*'': parameters for the [[Control_Loops#Reference_generators_2|reference generator]]&lt;br /&gt;
; ''REF_OMEGA_*'' : second order model natural frequency for respective axis&lt;br /&gt;
; ''REF_ZETA_*'' : second order model damping factor for respective axis&lt;br /&gt;
; ''REF_MAX_x'' : bound on ref model angular speed&lt;br /&gt;
; ''REF_MAX_xDOT'' : bound on ref model angular acceleration&lt;br /&gt;
; ''[PHI|THETA|PSI]_[PID]GAIN'': gains for the feedback control of the respective axis&lt;br /&gt;
; ''[PHI|THETA|PSI]_DDGAIN'': feedforward gains for the respective axis&lt;br /&gt;
&lt;br /&gt;
=== Quaternion ===&lt;br /&gt;
Attitude controllers using quaternions (no gimbal lock).&lt;br /&gt;
There is a fixed point implementation (recommended) and a floating point implementation for reference and testing.&lt;br /&gt;
&lt;br /&gt;
* fixed point: &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;subsystem name=&amp;quot;stabilization&amp;quot; type=&amp;quot;int_quat&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
* floating point: &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;subsystem name=&amp;quot;stabilization&amp;quot; type=&amp;quot;float_quat&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;stabilization&amp;quot; type=&amp;quot;int_quat&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
You also need the ''STABILIZATION_ATTITUDE'' xml configuration section as described above.&lt;br /&gt;
&lt;br /&gt;
=== Euler ===&lt;br /&gt;
Attitude controller using Euler Angles. Due to the inherent singularities (e.g. 90deg pitch) of the euler angles representation you can't use this controller if you want to fly in regimes close or at these singularities (e.g. acrobatics or transitioning vehicles).&lt;br /&gt;
See [[Control_Loops#Attitude_loop]] for diagrams of the control loop.&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;stabilization&amp;quot; type=&amp;quot;int_euler&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
You also need the ''STABILIZATION_ATTITUDE'' xml configuration section as described above.&lt;br /&gt;
&lt;br /&gt;
=== INDI ===&lt;br /&gt;
Attitude controller based on an Incremental Nonlinear Dynamic Inversion inner loop. It controls the angular acceleration in an incremental way. Detailed information can be found in the paper 'Adaptive Incremental Nonlinear Dynamic Inversion for Micro Aerial Vehicles' (http://arc.aiaa.org/doi/abs/10.2514/1.G001490).&lt;br /&gt;
&lt;br /&gt;
The idea is that any moment on the drone, results in an angular acceleration. With the onboard gyroscope, we measure the angular rate. This means that if we take the derivative of the angular rate, we have a measure of all moments on the drone through the angular acceleration. This includes the moment caused by the inputs. We know what the angular acceleration is with the inputs that we are giving, so to change the angular acceleration to a desired value, we just need to increment these inputs. How much we should increment the inputs to get a certain increment in angular acceleration is determined by the ''control effectiveness''.&lt;br /&gt;
&lt;br /&gt;
The benefit of using INDI over PID is that the disturbance rejection is a lot faster. This means that an external moment on the drone due to wind or something else is counteracted as fast as the drone can measure it and the actuators can move. Compare this to the integrator gain of a PID controller, that only slowly removes steady state offsets.&lt;br /&gt;
&lt;br /&gt;
More practical information can be found on [[working with INDI]]&lt;br /&gt;
&lt;br /&gt;
== Rate Control ==&lt;br /&gt;
There is only one rate control implementation. It allows you to fly a rotorcraft like a helicopter by controlling the angular rate directly instead of having (self-leveling) attitude control.&lt;br /&gt;
See [[Control_Loops#Rate_loop]] for diagrams of the control loop.&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
     &amp;lt;module name=&amp;quot;stabilization&amp;quot; type=&amp;quot;rate&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;section name=&amp;quot;STABILIZATION_RATE&amp;quot; prefix=&amp;quot;STABILIZATION_RATE_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- setpoints --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;SP_MAX_P&amp;quot; value=&amp;quot;10000&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;SP_MAX_Q&amp;quot; value=&amp;quot;10000&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;SP_MAX_R&amp;quot; value=&amp;quot;10000&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DEADBAND_P&amp;quot; value=&amp;quot;20&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DEADBAND_Q&amp;quot; value=&amp;quot;20&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DEADBAND_R&amp;quot; value=&amp;quot;200&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;REF_TAU&amp;quot; value=&amp;quot;4&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- feedback --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;GAIN_P&amp;quot; value=&amp;quot;400&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;GAIN_Q&amp;quot; value=&amp;quot;400&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;GAIN_R&amp;quot; value=&amp;quot;350&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;define name=&amp;quot;IGAIN_P&amp;quot; value=&amp;quot;75&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;IGAIN_Q&amp;quot; value=&amp;quot;75&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;IGAIN_R&amp;quot; value=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- feedforward --&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DDGAIN_P&amp;quot; value=&amp;quot;300&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DDGAIN_Q&amp;quot; value=&amp;quot;300&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DDGAIN_R&amp;quot; value=&amp;quot;300&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:User_Documentation]] [[Category:Subsystems]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Sidebar&amp;diff=23313</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Sidebar&amp;diff=23313"/>
		<updated>2016-08-24T19:07:44Z</updated>

		<summary type="html">&lt;p&gt;Flixr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Navigation&lt;br /&gt;
** mainpage|Home&lt;br /&gt;
** Hardware|Hardware&lt;br /&gt;
** Software|Software&lt;br /&gt;
** FAQ|FAQ&lt;br /&gt;
** Downloads|Downloads&lt;br /&gt;
** Hecto|Remembering Hecto&lt;br /&gt;
* Communication&lt;br /&gt;
** http://lists.paparazziuav.org|Mailing list&lt;br /&gt;
** https://gitter.im/paparazzi/discuss|Gitter chat&lt;br /&gt;
** Contact|Contact&lt;br /&gt;
** Account|Wiki account&lt;br /&gt;
* Development&lt;br /&gt;
** Contributing|How to contribute&lt;br /&gt;
** Developer_Guide|Developer Guide&lt;br /&gt;
** http://docs.paparazziuav.org| Doxygen docs&lt;br /&gt;
** http://github.com/paparazzi/paparazzi|Git repository&lt;br /&gt;
** Builds|Build tests&lt;br /&gt;
* Wiki tools&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** Help:Editing|Editing Help&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Sidebar&amp;diff=23312</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Sidebar&amp;diff=23312"/>
		<updated>2016-08-24T19:06:59Z</updated>

		<summary type="html">&lt;p&gt;Flixr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Navigation&lt;br /&gt;
** mainpage|Home&lt;br /&gt;
** Hardware|Hardware&lt;br /&gt;
** Software|Software&lt;br /&gt;
** FAQ|FAQ&lt;br /&gt;
** Downloads|Downloads&lt;br /&gt;
** Hecto|Remembering Hecto&lt;br /&gt;
* Communication&lt;br /&gt;
** http://lists.paparazziuav.org|Mailing list&lt;br /&gt;
** https://gitter.im/paparazzi/discuss|Gitter&lt;br /&gt;
** Contact|Contact&lt;br /&gt;
** Account|Wiki account&lt;br /&gt;
* Development&lt;br /&gt;
** Contributing|How to contribute&lt;br /&gt;
** Developer_Guide|Developer Guide&lt;br /&gt;
** http://docs.paparazziuav.org| Doxygen docs&lt;br /&gt;
** http://github.com/paparazzi/paparazzi|Git repository&lt;br /&gt;
** Builds|Build tests&lt;br /&gt;
* Wiki tools&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** Help:Editing|Editing Help&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Sidebar&amp;diff=23311</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Sidebar&amp;diff=23311"/>
		<updated>2016-08-24T19:06:40Z</updated>

		<summary type="html">&lt;p&gt;Flixr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Navigation&lt;br /&gt;
** mainpage|Home&lt;br /&gt;
** Hardware|Hardware&lt;br /&gt;
** Software|Software&lt;br /&gt;
** FAQ|FAQ&lt;br /&gt;
** Downloads|Downloads&lt;br /&gt;
** Hecto|Remembering Hecto&lt;br /&gt;
* Communication&lt;br /&gt;
** http://lists.paparazziuav.org|Mailing list&lt;br /&gt;
** https://gitter.im/paparazzi/discuss|Gitter&lt;br /&gt;
** Contact|Contact&lt;br /&gt;
** Account|wiki account&lt;br /&gt;
* Development&lt;br /&gt;
** Contributing|How to contribute&lt;br /&gt;
** Developer_Guide|Developer Guide&lt;br /&gt;
** http://docs.paparazziuav.org| Doxygen docs&lt;br /&gt;
** http://github.com/paparazzi/paparazzi|Git repository&lt;br /&gt;
** Builds|Build tests&lt;br /&gt;
* Wiki tools&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** Help:Editing|Editing Help&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Sidebar&amp;diff=23310</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Sidebar&amp;diff=23310"/>
		<updated>2016-08-24T19:06:17Z</updated>

		<summary type="html">&lt;p&gt;Flixr: add quick link for howto get a wiki account&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Navigation&lt;br /&gt;
** mainpage|Home&lt;br /&gt;
** Hardware|Hardware&lt;br /&gt;
** Software|Software&lt;br /&gt;
** FAQ|FAQ&lt;br /&gt;
** Downloads|Downloads&lt;br /&gt;
** Hecto|Remembering Hecto&lt;br /&gt;
* Communication&lt;br /&gt;
** http://lists.paparazziuav.org|Mailing list&lt;br /&gt;
** https://gitter.im/paparazzi/discuss|Gitter&lt;br /&gt;
** Contact|Contact&lt;br /&gt;
** [[Account|wiki account]]&lt;br /&gt;
* Development&lt;br /&gt;
** Contributing|How to contribute&lt;br /&gt;
** Developer_Guide|Developer Guide&lt;br /&gt;
** http://docs.paparazziuav.org| Doxygen docs&lt;br /&gt;
** http://github.com/paparazzi/paparazzi|Git repository&lt;br /&gt;
** Builds|Build tests&lt;br /&gt;
* Wiki tools&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** Help:Editing|Editing Help&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Contributing&amp;diff=23308</id>
		<title>Contributing</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Contributing&amp;diff=23308"/>
		<updated>2016-08-24T17:26:03Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to contribute ==&lt;br /&gt;
There are lots of ways to contribute to Paparazzi and get involved. Contributions in the form of elaborating on and expanding documentation, wiki pages, tutorials and code fixes are always welcome and encouraged. &lt;br /&gt;
&lt;br /&gt;
This page will give you a head start on how you can contribute.&lt;br /&gt;
&lt;br /&gt;
=== Wiki ===&lt;br /&gt;
&lt;br /&gt;
If you don't have a Wiki account yet join the [https://gitter.im/paparazzi/discuss Gitter channel] (there is an open chat button in the right lower corner of the page too) and ask and we will Create an account for you. We had to disable normal account creation due to spam attacks.&lt;br /&gt;
&lt;br /&gt;
You can then immediately start adding information, cleaning up, or fixing typos. It is a tremendous contribution to the quality of the PaparazziUAV documentation when you do this! Just Do It:&lt;br /&gt;
&lt;br /&gt;
[[Image:Just_Do_It.gif|400px]]&lt;br /&gt;
&lt;br /&gt;
You do not need a lot of deep technical knowledge to be helpful. If you read something and it is not clear to you, ask for an explanation in the Gitter Chat and then do not forget to add that information to the Wiki.&lt;br /&gt;
&lt;br /&gt;
Some information and links on how to edit the wiki can be found at [[Help:Editing|Help with Editing]].&lt;br /&gt;
&lt;br /&gt;
Please be aware of past edits and page histories. Try not to remove this; if you are moving/renaming a page, use the '''move''' tab at the top of a page. This ensures the revision history is moved with the page.&lt;br /&gt;
&lt;br /&gt;
=== Software development ===&lt;br /&gt;
&lt;br /&gt;
[[File:AGoodCombinationSTM32ProgressnDebugging.jpg|300px|thumb|Left|Learning Tools]]&lt;br /&gt;
&lt;br /&gt;
We use the distributed version control system [http://git-scm.com/ git]. The [http://github.com/paparazzi/paparazzi/ Papaprazzi master repository is hosted on Github].&lt;br /&gt;
&lt;br /&gt;
Also see the [[Git|Git wiki page]] for more details about setting up Git and cloning the source-code and data repository.&lt;br /&gt;
&lt;br /&gt;
Please also have a look at the [http://docs.paparazziuav.org/latest/styleguide.html Coding Style Guide].&lt;br /&gt;
&lt;br /&gt;
Here is the short version if you already know git:&lt;br /&gt;
# Create an account on [http://github.com/ github].&lt;br /&gt;
# Fork the [http://github.com/paparazzi/paparazzi/ papaprazzi repo] on github. (After logging in press the '''fork''' button).&lt;br /&gt;
# If you want to clone with SSH: '''git clone git@github.com:&amp;lt;yourname&amp;gt;/paparazzi.git'''&amp;lt;br/&amp;gt;Or with HTTPS: '''git clone &amp;lt;nowiki&amp;gt;https://github.com/&amp;lt;yourname&amp;gt;/paparazzi.git&amp;lt;/nowiki&amp;gt;'''&amp;lt;br/&amp;gt;[https://help.github.com/articles/which-remote-url-should-i-use Which remote URL should I use?]&lt;br /&gt;
# '''git remote add upstream &amp;lt;nowiki&amp;gt;https://github.com/paparazzi/paparazzi.git&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
# '''git fetch upstream'''&lt;br /&gt;
# checkout a new branch based on the development branch (master):&amp;lt;br/&amp;gt;'''git checkout -b my_new_feature upstream/master'''&lt;br /&gt;
# fix/code and commit in logical units (with a [http://bit.ly/goodcommitmessages good commit message])&lt;br /&gt;
# push your feature/bugfix branch&lt;br /&gt;
# Send us a [http://help.github.com/pull-requests/ pull request] on github. (Or send patches to the mailing list).&lt;br /&gt;
&lt;br /&gt;
=== Defects and Features ===&lt;br /&gt;
To report a Paparazzi defect or issue. Submit a feature request using the simple [https://github.com/paparazzi/paparazzi/issues issue tracker on github].&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration Builds ===&lt;br /&gt;
There are [[Builds|build servers]] running some [[Builds/Tests|Continuous Integration tests]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=23284</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=23284"/>
		<updated>2016-08-22T21:24:30Z</updated>

		<summary type="html">&lt;p&gt;Flixr: Protected &amp;quot;Main Page&amp;quot;: fuck the spammers ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
[[Image:Welcome to paparazziuav.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{Hotbar}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[http://paparazziuav.org Paparazzi UAV]''' (Unmanned Aerial Vehicle) is an open-source drone hardware and software project encompassing autopilot systems and ground station software for multicopters/multirotors, fixed-wing, helicopters and hybrid aircraft that was founded in 2003. [http://paparazziuav.org Paparazzi UAV] was designed with autonomous flight as the primary focus and manual flying as the secondary. From the beginning it was designed with portability in mind and the ability to control multiple aircraft within the same system. Paparazzi features a dynamic flight plan system that is defined by mission states and using way points as “variables”. This makes it easy to create very complex fully automated missions without the operators intervention. For more project information, [[General|see here]].&lt;br /&gt;
&lt;br /&gt;
{{P Header Box|color=#D51D00|size=100%|&amp;lt;center&amp;gt;Legal Disclaimer&amp;lt;/center&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The Paparazzi software source and hardware design is distributed without any guarantee. Before flying, please refer to your country's national aviation regulation for Unmanned Aerial Systems, or the one of the country you intend to overfly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Left column start --&amp;gt;&lt;br /&gt;
{{P Topic Table|{{P Header Box|ico=favicon32.png|[[General]]}} &lt;br /&gt;
{{:General/Index}}&lt;br /&gt;
{{P Header Box|ico=Gear.png|[[Hardware]]}} &lt;br /&gt;
{{:Hardware/Index}}&lt;br /&gt;
{{P Header Box|ico=Code.png|[[Software]]}} &lt;br /&gt;
{{:Software/Index}}&lt;br /&gt;
{{P Header Box|ico=favicon32.png|[[Miscellaneous]]}} &lt;br /&gt;
{{:Miscellaneous/Index}}&lt;br /&gt;
&amp;lt;!-- Right column start --&amp;gt;&lt;br /&gt;
|{{P Release|v5.8.2_stable|v5.8}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Blog posts --&amp;gt;&lt;br /&gt;
{{P Header Box|ico=RSS.png|[http://blog.paparazziuav.org Paparazzi UAV Blog]}}&lt;br /&gt;
&amp;lt;rss max=10 item-max-length=&amp;quot;1000&amp;quot;&amp;gt;http://feeds.feedburner.com/PaparazziBlog&amp;lt;/rss&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Youtube Video Playlist --&amp;gt;&lt;br /&gt;
{{P Header Box|ico=Video.png|Video Collection}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{#ev:youtubeplaylist|PLekU8nVT6qLm3oOudER7WVuj2plH_aU4u}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Talk:Main_Page&amp;diff=23283</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Talk:Main_Page&amp;diff=23283"/>
		<updated>2016-08-22T21:23:28Z</updated>

		<summary type="html">&lt;p&gt;Flixr: Flixr moved page Talk:Thunderbird Technical Support Phone Number +1 888-990-8801 to Talk:Main Page over a redirect without leaving a redirect: fucking spammers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=23282</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=23282"/>
		<updated>2016-08-22T21:23:27Z</updated>

		<summary type="html">&lt;p&gt;Flixr: Flixr moved page Thunderbird Technical Support Phone Number +1 888-990-8801 to Main Page over a redirect without leaving a redirect: fucking spammers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
[[Image:Welcome to paparazziuav.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{Hotbar}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[http://paparazziuav.org Paparazzi UAV]''' (Unmanned Aerial Vehicle) is an open-source drone hardware and software project encompassing autopilot systems and ground station software for multicopters/multirotors, fixed-wing, helicopters and hybrid aircraft that was founded in 2003. [http://paparazziuav.org Paparazzi UAV] was designed with autonomous flight as the primary focus and manual flying as the secondary. From the beginning it was designed with portability in mind and the ability to control multiple aircraft within the same system. Paparazzi features a dynamic flight plan system that is defined by mission states and using way points as “variables”. This makes it easy to create very complex fully automated missions without the operators intervention. For more project information, [[General|see here]].&lt;br /&gt;
&lt;br /&gt;
{{P Header Box|color=#D51D00|size=100%|&amp;lt;center&amp;gt;Legal Disclaimer&amp;lt;/center&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The Paparazzi software source and hardware design is distributed without any guarantee. Before flying, please refer to your country's national aviation regulation for Unmanned Aerial Systems, or the one of the country you intend to overfly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Left column start --&amp;gt;&lt;br /&gt;
{{P Topic Table|{{P Header Box|ico=favicon32.png|[[General]]}} &lt;br /&gt;
{{:General/Index}}&lt;br /&gt;
{{P Header Box|ico=Gear.png|[[Hardware]]}} &lt;br /&gt;
{{:Hardware/Index}}&lt;br /&gt;
{{P Header Box|ico=Code.png|[[Software]]}} &lt;br /&gt;
{{:Software/Index}}&lt;br /&gt;
{{P Header Box|ico=favicon32.png|[[Miscellaneous]]}} &lt;br /&gt;
{{:Miscellaneous/Index}}&lt;br /&gt;
&amp;lt;!-- Right column start --&amp;gt;&lt;br /&gt;
|{{P Release|v5.8.2_stable|v5.8}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Blog posts --&amp;gt;&lt;br /&gt;
{{P Header Box|ico=RSS.png|[http://blog.paparazziuav.org Paparazzi UAV Blog]}}&lt;br /&gt;
&amp;lt;rss max=10 item-max-length=&amp;quot;1000&amp;quot;&amp;gt;http://feeds.feedburner.com/PaparazziBlog&amp;lt;/rss&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Youtube Video Playlist --&amp;gt;&lt;br /&gt;
{{P Header Box|ico=Video.png|Video Collection}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{#ev:youtubeplaylist|PLekU8nVT6qLm3oOudER7WVuj2plH_aU4u}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=23281</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=23281"/>
		<updated>2016-08-22T21:20:06Z</updated>

		<summary type="html">&lt;p&gt;Flixr: Reverted edits by Spammer (talk) to last revision by Flixr&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
[[Image:Welcome to paparazziuav.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{Hotbar}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[http://paparazziuav.org Paparazzi UAV]''' (Unmanned Aerial Vehicle) is an open-source drone hardware and software project encompassing autopilot systems and ground station software for multicopters/multirotors, fixed-wing, helicopters and hybrid aircraft that was founded in 2003. [http://paparazziuav.org Paparazzi UAV] was designed with autonomous flight as the primary focus and manual flying as the secondary. From the beginning it was designed with portability in mind and the ability to control multiple aircraft within the same system. Paparazzi features a dynamic flight plan system that is defined by mission states and using way points as “variables”. This makes it easy to create very complex fully automated missions without the operators intervention. For more project information, [[General|see here]].&lt;br /&gt;
&lt;br /&gt;
{{P Header Box|color=#D51D00|size=100%|&amp;lt;center&amp;gt;Legal Disclaimer&amp;lt;/center&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The Paparazzi software source and hardware design is distributed without any guarantee. Before flying, please refer to your country's national aviation regulation for Unmanned Aerial Systems, or the one of the country you intend to overfly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Left column start --&amp;gt;&lt;br /&gt;
{{P Topic Table|{{P Header Box|ico=favicon32.png|[[General]]}} &lt;br /&gt;
{{:General/Index}}&lt;br /&gt;
{{P Header Box|ico=Gear.png|[[Hardware]]}} &lt;br /&gt;
{{:Hardware/Index}}&lt;br /&gt;
{{P Header Box|ico=Code.png|[[Software]]}} &lt;br /&gt;
{{:Software/Index}}&lt;br /&gt;
{{P Header Box|ico=favicon32.png|[[Miscellaneous]]}} &lt;br /&gt;
{{:Miscellaneous/Index}}&lt;br /&gt;
&amp;lt;!-- Right column start --&amp;gt;&lt;br /&gt;
|{{P Release|v5.8.2_stable|v5.8}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Blog posts --&amp;gt;&lt;br /&gt;
{{P Header Box|ico=RSS.png|[http://blog.paparazziuav.org Paparazzi UAV Blog]}}&lt;br /&gt;
&amp;lt;rss max=10 item-max-length=&amp;quot;1000&amp;quot;&amp;gt;http://feeds.feedburner.com/PaparazziBlog&amp;lt;/rss&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Youtube Video Playlist --&amp;gt;&lt;br /&gt;
{{P Header Box|ico=Video.png|Video Collection}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{#ev:youtubeplaylist|PLekU8nVT6qLm3oOudER7WVuj2plH_aU4u}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Joystick&amp;diff=23243</id>
		<title>Joystick</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Joystick&amp;diff=23243"/>
		<updated>2016-07-23T18:58:56Z</updated>

		<summary type="html">&lt;p&gt;Flixr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
A Joystick can be used to control your aircraft in the simulator or via the modem [[Subsystem/radio_control#Datalink|using radio_control type datalink]] in real flight using [[Input2Ivy]].&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Here a regular gaming pad, perfectly capable to control your aircraft when in manual or assisted flight&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Logitech_Extreme_3D_Pro_Joystick.jpg|Logitech Extreme 3D_Pro Joystick&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here and example of an Joystic that looks like an RC transmitter, but is just an USB connected Joystick. Handy for quick tests, and for ER 13, why not add one to you Paparazzi toolset?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Hk_6ch_rc_joystick_overview.jpg|Hk 6channel RC transmitterlook joystick via USB&lt;br /&gt;
File:Hk_6ch_rc_joystick_large.jpg|Hk 6channel RC transmitterlook joystick via USB closeup&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here a real RC transmitter connected via trainer port to your PC to be used as a Joystick&lt;br /&gt;
&lt;br /&gt;
=Quick test=&lt;br /&gt;
&lt;br /&gt;
If plugged in, under Linux a quick test to see if the device is recognized via:&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
&lt;br /&gt;
Although the message is a little different for evey joysticktype, it should display something like this in last lines:&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 [ 8988.708567] usb 2-4.3: new low-speed USB device number 7 using ehci-pci&lt;br /&gt;
 [ 8988.804672] usb 2-4.3: New USB device found, idVendor=0603, idProduct=1a13&lt;br /&gt;
 [ 8988.804679] usb 2-4.3: New USB device strings: Mfr=0, Product=34, SerialNumber=0&lt;br /&gt;
 [ 8988.804683] usb 2-4.3: Product: ART TECH GAME.  &lt;br /&gt;
 [ 8988.808821] input: ART TECH GAME.   as /devices/pci0000:00/0000:00:06.1/usb2/2-4/2-4.3/2-4.3:1.0/input/input14&lt;br /&gt;
 [ 8988.809007] hid-generic 0003:0603:1A13.0006: input,hidraw4: USB HID v1.00 Joystick [ART TECH GAME.  ] on usb-0000:00:06.1-4.3/input0&lt;br /&gt;
 ...&lt;br /&gt;
=Joystick Calibration=&lt;br /&gt;
You should always calibrate your joystick. By calibrating you make sure that your Joystick is not sending steering comanding values; while it should not when the steering sticks are in neutral position.&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
Install the joystick and the jstest-gtk packages via:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install joystick jstest-gtk&lt;br /&gt;
&lt;br /&gt;
Use the graphical jstest-gtk tool (or the commandline jstest) to view/edit your joystick calibration and axis/button mappings.&lt;br /&gt;
Start it via:&lt;br /&gt;
&lt;br /&gt;
 $ jstest-gtk&lt;br /&gt;
&lt;br /&gt;
===Store the calbration===&lt;br /&gt;
Your calibration and mapping will only be lost once you unplug the joystick, so store your configuration via:&lt;br /&gt;
 &lt;br /&gt;
 $ sudo jscal-store /dev/input/js0&lt;br /&gt;
&lt;br /&gt;
If you replug your joystick the next time, udev should take care of automatically loading the appropriate configuration.&lt;br /&gt;
&lt;br /&gt;
==OSX==&lt;br /&gt;
&lt;br /&gt;
Feel free to add your instructions here.&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Flight_Plans&amp;diff=21303</id>
		<title>Flight Plans</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Flight_Plans&amp;diff=21303"/>
		<updated>2016-07-13T12:28:37Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Call */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A '''flight plan''' is a XML document which one can create and store aboard an autopilot. The flight plan will describe how you want your aircraft to travel if released into into the wild blue yonder.&lt;br /&gt;
&lt;br /&gt;
== DTD and Structure ==&lt;br /&gt;
&lt;br /&gt;
The formal description of the flight plan file is given in the [http://en.wikipedia.org/wiki/Document_Type_Definition '''DTD'''] (located in &amp;lt;tt&amp;gt;conf/flight_plans/flight_plan.dtd&amp;lt;/tt&amp;gt;). This&lt;br /&gt;
DTD must be referenced in the header of your flight plan XML document using the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;!DOCTYPE flight_plan SYSTEM &amp;quot;flight_plan.dtd&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The flight plans are stored in the &amp;lt;tt&amp;gt;conf/flight_plans&amp;lt;/tt&amp;gt; directory. The [[Flight_Plan_Editor|flight plan editor]] can be used to create basic flight plans via the GUI.&lt;br /&gt;
&lt;br /&gt;
Extract from the [http://en.wikipedia.org/wiki/Document_Type_Definition DTD]:&lt;br /&gt;
 &amp;lt;tt&amp;gt;&amp;lt;!ELEMENT flight_plan (header?,waypoints,sectors?,variables?,includes?,exceptions?,blocks)&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''A flight plan is composed of two mandatory elements: [[#waypoints|waypoints]] and [[#blocks|blocks]]'''&lt;br /&gt;
&lt;br /&gt;
The root &amp;lt;tt&amp;gt;flight_plan&amp;lt;/tt&amp;gt; element is specified with several attributes:&lt;br /&gt;
 &amp;lt;tt&amp;gt;'''&amp;lt;flight_plan name lat0 lon0 ground_alt security_height home_mode_height qfu alt max_dist_from_home&amp;gt;'''&amp;lt;/tt&amp;gt;&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''name'''&amp;lt;/tt&amp;gt;: The name of the mission (a text string)&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''lat0, lon0'''&amp;lt;/tt&amp;gt;: Defines the latitude and longitude coordinates of the reference point {0,0} in WGS84 degree coordinates&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''ground_alt'''&amp;lt;/tt&amp;gt;: The ground altitude (in meters), Above Sea Level where you are flying. It defines the &amp;lt;tt&amp;gt;GROUND_ALT&amp;lt;/tt&amp;gt; constant value which can be used in combination with a waypoint &amp;lt;height&amp;gt; parameter to define a waypoint height&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt;:  The height (over &amp;lt;tt&amp;gt;'''ground_alt'''&amp;lt;/tt&amp;gt;) used by the circle-home failsafe procedure and in other flight procedures such as formation flight and anti-collision avoidance. Warnings are produced if you place a waypoint lower than &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt; (usually the case for the landing point)&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''home_mode_height'''&amp;lt;/tt&amp;gt; (optional): This optional attribute available since v4.2 allows to override &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt; as failsafe height in home mode. If &amp;lt;tt&amp;gt;'''home_mode_height'''&amp;lt;/tt&amp;gt; Is set lower than &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt;, the later is used. This attribute is useful if you need to return home at a high altitude rather than a low altitude.&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''qfu'''&amp;lt;/tt&amp;gt; (optional): defines the global constant &amp;lt;tt&amp;gt;QFU&amp;lt;/tt&amp;gt;. It usually is the magnetic heading in degrees (north=0, east=90) of the runway, the opposite of wind direction. This constant may be used in the mission description. It is also used by the simulator as the original course of the aircraft. So if you want to take off and climb to the West you would use qfu=270. &lt;br /&gt;
; &amp;lt;tt&amp;gt;'''alt'''&amp;lt;/tt&amp;gt;: The default altitude of waypoints ([[Altitude_definitions|Above Sea Level]]). So if your ground altitude is 400 then alt needs to be a value greater than ground altitude and above any obstructions in the flight plan. &lt;br /&gt;
; &amp;lt;tt&amp;gt;'''max_dist_from_home'''&amp;lt;/tt&amp;gt;: A radius representing the maximum allowed distance (in meters) from the HOME waypoint. Exceeding this value (ie flying outside the circle with this radius) will trigger an exception. It is up to you to define the block to be executed (ie what to do) for the exception.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Here is an '''example''' of such a line in the top of a flight plan:''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;flight_plan alt=&amp;quot;250&amp;quot; ground_alt=&amp;quot;185&amp;quot; lat0=&amp;quot;43.46223&amp;quot; lon0=&amp;quot;1.27289&amp;quot; name=&amp;quot;Example Muret&amp;quot; max_dist_from_home=&amp;quot;300&amp;quot; qfu=&amp;quot;270&amp;quot; security_height=&amp;quot;25&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that a flight plan could also contain optional &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;'s and &amp;lt;tt&amp;gt;exceptions&amp;lt;/tt&amp;gt; cases.&lt;br /&gt;
&lt;br /&gt;
In English the above flight plan says the name is Example Muret. The reference coordinates for the 0,0 point is: 43.46223 (lat) and 1.27289 (long). The flying site 0,0 location is 185m above sea level. The security height is 25m above 0,0 point or 210m above sea level. The default (ie if not defined in a waypoint this alt is used) altitude is 250m (above sea level). The home mode block altitude is defined to be 150m above sea level. Also, for security, a circle is defined with a radius that's 300m from 0,0 position. This is the max_dist_from_home value. Fly 301m from 0,0 and an exception is triggered. A useful block is to trigger/go to the home mode block and return to home when the aircraft flies outside the safety circle. Example flight plans are helpful for study before you build your own from scratch.&lt;br /&gt;
&lt;br /&gt;
== Waypoints ==&lt;br /&gt;
&lt;br /&gt;
The waypoints are the geographic locations used to specify the trajectories. A waypoint is specified by it's name and coordinates:&lt;br /&gt;
 &amp;lt;tt&amp;gt;''' &amp;lt;waypoint name wpx wpy [alt] [height]/&amp;gt; '''&amp;lt;/tt&amp;gt;&lt;br /&gt;
where wpx and wpy are real positional coordinates ( &amp;lt;tt&amp;gt;'''lat/lon'''&amp;lt;/tt&amp;gt; )  '''or''' UTM coordinates ( &amp;lt;tt&amp;gt;'''utm_x0/utm_y0'''&amp;lt;/tt&amp;gt; ) '''or''' relative coordinates ( &amp;lt;tt&amp;gt;'''x/y'''&amp;lt;/tt&amp;gt; ) in meters from your reference point {0,0} .  &amp;lt;tt&amp;gt;alt&amp;lt;/tt&amp;gt; is an optional parameter and can be used to assign an altitude to a particular waypoint that is different from the globally defined &amp;lt;tt&amp;gt;alt&amp;lt;/tt&amp;gt; parameter of the flightplan. The &amp;lt;tt&amp;gt;height&amp;lt;/tt&amp;gt; attribute can be used to set the waypoint height relative to the [[Altitude_definitions|ground altitude]] (&amp;lt;tt&amp;gt;ground_alt&amp;lt;/tt&amp;gt;) of the flight plan for this waypoint.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;waypoints&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;HOME&amp;quot; x=&amp;quot;0.0&amp;quot; y=&amp;quot;30.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;BRIDGEOVERRIVER&amp;quot; x=&amp;quot;-100.0&amp;quot; y=&amp;quot;60.0&amp;quot; alt=&amp;quot;270.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;MyBarn&amp;quot; x=&amp;quot;-130.0&amp;quot; y=&amp;quot;217.5&amp;quot; alt=&amp;quot;3000.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;3&amp;quot; x=&amp;quot;-30.0&amp;quot; y=&amp;quot;50&amp;quot; height=&amp;quot;50.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;4&amp;quot; x=&amp;quot;-30.0&amp;quot; y=&amp;quot;50.&amp;quot; alt=&amp;quot;ground_alt + 50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;_MYHELPERSPOT&amp;quot; x=&amp;quot;-30.0&amp;quot; y=&amp;quot;60&amp;quot; height=&amp;quot;50.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;_MYOTHERHELPERSPOT&amp;quot; x=&amp;quot;-70.0&amp;quot; y=&amp;quot;90&amp;quot; height=&amp;quot;70.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;TOWER&amp;quot; lat=&amp;quot;48.858249&amp;quot; lon=&amp;quot;2.294494&amp;quot; height=&amp;quot;324.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;MountainCAFE&amp;quot; utm_x0=&amp;quot;360284.8&amp;quot; utm_y0=&amp;quot;4813595.5&amp;quot; alt=&amp;quot;1965.&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/waypoints&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Tips'''&lt;br /&gt;
* Waypoints are easily adjusted with the [[Flight_Plan_Editor|flight plan editor]].&lt;br /&gt;
* If a waypoint name starts with an underscore ( _ ), the waypoint is '''not displayed''' in the GCS, except in editor mode.&lt;br /&gt;
* The maximum number of waypoints is 254.&lt;br /&gt;
* A waypoint named &amp;lt;tt&amp;gt;HOME&amp;lt;/tt&amp;gt; is required if the failsafe HOME mode procedure is used.&lt;br /&gt;
* A waypoints index/reference pointer is derived by prefixing the waypoint name with &amp;quot;WP_&amp;quot;. Useful when a [[#Call |call function]] uses the waypoints reference index vs. it's name.&lt;br /&gt;
&lt;br /&gt;
== Sectors ==&lt;br /&gt;
&lt;br /&gt;
=== Static sectors (default) ===&lt;br /&gt;
&lt;br /&gt;
Flat ''Sectors'' can be described as an area defined by list of waypoint corners. Such an area will be displayed in the Ground Control Station (GCS) by colored lines connecting the cornerpoints.&lt;br /&gt;
A function is generated to check if a point, usually the aircraft itself, is ''inside'' this sector. Currently, this feature requires that the polygon is &amp;lt;b&amp;gt;convex&amp;lt;/b&amp;gt; and described in a &amp;lt;b&amp;gt;clockwise&amp;lt;/b&amp;gt; order. For a sector named &amp;lt;tt&amp;gt;MyBigGarden&amp;lt;/tt&amp;gt; the generated function for the example here would be &amp;lt;tt&amp;gt;bool_t InsideMyBigGarden(float x, float y);&amp;lt;/tt&amp;gt; where &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y&amp;lt;/tt&amp;gt; are east and north coordinated, in meters, relative to the geographic reference of the flight plan. If the flight plan is dynamically relocated, such a sector will be relocated but the display is currently not updated on the GCS. It would be great if one would help improving that part of the source code. Note that sector names are not allowed to contain spaces.&lt;br /&gt;
&lt;br /&gt;
For example, with the following element in a flight plan.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;sectors&amp;gt;&lt;br /&gt;
    &amp;lt;sector name=&amp;quot;MyBigGarden&amp;quot; color=&amp;quot;red&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/sector&amp;gt;&lt;br /&gt;
  &amp;lt;/sectors&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is then possible to add an exception clause to your flightplan. For example if the aircraft for some reason flies outside this, defined by us, sector the airframe will fly to a standby waypoint. The exclamation mark (!) means the boolean operator &amp;lt;tt&amp;gt;NOT&amp;lt;/tt&amp;gt; in this example. In regular language one would describe &amp;quot;If my airframe is NOT inside the MyBigGarden sector anymore then deroute it to the standby waypoint. In Flightplan &amp;quot;Speak&amp;quot; this is written like: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;exception cond=&amp;quot;! InsideMyBigGarden(GetPosX(), GetPosY())&amp;quot; deroute=&amp;quot;standby&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: editing of the waypoints of the sector during the flight will not dynamically update the inside function. It will always check if the position is inside the original sector.&lt;br /&gt;
&lt;br /&gt;
'''Tips'''&lt;br /&gt;
* A nice option in the corner notation is that one can add an underscore ( _ ) in front of the name; a corner or waypoint name that starts with an underscore is not displayed in the GCS. Only in editor mode it is visible. It is visible in editor mode, because if you the could not see it, it also would be not possible to edit or drag the corner or waypoint to another position.&lt;br /&gt;
* The color indicating the sector borders is not fixed but can be defined by oneself if wished for via the color attribute.&lt;br /&gt;
&lt;br /&gt;
=== Dynamic sectors ===&lt;br /&gt;
&lt;br /&gt;
With the latest version (v5.5-devel-628), it is possible to create dynamic sectors. The procedure to create the sector is the same than for the static version with an extra attribute '''type=&amp;quot;dynamic&amp;quot;''':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;sectors&amp;gt;&lt;br /&gt;
    &amp;lt;sector name=&amp;quot;MyBigGarden&amp;quot; color=&amp;quot;red&amp;quot; type=&amp;quot;dynamic&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/sector&amp;gt;&lt;br /&gt;
  &amp;lt;/sectors&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also recommended to avoid using hidden waypoints (no _ prefix), so you can move the corner of your sector from the GCS. The polygon is updated on the 2D map to reflect the new waypoints positions.&lt;br /&gt;
Beside the possibility to change the shape of the area in flight, one of the main benefit is that the algorithm behind allows concave hulls. The only restriction is that the edges of the polygon should not cross each other.&lt;br /&gt;
&lt;br /&gt;
The generated function is the same than the static version and can be used the same way.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
'''Available since v5.9'''&lt;br /&gt;
&lt;br /&gt;
It is possible to declare a list of variables that will be automatically created during the flight plan generation and available for the rest of the system from the generated flight plan header and of course inside the flight plan itself. With appropriate attributes, it is also possible to make the variables accessible from the telemetry as a [[Settings|setting]].&lt;br /&gt;
&lt;br /&gt;
The following code will produce a '''float''' variable initialized to 0:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variables&amp;gt;&lt;br /&gt;
    &amp;lt;variable var=&amp;quot;my_var&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/variables&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The type and the initial value can be changed with the '''type''' and '''init''' attributes:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variables&amp;gt;&lt;br /&gt;
    &amp;lt;variable var=&amp;quot;my_var&amp;quot; init=&amp;quot;10&amp;quot; type=&amp;quot;int&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/variables&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To produce an automatic setting for a variable, at least '''min''', '''max''' and '''step''' attributes need to be specified:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variables&amp;gt;&lt;br /&gt;
    &amp;lt;variable var=&amp;quot;my_var&amp;quot; min=&amp;quot;0.&amp;quot; max=&amp;quot;10.&amp;quot; step=&amp;quot;0.1&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/variables&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
They will appear under the '''Flight Plan''' settings tab in the GCS. So more attributes can be specified: '''shortname''', '''unit''', '''alt_unit''', '''alt_unit_coef''', '''values'''. See [[Settings]] page for more information about these options.&lt;br /&gt;
&lt;br /&gt;
== Includes ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; is used to add some flight plan elements defined in an external procedure. It’s useful to include pre-written procedures with only few arguments and then clarify the flight plan.&lt;br /&gt;
Here is the structure:&lt;br /&gt;
 &amp;lt;tt&amp;gt;&amp;lt;include name procedure&amp;gt; [&amp;lt;arg name value /&amp;gt;]*[&amp;lt;with from to /&amp;gt;]*&amp;lt;/include&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
where &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; attribute of the include element will be used in this flight plan to prefix the blocks of the &amp;lt;tt&amp;gt;procedure&amp;lt;/tt&amp;gt;, the XML referenced file.&lt;br /&gt;
Named arguments may be given with their value in the &amp;lt;tt&amp;gt;arg&amp;lt;/tt&amp;gt; elements. The &amp;lt;tt&amp;gt;with&amp;lt;/tt&amp;gt; tag allows to link labels (e.g. attribute of a deroute instruction or of an exception) from the procedure to blocks of the main flight plan.&lt;br /&gt;
Then, each block of the procedure is like any block of the flight plan and is designated with a dotted identifier: block &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt; of a procedure named &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; is named &amp;lt;tt&amp;gt;b.p&amp;lt;/tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;includes&amp;gt;&lt;br /&gt;
    &amp;lt;include name=&amp;quot;landing&amp;quot; procedure=&amp;quot;landing.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/includes&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Blocks ==&lt;br /&gt;
&lt;br /&gt;
Block elements are the main part of a flight plan: they describe each unit of the mission.&lt;br /&gt;
They are made of various primitives, called stages and exceptions, you can put one after the other. When a&lt;br /&gt;
stage (or a block) is finished, the autopilot goes to the next one. The behaviour after the last stage of the last block is undefined. &lt;br /&gt;
&lt;br /&gt;
As described in the DTD, the &amp;lt;tt&amp;gt;blocks&amp;lt;/tt&amp;gt; element is composed of &amp;lt;tt&amp;gt;block&amp;lt;/tt&amp;gt; elements which are sequence of ''stages'':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!ELEMENT blocks (block+)&amp;gt;&lt;br /&gt;
  &amp;lt;!ELEMENT block  (exception|while|heading|attitude|go|xyz|set|call|circle|deroute|stay|follow|survey_rectangle|for|return|eight|oval|home|path)*&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block name=&amp;quot;circlehome&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle radius=&amp;quot;75&amp;quot; wp=&amp;quot;HOME&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add a button in the [[GCS#Strips|strip of the aircraft]] with the attribute &amp;lt;tt&amp;gt;strip_button&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block name=&amp;quot;descent&amp;quot; strip_button=&amp;quot;Descent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot; throttle=&amp;quot;0.0&amp;quot; pitch=&amp;quot;-15&amp;quot; vmode=&amp;quot;throttle&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This button will activate the block. If the attribute &amp;lt;tt&amp;gt;group&amp;lt;/tt&amp;gt; is specified, all strip buttons of the same group will be placed vertically on top of each other.&lt;br /&gt;
&lt;br /&gt;
In the same way, a key shortcut can be specified:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block key=&amp;quot;D&amp;quot; name=&amp;quot;descent&amp;quot; strip_button=&amp;quot;Descent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot; throttle=&amp;quot;0.0&amp;quot; pitch=&amp;quot;-15&amp;quot; vmode=&amp;quot;throttle&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Modifiers are allowed, using the syntax of [http://library.gnome.org/devel/gtk/2.15/gtk-Keyboard-Accelerators.html#gtk-accelerator-parse GTK accelerators].&lt;br /&gt;
&lt;br /&gt;
An icon can be specified to display the button. The &amp;lt;tt&amp;gt;strip_button&amp;lt;/tt&amp;gt; label then is a tooltip for the icon. The icon must be an image file available in the directory &amp;lt;tt&amp;gt;data/pictures/gcs_icons&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;block name=&amp;quot;Takeoff&amp;quot; strip_icon=&amp;quot;takeoff.png&amp;quot; strip_button=&amp;quot;Takeoff&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can call functions before or after each execution of the block:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block name=&amp;quot;circlehome&amp;quot; pre_call=&amp;quot;function_to_call_before_circle()&amp;quot; post_call=&amp;quot;function_to_call_after_circle()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
Most of the numeric attributes in stages are analyzed as C expressions. The syntax of this C expression is restricted to &lt;br /&gt;
* numeric constants&lt;br /&gt;
* some internal autopilot variables (not fully documented, see [[Flight_Plans#Internal_Variables_in_Flight_Plans|internal variables section]] below and other examples)&lt;br /&gt;
* Some binary operators: &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, &amp;lt;&amp;gt;, ==, +, -, /, *&lt;br /&gt;
* Some utility functions&lt;br /&gt;
&lt;br /&gt;
Some examples of usable expressions are given in the next sections.&lt;br /&gt;
=== Initialization  Blocks ===&lt;br /&gt;
Most flight plans will have three blocks of flight plan initialization blocks. It is good practice to follow this example below if you first start learning to create flightplans&lt;br /&gt;
&lt;br /&gt;
The first block waits until the GPS fix has been established, as shown below.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;blocks&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Wait GPS&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;set value=&amp;quot;1&amp;quot; var=&amp;quot;kill_throttle&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;while cond=&amp;quot;!GpsFixValid()&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The second block updates the local waypoints with respect to the UAV.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Geo init&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;while cond=&amp;quot;LessThan(NavBlockTime(), 10)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;NavSetGroundReferenceHere()&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This next block prevents the UAV from starting the engine and taking off. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Holding point&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;!--set var=&amp;quot;nav_mode&amp;quot; value=&amp;quot;NAV_MODE_ROLL&amp;quot;/--&amp;gt;&lt;br /&gt;
      &amp;lt;set value=&amp;quot;1&amp;quot; var=&amp;quot;kill_throttle&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;attitude roll=&amp;quot;0&amp;quot; throttle=&amp;quot;0&amp;quot; vmode=&amp;quot;throttle&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Exceptions ===&lt;br /&gt;
&lt;br /&gt;
The flight manager can handle exceptions. They consist in conditions checked periodically (at the same pace as the navigation control), allowing the control to jump to a given block. Here is the syntax of exceptions:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;exception cond=&amp;quot;...&amp;quot; deroute=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
where &amp;lt;tt&amp;gt;cond&amp;lt;/tt&amp;gt; is an expression and &amp;lt;tt&amp;gt;deroute&amp;lt;/tt&amp;gt; is the name of the block we want to switch to as soon as the condition is true.&lt;br /&gt;
&lt;br /&gt;
Here are some example of exceptions:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;exception cond=&amp;quot;10 &amp;gt; PowerVoltage()&amp;quot; deroute=&amp;quot;go_down&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;exception cond=&amp;quot;(ground_alt+10 &amp;gt; GetPosAlt())&amp;quot; deroute=&amp;quot;go_up&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;exception cond=&amp;quot;(autopilot_flight_time &amp;gt; 840)&amp;quot; deroute=&amp;quot;quick_land&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exceptions can be local to a block or global to the flight plan, in the &amp;lt;tt&amp;gt;&amp;lt;exceptions&amp;gt;&amp;lt;/tt&amp;gt; element. In the following example, time since last reception of a message from the ground station is monitored and the navigation is switched to the &amp;lt;tt&amp;gt;Standby&amp;lt;/tt&amp;gt; block if no message have been received for 22s. This exception is valid for '''all''' the blocks.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;flight_plan ...&amp;gt;&lt;br /&gt;
    &amp;lt;waypoints&amp;gt; ... &amp;lt;/waypoints&amp;gt;&lt;br /&gt;
    &amp;lt;exceptions&amp;gt;&lt;br /&gt;
      &amp;lt;exception cond=&amp;quot;datalink_time &amp;gt; 22&amp;quot; deroute=&amp;quot;Standby&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exceptions&amp;gt;&lt;br /&gt;
  &amp;lt;blocks&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Deroute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;deroute&amp;lt;/tt&amp;gt; is the ''goto'' directive of the flight plan; it switches the navigation to the given block:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;deroute block=&amp;quot;landing&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this primitive should not be used to execute loops which are provided by the following elements.&lt;br /&gt;
&lt;br /&gt;
=== Return ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;return&amp;lt;/tt&amp;gt; is also a ''goto'' directive that brings you back to the last block (and last stage). It has no argument.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;return/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Loops ===&lt;br /&gt;
&lt;br /&gt;
Unbounded loops are written with &amp;lt;tt&amp;gt;while&amp;lt;/tt&amp;gt; elements whose &amp;lt;tt&amp;gt;cond&amp;lt;/tt&amp;gt; attribute is a boolean expression.&lt;br /&gt;
Children  of &amp;lt;tt&amp;gt;while&amp;lt;/tt&amp;gt; are stages:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;while cond=&amp;quot;TRUE&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;go wp=&amp;quot;A&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;go wp=&amp;quot;B&amp;quot;/&amp;gt; &lt;br /&gt;
    &amp;lt;go wp=&amp;quot;C&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;while cond=&amp;quot;5 &amp;gt; stage_time&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;/while&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
In this example, we run an infinite loop, letting the aircraft try to go via waypoints &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;C&amp;lt;/tt&amp;gt; and waiting for 5 seconds before repeating.&lt;br /&gt;
&lt;br /&gt;
Bounded loops are written with the &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; tag:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;for var=&amp;quot;i&amp;quot; from=&amp;quot;0&amp;quot; to=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/for&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where the body of the loop will be run four times.&lt;br /&gt;
&lt;br /&gt;
The variable of a &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; loop can be used inside expressions appearing as attributes of the stages:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;for var=&amp;quot;i&amp;quot; from=&amp;quot;1&amp;quot; to=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot; radius=&amp;quot;75&amp;quot; alt=&amp;quot;ground_alt+50*$i&amp;quot; until=&amp;quot;stage_time&amp;gt;10&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/for&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the aircraft will circle around waypoint '''HOME''' for 10 seconds at and altitude above ground of 50m, 10 seconds at altitude 100 meter (50+50), ... until 250m (5x +50).&lt;br /&gt;
&lt;br /&gt;
Note: Two bounded loops using the same control variable are not allowed in the same block.&lt;br /&gt;
&lt;br /&gt;
=== Navigation modes ===&lt;br /&gt;
&lt;br /&gt;
Navigation modes give the description of the desired trajectory in 3D. While the horizontal mode is specified through&lt;br /&gt;
''stages'', the vertical control is specified with various attributes of these stages. The current available navigation stages are&lt;br /&gt;
* attitude : just keep a fixed attitude;&lt;br /&gt;
* heading : keep a given course;&lt;br /&gt;
* go : go to a given waypoint;&lt;br /&gt;
* path : list of waypoints linked by ''go''&lt;br /&gt;
* circle : circle around a waypoint;&lt;br /&gt;
* oval : two half circles with a straight between two nav points&lt;br /&gt;
* eight : fly a figure of eight through a waypoint and around another&lt;br /&gt;
* stay : hold the position (hard to realize for a fixed-wing aircraft);&lt;br /&gt;
* follow : follow another aircraft;&lt;br /&gt;
* xyz : circle around a point moveable with the RC transmitter stick (obsolete with the datalink).&lt;br /&gt;
&lt;br /&gt;
The vertical control is achieved using the &amp;lt;tt&amp;gt;vmode&amp;lt;/tt&amp;gt; attribute of these stages. The possible values are &lt;br /&gt;
* '''alt''' (the default) : the autopilot keeps the desired altitude which is the altitude of the waypoint (if any) or the altitude specified with the &amp;lt;tt&amp;gt;alt&amp;lt;/tt&amp;gt; attribute;&lt;br /&gt;
* '''climb''' : the autopilot keeps the desired vertical speed specified with the &amp;lt;tt&amp;gt;climb&amp;lt;/tt&amp;gt; attribute (in m/s);&lt;br /&gt;
* '''throttle''' : the autopilots sets the desired throttle specified with the &amp;lt;tt&amp;gt;throttle&amp;lt;/tt&amp;gt; attribute (between 0 and 1);&lt;br /&gt;
* '''glide''' : the autopilot keeps the desired slope between two waypoints&lt;br /&gt;
&lt;br /&gt;
The default control is done with the throttle. However, setting the &amp;lt;tt&amp;gt;pitch&amp;lt;/tt&amp;gt; attribute to '''auto''' and the &amp;lt;tt&amp;gt;throttle&amp;lt;/tt&amp;gt; attribute to a constant allows a vertical control only by controlling the attitude of the A/C.&lt;br /&gt;
The &amp;lt;tt&amp;gt;pitch&amp;lt;/tt&amp;gt; attribute also can be set to any value (in degrees) while the throttle control is in use: it usually affects the airspeed of the aircraft.  &lt;br /&gt;
&lt;br /&gt;
The different navigation modes are detailed in the next sections.&lt;br /&gt;
&lt;br /&gt;
=== Attitude ===&lt;br /&gt;
&lt;br /&gt;
Element &amp;lt;tt&amp;gt;attitude&amp;lt;/tt&amp;gt; is the navigation mode which corresponds to the current lowest control loop for horizontal mode.&lt;br /&gt;
The autopilot then keeps a constant attitude. The &amp;lt;tt&amp;gt;roll&amp;lt;/tt&amp;gt; attribute is required (in degrees, positive to put right wing low).&lt;br /&gt;
&lt;br /&gt;
To fly away, at constant airspeed:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;attitude roll=&amp;quot;0&amp;quot; vmode=&amp;quot;throttle&amp;quot;, throttle=&amp;quot;0.5&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fly around, holding a given altitude:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;attitude roll=&amp;quot;30&amp;quot; alt=&amp;quot;ground_alt+50&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it is not a ''safe'' navigation mode since the geographic position of the plane is not controlled. However, this mode is useful to tune the roll attitude control loop.&lt;br /&gt;
&lt;br /&gt;
=== Heading ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;heading&amp;lt;/tt&amp;gt; primitive is relative to the second level loop for horizontal mode in the autopilot which will keep the given &amp;lt;tt&amp;gt;course&amp;lt;/tt&amp;gt;, a required attribute (in degrees, clockwise, north=0, east=90).&lt;br /&gt;
&lt;br /&gt;
One example to takeoff, following the QFU, 80% throttle, nose up (15 degrees) until height of 30m is reached:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;heading course=&amp;quot;QFU&amp;quot; vmode=&amp;quot;throttle&amp;quot; throttle=&amp;quot;0.8&amp;quot; pitch=&amp;quot;15&amp;quot; until=&amp;quot;(GetPosAlt() &amp;gt; ground_alt+30)&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Go ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;go&amp;lt;/tt&amp;gt; primitive is probably the most useful one. Basically, the autopilot will try to join a given waypoint (&amp;lt;tt&amp;gt;wp&amp;lt;/tt&amp;gt;, the only required attribute). So the simplest thing you can ask for is&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;go wp=&amp;quot;HOME&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
which will set the '''HOME''' waypoint as the desired target position. Note than since &amp;lt;tt&amp;gt;vmode=&amp;quot;alt&amp;quot;&amp;lt;/tt&amp;gt; is the default, the altitude of the target waypoint is also taken into account. The navigation will switch to the next stage as soon as the target is reached.&lt;br /&gt;
&lt;br /&gt;
It is usually not a good idea to try to join a waypoint without asking for a precise trajectory, i.e. a given line.&lt;br /&gt;
Setting the &amp;lt;tt&amp;gt;hmode&amp;lt;/tt&amp;gt; attribute to '''route''', the navigation will go over a segment joining two waypoints:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;go from=&amp;quot;wp1&amp;quot; wp=&amp;quot;wp2&amp;quot; hmode=&amp;quot;route&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The target altitude is the altitude of the target waypoint; it can also be set with the &amp;lt;tt&amp;gt;alt&amp;lt;/tt&amp;gt; attribute. The following example keeps an altitude with fixed throttle:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;go from=&amp;quot;wp2&amp;quot; wp=&amp;quot;wp3&amp;quot; hmode=&amp;quot;route&amp;quot; pitch=&amp;quot;auto&amp;quot; throttle=&amp;quot;0.75&amp;quot; alt=&amp;quot;ground_alt+100&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes related to the vertical control can also be set to replace the default altitude mode:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;go from=&amp;quot;wp1&amp;quot; wp=&amp;quot;wp2&amp;quot; hmode=&amp;quot;route&amp;quot; vmode=&amp;quot;climb&amp;quot; climb=&amp;quot;1.5&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the &amp;lt;tt&amp;gt;approaching_time&amp;lt;/tt&amp;gt; (in seconds) attribute helps to decide when the target is ''reached''. It can be set&lt;br /&gt;
to '''0''' to go over the target waypoint (default value is the '''CARROT''' time, set in the airframe configuration file).&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;go from=&amp;quot;wp1&amp;quot; wp=&amp;quot;wp2&amp;quot; hmode=&amp;quot;route&amp;quot; approaching_time=&amp;quot;1&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Path ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;path&amp;lt;/tt&amp;gt; primitive is just a shorthand expression for a set of &amp;lt;tt&amp;gt;go&amp;lt;/tt&amp;gt; primitives. A list of waypoints defined with the &amp;lt;tt&amp;gt;wpts&amp;lt;/tt&amp;gt; attribute is pre-processed into a set of &amp;lt;tt&amp;gt;go&amp;lt;/tt&amp;gt; primitives with the &amp;lt;tt&amp;gt;hmode&amp;lt;/tt&amp;gt; attribute. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;path wpts=&amp;quot;wp1, wp2, wp3&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other attributes are optional:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;path wpts=&amp;quot;wp3, wp1, wp2&amp;quot; approaching_time=&amp;quot;1&amp;quot; pitch=&amp;quot;auto&amp;quot; throttle=&amp;quot;0.5&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Circle ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;circle&amp;lt;/tt&amp;gt; primitive is the second main navigation mode: the trajectory is defined as a circle around a given waypoint with a given radius:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;circle wp=&amp;quot;HOME&amp;quot; radius=&amp;quot;75&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
A positive radius makes the UAS move clockwise, a negative counter-clockwise.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;until&amp;lt;/tt&amp;gt; attribute may be used to control the end of the stage. The following example defines an ascending trajectory at constant throttle, nose up (15 degrees), over growing circles, until the battery level is low:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;circle wp=&amp;quot;wp1&amp;quot; radius=&amp;quot;50+(GetPosAlt()-ground_alt)/2&amp;quot; vmode=&amp;quot;throttle&amp;quot; throttle=&amp;quot;0.75&amp;quot; pitch=&amp;quot;15&amp;quot; until=&amp;quot;10&amp;gt;PowerVoltage()&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Oval ===&lt;br /&gt;
The oval consists of two half circles that are connected with two straight lines. This flight path is usefull when a IMU is used because the straights allow for level flight. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt; &amp;lt;oval p1=&amp;quot;1&amp;quot; p2=&amp;quot;2&amp;quot; radius=&amp;quot;nav_radius&amp;quot;/&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Eight ===&lt;br /&gt;
'''Works only for Fixed-wing!''' Fly a figure of eight that consists of two straight legs that pass though the center and the center of the half circle at the end of the two legs is in the turn around  waypoint. The altitude of the center waypoint is used for the entire figure. The turn around waypoint is moved to match radius given. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;  &amp;lt;eight center=&amp;quot;1&amp;quot; radius=&amp;quot;nav_radius&amp;quot; turn_around=&amp;quot;2&amp;quot;/&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Survey rectangle ===&lt;br /&gt;
Fly a survey rectangle defined by two waypoints. The distance between the legs of the grid (in meter) and the orientation of the grid (NS or WE) can be set by the operator. The plane will turn outside of the border of the rectangle before starting a new leg.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;  &amp;lt;survey_rectangle wp1=&amp;quot;1&amp;quot; wp2=&amp;quot;2&amp;quot; grid=&amp;quot;200&amp;quot; orientation=&amp;quot;NS&amp;quot;/&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Follow ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;follow&amp;lt;/tt&amp;gt; is a special primitive which makes the UAS follow another UAS (real or simulated, named with its &amp;lt;tt&amp;gt;ac_id&amp;lt;/tt&amp;gt;) at a given &amp;lt;tt&amp;gt;distance&amp;lt;/tt&amp;gt; (in meters) behind and at a given &amp;lt;tt&amp;gt;height&amp;lt;/tt&amp;gt; (in meters) above.&lt;br /&gt;
&lt;br /&gt;
In this example, the autopilot will try to follow A/C number '''4''', staying '''50'''m behind and '''20'''m above.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;follow ac_id=&amp;quot;4&amp;quot; distance=&amp;quot;50&amp;quot; height=&amp;quot;20&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Stay ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;stay&amp;lt;/tt&amp;gt; Here the UAS with try to stay at the waypoint as best as it can. For an aircraft capable of hovering it will just hang above the waypoint. For a fixedwing type UAV,&amp;lt;tt&amp;gt;stay&amp;lt;/tt&amp;gt; will mean the aircraft will constantly fly straight through the waypoint in a flower like pattern with the smallest turn radius it can manage.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;stay wp=&amp;quot;HOME&amp;quot; alt=&amp;quot;10&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XYZ ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;xyz&amp;lt;/tt&amp;gt; is a special mode where the UAS circles around a user moveable waypoint. This waypoint is moved with the RC sticks:&lt;br /&gt;
* YAW channel controls the point over the west-east axis;&lt;br /&gt;
* PITCH channel controls the point over the south-north axis;&lt;br /&gt;
* ROLL channel controls the altitude.&lt;br /&gt;
&lt;br /&gt;
Example (default radius is '''100'''):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;xyz radius=&amp;quot;40&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;set&amp;lt;/tt&amp;gt; element is a dangerous one which should be used only by expert users: it is used to directly set an internal variable of the autopilot. For example, you can change the value of the default ground altitude, a variable used by the home mode failsafe procedure (and maybe by your own flight plan):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;set var=&amp;quot;ground_alt&amp;quot; value=&amp;quot;ground_alt+50&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
This directive is extremely powerful and has great potential for error - use with caution.&lt;br /&gt;
&lt;br /&gt;
=== Call ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;call&amp;lt;/tt&amp;gt; allows the user to define its own navigation procedures in C. The &amp;lt;tt&amp;gt;value&amp;lt;/tt&amp;gt; must be a call to a boolean function which must return TRUE as long as the stage is not completed (a function which should be called only once would then return immediately FALSE).&lt;br /&gt;
This feature is illustrated with the '''line''' pattern:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;call fun=&amp;quot;nav_line_setup()&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;call fun=&amp;quot;nav_line_run(WP_1, WP_2, nav_radius)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where &amp;lt;tt&amp;gt;nav_line_setup()&amp;lt;/tt&amp;gt; returns FALSE and &amp;lt;tt&amp;gt;nav_line_run()&amp;lt;/tt&amp;gt; always returns TRUE (this stage never ends). '''Note''' that a waypoints index is derived/denoted by prefixing the waypoint name with &amp;lt;tt&amp;gt;WP_&amp;lt;/tt&amp;gt;(i.e.: 1 --&amp;gt; WP_1, 2 --&amp;gt; WP_2)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To call ''any'' function exactly once regardless of the return value (e.g. call a void function), add &amp;lt;tt&amp;gt;loop=&amp;quot;FALSE&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;call fun=&amp;quot;viewvideo_take_shot(TRUE)&amp;quot; loop=&amp;quot;FALSE&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or use the &amp;lt;tt&amp;gt;call_once&amp;lt;/tt&amp;gt; alias:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;call_once fun=&amp;quot;viewvideo_take_shot(TRUE)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such extra navigation functions are usually written as a [[Modules|Module]] and the header files are included automatically.&lt;br /&gt;
&lt;br /&gt;
If you want to call functions that are not part of a module, you need to include the header file which contains the function declaration:or supplementary C file which must be specified in the &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;header&amp;gt;&lt;br /&gt;
#include &amp;quot;path/to/header.h&amp;quot;&lt;br /&gt;
  &amp;lt;/header&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where the path is relative to the &amp;lt;tt&amp;gt;sw/airborne&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
You can also call functions before or after each execution of the block (this means continuously on each iteration of each stage of the block, not just when entering o exiting the block).&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block name=&amp;quot;circlehome&amp;quot; pre_call=&amp;quot;function_to_call_before_circle()&amp;quot; post_call=&amp;quot;function_to_call_after_circle()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pre Call ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;block name=&amp;quot;Standby&amp;quot; strip_button=&amp;quot;Standby&amp;quot; strip_icon=&amp;quot;home.png&amp;quot; pre_call=&amp;quot;if(!InsideKill(GetPosX(), GetPosY())) NavKillThrottle();&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Post Call ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;block name=&amp;quot;traj&amp;quot; pre_call=&amp;quot;formation_pre_call()&amp;quot; post_call=&amp;quot;formation_flight()&amp;quot;&amp;gt; &amp;lt;!-- formation flight is call after all other navigation tasks --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedures ==&lt;br /&gt;
&lt;br /&gt;
Procedures are libraries which can be included in flight plans. They are composed of waypoints, sectors and blocks. The header of a procedure may contain some parameters which are replaced by arguments when the procedure is included.&lt;br /&gt;
&lt;br /&gt;
Extract of the DTD: a procedure is a sequence of parameters, waypoints, ...:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;!ELEMENT procedure (param*,header?,waypoints?,sectors?,exceptions?,blocks?)&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;param&amp;lt;/tt&amp;gt;eter is just a name. A parameter is optional if it is declared with a default value.&lt;br /&gt;
An example with a required and an optional parameter:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;param name=&amp;quot;alt&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;param name=&amp;quot;radius&amp;quot; default_value=&amp;quot;75&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Procedures are called with the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; element in a flight plan. A procedure cannot be included twice or by another procedure. A procedure call requires:&lt;br /&gt;
&lt;br /&gt;
* the name of the procedure file, the name given to this inclusion; &lt;br /&gt;
* values for the parameters;&lt;br /&gt;
* backlinks for block name exits of the procedure.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;include name=&amp;quot;landing&amp;quot; procedure=&amp;quot;landing.xml&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding procedure '''landing.xml''':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE procedure SYSTEM &amp;quot;flight_plan.dtd&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;procedure&amp;gt;&lt;br /&gt;
    &amp;lt;waypoints&amp;gt;&lt;br /&gt;
      &amp;lt;waypoint name=&amp;quot;AF&amp;quot; x=&amp;quot;177.4&amp;quot; y=&amp;quot;45.1&amp;quot; alt=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;waypoint name=&amp;quot;TD&amp;quot; x=&amp;quot;28.8&amp;quot; y=&amp;quot;57.0&amp;quot; alt=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;waypoint name=&amp;quot;_BASELEG&amp;quot; x=&amp;quot;168.8&amp;quot; y=&amp;quot;-13.8&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/waypoints&amp;gt;&lt;br /&gt;
    &amp;lt;blocks&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
      &amp;lt;block name=&amp;quot;land&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;call fun=&amp;quot;nav_compute_baseleg(WP_AF, WP_TD, WP__BASELEG, nav_radius)&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;circle radius=&amp;quot;nav_radius&amp;quot; until=&amp;quot;NavCircleCount() &amp;gt; 0.5&amp;quot; wp=&amp;quot;_BASELEG&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;circle radius=&amp;quot;nav_radius&amp;quot; until=&amp;quot;And(NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-10), 10 &amp;gt; fabs(GetPosAlt()- WaypointAlt(WP__BASELEG)))&amp;quot; wp=&amp;quot;_BASELEG&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/block&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/blocks&amp;gt;&lt;br /&gt;
  &amp;lt;/procedure&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the name of procedure '''land''' block will be renamed into '''landing.land''':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;deroute block=&amp;quot;landing.land&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
will jump to this procedure block.&lt;br /&gt;
&lt;br /&gt;
Suppose you have a go-around condition in your landing procedure. You would write it&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;exception cond=&amp;quot;...&amp;quot; deroute=&amp;quot;go-around&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
then you must link this block exit with one of your block (e.g. &amp;lt;tt&amp;gt;Standby&amp;lt;/tt&amp;gt;). So you would include the procedure as follows:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;include name=&amp;quot;landing&amp;quot; procedure=&amp;quot;landing.xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;with from=&amp;quot;go-around&amp;quot; to=&amp;quot;Standby&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/include&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Internal Variables in Flight Plans ==&lt;br /&gt;
&lt;br /&gt;
The flight plan can use several internal variables, macros and functions coming from the rest of the system or the flight plan API itself. The following list present some of the most commonly used variables, but much more are actually available:&lt;br /&gt;
&lt;br /&gt;
* '''autopilot_flight_time''': time in seconds since autopilot was booted (integer)&lt;br /&gt;
* '''datalink_time''': time in seconds since last connection of telemetry to ground control station (including ''subsystems/datalink/datallink.h'' in the '''header''' section is required) (integer)&lt;br /&gt;
* '''GetPosAlt()''': returns the current altitude above ground level in meter (float)&lt;br /&gt;
* '''GetPosX()''': returns x (easting) of current position relative to reference in meter (float)&lt;br /&gt;
* '''GetPosY()''': returns y (northing) of current position relative to reference in meter (float)&lt;br /&gt;
* &amp;lt;s&amp;gt;'''ground_alt''': altitude above ground level in meter (float)&amp;lt;/s&amp;gt; (v5.8 and higher - use '''GetAltRef()''' instead)&lt;br /&gt;
* '''GetAltRef()''': returns reference altitude, usually ground_alt&lt;br /&gt;
* '''NavSetGroundReferenceHere()''': reset position and altitude reference point to current position&lt;br /&gt;
* '''NavSetAltitudeReferenceHere()''': reset altitude reference to current alt but keep previous horizontal position reference&lt;br /&gt;
* '''NavSetWaypointHere(_wp)''': set position of a waypoint given as argument to the current position&lt;br /&gt;
* '''WaypointX(_wp)''': returns x (easting) of waypoint position relative to reference in meter (float)&lt;br /&gt;
* '''WaypointY(_wp)''': returns y (northing) of waypoint position relative to reference in meter (float)&lt;br /&gt;
* '''WaypointAlt(_wp)''': returns waypoint altitude in meter (float)&lt;br /&gt;
* '''nav_radius''': free variable usually used to set circle radius in flight plan&lt;br /&gt;
* '''NavKillThrottle()''': function to switch off throttle&lt;br /&gt;
* '''PowerVoltage()''': returns current voltage of the battery&lt;br /&gt;
* all functions from the [http://docs.paparazziuav.org/latest/group__state__interface.html state interface API]&lt;br /&gt;
* all functions from the [http://docs.paparazziuav.org/latest/subsystems_2navigation_2waypoints_8h.html waypoint API]&lt;br /&gt;
* all variables declared in [[modules]] headers&lt;br /&gt;
&lt;br /&gt;
== Advanced Examples ==&lt;br /&gt;
&lt;br /&gt;
Parameters used in a flight plan can be computed expressions. In this example, the plane is asked to perform 5 circles at progressively increasing altitudes for exactly one minute at each altitude:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;for var=&amp;quot;i&amp;quot; from=&amp;quot;1&amp;quot; to=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot; radius=&amp;quot;75&amp;quot;&lt;br /&gt;
          alt=&amp;quot;ground_alt + 50*$i&amp;quot;&lt;br /&gt;
          until=&amp;quot;stage_time &amp;gt; 60&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/for&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below you find some random examples of the posibilities. This is only the tip of the iceberg, use your imagination and go wild with new creative ideas for your flightplan&lt;br /&gt;
&lt;br /&gt;
=== Gains on the fly ===&lt;br /&gt;
&lt;br /&gt;
It is very well possible to set specific gain for an airframe if it reaches e.g a certain block.&lt;br /&gt;
&lt;br /&gt;
=== Dynacmically adjustable maximum speed ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;call_once fun=&amp;quot;gh_set_max_speed(2.0)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Immobilize Actuators === &lt;br /&gt;
&lt;br /&gt;
h_ctl setpoints variable are set by the h_ctl_attitude_loop() (from fw_h_ctl.c) loop) which can be disabled with the h_ctl_disabled flag:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;set var=&amp;quot;h_ctl_disabled&amp;quot; value=&amp;quot;TRUE&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;set var=&amp;quot;h_ctl_aileron_setpoint&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;set var=&amp;quot;h_ctl_elevator_setpoint&amp;quot; value=&amp;quot;MAX_PPRZ/2&amp;quot;/&amp;gt;&lt;br /&gt;
 .... waiting for a condition ...&lt;br /&gt;
 &amp;lt;set var=&amp;quot;h_ctl_disabled&amp;quot; value=&amp;quot;FALSE&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips and Tricks ==&lt;br /&gt;
&lt;br /&gt;
There are many ways to skin a cat just as there are many ways to craft your flight plan. Following the best practices tips can save you from a lot of frustration and mishap.&lt;br /&gt;
&lt;br /&gt;
* Simulate your flight plan before taking it to the sky. Flight plans should always be carefully tested prior to flight, take a look at the [[Simulation|simulation]] page for details on how to simulate your plan.&lt;br /&gt;
* Make an subdirectory in the Flight_plan directory with your own name and add your flight plans there. Make sure that the location of the DTD is correct, e.g by using relative directory double dots as in &amp;lt;tt&amp;gt;&amp;lt;!DOCTYPE flight_plan SYSTEM &amp;quot;../flight_plan.dtd&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Take a good look at other flight plans included with Paparazzi. To learn from example flight plans please visit the [[Flight_Plan_Examples|flight plan examples]] page&lt;br /&gt;
* There are several option to build failsafe features into you flightplan, [[Failsafe|for some examples visit the Failsafe page]].&lt;br /&gt;
* Some flight plan examples define waypoint locations using relative coordinates. These are relative positions from the fixed lat and lon in the header of the flight plan. When simulating your flight plan the aircraft always use the lat/lon as defined in the flight plan since a regular simulation has no notion of you current position of you local PC where you simulate on. This is something to keep in mind if you test your flight plan in real flights.&lt;br /&gt;
&lt;br /&gt;
=== V5.8+ ===&lt;br /&gt;
* If you don't like the '''No SRTM data found to check altitude''' warning, either in your flight plan editor or in GCS itself click on the '''Nav-&amp;gt;display SRTM'''. It will ask you whether you want to download SRTM data. Say yes, and it will save the data in ''data/srtm'' directory, so you don't get the warning any more and check the ground altitude even without GPS.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=21268</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=21268"/>
		<updated>2016-06-21T19:21:32Z</updated>

		<summary type="html">&lt;p&gt;Flixr: v5.8.2 maintenance release&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
[[Image:Welcome to paparazziuav.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{Hotbar}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[http://paparazziuav.org Paparazzi UAV]''' (Unmanned Aerial Vehicle) is an open-source drone hardware and software project encompassing autopilot systems and ground station software for multicopters/multirotors, fixed-wing, helicopters and hybrid aircraft that was founded in 2003. [http://paparazziuav.org Paparazzi UAV] was designed with autonomous flight as the primary focus and manual flying as the secondary. From the beginning it was designed with portability in mind and the ability to control multiple aircraft within the same system. Paparazzi features a dynamic flight plan system that is defined by mission states and using way points as “variables”. This makes it easy to create very complex fully automated missions without the operators intervention. For more project information, [[General|see here]].&lt;br /&gt;
&lt;br /&gt;
{{P Header Box|color=#D51D00|size=100%|&amp;lt;center&amp;gt;Legal Disclaimer&amp;lt;/center&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The Paparazzi software source and hardware design is distributed without any guarantee. Before flying, please refer to your country's national aviation regulation for Unmanned Aerial Systems, or the one of the country you intend to overfly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Left column start --&amp;gt;&lt;br /&gt;
{{P Topic Table|{{P Header Box|ico=favicon32.png|[[General]]}} &lt;br /&gt;
{{:General/Index}}&lt;br /&gt;
{{P Header Box|ico=Gear.png|[[Hardware]]}} &lt;br /&gt;
{{:Hardware/Index}}&lt;br /&gt;
{{P Header Box|ico=Code.png|[[Software]]}} &lt;br /&gt;
{{:Software/Index}}&lt;br /&gt;
{{P Header Box|ico=favicon32.png|[[Miscellaneous]]}} &lt;br /&gt;
{{:Miscellaneous/Index}}&lt;br /&gt;
&amp;lt;!-- Right column start --&amp;gt;&lt;br /&gt;
|{{P Release|v5.8.2_stable|v5.8}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Blog posts --&amp;gt;&lt;br /&gt;
{{P Header Box|ico=RSS.png|[http://blog.paparazziuav.org Paparazzi UAV Blog]}}&lt;br /&gt;
&amp;lt;rss max=10 item-max-length=&amp;quot;1000&amp;quot;&amp;gt;http://feeds.feedburner.com/PaparazziBlog&amp;lt;/rss&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Youtube Video Playlist --&amp;gt;&lt;br /&gt;
{{P Header Box|ico=Video.png|Video Collection}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{#ev:youtubeplaylist|PLekU8nVT6qLm3oOudER7WVuj2plH_aU4u}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Flight_Plans&amp;diff=21267</id>
		<title>Flight Plans</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Flight_Plans&amp;diff=21267"/>
		<updated>2016-06-19T20:08:13Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Dynacmically adjustable maximum speed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A '''flight plan''' is a XML document which one can create and store aboard an autopilot. The flight plan will describe how you want your aircraft to travel if released into into the wild blue yonder.&lt;br /&gt;
&lt;br /&gt;
== DTD and Structure ==&lt;br /&gt;
&lt;br /&gt;
The formal description of the flight plan file is given in the [http://en.wikipedia.org/wiki/Document_Type_Definition '''DTD'''] (located in &amp;lt;tt&amp;gt;conf/flight_plans/flight_plan.dtd&amp;lt;/tt&amp;gt;). This&lt;br /&gt;
DTD must be referenced in the header of your flight plan XML document using the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;!DOCTYPE flight_plan SYSTEM &amp;quot;flight_plan.dtd&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The flight plans are stored in the &amp;lt;tt&amp;gt;conf/flight_plans&amp;lt;/tt&amp;gt; directory. The [[Flight_Plan_Editor|flight plan editor]] can be used to create basic flight plans via the GUI.&lt;br /&gt;
&lt;br /&gt;
Extract from the [http://en.wikipedia.org/wiki/Document_Type_Definition DTD]:&lt;br /&gt;
 &amp;lt;tt&amp;gt;&amp;lt;!ELEMENT flight_plan (header?,waypoints,sectors?,variables?,includes?,exceptions?,blocks)&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''A flight plan is composed of two mandatory elements: [[#waypoints|waypoints]] and [[#blocks|blocks]]'''&lt;br /&gt;
&lt;br /&gt;
The root &amp;lt;tt&amp;gt;flight_plan&amp;lt;/tt&amp;gt; element is specified with several attributes:&lt;br /&gt;
 &amp;lt;tt&amp;gt;'''&amp;lt;flight_plan name lat0 lon0 ground_alt security_height home_mode_height qfu alt max_dist_from_home&amp;gt;'''&amp;lt;/tt&amp;gt;&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''name'''&amp;lt;/tt&amp;gt;: The name of the mission (a text string)&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''lat0, lon0'''&amp;lt;/tt&amp;gt;: Defines the latitude and longitude coordinates of the reference point {0,0} in WGS84 degree coordinates&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''ground_alt'''&amp;lt;/tt&amp;gt;: The ground altitude (in meters), Above Sea Level where you are flying. It defines the &amp;lt;tt&amp;gt;GROUND_ALT&amp;lt;/tt&amp;gt; constant value which can be used in combination with a waypoint &amp;lt;height&amp;gt; parameter to define a waypoint height&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt;:  The height (over &amp;lt;tt&amp;gt;'''ground_alt'''&amp;lt;/tt&amp;gt;) used by the circle-home failsafe procedure and in other flight procedures such as formation flight and anti-collision avoidance. Warnings are produced if you place a waypoint lower than &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt; (usually the case for the landing point)&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''home_mode_height'''&amp;lt;/tt&amp;gt; (optional): This optional attribute available since v4.2 allows to override &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt; as failsafe height in home mode. If &amp;lt;tt&amp;gt;'''home_mode_height'''&amp;lt;/tt&amp;gt; Is set lower than &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt;, the later is used. This attribute is useful if you need to return home at a high altitude rather than a low altitude.&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''qfu'''&amp;lt;/tt&amp;gt; (optional): defines the global constant &amp;lt;tt&amp;gt;QFU&amp;lt;/tt&amp;gt;. It usually is the magnetic heading in degrees (north=0, east=90) of the runway, the opposite of wind direction. This constant may be used in the mission description. It is also used by the simulator as the original course of the aircraft. So if you want to take off and climb to the West you would use qfu=270. &lt;br /&gt;
; &amp;lt;tt&amp;gt;'''alt'''&amp;lt;/tt&amp;gt;: The default altitude of waypoints ([[Altitude_definitions|Above Sea Level]]). So if your ground altitude is 400 then alt needs to be a value greater than ground altitude and above any obstructions in the flight plan. &lt;br /&gt;
; &amp;lt;tt&amp;gt;'''max_dist_from_home'''&amp;lt;/tt&amp;gt;: A radius representing the maximum allowed distance (in meters) from the HOME waypoint. Exceeding this value (ie flying outside the circle with this radius) will trigger an exception. It is up to you to define the block to be executed (ie what to do) for the exception.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Here is an '''example''' of such a line in the top of a flight plan:''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;flight_plan alt=&amp;quot;250&amp;quot; ground_alt=&amp;quot;185&amp;quot; lat0=&amp;quot;43.46223&amp;quot; lon0=&amp;quot;1.27289&amp;quot; name=&amp;quot;Example Muret&amp;quot; max_dist_from_home=&amp;quot;300&amp;quot; qfu=&amp;quot;270&amp;quot; security_height=&amp;quot;25&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that a flight plan could also contain optional &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;'s and &amp;lt;tt&amp;gt;exceptions&amp;lt;/tt&amp;gt; cases.&lt;br /&gt;
&lt;br /&gt;
In English the above flight plan says the name is Example Muret. The reference coordinates for the 0,0 point is: 43.46223 (lat) and 1.27289 (long). The flying site 0,0 location is 185m above sea level. The security height is 25m above 0,0 point or 210m above sea level. The default (ie if not defined in a waypoint this alt is used) altitude is 250m (above sea level). The home mode block altitude is defined to be 150m above sea level. Also, for security, a circle is defined with a radius that's 300m from 0,0 position. This is the max_dist_from_home value. Fly 301m from 0,0 and an exception is triggered. A useful block is to trigger/go to the home mode block and return to home when the aircraft flies outside the safety circle. Example flight plans are helpful for study before you build your own from scratch.&lt;br /&gt;
&lt;br /&gt;
== Waypoints ==&lt;br /&gt;
&lt;br /&gt;
The waypoints are the geographic locations used to specify the trajectories. A waypoint is specified by it's name and coordinates:&lt;br /&gt;
 &amp;lt;tt&amp;gt;''' &amp;lt;waypoint name wpx wpy [alt] [height]/&amp;gt; '''&amp;lt;/tt&amp;gt;&lt;br /&gt;
where wpx and wpy are real positional coordinates ( &amp;lt;tt&amp;gt;'''lat/lon'''&amp;lt;/tt&amp;gt; )  '''or''' UTM coordinates ( &amp;lt;tt&amp;gt;'''utm_x0/utm_y0'''&amp;lt;/tt&amp;gt; ) '''or''' relative coordinates ( &amp;lt;tt&amp;gt;'''x/y'''&amp;lt;/tt&amp;gt; ) in meters from your reference point {0,0} .  &amp;lt;tt&amp;gt;alt&amp;lt;/tt&amp;gt; is an optional parameter and can be used to assign an altitude to a particular waypoint that is different from the globally defined &amp;lt;tt&amp;gt;alt&amp;lt;/tt&amp;gt; parameter of the flightplan. The &amp;lt;tt&amp;gt;height&amp;lt;/tt&amp;gt; attribute can be used to set the waypoint height relative to the [[Altitude_definitions|ground altitude]] (&amp;lt;tt&amp;gt;ground_alt&amp;lt;/tt&amp;gt;) of the flight plan for this waypoint.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;waypoints&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;HOME&amp;quot; x=&amp;quot;0.0&amp;quot; y=&amp;quot;30.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;BRIDGEOVERRIVER&amp;quot; x=&amp;quot;-100.0&amp;quot; y=&amp;quot;60.0&amp;quot; alt=&amp;quot;270.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;MyBarn&amp;quot; x=&amp;quot;-130.0&amp;quot; y=&amp;quot;217.5&amp;quot; alt=&amp;quot;3000.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;3&amp;quot; x=&amp;quot;-30.0&amp;quot; y=&amp;quot;50&amp;quot; height=&amp;quot;50.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;4&amp;quot; x=&amp;quot;-30.0&amp;quot; y=&amp;quot;50.&amp;quot; alt=&amp;quot;ground_alt + 50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;_MYHELPERSPOT&amp;quot; x=&amp;quot;-30.0&amp;quot; y=&amp;quot;60&amp;quot; height=&amp;quot;50.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;_MYOTHERHELPERSPOT&amp;quot; x=&amp;quot;-70.0&amp;quot; y=&amp;quot;90&amp;quot; height=&amp;quot;70.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;TOWER&amp;quot; lat=&amp;quot;48.858249&amp;quot; lon=&amp;quot;2.294494&amp;quot; height=&amp;quot;324.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;MountainCAFE&amp;quot; utm_x0=&amp;quot;360284.8&amp;quot; utm_y0=&amp;quot;4813595.5&amp;quot; alt=&amp;quot;1965.&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/waypoints&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Tips'''&lt;br /&gt;
* Waypoints are easily adjusted with the [[Flight_Plan_Editor|flight plan editor]].&lt;br /&gt;
* If a waypoint name starts with an underscore ( _ ), the waypoint is '''not displayed''' in the GCS, except in editor mode.&lt;br /&gt;
* The maximum number of waypoints is 254.&lt;br /&gt;
* A waypoint named &amp;lt;tt&amp;gt;HOME&amp;lt;/tt&amp;gt; is required if the failsafe HOME mode procedure is used.&lt;br /&gt;
* A waypoints index/reference pointer is derived by prefixing the waypoint name with &amp;quot;WP_&amp;quot;. Useful when a [[#Call |call function]] uses the waypoints reference index vs. it's name.&lt;br /&gt;
&lt;br /&gt;
== Sectors ==&lt;br /&gt;
&lt;br /&gt;
=== Static sectors (default) ===&lt;br /&gt;
&lt;br /&gt;
Flat ''Sectors'' can be described as an area defined by list of waypoint corners. Such an area will be displayed in the Ground Control Station (GCS) by colored lines connecting the cornerpoints.&lt;br /&gt;
A function is generated to check if a point, usually the aircraft itself, is ''inside'' this sector. Currently, this feature requires that the polygon is &amp;lt;b&amp;gt;convex&amp;lt;/b&amp;gt; and described in a &amp;lt;b&amp;gt;clockwise&amp;lt;/b&amp;gt; order. For a sector named &amp;lt;tt&amp;gt;MyBigGarden&amp;lt;/tt&amp;gt; the generated function for the example here would be &amp;lt;tt&amp;gt;bool_t InsideMyBigGarden(float x, float y);&amp;lt;/tt&amp;gt; where &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y&amp;lt;/tt&amp;gt; are east and north coordinated, in meters, relative to the geographic reference of the flight plan. If the flight plan is dynamically relocated, such a sector will be relocated but the display is currently not updated on the GCS. It would be great if one would help improving that part of the source code. Note that sector names are not allowed to contain spaces.&lt;br /&gt;
&lt;br /&gt;
For example, with the following element in a flight plan.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;sectors&amp;gt;&lt;br /&gt;
    &amp;lt;sector name=&amp;quot;MyBigGarden&amp;quot; color=&amp;quot;red&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/sector&amp;gt;&lt;br /&gt;
  &amp;lt;/sectors&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is then possible to add an exception clause to your flightplan. For example if the aircraft for some reason flies outside this, defined by us, sector the airframe will fly to a standby waypoint. The exclamation mark (!) means the boolean operator &amp;lt;tt&amp;gt;NOT&amp;lt;/tt&amp;gt; in this example. In regular language one would describe &amp;quot;If my airframe is NOT inside the MyBigGarden sector anymore then deroute it to the standby waypoint. In Flightplan &amp;quot;Speak&amp;quot; this is written like: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;exception cond=&amp;quot;! InsideMyBigGarden(GetPosX(), GetPosY())&amp;quot; deroute=&amp;quot;standby&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: editing of the waypoints of the sector during the flight will not dynamically update the inside function. It will always check if the position is inside the original sector.&lt;br /&gt;
&lt;br /&gt;
'''Tips'''&lt;br /&gt;
* A nice option in the corner notation is that one can add an underscore ( _ ) in front of the name; a corner or waypoint name that starts with an underscore is not displayed in the GCS. Only in editor mode it is visible. It is visible in editor mode, because if you the could not see it, it also would be not possible to edit or drag the corner or waypoint to another position.&lt;br /&gt;
* The color indicating the sector borders is not fixed but can be defined by oneself if wished for via the color attribute.&lt;br /&gt;
&lt;br /&gt;
=== Dynamic sectors ===&lt;br /&gt;
&lt;br /&gt;
With the latest version (v5.5-devel-628), it is possible to create dynamic sectors. The procedure to create the sector is the same than for the static version with an extra attribute '''type=&amp;quot;dynamic&amp;quot;''':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;sectors&amp;gt;&lt;br /&gt;
    &amp;lt;sector name=&amp;quot;MyBigGarden&amp;quot; color=&amp;quot;red&amp;quot; type=&amp;quot;dynamic&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/sector&amp;gt;&lt;br /&gt;
  &amp;lt;/sectors&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also recommended to avoid using hidden waypoints (no _ prefix), so you can move the corner of your sector from the GCS. The polygon is updated on the 2D map to reflect the new waypoints positions.&lt;br /&gt;
Beside the possibility to change the shape of the area in flight, one of the main benefit is that the algorithm behind allows concave hulls. The only restriction is that the edges of the polygon should not cross each other.&lt;br /&gt;
&lt;br /&gt;
The generated function is the same than the static version and can be used the same way.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
'''Available since v5.9'''&lt;br /&gt;
&lt;br /&gt;
It is possible to declare a list of variables that will be automatically created during the flight plan generation and available for the rest of the system from the generated flight plan header and of course inside the flight plan itself. With appropriate attributes, it is also possible to make the variables accessible from the telemetry as a [[Settings|setting]].&lt;br /&gt;
&lt;br /&gt;
The following code will produce a '''float''' variable initialized to 0:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variables&amp;gt;&lt;br /&gt;
    &amp;lt;variable var=&amp;quot;my_var&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/variables&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The type and the initial value can be changed with the '''type''' and '''init''' attributes:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variables&amp;gt;&lt;br /&gt;
    &amp;lt;variable var=&amp;quot;my_var&amp;quot; init=&amp;quot;10&amp;quot; type=&amp;quot;int&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/variables&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To produce an automatic setting for a variable, at least '''min''', '''max''' and '''step''' attributes need to be specified:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variables&amp;gt;&lt;br /&gt;
    &amp;lt;variable var=&amp;quot;my_var&amp;quot; min=&amp;quot;0.&amp;quot; max=&amp;quot;10.&amp;quot; step=&amp;quot;0.1&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/variables&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
They will appear under the '''Flight Plan''' settings tab in the GCS. So more attributes can be specified: '''shortname''', '''unit''', '''alt_unit''', '''alt_unit_coef''', '''values'''. See [[Settings]] page for more information about these options.&lt;br /&gt;
&lt;br /&gt;
== Includes ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; is used to add some flight plan elements defined in an external procedure. It’s useful to include pre-written procedures with only few arguments and then clarify the flight plan.&lt;br /&gt;
Here is the structure:&lt;br /&gt;
 &amp;lt;tt&amp;gt;&amp;lt;include name procedure&amp;gt; [&amp;lt;arg name value /&amp;gt;]*[&amp;lt;with from to /&amp;gt;]*&amp;lt;/include&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
where &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; attribute of the include element will be used in this flight plan to prefix the blocks of the &amp;lt;tt&amp;gt;procedure&amp;lt;/tt&amp;gt;, the XML referenced file.&lt;br /&gt;
Named arguments may be given with their value in the &amp;lt;tt&amp;gt;arg&amp;lt;/tt&amp;gt; elements. The &amp;lt;tt&amp;gt;with&amp;lt;/tt&amp;gt; tag allows to link labels (e.g. attribute of a deroute instruction or of an exception) from the procedure to blocks of the main flight plan.&lt;br /&gt;
Then, each block of the procedure is like any block of the flight plan and is designated with a dotted identifier: block &amp;lt;tt&amp;gt;b&amp;lt;/tt&amp;gt; of a procedure named &amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt; is named &amp;lt;tt&amp;gt;b.p&amp;lt;/tt&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;includes&amp;gt;&lt;br /&gt;
    &amp;lt;include name=&amp;quot;landing&amp;quot; procedure=&amp;quot;landing.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/includes&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Blocks ==&lt;br /&gt;
&lt;br /&gt;
Block elements are the main part of a flight plan: they describe each unit of the mission.&lt;br /&gt;
They are made of various primitives, called stages and exceptions, you can put one after the other. When a&lt;br /&gt;
stage (or a block) is finished, the autopilot goes to the next one. The behaviour after the last stage of the last block is undefined. &lt;br /&gt;
&lt;br /&gt;
As described in the DTD, the &amp;lt;tt&amp;gt;blocks&amp;lt;/tt&amp;gt; element is composed of &amp;lt;tt&amp;gt;block&amp;lt;/tt&amp;gt; elements which are sequence of ''stages'':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!ELEMENT blocks (block+)&amp;gt;&lt;br /&gt;
  &amp;lt;!ELEMENT block  (exception|while|heading|attitude|go|xyz|set|call|circle|deroute|stay|follow|survey_rectangle|for|return|eight|oval|home|path)*&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block name=&amp;quot;circlehome&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle radius=&amp;quot;75&amp;quot; wp=&amp;quot;HOME&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can add a button in the [[GCS#Strips|strip of the aircraft]] with the attribute &amp;lt;tt&amp;gt;strip_button&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block name=&amp;quot;descent&amp;quot; strip_button=&amp;quot;Descent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot; throttle=&amp;quot;0.0&amp;quot; pitch=&amp;quot;-15&amp;quot; vmode=&amp;quot;throttle&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This button will activate the block. If the attribute &amp;lt;tt&amp;gt;group&amp;lt;/tt&amp;gt; is specified, all strip buttons of the same group will be placed vertically on top of each other.&lt;br /&gt;
&lt;br /&gt;
In the same way, a key shortcut can be specified:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block key=&amp;quot;D&amp;quot; name=&amp;quot;descent&amp;quot; strip_button=&amp;quot;Descent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot; throttle=&amp;quot;0.0&amp;quot; pitch=&amp;quot;-15&amp;quot; vmode=&amp;quot;throttle&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Modifiers are allowed, using the syntax of [http://library.gnome.org/devel/gtk/2.15/gtk-Keyboard-Accelerators.html#gtk-accelerator-parse GTK accelerators].&lt;br /&gt;
&lt;br /&gt;
An icon can be specified to display the button. The &amp;lt;tt&amp;gt;strip_button&amp;lt;/tt&amp;gt; label then is a tooltip for the icon. The icon must be an image file available in the directory &amp;lt;tt&amp;gt;data/pictures/gcs_icons&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;block name=&amp;quot;Takeoff&amp;quot; strip_icon=&amp;quot;takeoff.png&amp;quot; strip_button=&amp;quot;Takeoff&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can call functions before or after each execution of the block:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block name=&amp;quot;circlehome&amp;quot; pre_call=&amp;quot;function_to_call_before_circle()&amp;quot; post_call=&amp;quot;function_to_call_after_circle()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Expressions ====&lt;br /&gt;
&lt;br /&gt;
Most of the numeric attributes in stages are analyzed as C expressions. The syntax of this C expression is restricted to &lt;br /&gt;
* numeric constants&lt;br /&gt;
* some internal autopilot variables (not fully documented, see [[Flight_Plans#Internal_Variables_in_Flight_Plans|internal variables section]] below and other examples)&lt;br /&gt;
* Some binary operators: &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, &amp;lt;&amp;gt;, ==, +, -, /, *&lt;br /&gt;
* Some utility functions&lt;br /&gt;
&lt;br /&gt;
Some examples of usable expressions are given in the next sections.&lt;br /&gt;
=== Initialization  Blocks ===&lt;br /&gt;
Most flight plans will have three blocks of flight plan initialization blocks. It is good practice to follow this example below if you first start learning to create flightplans&lt;br /&gt;
&lt;br /&gt;
The first block waits until the GPS fix has been established, as shown below.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;blocks&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Wait GPS&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;set value=&amp;quot;1&amp;quot; var=&amp;quot;kill_throttle&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;while cond=&amp;quot;!GpsFixValid()&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The second block updates the local waypoints with respect to the UAV.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Geo init&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;while cond=&amp;quot;LessThan(NavBlockTime(), 10)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;NavSetGroundReferenceHere()&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This next block prevents the UAV from starting the engine and taking off. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Holding point&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;!--set var=&amp;quot;nav_mode&amp;quot; value=&amp;quot;NAV_MODE_ROLL&amp;quot;/--&amp;gt;&lt;br /&gt;
      &amp;lt;set value=&amp;quot;1&amp;quot; var=&amp;quot;kill_throttle&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;attitude roll=&amp;quot;0&amp;quot; throttle=&amp;quot;0&amp;quot; vmode=&amp;quot;throttle&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Exceptions ===&lt;br /&gt;
&lt;br /&gt;
The flight manager can handle exceptions. They consist in conditions checked periodically (at the same pace as the navigation control), allowing the control to jump to a given block. Here is the syntax of exceptions:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;exception cond=&amp;quot;...&amp;quot; deroute=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
where &amp;lt;tt&amp;gt;cond&amp;lt;/tt&amp;gt; is an expression and &amp;lt;tt&amp;gt;deroute&amp;lt;/tt&amp;gt; is the name of the block we want to switch to as soon as the condition is true.&lt;br /&gt;
&lt;br /&gt;
Here are some example of exceptions:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;exception cond=&amp;quot;10 &amp;gt; PowerVoltage()&amp;quot; deroute=&amp;quot;go_down&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;exception cond=&amp;quot;(ground_alt+10 &amp;gt; GetPosAlt())&amp;quot; deroute=&amp;quot;go_up&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;exception cond=&amp;quot;(autopilot_flight_time &amp;gt; 840)&amp;quot; deroute=&amp;quot;quick_land&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exceptions can be local to a block or global to the flight plan, in the &amp;lt;tt&amp;gt;&amp;lt;exceptions&amp;gt;&amp;lt;/tt&amp;gt; element. In the following example, time since last reception of a message from the ground station is monitored and the navigation is switched to the &amp;lt;tt&amp;gt;Standby&amp;lt;/tt&amp;gt; block if no message have been received for 22s. This exception is valid for '''all''' the blocks.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;flight_plan ...&amp;gt;&lt;br /&gt;
    &amp;lt;waypoints&amp;gt; ... &amp;lt;/waypoints&amp;gt;&lt;br /&gt;
    &amp;lt;exceptions&amp;gt;&lt;br /&gt;
      &amp;lt;exception cond=&amp;quot;datalink_time &amp;gt; 22&amp;quot; deroute=&amp;quot;Standby&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exceptions&amp;gt;&lt;br /&gt;
  &amp;lt;blocks&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Deroute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;deroute&amp;lt;/tt&amp;gt; is the ''goto'' directive of the flight plan; it switches the navigation to the given block:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;deroute block=&amp;quot;landing&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this primitive should not be used to execute loops which are provided by the following elements.&lt;br /&gt;
&lt;br /&gt;
=== Return ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;return&amp;lt;/tt&amp;gt; is also a ''goto'' directive that brings you back to the last block (and last stage). It has no argument.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;return/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Loops ===&lt;br /&gt;
&lt;br /&gt;
Unbounded loops are written with &amp;lt;tt&amp;gt;while&amp;lt;/tt&amp;gt; elements whose &amp;lt;tt&amp;gt;cond&amp;lt;/tt&amp;gt; attribute is a boolean expression.&lt;br /&gt;
Children  of &amp;lt;tt&amp;gt;while&amp;lt;/tt&amp;gt; are stages:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;while cond=&amp;quot;TRUE&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;go wp=&amp;quot;A&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;go wp=&amp;quot;B&amp;quot;/&amp;gt; &lt;br /&gt;
    &amp;lt;go wp=&amp;quot;C&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;while cond=&amp;quot;5 &amp;gt; stage_time&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;/while&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
In this example, we run an infinite loop, letting the aircraft try to go via waypoints &amp;lt;tt&amp;gt;A&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;B&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;C&amp;lt;/tt&amp;gt; and waiting for 5 seconds before repeating.&lt;br /&gt;
&lt;br /&gt;
Bounded loops are written with the &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; tag:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;for var=&amp;quot;i&amp;quot; from=&amp;quot;0&amp;quot; to=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/for&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where the body of the loop will be run four times.&lt;br /&gt;
&lt;br /&gt;
The variable of a &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; loop can be used inside expressions appearing as attributes of the stages:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;for var=&amp;quot;i&amp;quot; from=&amp;quot;1&amp;quot; to=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot; radius=&amp;quot;75&amp;quot; alt=&amp;quot;ground_alt+50*$i&amp;quot; until=&amp;quot;stage_time&amp;gt;10&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/for&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the aircraft will circle around waypoint '''HOME''' for 10 seconds at and altitude above ground of 50m, 10 seconds at altitude 100 meter (50+50), ... until 250m (5x +50).&lt;br /&gt;
&lt;br /&gt;
Note: Two bounded loops using the same control variable are not allowed in the same block.&lt;br /&gt;
&lt;br /&gt;
=== Navigation modes ===&lt;br /&gt;
&lt;br /&gt;
Navigation modes give the description of the desired trajectory in 3D. While the horizontal mode is specified through&lt;br /&gt;
''stages'', the vertical control is specified with various attributes of these stages. The current available navigation stages are&lt;br /&gt;
* attitude : just keep a fixed attitude;&lt;br /&gt;
* heading : keep a given course;&lt;br /&gt;
* go : go to a given waypoint;&lt;br /&gt;
* path : list of waypoints linked by ''go''&lt;br /&gt;
* circle : circle around a waypoint;&lt;br /&gt;
* oval : two half circles with a straight between two nav points&lt;br /&gt;
* eight : fly a figure of eight through a waypoint and around another&lt;br /&gt;
* stay : hold the position (hard to realize for a fixed-wing aircraft);&lt;br /&gt;
* follow : follow another aircraft;&lt;br /&gt;
* xyz : circle around a point moveable with the RC transmitter stick (obsolete with the datalink).&lt;br /&gt;
&lt;br /&gt;
The vertical control is achieved using the &amp;lt;tt&amp;gt;vmode&amp;lt;/tt&amp;gt; attribute of these stages. The possible values are &lt;br /&gt;
* '''alt''' (the default) : the autopilot keeps the desired altitude which is the altitude of the waypoint (if any) or the altitude specified with the &amp;lt;tt&amp;gt;alt&amp;lt;/tt&amp;gt; attribute;&lt;br /&gt;
* '''climb''' : the autopilot keeps the desired vertical speed specified with the &amp;lt;tt&amp;gt;climb&amp;lt;/tt&amp;gt; attribute (in m/s);&lt;br /&gt;
* '''throttle''' : the autopilots sets the desired throttle specified with the &amp;lt;tt&amp;gt;throttle&amp;lt;/tt&amp;gt; attribute (between 0 and 1);&lt;br /&gt;
* '''glide''' : the autopilot keeps the desired slope between two waypoints&lt;br /&gt;
&lt;br /&gt;
The default control is done with the throttle. However, setting the &amp;lt;tt&amp;gt;pitch&amp;lt;/tt&amp;gt; attribute to '''auto''' and the &amp;lt;tt&amp;gt;throttle&amp;lt;/tt&amp;gt; attribute to a constant allows a vertical control only by controlling the attitude of the A/C.&lt;br /&gt;
The &amp;lt;tt&amp;gt;pitch&amp;lt;/tt&amp;gt; attribute also can be set to any value (in degrees) while the throttle control is in use: it usually affects the airspeed of the aircraft.  &lt;br /&gt;
&lt;br /&gt;
The different navigation modes are detailed in the next sections.&lt;br /&gt;
&lt;br /&gt;
=== Attitude ===&lt;br /&gt;
&lt;br /&gt;
Element &amp;lt;tt&amp;gt;attitude&amp;lt;/tt&amp;gt; is the navigation mode which corresponds to the current lowest control loop for horizontal mode.&lt;br /&gt;
The autopilot then keeps a constant attitude. The &amp;lt;tt&amp;gt;roll&amp;lt;/tt&amp;gt; attribute is required (in degrees, positive to put right wing low).&lt;br /&gt;
&lt;br /&gt;
To fly away, at constant airspeed:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;attitude roll=&amp;quot;0&amp;quot; vmode=&amp;quot;throttle&amp;quot;, throttle=&amp;quot;0.5&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fly around, holding a given altitude:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;attitude roll=&amp;quot;30&amp;quot; alt=&amp;quot;ground_alt+50&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that it is not a ''safe'' navigation mode since the geographic position of the plane is not controlled. However, this mode is useful to tune the roll attitude control loop.&lt;br /&gt;
&lt;br /&gt;
=== Heading ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;heading&amp;lt;/tt&amp;gt; primitive is relative to the second level loop for horizontal mode in the autopilot which will keep the given &amp;lt;tt&amp;gt;course&amp;lt;/tt&amp;gt;, a required attribute (in degrees, clockwise, north=0, east=90).&lt;br /&gt;
&lt;br /&gt;
One example to takeoff, following the QFU, 80% throttle, nose up (15 degrees) until height of 30m is reached:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;heading course=&amp;quot;QFU&amp;quot; vmode=&amp;quot;throttle&amp;quot; throttle=&amp;quot;0.8&amp;quot; pitch=&amp;quot;15&amp;quot; until=&amp;quot;(GetPosAlt() &amp;gt; ground_alt+30)&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Go ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;go&amp;lt;/tt&amp;gt; primitive is probably the most useful one. Basically, the autopilot will try to join a given waypoint (&amp;lt;tt&amp;gt;wp&amp;lt;/tt&amp;gt;, the only required attribute). So the simplest thing you can ask for is&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;go wp=&amp;quot;HOME&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
which will set the '''HOME''' waypoint as the desired target position. Note than since &amp;lt;tt&amp;gt;vmode=&amp;quot;alt&amp;quot;&amp;lt;/tt&amp;gt; is the default, the altitude of the target waypoint is also taken into account. The navigation will switch to the next stage as soon as the target is reached.&lt;br /&gt;
&lt;br /&gt;
It is usually not a good idea to try to join a waypoint without asking for a precise trajectory, i.e. a given line.&lt;br /&gt;
Setting the &amp;lt;tt&amp;gt;hmode&amp;lt;/tt&amp;gt; attribute to '''route''', the navigation will go over a segment joining two waypoints:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;go from=&amp;quot;wp1&amp;quot; wp=&amp;quot;wp2&amp;quot; hmode=&amp;quot;route&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The target altitude is the altitude of the target waypoint; it can also be set with the &amp;lt;tt&amp;gt;alt&amp;lt;/tt&amp;gt; attribute. The following example keeps an altitude with fixed throttle:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;go from=&amp;quot;wp2&amp;quot; wp=&amp;quot;wp3&amp;quot; hmode=&amp;quot;route&amp;quot; pitch=&amp;quot;auto&amp;quot; throttle=&amp;quot;0.75&amp;quot; alt=&amp;quot;ground_alt+100&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes related to the vertical control can also be set to replace the default altitude mode:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;go from=&amp;quot;wp1&amp;quot; wp=&amp;quot;wp2&amp;quot; hmode=&amp;quot;route&amp;quot; vmode=&amp;quot;climb&amp;quot; climb=&amp;quot;1.5&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the &amp;lt;tt&amp;gt;approaching_time&amp;lt;/tt&amp;gt; (in seconds) attribute helps to decide when the target is ''reached''. It can be set&lt;br /&gt;
to '''0''' to go over the target waypoint (default value is the '''CARROT''' time, set in the airframe configuration file).&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;go from=&amp;quot;wp1&amp;quot; wp=&amp;quot;wp2&amp;quot; hmode=&amp;quot;route&amp;quot; approaching_time=&amp;quot;1&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Path ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;path&amp;lt;/tt&amp;gt; primitive is just a shorthand expression for a set of &amp;lt;tt&amp;gt;go&amp;lt;/tt&amp;gt; primitives. A list of waypoints defined with the &amp;lt;tt&amp;gt;wpts&amp;lt;/tt&amp;gt; attribute is pre-processed into a set of &amp;lt;tt&amp;gt;go&amp;lt;/tt&amp;gt; primitives with the &amp;lt;tt&amp;gt;hmode&amp;lt;/tt&amp;gt; attribute. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;path wpts=&amp;quot;wp1, wp2, wp3&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other attributes are optional:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;path wpts=&amp;quot;wp3, wp1, wp2&amp;quot; approaching_time=&amp;quot;1&amp;quot; pitch=&amp;quot;auto&amp;quot; throttle=&amp;quot;0.5&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Circle ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;circle&amp;lt;/tt&amp;gt; primitive is the second main navigation mode: the trajectory is defined as a circle around a given waypoint with a given radius:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;circle wp=&amp;quot;HOME&amp;quot; radius=&amp;quot;75&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
A positive radius makes the UAS move clockwise, a negative counter-clockwise.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;until&amp;lt;/tt&amp;gt; attribute may be used to control the end of the stage. The following example defines an ascending trajectory at constant throttle, nose up (15 degrees), over growing circles, until the battery level is low:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;circle wp=&amp;quot;wp1&amp;quot; radius=&amp;quot;50+(GetPosAlt()-ground_alt)/2&amp;quot; vmode=&amp;quot;throttle&amp;quot; throttle=&amp;quot;0.75&amp;quot; pitch=&amp;quot;15&amp;quot; until=&amp;quot;10&amp;gt;PowerVoltage()&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Oval ===&lt;br /&gt;
The oval consists of two half circles that are connected with two straight lines. This flight path is usefull when a IMU is used because the straights allow for level flight. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt; &amp;lt;oval p1=&amp;quot;1&amp;quot; p2=&amp;quot;2&amp;quot; radius=&amp;quot;nav_radius&amp;quot;/&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Eight ===&lt;br /&gt;
'''Works only for Fixed-wing!''' Fly a figure of eight that consists of two straight legs that pass though the center and the center of the half circle at the end of the two legs is in the turn around  waypoint. The altitude of the center waypoint is used for the entire figure. The turn around waypoint is moved to match radius given. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;  &amp;lt;eight center=&amp;quot;1&amp;quot; radius=&amp;quot;nav_radius&amp;quot; turn_around=&amp;quot;2&amp;quot;/&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Survey rectangle ===&lt;br /&gt;
Fly a survey rectangle defined by two waypoints. The distance between the legs of the grid (in meter) and the orientation of the grid (NS or WE) can be set by the operator. The plane will turn outside of the border of the rectangle before starting a new leg.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;  &amp;lt;survey_rectangle wp1=&amp;quot;1&amp;quot; wp2=&amp;quot;2&amp;quot; grid=&amp;quot;200&amp;quot; orientation=&amp;quot;NS&amp;quot;/&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Follow ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;follow&amp;lt;/tt&amp;gt; is a special primitive which makes the UAS follow another UAS (real or simulated, named with its &amp;lt;tt&amp;gt;ac_id&amp;lt;/tt&amp;gt;) at a given &amp;lt;tt&amp;gt;distance&amp;lt;/tt&amp;gt; (in meters) behind and at a given &amp;lt;tt&amp;gt;height&amp;lt;/tt&amp;gt; (in meters) above.&lt;br /&gt;
&lt;br /&gt;
In this example, the autopilot will try to follow A/C number '''4''', staying '''50'''m behind and '''20'''m above.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;follow ac_id=&amp;quot;4&amp;quot; distance=&amp;quot;50&amp;quot; height=&amp;quot;20&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Stay ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;stay&amp;lt;/tt&amp;gt; Here the UAS with try to stay at the waypoint as best as it can. For an aircraft capable of hovering it will just hang above the waypoint. For a fixedwing type UAV,&amp;lt;tt&amp;gt;stay&amp;lt;/tt&amp;gt; will mean the aircraft will constantly fly straight through the waypoint in a flower like pattern with the smallest turn radius it can manage.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;stay wp=&amp;quot;HOME&amp;quot; alt=&amp;quot;10&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XYZ ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;xyz&amp;lt;/tt&amp;gt; is a special mode where the UAS circles around a user moveable waypoint. This waypoint is moved with the RC sticks:&lt;br /&gt;
* YAW channel controls the point over the west-east axis;&lt;br /&gt;
* PITCH channel controls the point over the south-north axis;&lt;br /&gt;
* ROLL channel controls the altitude.&lt;br /&gt;
&lt;br /&gt;
Example (default radius is '''100'''):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;xyz radius=&amp;quot;40&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Set ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;set&amp;lt;/tt&amp;gt; element is a dangerous one which should be used only by expert users: it is used to directly set an internal variable of the autopilot. For example, you can change the value of the default ground altitude, a variable used by the home mode failsafe procedure (and maybe by your own flight plan):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;set var=&amp;quot;ground_alt&amp;quot; value=&amp;quot;ground_alt+50&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
This directive is extremely powerful and has great potential for error - use with caution.&lt;br /&gt;
&lt;br /&gt;
=== Call ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;call&amp;lt;/tt&amp;gt; allows the user to define its own navigation procedures in C. The &amp;lt;tt&amp;gt;value&amp;lt;/tt&amp;gt; must be a call to a boolean function which must return TRUE as long as the stage is not completed (a function which should be called only once would then return immediately FALSE).&lt;br /&gt;
This feature is illustrated with the '''line''' pattern:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;call fun=&amp;quot;nav_line_setup()&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;call fun=&amp;quot;nav_line_run(WP_1, WP_2, nav_radius)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where &amp;lt;tt&amp;gt;nav_line_setup()&amp;lt;/tt&amp;gt; returns FALSE and &amp;lt;tt&amp;gt;nav_line_run()&amp;lt;/tt&amp;gt; always returns TRUE (this stage never ends). '''Note''' that a waypoints index is derived/denoted by prefixing the waypoint name with &amp;lt;tt&amp;gt;WP_&amp;lt;/tt&amp;gt;(i.e.: 1 --&amp;gt; WP_1, 2 --&amp;gt; WP_2)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To call ''any'' function exactly once regardless of the return value (e.g. call a void function), add &amp;lt;tt&amp;gt;loop=&amp;quot;FALSE&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;call fun=&amp;quot;viewvideo_take_shot(TRUE)&amp;quot; loop=&amp;quot;FALSE&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such extra navigation functions are usually written as a [[Modules|Module]] and the header files are included automatically.&lt;br /&gt;
&lt;br /&gt;
If you want to call functions that are not part of a module, you need to include the header file which contains the function declaration:or supplementary C file which must be specified in the &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;header&amp;gt;&lt;br /&gt;
#include &amp;quot;path/to/header.h&amp;quot;&lt;br /&gt;
  &amp;lt;/header&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where the path is relative to the &amp;lt;tt&amp;gt;sw/airborne&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
You can also call functions before or after each execution of the block (this means continuously on each iteration of each stage of the block, not just when entering o exiting the block).&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block name=&amp;quot;circlehome&amp;quot; pre_call=&amp;quot;function_to_call_before_circle()&amp;quot; post_call=&amp;quot;function_to_call_after_circle()&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pre Call ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;block name=&amp;quot;Standby&amp;quot; strip_button=&amp;quot;Standby&amp;quot; strip_icon=&amp;quot;home.png&amp;quot; pre_call=&amp;quot;if(!InsideKill(GetPosX(), GetPosY())) NavKillThrottle();&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Post Call ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;block name=&amp;quot;traj&amp;quot; pre_call=&amp;quot;formation_pre_call()&amp;quot; post_call=&amp;quot;formation_flight()&amp;quot;&amp;gt; &amp;lt;!-- formation flight is call after all other navigation tasks --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedures ==&lt;br /&gt;
&lt;br /&gt;
Procedures are libraries which can be included in flight plans. They are composed of waypoints, sectors and blocks. The header of a procedure may contain some parameters which are replaced by arguments when the procedure is included.&lt;br /&gt;
&lt;br /&gt;
Extract of the DTD: a procedure is a sequence of parameters, waypoints, ...:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;!ELEMENT procedure (param*,header?,waypoints?,sectors?,exceptions?,blocks?)&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;tt&amp;gt;param&amp;lt;/tt&amp;gt;eter is just a name. A parameter is optional if it is declared with a default value.&lt;br /&gt;
An example with a required and an optional parameter:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;param name=&amp;quot;alt&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;param name=&amp;quot;radius&amp;quot; default_value=&amp;quot;75&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Procedures are called with the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; element in a flight plan. A procedure cannot be included twice or by another procedure. A procedure call requires:&lt;br /&gt;
&lt;br /&gt;
* the name of the procedure file, the name given to this inclusion; &lt;br /&gt;
* values for the parameters;&lt;br /&gt;
* backlinks for block name exits of the procedure.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;include name=&amp;quot;landing&amp;quot; procedure=&amp;quot;landing.xml&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding procedure '''landing.xml''':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE procedure SYSTEM &amp;quot;flight_plan.dtd&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;procedure&amp;gt;&lt;br /&gt;
    &amp;lt;waypoints&amp;gt;&lt;br /&gt;
      &amp;lt;waypoint name=&amp;quot;AF&amp;quot; x=&amp;quot;177.4&amp;quot; y=&amp;quot;45.1&amp;quot; alt=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;waypoint name=&amp;quot;TD&amp;quot; x=&amp;quot;28.8&amp;quot; y=&amp;quot;57.0&amp;quot; alt=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;waypoint name=&amp;quot;_BASELEG&amp;quot; x=&amp;quot;168.8&amp;quot; y=&amp;quot;-13.8&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/waypoints&amp;gt;&lt;br /&gt;
    &amp;lt;blocks&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
      &amp;lt;block name=&amp;quot;land&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;call fun=&amp;quot;nav_compute_baseleg(WP_AF, WP_TD, WP__BASELEG, nav_radius)&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;circle radius=&amp;quot;nav_radius&amp;quot; until=&amp;quot;NavCircleCount() &amp;gt; 0.5&amp;quot; wp=&amp;quot;_BASELEG&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;circle radius=&amp;quot;nav_radius&amp;quot; until=&amp;quot;And(NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-10), 10 &amp;gt; fabs(GetPosAlt()- WaypointAlt(WP__BASELEG)))&amp;quot; wp=&amp;quot;_BASELEG&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/block&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/blocks&amp;gt;&lt;br /&gt;
  &amp;lt;/procedure&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the name of procedure '''land''' block will be renamed into '''landing.land''':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;deroute block=&amp;quot;landing.land&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
will jump to this procedure block.&lt;br /&gt;
&lt;br /&gt;
Suppose you have a go-around condition in your landing procedure. You would write it&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;exception cond=&amp;quot;...&amp;quot; deroute=&amp;quot;go-around&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
then you must link this block exit with one of your block (e.g. &amp;lt;tt&amp;gt;Standby&amp;lt;/tt&amp;gt;). So you would include the procedure as follows:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;include name=&amp;quot;landing&amp;quot; procedure=&amp;quot;landing.xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;with from=&amp;quot;go-around&amp;quot; to=&amp;quot;Standby&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/include&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Internal Variables in Flight Plans ==&lt;br /&gt;
&lt;br /&gt;
The flight plan can use several internal variables, macros and functions coming from the rest of the system or the flight plan API itself. The following list present some of the most commonly used variables, but much more are actually available:&lt;br /&gt;
&lt;br /&gt;
* '''autopilot_flight_time''': time in seconds since autopilot was booted (integer)&lt;br /&gt;
* '''datalink_time''': time in seconds since last connection of telemetry to ground control station (including ''subsystems/datalink/datallink.h'' in the '''header''' section is required) (integer)&lt;br /&gt;
* '''GetPosAlt()''': returns the current altitude above ground level in meter (float)&lt;br /&gt;
* '''GetPosX()''': returns x (easting) of current position relative to reference in meter (float)&lt;br /&gt;
* '''GetPosY()''': returns y (northing) of current position relative to reference in meter (float)&lt;br /&gt;
* &amp;lt;s&amp;gt;'''ground_alt''': altitude above ground level in meter (float)&amp;lt;/s&amp;gt; (v5.8 and higher - use '''GetAltRef()''' instead)&lt;br /&gt;
* '''GetAltRef()''': returns reference altitude, usually ground_alt&lt;br /&gt;
* '''NavSetGroundReferenceHere()''': reset position and altitude reference point to current position&lt;br /&gt;
* '''NavSetAltitudeReferenceHere()''': reset altitude reference to current alt but keep previous horizontal position reference&lt;br /&gt;
* '''NavSetWaypointHere(_wp)''': set position of a waypoint given as argument to the current position&lt;br /&gt;
* '''WaypointX(_wp)''': returns x (easting) of waypoint position relative to reference in meter (float)&lt;br /&gt;
* '''WaypointY(_wp)''': returns y (northing) of waypoint position relative to reference in meter (float)&lt;br /&gt;
* '''WaypointAlt(_wp)''': returns waypoint altitude in meter (float)&lt;br /&gt;
* '''nav_radius''': free variable usually used to set circle radius in flight plan&lt;br /&gt;
* '''NavKillThrottle()''': function to switch off throttle&lt;br /&gt;
* '''PowerVoltage()''': returns current voltage of the battery&lt;br /&gt;
* all functions from the [http://docs.paparazziuav.org/latest/group__state__interface.html state interface API]&lt;br /&gt;
* all functions from the [http://docs.paparazziuav.org/latest/subsystems_2navigation_2waypoints_8h.html waypoint API]&lt;br /&gt;
* all variables declared in [[modules]] headers&lt;br /&gt;
&lt;br /&gt;
== Advanced Examples ==&lt;br /&gt;
&lt;br /&gt;
Parameters used in a flight plan can be computed expressions. In this example, the plane is asked to perform 5 circles at progressively increasing altitudes for exactly one minute at each altitude:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;for var=&amp;quot;i&amp;quot; from=&amp;quot;1&amp;quot; to=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;circle wp=&amp;quot;HOME&amp;quot; radius=&amp;quot;75&amp;quot;&lt;br /&gt;
          alt=&amp;quot;ground_alt + 50*$i&amp;quot;&lt;br /&gt;
          until=&amp;quot;stage_time &amp;gt; 60&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/for&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below you find some random examples of the posibilities. This is only the tip of the iceberg, use your imagination and go wild with new creative ideas for your flightplan&lt;br /&gt;
&lt;br /&gt;
=== Gains on the fly ===&lt;br /&gt;
&lt;br /&gt;
It is very well possible to set specific gain for an airframe if it reaches e.g a certain block.&lt;br /&gt;
&lt;br /&gt;
=== Dynacmically adjustable maximum speed ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;call_once fun=&amp;quot;gh_set_max_speed(2.0)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Immobilize Actuators === &lt;br /&gt;
&lt;br /&gt;
h_ctl setpoints variable are set by the h_ctl_attitude_loop() (from fw_h_ctl.c) loop) which can be disabled with the h_ctl_disabled flag:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;set var=&amp;quot;h_ctl_disabled&amp;quot; value=&amp;quot;TRUE&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;set var=&amp;quot;h_ctl_aileron_setpoint&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;set var=&amp;quot;h_ctl_elevator_setpoint&amp;quot; value=&amp;quot;MAX_PPRZ/2&amp;quot;/&amp;gt;&lt;br /&gt;
 .... waiting for a condition ...&lt;br /&gt;
 &amp;lt;set var=&amp;quot;h_ctl_disabled&amp;quot; value=&amp;quot;FALSE&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips and Tricks ==&lt;br /&gt;
&lt;br /&gt;
There are many ways to skin a cat just as there are many ways to craft your flight plan. Following the best practices tips can save you from a lot of frustration and mishap.&lt;br /&gt;
&lt;br /&gt;
* Simulate your flight plan before taking it to the sky. Flight plans should always be carefully tested prior to flight, take a look at the [[Simulation|simulation]] page for details on how to simulate your plan.&lt;br /&gt;
* Make an subdirectory in the Flight_plan directory with your own name and add your flight plans there. Make sure that the location of the DTD is correct, e.g by using relative directory double dots as in &amp;lt;tt&amp;gt;&amp;lt;!DOCTYPE flight_plan SYSTEM &amp;quot;../flight_plan.dtd&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Take a good look at other flight plans included with Paparazzi. To learn from example flight plans please visit the [[Flight_Plan_Examples|flight plan examples]] page&lt;br /&gt;
* There are several option to build failsafe features into you flightplan, [[Failsafe|for some examples visit the Failsafe page]].&lt;br /&gt;
* Some flight plan examples define waypoint locations using relative coordinates. These are relative positions from the fixed lat and lon in the header of the flight plan. When simulating your flight plan the aircraft always use the lat/lon as defined in the flight plan since a regular simulation has no notion of you current position of you local PC where you simulate on. This is something to keep in mind if you test your flight plan in real flights.&lt;br /&gt;
&lt;br /&gt;
=== V5.8+ ===&lt;br /&gt;
* If you don't like the '''No SRTM data found to check altitude''' warning, either in your flight plan editor or in GCS itself click on the '''Nav-&amp;gt;display SRTM'''. It will ask you whether you want to download SRTM data. Say yes, and it will save the data in ''data/srtm'' directory, so you don't get the warning any more and check the ground altitude even without GPS.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Modules&amp;diff=21265</id>
		<title>Modules</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Modules&amp;diff=21265"/>
		<updated>2016-06-17T21:23:14Z</updated>

		<summary type="html">&lt;p&gt;Flixr: add autoload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Modules&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
The modules allow to add new code in a flexible way with initialisation, periodic and event functions without modifying the main AP loop.&lt;br /&gt;
&lt;br /&gt;
See [[FirmwareArchitecture]] and [[Subsystems]] for the differences of modules to subsystems.&lt;br /&gt;
&lt;br /&gt;
=== Available modules ===&lt;br /&gt;
&lt;br /&gt;
There is a special page listing all currently available modules to simply extend your Paparazzi autopilot board possibilities. [[Modules_list| Go here to inspect this list of modules]].&lt;br /&gt;
&lt;br /&gt;
The auto-generated list and short doc for all modules in the master branch can be found at the [http://docs.paparazziuav.org/latest/onboard_modules.html onboard modules page of the doxygen docs].&lt;br /&gt;
&lt;br /&gt;
=== Make your own ===&lt;br /&gt;
&lt;br /&gt;
It is very possible to make your own module and to share it with the world. To make it even easier there is a helper tool called &amp;quot;create_module&amp;quot; in the main Paparazzi directory. Try it, you'll be surprised how easy it is to start your own module with the help of this tool. &lt;br /&gt;
&lt;br /&gt;
=== In the airframe file ===&lt;br /&gt;
&lt;br /&gt;
To add a new module for an aircraft, add a section '''modules''' in his airframe xml file :&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;modules main_freq=&amp;quot;60&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;load name=&amp;quot;demo_module.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;load name=&amp;quot;dummy.xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;BLA&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;BLUB&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;configure name=&amp;quot;FOO&amp;quot; value=&amp;quot;BAR&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/load&amp;gt;&lt;br /&gt;
 &amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
* The main_freq parameter (in Hz) is optional. If present, it allows to specify the frequency of the main loop. Default is the ''main periodic frequency'' of the autopilot. If not needed to be specified, then the first line is just: &amp;lt;modules&amp;gt;&lt;br /&gt;
* The children &amp;quot;define&amp;quot; generate compilation defines for all the targets of a module and can be used with or without value. It allows to keep the module description more generic add to place the airframe dependent parameters in the airframe xml file.&lt;br /&gt;
* The child &amp;quot;configure&amp;quot; generates a makefile variable.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Since '''v5.8''' it is possible to safely replace ''subsystem'' by ''module'' in your airframe file. The roadmap of Paparazzi is to convert existing [[subsystems]] to modules.&lt;br /&gt;
&lt;br /&gt;
As a result, modules can be loaded using the same format than subsystems, as children of the '''firmware''' node.&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;firmware name=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;module name=&amp;quot;demo_module&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;module name=&amp;quot;dummy&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;BLA&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;BLUB&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;configure name=&amp;quot;FOO&amp;quot; value=&amp;quot;BAR&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/module&amp;gt;&lt;br /&gt;
  &amp;lt;target name=&amp;quot;...&amp;quot; board=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;module name=&amp;quot;something&amp;quot; type=&amp;quot;sometype&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/target&amp;gt;&lt;br /&gt;
 &amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The '''modules''' node is then only needed if a custom ''main_freq'' parameter need to be specified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== In the module file ===&lt;br /&gt;
&lt;br /&gt;
The modules description files are located in '''conf/modules'''.&lt;br /&gt;
{{Box Code|conf/modules/mymodule.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE module SYSTEM &amp;quot;module.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;module name=&amp;quot;demo_module&amp;quot; dir=&amp;quot;demo_module&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;doc&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;&lt;br /&gt;
     Demo module.&lt;br /&gt;
     More details about this module.&lt;br /&gt;
   &amp;lt;/description&amp;gt;&lt;br /&gt;
   &amp;lt;configure name=&amp;quot;SOMETHING&amp;quot; value=&amp;quot;S1|S2|S3&amp;quot; description=&amp;quot;The thing to use&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;DEMO_MODULE_LED&amp;quot; value=&amp;quot;LED_X&amp;quot; description=&amp;quot;LED Selection&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/doc&amp;gt;&lt;br /&gt;
  &amp;lt;settings&amp;gt;&lt;br /&gt;
    &amp;lt;dl_settings name=&amp;quot;bla&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;dl_setting min=&amp;quot;0&amp;quot; max=&amp;quot;5&amp;quot; step=&amp;quot;1&amp;quot; var=&amp;quot;bla_bla&amp;quot; shortname=&amp;quot;bb&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/dl_settings&amp;gt;&lt;br /&gt;
  &amp;lt;settings&amp;gt;&lt;br /&gt;
  &amp;lt;depends&amp;gt;foo.xml,bar|baz&amp;lt;/depends&amp;gt;&lt;br /&gt;
  &amp;lt;conficts&amp;gt;boo&amp;lt;/conflicts&amp;gt;&lt;br /&gt;
  &amp;lt;header&amp;gt;&lt;br /&gt;
   &amp;lt;file name=&amp;quot;demo_module.h&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/header&amp;gt;&lt;br /&gt;
  &amp;lt;init fun=&amp;quot;init_demo()&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;periodic fun=&amp;quot;periodic_1Hz_demo()&amp;quot; freq=&amp;quot;1.&amp;quot; start=&amp;quot;start_demo()&amp;quot; stop=&amp;quot;stop_demo()&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;periodic fun=&amp;quot;periodic_10Hz_demo()&amp;quot; period=&amp;quot;0.1&amp;quot; start=&amp;quot;start_demo()&amp;quot; stop=&amp;quot;stop_demo()&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;makefile&amp;gt;&lt;br /&gt;
   &amp;lt;raw&amp;gt;&lt;br /&gt;
    #Raw makefile section&lt;br /&gt;
   &amp;lt;/raw&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;USE_SOMETHING&amp;quot; value=&amp;quot;$(SOMETHING)&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;DEMO_MODULE_LED&amp;quot; value=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;file name=&amp;quot;demo_module.c&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/makefile&amp;gt;&lt;br /&gt;
 &amp;lt;/module&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* module&lt;br /&gt;
** name : this parameter is the name of the module (mandatory)&lt;br /&gt;
** dir : the name of the directory in '''sw/airborne/modules''' where the source code is located (in the above example: sw/airborne/modules/demo_module), if not specified, the name of the module is used as default directory name&lt;br /&gt;
&lt;br /&gt;
* doc&lt;br /&gt;
** description: a description of the module. The content of the first line until the dot is treated as the brief description used as the name in the [http://paparazzi.github.com/docs/latest/onboard_modules.html generated docs] (mandatory).&lt;br /&gt;
** define: describe the possible define flags for this module with default values and a short description (usually called from the [[Airframe_Configuration|airframe firmware section]])&lt;br /&gt;
** configure: describe the possible configuration options for this module with default values and a short description (usually called from the [[Airframe_Configuration|airframe firmware section]])&lt;br /&gt;
** section: describe the parameters that can be added as a section in the [[Airframe_Configuration|airframe configuration file]]&lt;br /&gt;
&lt;br /&gt;
* settings_file (0 or more)&lt;br /&gt;
** file name of a settings xml file&lt;br /&gt;
&lt;br /&gt;
* settings (0 or more): use the same format than systems [[Settings]]&lt;br /&gt;
** target: a list of targets allowed or forbidden for which embedded settings should be used&lt;br /&gt;
** dl_settings node with a tab name&lt;br /&gt;
*** dl_setting: setting description, see [[Settings]] page for details&lt;br /&gt;
&lt;br /&gt;
* depends (0 or 1 'depends' node)&lt;br /&gt;
** comma separated list of required modules&lt;br /&gt;
** allows to specify OR dependencies with pipe (|) similar to Debian depends, ex: &amp;lt;code&amp;gt;foo,bar|baz&amp;lt;/code&amp;gt; would make it depend on foo AND (bar OR baz)&lt;br /&gt;
** the elements can be a xml file (in conf/modules) or a module name (as set in the module xml 'name' node)&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
Prior to '''v5.3.0_testing''' we had one &amp;lt;tt&amp;gt;depend&amp;lt;/tt&amp;gt; node instead of &amp;lt;tt&amp;gt;depends&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;conflicts&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;'depend' node used prior to '''v5.3_devel-438-g8be5c42'''):&lt;br /&gt;
* depend (0 or 1 'depend' node)&lt;br /&gt;
** require : the list of required modules&lt;br /&gt;
** conflict : the list of conflicting modules&lt;br /&gt;
** the elements of a list are separated with a pipe (|), ex: &amp;quot;bla|boo&amp;quot;&lt;br /&gt;
** the elements can be a xml file (in conf/modules) or a module name (in sw/airborne/modules)&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
* conflicts (0 or 1 'conflicts' node)&lt;br /&gt;
** comma separated list of conflicting modules&lt;br /&gt;
** the elements can be a xml file (in conf/modules) or a module name (as set in the module xml 'name' node)&lt;br /&gt;
&lt;br /&gt;
* autoload (0 or 1 'autoload' node)&lt;br /&gt;
** name : the name of the module which should also be automatically loaded&lt;br /&gt;
&lt;br /&gt;
* header (0 or 1 'header' node)&lt;br /&gt;
** file : the name of the header to automatically include in modules.h&lt;br /&gt;
&lt;br /&gt;
* init (0 or more 'init' node)&lt;br /&gt;
** fun : initialization function name, called once at startup&lt;br /&gt;
&lt;br /&gt;
* periodic (0 or more 'periodic' node)&lt;br /&gt;
** fun : periodic function name (mandatory)&lt;br /&gt;
** period : period of the function in seconds, cannot be higher than the main frequency (if not specified, use freq parameter)&lt;br /&gt;
** freq : frequency of the function in Hz, cannot be higher than main frequency (used if period is not defined; if nor period nor freq are defined, the maximum frequency is used by default)&lt;br /&gt;
** delay : integer that can be used to impose a sequence in the periodic functions (use values between 0 and main_freq/function_freq)&lt;br /&gt;
** start : function to be executed before the periodic function starts&lt;br /&gt;
** stop : function to be executed after the periodic function stops (never called if autorun=LOCK)&lt;br /&gt;
** autorun : TRUE to make the periodic function starts automatically after init, FALSE to make it way for a user command to start, LOCK to make it always true (default is LOCK)&lt;br /&gt;
&lt;br /&gt;
* event (0 or more 'event' node)&lt;br /&gt;
** fun : event function name called in each cycle of the main AP loop&lt;br /&gt;
&lt;br /&gt;
* datalink (0 or more 'datalink' node)&lt;br /&gt;
** message : name of the datalink (uplink) message to be parsed&lt;br /&gt;
** fun : name of the function called when a message arrived&lt;br /&gt;
&lt;br /&gt;
* makefile (0 or more 'makefile' node)&lt;br /&gt;
** target : a list of build targets separated with pipes (ex: &amp;lt;makefile target=&amp;quot;tunnel|foo&amp;quot;&amp;gt;) (default is &amp;quot;ap|sim|nps&amp;quot;)&lt;br /&gt;
** define : each define node specifies a CFLAGS for the current targets&lt;br /&gt;
*** name : name of the define (ex: name=&amp;quot;USE_MODULE_LED&amp;quot; -&amp;gt; target.CFLAGS += -DUSE_MODULE_LED) (mandatory)&lt;br /&gt;
*** value : the value to associate (ex: name=&amp;quot;DEMO_MODULE_LED&amp;quot; value=&amp;quot;2&amp;quot; -&amp;gt; target.CFLAGS += -DDEMO_MODULE_LED=2)&lt;br /&gt;
*** type : the type of define, possible values are &amp;quot;define&amp;quot; or &amp;quot;D&amp;quot;, &amp;quot;include&amp;quot; or &amp;quot;I&amp;quot; (ex: name=&amp;quot;$(ARCH_SRC)&amp;quot; type=&amp;quot;include&amp;quot; -&amp;gt; target.CFLAGS += -I$(ARCH_SRC) ) (default is &amp;quot;define&amp;quot;)&lt;br /&gt;
** file&lt;br /&gt;
*** name : the name of the c file (located in &amp;quot;sw/airborne/modules/&amp;lt;dir_name&amp;gt;&amp;quot;) to add in the Makefile (ex: name=&amp;quot;demo_module.c&amp;quot; -&amp;gt; target.srcs += modules/&amp;lt;dir_name&amp;gt;/demo_module.c)&lt;br /&gt;
*** dir : select a directory for this file only (overrides the default directory)&lt;br /&gt;
** file_arch (hardware related code)&lt;br /&gt;
*** name : the name of the c file (located in &amp;quot;sw/airborne/arch/&amp;lt;ARCH&amp;gt;/modules/&amp;lt;dir_name&amp;gt;&amp;quot;) add in the Makefile (ex: name=&amp;quot;demo_module_hw.c&amp;quot; -&amp;gt; target.srcs += arch/&amp;lt;ARCH&amp;gt;/modules/&amp;lt;dir_name&amp;gt;/demo_module_hw.c)&lt;br /&gt;
*** dir : select a directory for this file only (overrides the default directory)&lt;br /&gt;
** raw : allows to define a raw makefile section&lt;br /&gt;
&lt;br /&gt;
If the compilation target is not supported by the module, it will be automatically unloaded. This may require a 'clean_ac' to work.&lt;br /&gt;
&lt;br /&gt;
=== In the airborne code ===&lt;br /&gt;
&lt;br /&gt;
The code corresponding to a module should be placed in the directory &amp;quot;sw/airborne/modules/&amp;lt;dir_name&amp;gt;&amp;quot; where dir_name must match the one in your conf file (attribute &amp;quot;dir&amp;quot; if specified, &amp;quot;name&amp;quot; otherwise). There are also defines generated for the frequency and period of every periodic functions of the module that can be used in the code: &amp;lt;PERIODIC_FUNCTION_NAME&amp;gt;_FREQ and &amp;lt;PERIODIC_FUNCTION_NAME&amp;gt;_PERIOD.&lt;br /&gt;
&lt;br /&gt;
=== Starting / stopping a module ===&lt;br /&gt;
&lt;br /&gt;
If modules are loaded with periodical functions that are not locked, a new tab will automatically appear in the setting page of the GCS that allows you to start and stop them.&lt;br /&gt;
&lt;br /&gt;
An other possibility is that any file that includes the header &amp;quot;modules.h&amp;quot; can start or stop the periodic tasks.&lt;br /&gt;
&lt;br /&gt;
=== Telemetry ===&lt;br /&gt;
&lt;br /&gt;
In the [[telemetry]] file, if a module name is specified in a field '''message''', it will be included in the telemetry messages only if the corresponding module is loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;message name=&amp;quot;SOME_MODULE_MSG&amp;quot; period=&amp;quot;2&amp;quot; module=&amp;quot;module_name&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This functionality was removed again in v5.9 ([https://github.com/paparazzi/paparazzi/pull/1678 #1678]), since it is not needed anymore with the &amp;lt;tt&amp;gt;register_periodic_telemetry&amp;lt;/tt&amp;gt; functionality we have since v5.0.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer_Documentation]] [[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Subsystem/ins&amp;diff=21259</id>
		<title>Subsystem/ins</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Subsystem/ins&amp;diff=21259"/>
		<updated>2016-06-15T07:52:36Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* float_invariant */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages hideprefix=always&amp;gt;Subsystems&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
== INS subsystem ==&lt;br /&gt;
The INS (Inertial Navigation System) subsystem specifies which position and velocity estimation algorithm you are using.&lt;br /&gt;
&lt;br /&gt;
Most of the INS filters are only providing position and speed, and they need to be used together with an [[Subsystem/ahrs|AHRS (Attitude and Heading Reference System) filter]] for attitude. Currently, only the experimental invariant filter is a full INS.&lt;br /&gt;
&lt;br /&gt;
Currently possible INS subsystem types are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type !! Point Type !! Firmwares !! Notes&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ins#alt_float|alt_float]]''' || floating || fixedwing || &lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ins#GPS passthrough (gps_passthrough)|gps_passthrough]]''' ||  || all ||&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ins#xsens|xsens]]''' ||  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ins#xsens700|xsens700]]'''  ||  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ins#no_type|no_type]]''' ||  || all || &lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ins#Horizontal Filter Float (hff)|Horizontal Filter Float (hff)]]''' || floating ||  ||&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ins#extended|extended]]''' || floating? || all ||&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ins#vectornav|vectornav]]''' ||  || all ||&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ins#float_invariant|float_invariant]]''' || floating || all ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
e.g. for the extended filter:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ins&amp;quot; type=&amp;quot;extended&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
=== alt_float ===&lt;br /&gt;
Filters altitude and climb rate for fixedwings.&lt;br /&gt;
&lt;br /&gt;
A 2-state Kalman filter that estimates vertical position and vertical velocity from GPS and barometric data.&lt;br /&gt;
&lt;br /&gt;
When ''USE_BAROMETER'' is defined to ''TRUE'':&lt;br /&gt;
* GPS horizontal position and horizontal velocity is directly passed through&lt;br /&gt;
* GPS vertical position sets the altitude for the barometric reference pressure (QFE)&lt;br /&gt;
* Vertical position and velocity is a filtered based on barometric pressure with respect to the reference pressure and GPS vertical velocity readings.&lt;br /&gt;
&lt;br /&gt;
When ''USE_BAROMETER'' is not defined, ''FALSE'' or ''0'':&lt;br /&gt;
* GPS velocity is directly passed through to the vehicle's state.&lt;br /&gt;
* GPS horizontal position is directly passed through.&lt;br /&gt;
* Altitude is filtered based on GPS height and vertical velocity data.&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
USE_BAROMETER - Enables the use of barometric data&lt;br /&gt;
&lt;br /&gt;
DEBUG_ALT_KALMAN - Enables debug messages from the subsystem (Default: not defined)&lt;br /&gt;
&lt;br /&gt;
e.g. to use with barometer:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ins&amp;quot; type=&amp;quot;alt_float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;USE_BAROMETER&amp;quot; value=&amp;quot;TRUE&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;subsystem&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GPS passthrough (gps_passthrough) ===&lt;br /&gt;
&amp;quot;dummy&amp;quot; INS that does no filtering whatsoever. It directly passes GPS position and velocity through.&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ins&amp;quot; type=&amp;quot;gps_passthrough&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== xsens ===&lt;br /&gt;
XSens Mti-G&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ins&amp;quot; type=&amp;quot;xsens&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;configure name=&amp;quot;XSENS_UART_NR&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;configure name=&amp;quot;XSENS_UART_BAUD&amp;quot; value=&amp;quot;B115200&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/subsystem&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== xsens700 ===&lt;br /&gt;
XSens Mti-G&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;load name=&amp;quot;ins_xsens_MTiG_fixedwing.xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;configure name=&amp;quot;XSENS_UART_NR&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/load&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== no_type ===&lt;br /&gt;
Vertical filter (in float) estimating altitude, vertical velocity and accelerometer bias.&lt;br /&gt;
&lt;br /&gt;
If USE_GPS, horizontal position and velocity is set directly by GPS.&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;subsystem name=&amp;quot;ins&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Horizontal Filter Float (hff) ===&lt;br /&gt;
simple with float vertical and horizontal filters for INS&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ins&amp;quot; type=&amp;quot;hff&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== extended ===&lt;br /&gt;
Extended vertical filter (in float).&lt;br /&gt;
&lt;br /&gt;
A 4-state Kalman filter that estimates:&lt;br /&gt;
* vertical position&lt;br /&gt;
* vertical speed&lt;br /&gt;
* accelerometer bias&lt;br /&gt;
* barometric offset&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ins&amp;quot; type=&amp;quot;extended&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''Parameters'''&lt;br /&gt;
&lt;br /&gt;
INS_PROPAGATE_FREQUENCY - Defines the frequency (Hz) of the propagation model (Default: PERIODIC_FREQUENCY)&lt;br /&gt;
&lt;br /&gt;
=== vectornav ===&lt;br /&gt;
Driver for the Vectornav VN-200 INS, see also [[Sensors/imu#Vectornav_VN-200]].&lt;br /&gt;
&lt;br /&gt;
=== float_invariant ===&lt;br /&gt;
A full INS estimating attitude, velocity, position and biases via invariant filter&lt;br /&gt;
&lt;br /&gt;
[[Category:User_Documentation]] [[Category:Subsystems]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&amp;diff=21232</id>
		<title>Installation/Linux</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&amp;diff=21232"/>
		<updated>2016-05-30T10:54:48Z</updated>

		<summary type="html">&lt;p&gt;Flixr: terry.guo PPA doesn't exist anymore&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Installation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This page only describes the installation of the prerequisite tools and dependencies on Debian/Ubuntu needed for Paparazzi.&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''See the general [[Installation]] page for how to [[Installation#Getting_the_Source_Code|download Paparazzi]] and [[Installation#Launching_the_Software|launching it]] after you followed the instructions here.'''&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi is very easily installed on any laptop or workstation running [http://www.ubuntu.com/ Ubuntu], [http://www.debian.org/ Debian] (or any of their derivatives).&lt;br /&gt;
&lt;br /&gt;
The steps required to install the software needed to be able to let your UAS fly &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation/Linux#Installation_of_dependencies|Install the basic Paparazzi dependencies]] and the [[Installation/Linux#ARM_embedded_toolchain|ARM cross compiling toolchain.]]&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation#Getting_the_Source_Code|Download the source code from the source repository.]]&lt;br /&gt;
&amp;lt;li&amp;gt;Allow access to your PC hardware connection by adding appropriate [[Udev]] rules.&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation#Launching_the_Software|Compile the binaries from the sources and launch the software.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Users of other Linux flavors than a recent Ubuntu or Debian and anyone needing manual control of each individual package can [[Installation/Manual|install them independently]].&lt;br /&gt;
&lt;br /&gt;
===For the impatient===&lt;br /&gt;
&lt;br /&gt;
For Ubuntu add the [https://launchpad.net/~paparazzi-uav/+archive/ppa paparazzi-uav ppa] &amp;lt;tt&amp;gt;sudo add-apt-repository ppa:paparazzi-uav/ppa&amp;lt;/tt&amp;gt; and install the &amp;lt;tt&amp;gt;paparazzi-dev&amp;lt;/tt&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
Since Paparazzi v5.0 the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] is recommended.&lt;br /&gt;
Available as of Ubuntu 14.04, on older versions it can be [[Installation/Linux#ARM_embedded_toolchain|installed via tarball]].&lt;br /&gt;
&lt;br /&gt;
Or just use the [[Installation#Quickstart_on_Ubuntu_12.04|Quickstart for Ubuntu 12.04 LTS]].&lt;br /&gt;
&lt;br /&gt;
== Installation video Tutorials ==&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtubehd|SshFJrBuku8}} {{#ev:youtubehd|eW0PCSjrP78}}&lt;br /&gt;
&lt;br /&gt;
== Installation of dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu ===&lt;br /&gt;
'''Binary packages for Ubuntu are available for the ''i386'', ''amd64'' and ''armhf'' architectures.'''&lt;br /&gt;
&lt;br /&gt;
Add the installation sources for the Paparazzi software packages. Run from a terminal:&lt;br /&gt;
 sudo add-apt-repository ppa:paparazzi-uav/ppa&lt;br /&gt;
&lt;br /&gt;
Then update the systems package inventory and install the main Paparazzi software dependencies. This will take some time.&lt;br /&gt;
 sudo apt-get update &lt;br /&gt;
 sudo apt-get install paparazzi-dev&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
'''Binary packages for Debian are available for the ''i386'' and ''amd64'' architectures. ''armhf'' packages seem to be currently not supported by the OpenSUSE build service.'''&lt;br /&gt;
&lt;br /&gt;
For Debian Wheezy (7.0) and Jessie (8.0) packages are built using the [http://openbuildservice.org/ Open Build Service (OBS)] on [https://build.opensuse.org/project/show?project=home%3Aflixr%3Apaparazzi-uav OpenSUSE Build Service project home:flixr:paparazzi-uav]&lt;br /&gt;
&lt;br /&gt;
[http://software.opensuse.org/download/package?project=home:flixr:paparazzi-uav&amp;amp;package=paparazzi-dev Install paparazzi-dev]&lt;br /&gt;
&lt;br /&gt;
First add the key:&lt;br /&gt;
 wget -q &amp;quot;http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_8.0/Release.key&amp;quot; -O- | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
Add the appropriate repo, depending on your Debian version to sources.list&lt;br /&gt;
 echo &amp;quot;deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_7.0/ ./&amp;quot; | tee -a /etc/apt/sources.list&lt;br /&gt;
 echo &amp;quot;deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_8.0/ ./&amp;quot; | tee -a /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Update the systems package inventory and install the main Paparazzi software dependencies.&lt;br /&gt;
 sudo apt-get update &lt;br /&gt;
 sudo apt-get install paparazzi-dev&lt;br /&gt;
&lt;br /&gt;
== ARM embedded toolchain ==&lt;br /&gt;
&lt;br /&gt;
For current Paparazzi versions (v5.0 and above) the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] is recommended, which also supports the STM32F4 with FPU (hardware floating point).&lt;br /&gt;
&lt;br /&gt;
=== gcc-arm-none-eabi as Debian/Ubuntu package ===&lt;br /&gt;
&lt;br /&gt;
'''This is the recommended method'''&lt;br /&gt;
&lt;br /&gt;
Note that there are actually two '''different''' toolchains available!&lt;br /&gt;
* [https://launchpad.net/gcc-arm-embedded/ ARM gcc-arm-embedded toolchain] with Debian package name ''gcc-arm-embedded''&lt;br /&gt;
** includes libstdc++ and newlib-nano&lt;br /&gt;
* [https://packages.debian.org/jessie/gcc-arm-none-eabi Debian gcc-arm-none-eabi toolchain]&lt;br /&gt;
** does not include libstdc++&lt;br /&gt;
** does not include newlib-nano&lt;br /&gt;
&lt;br /&gt;
Both toolchains ''should'' work for most use-cases (if you don't need C++ or nano specs), although the [https://launchpad.net/gcc-arm-embedded/ ARM gcc-arm-embedded toolchain] is better tested.&lt;br /&gt;
&lt;br /&gt;
==== gcc-arm-embedded toolchain ====&lt;br /&gt;
&lt;br /&gt;
'''This is the recommended toolchain'''&lt;br /&gt;
&lt;br /&gt;
On ''most'' Ubuntu versions the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] can be installed as a debian package from the [https://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa ppa]:&lt;br /&gt;
 sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install gcc-arm-embedded&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
Previously there was a PPA by terry.guo that contained this toolchain under the package name ''gcc-arm-none-eabi''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
See https://launchpad.net/gcc-arm-embedded/+announcement/13824 for details on how to switch the newer &lt;br /&gt;
PPA and package. &lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gcc-arm-none-eabi Debian toolchain ====&lt;br /&gt;
&lt;br /&gt;
Current Debian ('''jessie''') and Ubuntu (14.04 '''trusty''' and later) releases have the gcc-arm-none-eabi package in the official repositories ('''universe'''), and can be installed with:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install gcc-arm-none-eabi&lt;br /&gt;
&lt;br /&gt;
=== ARM gcc-arm-embedded tarball ===&lt;br /&gt;
Another way is to download and unpack the tarball and add it to your PATH:&lt;br /&gt;
&lt;br /&gt;
* Download gcc-arm-none-eabi-*-*-linux.tar.bz2 from [https://launchpad.net/gcc-arm-embedded/+download External Downloads] section of ARM gcc-arm-embedded project&lt;br /&gt;
* Unpack it to a directory of your choice&lt;br /&gt;
* Add the bin folder in to your PATH&lt;br /&gt;
&lt;br /&gt;
e.g.:&lt;br /&gt;
 cd ~&lt;br /&gt;
 wget https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2&lt;br /&gt;
 sudo tar -vjxf gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2 -C /opt&lt;br /&gt;
 rm -r gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2&lt;br /&gt;
 exportline=&amp;quot;PATH=$PATH:/opt/gcc-arm-none-eabi-4_7-2013q2/bin&amp;quot;&lt;br /&gt;
 if grep -Fxq &amp;quot;$exportline&amp;quot; ~/.profile; then echo nothing to do ; else echo $exportline &amp;gt;&amp;gt; ~/.profile; fi&lt;br /&gt;
 source ~/.profile&lt;br /&gt;
&lt;br /&gt;
The file .profile will be sourced in every bash after logging out and in again. Until then,&lt;br /&gt;
 source ~/.profile&lt;br /&gt;
can be used for every bash individually.&lt;br /&gt;
&lt;br /&gt;
If you can not access your toolchain with PATH working, look a the [[Installation/Linux#Troubleshooting]].&lt;br /&gt;
&lt;br /&gt;
=== Old toolchain for Paparazzi v4.x and earlier ===&lt;br /&gt;
&lt;br /&gt;
'''For Paparazzi v4.x''' and earlier you need to install the &amp;lt;tt&amp;gt;paparazzi-arm-multilib&amp;lt;/tt&amp;gt; package. It has support for both ARM7 (i.e. Tiny,TWOG,YAPA autopilot boards) as well as STM32F1 (i.e. LISA boards).&amp;lt;br&amp;gt;&lt;br /&gt;
'''This toolchain does not properly support STM32F4 based autopilots!!'''&lt;br /&gt;
&lt;br /&gt;
You can install it explicitly with:&lt;br /&gt;
 sudo apt-get install paparazzi-arm-multilib&lt;br /&gt;
&lt;br /&gt;
== Optional Packages ==&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;b&amp;gt;lpc21isp&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;openocd&amp;lt;/b&amp;gt; are normally '''automatically installed''' as they are recommended packages of paparazzi-dev, '''if not''' you can manually install them via:&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install lpc21isp openocd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;lpc21isp&amp;lt;/tt&amp;gt; is needed to serially flash the LPC2148 based autopilots (e.g. bootloader for tiny, twog, umarim), &amp;lt;tt&amp;gt;openocd&amp;lt;/tt&amp;gt; is for flashing via JTAG (e.g. for Lisa boards) and debugging.&lt;br /&gt;
&lt;br /&gt;
== Installing and running Paparazzi ==&lt;br /&gt;
&lt;br /&gt;
Please see [[Installation#Getting_the_Source_Code|Getting the Source Code on the general Installation page]] for details on downloading the Paparazzi source code, compiling and running it.&lt;br /&gt;
&lt;br /&gt;
== Udev rules ==&lt;br /&gt;
&lt;br /&gt;
Add the appropriate [[Udev]] rule (available in fhe file ''50-paparazzi.rules'') to the USB handler.  Simply copy as root &amp;lt;tt&amp;gt;conf/system/udev/rules/50-paparazzi.rules&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;/etc/udev/rules.d/&amp;lt;/tt&amp;gt;, e.g in a terminal:&lt;br /&gt;
&lt;br /&gt;
 cd &amp;lt;your paparazzi directory&amp;gt;&lt;br /&gt;
 sudo cp conf/system/udev/rules/50-paparazzi.rules /etc/udev/rules.d/&lt;br /&gt;
 sudo udevadm control --reload-rules&lt;br /&gt;
&lt;br /&gt;
See the [[Udev]] page for more details.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== No access rights for USB devices ===&lt;br /&gt;
&lt;br /&gt;
Some Linux distributions, don't allow standard (non admin) users to directly access the USB bus by default. On recent Ubuntu/Debian versions the first/main user is already a member of the ''plugdev'' group which should be sufficient for most cases.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have problems, make yourself a member of the ''plugdev'' and ''dialout'' groups:&lt;br /&gt;
&lt;br /&gt;
 sudo adduser &amp;lt;your login&amp;gt; plugdev&lt;br /&gt;
 sudo adduser &amp;lt;your login&amp;gt; dialout&lt;br /&gt;
&lt;br /&gt;
Logout and login again.&lt;br /&gt;
&lt;br /&gt;
=== arm-none-eabi-gcc: Command not found ===&lt;br /&gt;
Appeared on Debian Wheezy 7 (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)&amp;lt;br/&amp;gt;&lt;br /&gt;
If this error occurs, maybe the [https://packages.debian.org/de/wheezy/ia32-libs ia32-libs] are missing.&lt;br /&gt;
&lt;br /&gt;
Enable multiarch and install ia32-libs:&lt;br /&gt;
 dpkg --add-architecture i386&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install ia32-libs&lt;br /&gt;
&lt;br /&gt;
=== arm-linux-gnueabi-gcc cross-compiler not found ===&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu ===&lt;br /&gt;
 apt-get install gcc-arm-linux-gnueabi&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
Starting with jessie, there were [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771496#41 some changes] to the way cross-compilers are set up. To make it work you will have to add armel architecture and pick up some crossbuild tools.&lt;br /&gt;
&lt;br /&gt;
First edit your /etc/apt/sources.list and add the following line, to enable the emdebian repo:&lt;br /&gt;
 deb http://emdebian.org/tools/debian/ jessie main&lt;br /&gt;
&lt;br /&gt;
Run the following command in your terminal to add the keys for it&lt;br /&gt;
 curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
Then you could add armel architecture and fetch the missing cross-compiler packages&lt;br /&gt;
 dpkg --add-architecture armel&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install crossbuild-essential-armel&lt;br /&gt;
&lt;br /&gt;
You could find out more about cross-toolchains in jessie on debian [https://wiki.debian.org/CrossToolchains wiki page].&lt;br /&gt;
&lt;br /&gt;
Note that some of your repos might not mirror embedded architectures, which would give you an error when you try to update the sources. In that case you will have to specify which architecture you do want from them by editing the corresponding entry in your sources.list file, in a way described [https://wiki.debian.org/Multiarch/HOWTO here]. Like in this example with the crunchbang repo you could specify it by adding [arch=amd64,i386] to the line, so you only enable amd64 and i386 architectures:&lt;br /&gt;
 deb [arch=amd64,i386] http://packages.crunchbang.org/waldorf waldorf main&lt;br /&gt;
&lt;br /&gt;
===arm-none-eabi-gdb: error with libncurses.so.5===&lt;br /&gt;
Appeared on Xubuntu 14.04 LTS (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)&amp;lt;br/&amp;gt;&lt;br /&gt;
Terminal output: arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory&lt;br /&gt;
&lt;br /&gt;
If this error occurs, maybe [http://packages.ubuntu.com/search?keywords=lib32ncurses5 lib32ncurses5] is missing. &amp;lt;br/&amp;gt;&lt;br /&gt;
Found on [https://answers.launchpad.net/gcc-arm-embedded/+question/226680 launchpad q&amp;amp;a]&lt;br /&gt;
&lt;br /&gt;
=== FTDI serial adapter not working on old Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
On older Linux distributions (not needed for lucid and later), the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get remove brltty&lt;br /&gt;
&lt;br /&gt;
=== Code not starting on autopilot after changing gcc ===&lt;br /&gt;
&lt;br /&gt;
If you changed the toolchain (e.g. installed a new one for having FPU-Support for the F4), you need to run&lt;br /&gt;
&lt;br /&gt;
 make clean &amp;amp;&amp;amp; make&lt;br /&gt;
&lt;br /&gt;
in sw/ext in order to rebuild the libs. Otherwise the embedded code can behave strange (most likely not start)&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=21231</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=21231"/>
		<updated>2016-05-30T10:14:06Z</updated>

		<summary type="html">&lt;p&gt;Flixr: terry.guo PPA for gcc-arm-none-eabi doesn't exist anymore, https://launchpad.net/gcc-arm-embedded/+announcement/13824&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Installation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux] or Apple Macintosh running [http://en.wikipedia.org/wiki/OS_X Mac OS X]. There is also work being done to port Paparazzi to Windows.&lt;br /&gt;
&lt;br /&gt;
The steps required to install the software needed to be able to let your UAS fly are:&lt;br /&gt;
&lt;br /&gt;
# Install tools and prerequisites needed by Paparazzi.&lt;br /&gt;
# Download the source code from the source repository.&lt;br /&gt;
# Compile the Paparazzi software from sourcecode&lt;br /&gt;
# Complete any final configuration&lt;br /&gt;
&lt;br /&gt;
== Quickstart for Ubuntu users ==&lt;br /&gt;
Love one-liners? To get the latest Paparazzi up and running on your '''Ubuntu 12.04 or higher OS''', make sure you have internet, then just copy and paste the text below into your terminal and press [enter] ... and wait a while...&lt;br /&gt;
&lt;br /&gt;
 sudo add-apt-repository -y ppa:paparazzi-uav/ppa &amp;amp;&amp;amp; sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa &amp;amp;&amp;amp; sudo apt-get update &amp;amp;&amp;amp; \ &lt;br /&gt;
 sudo apt-get -f -y install paparazzi-dev paparazzi-jsbsim gcc-arm-embedded &amp;amp;&amp;amp; cd ~ &amp;amp;&amp;amp; &amp;lt;nowiki&amp;gt;git clone --origin upstream https://github.com/paparazzi/paparazzi.git&amp;lt;/nowiki&amp;gt; &amp;amp;&amp;amp; \&lt;br /&gt;
 cd ~/paparazzi &amp;amp;&amp;amp; git remote update -p &amp;amp;&amp;amp; \&lt;br /&gt;
 git checkout -b v5.8 upstream/v5.8 &amp;amp;&amp;amp; sudo cp conf/system/udev/rules/*.rules /etc/udev/rules.d/ &amp;amp;&amp;amp; sudo udevadm control --reload-rules &amp;amp;&amp;amp; \&lt;br /&gt;
 make clean &amp;amp;&amp;amp; make &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&lt;br /&gt;
                [[File:Done.jpg|frameless|center|Done!]]&lt;br /&gt;
If all went well the Paparazzi Center should now be running... '''skip''' the rest of this page and go fly! &lt;br /&gt;
&lt;br /&gt;
If you are new you'll need to do some more things before you go fly like configuring your XML definition file detailing your airframe configuration. There is help here for that: [[Airframe_Configuration]]&lt;br /&gt;
&lt;br /&gt;
In case you have no autopilot hardware yet, no problem, you can get hardware [[Get_Hardware|here]] or just buy a ready to fly aircraft that can run Paparazzi Software like the Parrot Drones [http://www.parrot.com/products/bebop-drone/ Parrot Bebop] and run Paparazzi on your Parrot [[AR_Drone_2|ARDRone2]], [[Bebop|Bebop]] and Bebop2 (soon the Disco drone).&lt;br /&gt;
&lt;br /&gt;
== OS Specific Instructions ==&lt;br /&gt;
&lt;br /&gt;
For Linux an instructional video explaining it all in detail can be found here https://www.youtube.com/watch?v=eW0PCSjrP78&lt;br /&gt;
&lt;br /&gt;
The process of installing the prerequisite tools and dependencies needed by Paparazzi is specific to the operating system you are using. For detailed installation instructions, please see the following pages:&lt;br /&gt;
*[[Installation/Linux|Installing prerequisites tools on Linux]]&lt;br /&gt;
*[[Installation/MacOSX|Installing prerequisites tools on Mac OS X]]&lt;br /&gt;
*[[Installation/RaspberryPi|Installing prerequisites tools on the RaspberryPi (Raspbian)]]&lt;br /&gt;
&lt;br /&gt;
For more advanced installation information or developers, please see the following pages:&lt;br /&gt;
*[[Installation/FromScratch|Installing everything from scratch]] For non Debian based Linux distributions or if one just wants to be able to use all the latest and greatest compilers, or source code of everything to improve something. Then there is no other way than to install from scratch.&lt;br /&gt;
*[[Installation/Windows|Installing prerequisite tools on Windows]] Note that this is '''a work in progress, and not finished yet'''. It would be fantastic if you are interested in running Paparazzi on this OS to help out with the porting. Being able to help is one of opensource software main features. If your skill- set is not so good in this area, but you still insist using Windows OS, then it is best to install a VirtualMachine from within Windows where you run the free Ubuntu OS of choice.&lt;br /&gt;
&lt;br /&gt;
=== Virtual Machines ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to have your Debian/Ubuntu running in a virtual machine, for instance with [http://www.virtualbox.org/ VirtualBox]. This requires minimal changes to your computer setup, as you can run the VM from all common platforms (Windows, OS X, Linux). The virtual machine image can easily be transferred between different laptops, giving greater flexibility. Unfortunately, the Open-Source Edition of VirtualBox doesn't include the necessary USB support, so you'll need to get the regular version from the website.&lt;br /&gt;
&lt;br /&gt;
If you are new and this is your first time installing it is suggested you keep it simple. Use the standard Linux or OS X install. Select a system you can dedicate to the Linux installation. No VMs or dual boot configurations. The idea is do a very simple generic installation that is certain to have no issues. This reassures you that the installation process works and you can see and use a working Paparazzi install for some time before you try a more complicated install. The install is well documented and certain to succeed if followed exactly. Most issues arise when someone unfamiliar with Paparazzi or their OS tries a non-standard install that requires special steps that are not documented. Generally, commands can be copied and pasted for easy, step-by-step installation.&lt;br /&gt;
&lt;br /&gt;
== Getting the Source Code ==&lt;br /&gt;
The Paparazzi source code is hosted on [https://github.com/paparazzi/paparazzi Github]. While you can download it as a tarball from https://github.com/paparazzi/paparazzi/releases, it is recommended to clone the repository with [[git]].&lt;br /&gt;
&lt;br /&gt;
From the directory of your choice type:&lt;br /&gt;
 git clone --origin upstream https://github.com/paparazzi/paparazzi.git&lt;br /&gt;
Check out the released stable version branch:&lt;br /&gt;
 cd paparazzi&lt;br /&gt;
 git checkout v5.8&lt;br /&gt;
&lt;br /&gt;
'''If this whole &amp;quot;Git&amp;quot; thing is new to you, more options and information can be found on the [[git|Git page]].'''&lt;br /&gt;
&lt;br /&gt;
== Launching the Software ==&lt;br /&gt;
Make sure you have installed the &amp;lt;tt&amp;gt;paparazzi-dev&amp;lt;/tt&amp;gt; package as described above. Without these you will not be able to compile the sourcecode.&lt;br /&gt;
The first step is to compile. From the &amp;lt;tt&amp;gt;paparazzi&amp;lt;/tt&amp;gt; directory (&amp;lt;tt&amp;gt;cd ~/paparazzi&amp;lt;/tt&amp;gt;), run&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
You will have to run this command after each update of the source (&amp;lt;tt&amp;gt;git pull&amp;lt;/tt&amp;gt; command).&lt;br /&gt;
Launch the software from the &amp;lt;tt&amp;gt;paparazzi&amp;lt;/tt&amp;gt; directory with&lt;br /&gt;
&lt;br /&gt;
 ./paparazzi&lt;br /&gt;
&lt;br /&gt;
From the [[Paparazzi_Center|Paparazzi Center]] interface, select the ''Microjet'' aircraft, select the ''sim'' target and ''Build'' it. Then ''Execute'' the ''Simulation'' session. The procedure is detailed in the [[Simulation]] page.&lt;br /&gt;
&lt;br /&gt;
=== Environment Variables ===&lt;br /&gt;
&lt;br /&gt;
If ('''and only if''') you want to directly launch some Paparazzi agents (the ''Tools'' of the [[Paparazzi_Center|Paparazzi Center]]) from the command line, without using the Paparazzi Center, you must have the Paparazzi source and home environment variables set correctly in your shell. These variables can be automatically set in your shell by adding the following lines to your .bashrc file:&lt;br /&gt;
{{Box Code|~/.bashrc|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export PAPARAZZI_HOME=''your paparazzi software directory''&lt;br /&gt;
export PAPARAZZI_SRC=''your paparazzi software directory''&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Verify that your variables are set correctly with the following command:&lt;br /&gt;
:&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;env | grep PAPARAZZI&amp;lt;/source&amp;gt;&lt;br /&gt;
which should return the following:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
PAPARAZZI_HOME=''your paparazzi software directory''&lt;br /&gt;
PAPARAZZI_SRC=''your paparazzi software directory''&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you wish to manually set the env variables (i.e. when compiling a backup copy of your code in a different folder) execute the following command from the folder you wish to set as your active paparazzi folder:&lt;br /&gt;
:&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export PAPARAZZI_HOME=`pwd`;export PAPARAZZI_SRC=`pwd`&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software Updates ==&lt;br /&gt;
'''We manage the software with the git version control system. Learn it! If you are new to it, see the [[Git|Git wiki page]].'''&lt;br /&gt;
&lt;br /&gt;
Paparazzi is a very rapidly evolving project and as such you might want to update your software regularly. See the [[RepositoryStructure|branching model and release process page]].&lt;br /&gt;
&lt;br /&gt;
Any new files you created will not be lost/overwritten when updating (like your own airframe file). Nevertheless, as with all things, backups are advised.&lt;br /&gt;
If you modified source code, the best way is of course to use the version control system [[Git]] to commit your changes. Otherwise at least use the brute force method and save everything in another directory.&lt;br /&gt;
&lt;br /&gt;
Update your software with care and caution, and always test the functionality on the ground and in the air as some updates will affect tuning parameters. You might need to update your airframe file as well. The compiler will usually complain if there is a problem, at which point you can look at the [[Airframe_Configuration|Airframe Configuration wiki page]] again, look on the [[Contact#Mailing_List|mailing list]] or some of the most recent airframe files on git to find the proper syntax.&lt;br /&gt;
&lt;br /&gt;
'''See also the [[Release Upgrades]] page for information on how to update your configuration from one release to the next.'''&lt;br /&gt;
&lt;br /&gt;
=== Quick'n dirty description ===&lt;br /&gt;
&lt;br /&gt;
To download and automatically merge any updated source files, run the following command from your Paparazzi directory&lt;br /&gt;
 git pull&lt;br /&gt;
&lt;br /&gt;
After any git update or source code modification the code can be recompiled from ''your paparazzi software directory'' with the following command:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
The ''make'' command will only recompile portions of the software where changed have been detected.&lt;br /&gt;
If it does not behave as expected you can delete all compiled files and recompile from scratch with the following commands:&lt;br /&gt;
&lt;br /&gt;
 make clean&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
If you'd like to check that the code compiles all example airframes then you can run the test suite using the command&lt;br /&gt;
&lt;br /&gt;
 make test&lt;br /&gt;
&lt;br /&gt;
For more details see the [[Builds/Tests|tests page]].&lt;br /&gt;
&lt;br /&gt;
== Using the Live CD ==&lt;br /&gt;
&lt;br /&gt;
There is a [[LiveCD]] available, but it dates back to 2008. It is still an easy way to get a first glimpse of Paparazzi however without installing anything.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Modules&amp;diff=21229</id>
		<title>Modules</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Modules&amp;diff=21229"/>
		<updated>2016-05-25T08:24:02Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Telemetry */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Modules&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
The modules allow to add new code in a flexible way with initialisation, periodic and event functions without modifying the main AP loop.&lt;br /&gt;
&lt;br /&gt;
See [[FirmwareArchitecture]] and [[Subsystems]] for the differences of modules to subsystems.&lt;br /&gt;
&lt;br /&gt;
=== Available modules ===&lt;br /&gt;
&lt;br /&gt;
There is a special page listing all currently available modules to simply extend your Paparazzi autopilot board possibilities. [[Modules_list| Go here to inspect this list of modules]].&lt;br /&gt;
&lt;br /&gt;
The auto-generated list and short doc for all modules in the master branch can be found at the [http://docs.paparazziuav.org/latest/onboard_modules.html onboard modules page of the doxygen docs].&lt;br /&gt;
&lt;br /&gt;
=== Make your own ===&lt;br /&gt;
&lt;br /&gt;
It is very possible to make your own module and to share it with the world. To make it even easier there is a helper tool called &amp;quot;create_module&amp;quot; in the main Paparazzi directory. Try it, you'll be surprised how easy it is to start your own module with the help of this tool. &lt;br /&gt;
&lt;br /&gt;
=== In the airframe file ===&lt;br /&gt;
&lt;br /&gt;
To add a new module for an aircraft, add a section '''modules''' in his airframe xml file :&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;modules main_freq=&amp;quot;60&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;load name=&amp;quot;demo_module.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;load name=&amp;quot;dummy.xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;BLA&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;BLUB&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;configure name=&amp;quot;FOO&amp;quot; value=&amp;quot;BAR&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/load&amp;gt;&lt;br /&gt;
 &amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
* The main_freq parameter (in Hz) is optional. If present, it allows to specify the frequency of the main loop. Default is the ''main periodic frequency'' of the autopilot. If not needed to be specified, then the first line is just: &amp;lt;modules&amp;gt;&lt;br /&gt;
* The children &amp;quot;define&amp;quot; generate compilation defines for all the targets of a module and can be used with or without value. It allows to keep the module description more generic add to place the airframe dependent parameters in the airframe xml file.&lt;br /&gt;
* The child &amp;quot;configure&amp;quot; generates a makefile variable.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Since '''v5.8''' it is possible to safely replace ''subsystem'' by ''module'' in your airframe file. The roadmap of Paparazzi is to convert existing [[subsystems]] to modules.&lt;br /&gt;
&lt;br /&gt;
As a result, modules can be loaded using the same format than subsystems, as children of the '''firmware''' node.&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;firmware name=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;module name=&amp;quot;demo_module&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;module name=&amp;quot;dummy&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;BLA&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;BLUB&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;configure name=&amp;quot;FOO&amp;quot; value=&amp;quot;BAR&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/module&amp;gt;&lt;br /&gt;
  &amp;lt;target name=&amp;quot;...&amp;quot; board=&amp;quot;...&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;module name=&amp;quot;something&amp;quot; type=&amp;quot;sometype&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/target&amp;gt;&lt;br /&gt;
 &amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The '''modules''' node is then only needed if a custom ''main_freq'' parameter need to be specified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== In the module file ===&lt;br /&gt;
&lt;br /&gt;
The modules description files are located in '''conf/modules'''.&lt;br /&gt;
{{Box Code|conf/modules/mymodule.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE module SYSTEM &amp;quot;module.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;module name=&amp;quot;demo_module&amp;quot; dir=&amp;quot;demo_module&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;doc&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;&lt;br /&gt;
     Demo module.&lt;br /&gt;
     More details about this module.&lt;br /&gt;
   &amp;lt;/description&amp;gt;&lt;br /&gt;
   &amp;lt;configure name=&amp;quot;SOMETHING&amp;quot; value=&amp;quot;S1|S2|S3&amp;quot; description=&amp;quot;The thing to use&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;DEMO_MODULE_LED&amp;quot; value=&amp;quot;LED_X&amp;quot; description=&amp;quot;LED Selection&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/doc&amp;gt;&lt;br /&gt;
  &amp;lt;settings&amp;gt;&lt;br /&gt;
    &amp;lt;dl_settings name=&amp;quot;bla&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;dl_setting min=&amp;quot;0&amp;quot; max=&amp;quot;5&amp;quot; step=&amp;quot;1&amp;quot; var=&amp;quot;bla_bla&amp;quot; shortname=&amp;quot;bb&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/dl_settings&amp;gt;&lt;br /&gt;
  &amp;lt;settings&amp;gt;&lt;br /&gt;
  &amp;lt;depends&amp;gt;foo.xml,bar|baz&amp;lt;/depends&amp;gt;&lt;br /&gt;
  &amp;lt;conficts&amp;gt;boo&amp;lt;/conflicts&amp;gt;&lt;br /&gt;
  &amp;lt;header&amp;gt;&lt;br /&gt;
   &amp;lt;file name=&amp;quot;demo_module.h&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/header&amp;gt;&lt;br /&gt;
  &amp;lt;init fun=&amp;quot;init_demo()&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;periodic fun=&amp;quot;periodic_1Hz_demo()&amp;quot; freq=&amp;quot;1.&amp;quot; start=&amp;quot;start_demo()&amp;quot; stop=&amp;quot;stop_demo()&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;periodic fun=&amp;quot;periodic_10Hz_demo()&amp;quot; period=&amp;quot;0.1&amp;quot; start=&amp;quot;start_demo()&amp;quot; stop=&amp;quot;stop_demo()&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;makefile&amp;gt;&lt;br /&gt;
   &amp;lt;raw&amp;gt;&lt;br /&gt;
    #Raw makefile section&lt;br /&gt;
   &amp;lt;/raw&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;USE_SOMETHING&amp;quot; value=&amp;quot;$(SOMETHING)&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;DEMO_MODULE_LED&amp;quot; value=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;file name=&amp;quot;demo_module.c&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/makefile&amp;gt;&lt;br /&gt;
 &amp;lt;/module&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* module&lt;br /&gt;
** name : this parameter is the name of the module (mandatory)&lt;br /&gt;
** dir : the name of the directory in '''sw/airborne/modules''' where the source code is located (in the above exemple: sw/airborne/modules/demo_module), if not specified, the name of the module is used as default directory name&lt;br /&gt;
&lt;br /&gt;
* doc&lt;br /&gt;
** description: a description of the module. The content of the first line until the dot is treated as the brief description used as the name in the [http://paparazzi.github.com/docs/latest/onboard_modules.html generated docs] (mandatory).&lt;br /&gt;
** define: describe the possible define flags for this module with default values and a short description (usually called from the [[Airframe_Configuration|airframe firmware section]])&lt;br /&gt;
** configure: describe the possible configuration options for this module with default values and a short description (usually called from the [[Airframe_Configuration|airframe firmware section]])&lt;br /&gt;
** section: describe the parameters that can be added as a section in the [[Airframe_Configuration|airframe configuration file]]&lt;br /&gt;
&lt;br /&gt;
* settings_file (0 or more)&lt;br /&gt;
** file name of a settings xml file&lt;br /&gt;
&lt;br /&gt;
* settings (0 or more): use the same format than systems [[Settings]]&lt;br /&gt;
** target: a list of targets allowed or forbidden for which embedded settings should be used&lt;br /&gt;
** dl_settings node with a tab name&lt;br /&gt;
*** dl_setting: setting description, see [[Settings]] page for details&lt;br /&gt;
&lt;br /&gt;
* depends (0 or 1 'depends' node)&lt;br /&gt;
** comma separated list of required modules&lt;br /&gt;
** allows to specify OR dependencies with pipe (|) similar to Debian depends, ex: &amp;lt;code&amp;gt;foo,bar|baz&amp;lt;/code&amp;gt; would make it depend on foo AND (bar OR baz)&lt;br /&gt;
** the elements can be a xml file (in conf/modules) or a module name (as set in the module xml 'name' node)&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:800px&amp;quot;&amp;gt;&lt;br /&gt;
Prior to '''v5.3.0_testing''' we had one &amp;lt;tt&amp;gt;depend&amp;lt;/tt&amp;gt; node instead of &amp;lt;tt&amp;gt;depends&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;conflicts&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;'depend' node used prior to '''v5.3_devel-438-g8be5c42'''):&lt;br /&gt;
* depend (0 or 1 'depend' node)&lt;br /&gt;
** require : the list of required modules&lt;br /&gt;
** conflict : the list of conflicting modules&lt;br /&gt;
** the elements of a list are separated with a pipe (|), ex: &amp;quot;bla|boo&amp;quot;&lt;br /&gt;
** the elements can be a xml file (in conf/modules) or a module name (in sw/airborne/modules)&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
* conflicts (0 or 1 'conflicts' node)&lt;br /&gt;
** comma separated list of conflicting modules&lt;br /&gt;
** the elements can be a xml file (in conf/modules) or a module name (as set in the module xml 'name' node)&lt;br /&gt;
&lt;br /&gt;
* header (0 or 1 'header' node)&lt;br /&gt;
** file : the name of the header to automatically include in modules.h&lt;br /&gt;
&lt;br /&gt;
* init (0 or more 'init' node)&lt;br /&gt;
** fun : initialization function name, called once at startup&lt;br /&gt;
&lt;br /&gt;
* periodic (0 or more 'periodic' node)&lt;br /&gt;
** fun : periodic function name (mandatory)&lt;br /&gt;
** period : period of the function in seconds, cannot be higher than the main frequency (if not specified, use freq parameter)&lt;br /&gt;
** freq : frequency of the function in Hz, cannot be higher than main frequency (used if period is not defined; if nor period nor freq are defined, the maximum frequency is used by default)&lt;br /&gt;
** delay : integer that can be used to impose a sequence in the periodic functions (use values between 0 and main_freq/function_freq)&lt;br /&gt;
** start : function to be executed before the periodic function starts&lt;br /&gt;
** stop : function to be executed after the periodic function stops (never called if autorun=LOCK)&lt;br /&gt;
** autorun : TRUE to make the periodic function starts automatically after init, FALSE to make it way for a user command to start, LOCK to make it always true (default is LOCK)&lt;br /&gt;
&lt;br /&gt;
* event (0 or more 'event' node)&lt;br /&gt;
** fun : event function name called in each cycle of the main AP loop&lt;br /&gt;
&lt;br /&gt;
* datalink (0 or more 'datalink' node)&lt;br /&gt;
** message : name of the datalink (uplink) message to be parsed&lt;br /&gt;
** fun : name of the function called when a message arrived&lt;br /&gt;
&lt;br /&gt;
* makefile (0 or more 'makefile' node)&lt;br /&gt;
** target : a list of build targets separated with pipes (ex: &amp;lt;makefile target=&amp;quot;tunnel|foo&amp;quot;&amp;gt;) (default is &amp;quot;ap|sim|nps&amp;quot;)&lt;br /&gt;
** define : each define node specifies a CFLAGS for the current targets&lt;br /&gt;
*** name : name of the define (ex: name=&amp;quot;USE_MODULE_LED&amp;quot; -&amp;gt; target.CFLAGS += -DUSE_MODULE_LED) (mandatory)&lt;br /&gt;
*** value : the value to associate (ex: name=&amp;quot;DEMO_MODULE_LED&amp;quot; value=&amp;quot;2&amp;quot; -&amp;gt; target.CFLAGS += -DDEMO_MODULE_LED=2)&lt;br /&gt;
*** type : the type of define, possible values are &amp;quot;define&amp;quot; or &amp;quot;D&amp;quot;, &amp;quot;include&amp;quot; or &amp;quot;I&amp;quot; (ex: name=&amp;quot;$(ARCH_SRC)&amp;quot; type=&amp;quot;include&amp;quot; -&amp;gt; target.CFLAGS += -I$(ARCH_SRC) ) (default is &amp;quot;define&amp;quot;)&lt;br /&gt;
** file&lt;br /&gt;
*** name : the name of the c file (located in &amp;quot;sw/airborne/modules/&amp;lt;dir_name&amp;gt;&amp;quot;) to add in the Makefile (ex: name=&amp;quot;demo_module.c&amp;quot; -&amp;gt; target.srcs += modules/&amp;lt;dir_name&amp;gt;/demo_module.c)&lt;br /&gt;
*** dir : select a directory for this file only (overrides the default directory)&lt;br /&gt;
** file_arch (hardware related code)&lt;br /&gt;
*** name : the name of the c file (located in &amp;quot;sw/airborne/arch/&amp;lt;ARCH&amp;gt;/modules/&amp;lt;dir_name&amp;gt;&amp;quot;) add in the Makefile (ex: name=&amp;quot;demo_module_hw.c&amp;quot; -&amp;gt; target.srcs += arch/&amp;lt;ARCH&amp;gt;/modules/&amp;lt;dir_name&amp;gt;/demo_module_hw.c)&lt;br /&gt;
*** dir : select a directory for this file only (overrides the default directory)&lt;br /&gt;
** raw : allows to define a raw makefile section&lt;br /&gt;
&lt;br /&gt;
If the compilation target is not supported by the module, it will be automatically unloaded. This may require a 'clean_ac' to work.&lt;br /&gt;
&lt;br /&gt;
=== In the airborne code ===&lt;br /&gt;
&lt;br /&gt;
The code corresponding to a module should be placed in the directory &amp;quot;sw/airborne/modules/&amp;lt;dir_name&amp;gt;&amp;quot; where dir_name must match the one in your conf file (attribute &amp;quot;dir&amp;quot; if specified, &amp;quot;name&amp;quot; otherwise). There are also defines generated for the frequency and period of every periodic functions of the module that can be used in the code: &amp;lt;PERIODIC_FUNCTION_NAME&amp;gt;_FREQ and &amp;lt;PERIODIC_FUNCTION_NAME&amp;gt;_PERIOD.&lt;br /&gt;
&lt;br /&gt;
=== Starting / stopping a module ===&lt;br /&gt;
&lt;br /&gt;
If modules are loaded with periodical functions that are not locked, a new tab will automatically appear in the setting page of the GCS that allows you to start and stop them.&lt;br /&gt;
&lt;br /&gt;
An other possibility is that any file that includes the header &amp;quot;modules.h&amp;quot; can start or stop the periodic tasks.&lt;br /&gt;
&lt;br /&gt;
=== Telemetry ===&lt;br /&gt;
&lt;br /&gt;
In the [[telemetry]] file, if a module name is specified in a field '''message''', it will be included in the telemetry messages only if the corresponding module is loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;message name=&amp;quot;SOME_MODULE_MSG&amp;quot; period=&amp;quot;2&amp;quot; module=&amp;quot;module_name&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This functionality was removed again in v5.9 ([https://github.com/paparazzi/paparazzi/pull/1678 #1678]), since it is not needed anymore with the &amp;lt;tt&amp;gt;register_periodic_telemetry&amp;lt;/tt&amp;gt; functionality we have since v5.0.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer_Documentation]] [[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Modems/xbee&amp;diff=21220</id>
		<title>Modems/xbee</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Modems/xbee&amp;diff=21220"/>
		<updated>2016-05-04T18:52:15Z</updated>

		<summary type="html">&lt;p&gt;Flixr: X-CTU 6 is available natively for linux&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Paparazzi supports the following modem protocols:&lt;br /&gt;
* Standard transparent serial (pprz protocol, AT mode) - compatible with all modems and can be used to connect the autopilot directly to a PC for testing without a modem.&lt;br /&gt;
* Digi (formerly Maxstream) API protocol (xbee) - compatible with all Digi modems including the 9XTend and Zigbee. This protocol enables hardware addressing through API mode, allowing multiple aircraft to be managed from a single ground modem.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
=== Installation of X-CTU ===&lt;br /&gt;
The simplest way to configure the XBee modems is to use the [http://www.digi.com/support/productdetail?pid=3352 X-CTU] software from Digi. It runs natively under MacOS X, Windows and Linux.&lt;br /&gt;
To use versions before X-CTU 6 under Linux, use Wine.&lt;br /&gt;
&lt;br /&gt;
==== Installation using Wine ====&lt;br /&gt;
'''X-CTU versions 6 and up are available natively for Linux''', so using Wine is only needed for older versions.&lt;br /&gt;
&lt;br /&gt;
Under Wine make sure you have the USB serial link connecting to XBee mapped to a com port (please consult [[Installation/Linux/udev | paparazzi linux device naming]]):&lt;br /&gt;
&lt;br /&gt;
* First of all you should install wine.&lt;br /&gt;
* Then install winetricks (X-CTU requires MS Visual C++ Redistributable package so winetricks will make things much easier to get installed).&lt;br /&gt;
* Then ('''!important''') run wine configuration before doing something else, so wine can create ~/.wine&lt;br /&gt;
* Make symlink to your modem device.&lt;br /&gt;
&lt;br /&gt;
 $ sudo ln -s /dev/paparazzi/xbee ~/.wine/dosdevices/com4&lt;br /&gt;
&lt;br /&gt;
* Set permissions for COM port (if you are not root):&lt;br /&gt;
 &lt;br /&gt;
 $ sudo ls -l /dev/paparazzi/xbee&lt;br /&gt;
 lrwxrwxrwx 1 root root 10 june 14 19:00 /dev/paparazzi/xbee -&amp;gt; /dev/ttyUSB0&lt;br /&gt;
 $ sudo chown &amp;lt;your_user_name_here&amp;gt; /dev/ttyUSB0&lt;br /&gt;
&lt;br /&gt;
* Run X-CTU setup and install it.&lt;br /&gt;
* Then run installed application. When window opens switch to &amp;quot;User Com Ports&amp;quot; tab and add com port &amp;quot;COM4. Note: This procedure have to be made every time you start X-CTU on Linux.&lt;br /&gt;
* Click &amp;quot;Test/Query&amp;quot; button. If you get some modem information (like serial, etc.) after a little time, then you have modem link established.&lt;br /&gt;
&lt;br /&gt;
If X-CTU complains on com port connectivity, try adding theese strings to ~/.wine/system.reg&lt;br /&gt;
 [hardware\\DEVICEMAP\\SERIALCOMM]&lt;br /&gt;
 &amp;quot;COM1&amp;quot;=&amp;quot;COM1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If your X-CTU does not update its firmware correctely from the web, follow the steps described in the chapter &amp;quot;Manually Update the X-CTU firmware files&amp;quot; of [http://wiki.openpilot.org/display/Doc/Configure+Xbee+via+Linux this page].&lt;br /&gt;
&lt;br /&gt;
=== Configuring XBee AT mode using X-CTU ===&lt;br /&gt;
This is the recommended way to start. With this firmware the modems basically act as a serial link replacement and don't do any mesh networking. The pprz protocol is based on this mode.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Basic approach:&lt;br /&gt;
# Connect your XBee to your PC. There are several vendors of [[Modems#GCS_Adaptation|USB boards]].&lt;br /&gt;
# Start the X-CTU programm and go to the modem configuration.&lt;br /&gt;
# Click on READ&lt;br /&gt;
# Select the appropriate function set with AT command set.&lt;br /&gt;
# set PAN ID, etc... depending on which XBee you use&lt;br /&gt;
# Set the baudrate you want to use. 57600 is the maximum baudrate setting for bidirectional transfers to work correctly. At a higher baudrate setting, transmission can only be done in one direction.&lt;br /&gt;
# Then write the firmware to the module.&lt;br /&gt;
If X-CTU asks you to reset the XBee, you have to connect the RST pin (5) to the GND pin (10) of the XBee. You can do this manually using tweezers or a short wire.&lt;br /&gt;
&lt;br /&gt;
=== Configuring XBee using a terminal emulator ===&lt;br /&gt;
&lt;br /&gt;
Alternatively you can configure your XBee using a text-based modem control and terminal emulation program, such as [http://en.wikipedia.org/wiki/Minicom Minicom] for Linux or [http://freeware.the-meiers.org CoolTerm] for Linux, Mac OSX, or Windows.&lt;br /&gt;
&lt;br /&gt;
The xBee modules can be set to the following baud rates:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;  cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;text-align:center&amp;quot; cellpadding=&amp;quot;6&amp;quot;&lt;br /&gt;
!''Baud Code''!!''Baud Rate''!!''Notes''&lt;br /&gt;
|-&lt;br /&gt;
|0||1200||&lt;br /&gt;
|-&lt;br /&gt;
|1||2400||&lt;br /&gt;
|-&lt;br /&gt;
|2||4800||&lt;br /&gt;
|-&lt;br /&gt;
|3||9600||&lt;br /&gt;
|-&lt;br /&gt;
|4||19200|| Use with fixedwing aircraft and their GCSs&lt;br /&gt;
|-&lt;br /&gt;
|5||38400||&lt;br /&gt;
|-&lt;br /&gt;
|6||57600|| Use with rotorcraft or transitioning aircraft and their GCSs&lt;br /&gt;
|-&lt;br /&gt;
|7||115200||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Quick, I'm in a rush''':&lt;br /&gt;
 $ sudo screen /dev/ttyUSB0 9600&lt;br /&gt;
 +++&lt;br /&gt;
 ATBD6&amp;lt;enter&amp;gt;&lt;br /&gt;
 ATAP1&amp;lt;enter&amp;gt;&lt;br /&gt;
 ATWR&amp;lt;enter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Minicom Instructions''':&lt;br /&gt;
* Connect XBee to your computer&lt;br /&gt;
* Setup minicom (by default XBee modems come set up for 9600 baud) 8-N-1 &lt;br /&gt;
* Type Ctrl-A A in minicom this will set it up to add linefeeds to the stream&lt;br /&gt;
* Type three '+' in quick succession resulting in &amp;quot;+++&amp;quot; string (you have 10s to type your next command otherwise the modem will revert back to transparent mode). Do NOT press enter.&lt;br /&gt;
** you get a confirmation: 'OK'&lt;br /&gt;
* Type &amp;quot;AT&amp;lt;enter&amp;gt;&amp;quot;&lt;br /&gt;
** you get a confirmation: 'OK'&lt;br /&gt;
* Type &amp;quot;ATBD&amp;lt;enter&amp;gt;&amp;quot;&lt;br /&gt;
** you get the current baudrate code: '3'&lt;br /&gt;
* To set another baudrate select one from the above table and type &amp;quot;ATBD &amp;lt;baud code&amp;gt;&amp;lt;enter&amp;gt;&amp;quot;:&lt;br /&gt;
* Type &amp;quot;ATAP 0 or 1 for API mode or not&amp;lt;enter&amp;gt;&amp;quot;&lt;br /&gt;
* To store the new baudrate in the rom type &amp;quot;ATWR&amp;lt;enter&amp;gt;&amp;quot;&lt;br /&gt;
* Now you can close minicom&lt;br /&gt;
* Reconnect modem&lt;br /&gt;
* Restart minicom with the new baudrate&lt;br /&gt;
* Test that the modem is setup correctly by typing &amp;quot;+++&amp;quot; and getting &amp;quot;OK&amp;quot; confirmation&lt;br /&gt;
&lt;br /&gt;
'''CoolTerm Instructions''':&lt;br /&gt;
* Connect xBee to your computer&lt;br /&gt;
* Open CoolTerm and click 'Options.' From the 'Serial Port' tab select:&lt;br /&gt;
**Port: USB Serial (or as appropriate for your xBee carrier board)&lt;br /&gt;
**Baudrate: 9600&lt;br /&gt;
**Data Bits: 8&lt;br /&gt;
**Parity: None&lt;br /&gt;
**Stop Bits 1&lt;br /&gt;
*From the 'Terminal' tab enable Local Echo&lt;br /&gt;
*Click OK&lt;br /&gt;
*Click Connect&lt;br /&gt;
* Type three '+' in quick succession resulting in &amp;quot;+++&amp;quot; string (you have 10s to type your next command otherwise the modem will revert back to transparent mode). Do NOT press enter.&lt;br /&gt;
** you get a confirmation: 'OK'&lt;br /&gt;
* Type &amp;quot;AT&amp;lt;enter&amp;gt;&amp;quot;&lt;br /&gt;
** you get a confirmation: 'OK'&lt;br /&gt;
* Type &amp;quot;ATBD&amp;lt;enter&amp;gt;&amp;quot;&lt;br /&gt;
** you get the current baudrate code: '3'&lt;br /&gt;
* To set another baudrate select one from the above table and type &amp;quot;ATBD &amp;lt;baud code&amp;gt;&amp;lt;enter&amp;gt;&amp;quot;:&lt;br /&gt;
* To store the new baudrate in the rom type &amp;quot;ATWR&amp;lt;enter&amp;gt;&amp;quot;&lt;br /&gt;
* Now you can close CoolTerm.&lt;br /&gt;
* Reconnect modem&lt;br /&gt;
* Restart CoolTerm, change options to new baudrate, and connect&lt;br /&gt;
* Test that the modem is setup correctly by typing &amp;quot;+++&amp;quot; and getting &amp;quot;OK&amp;quot; confirmation&lt;br /&gt;
&lt;br /&gt;
== XBee Pro ZB (AT command set) ==&lt;br /&gt;
This 2.4GHz modem uses ZigBee PRO Feature Set and is compatible with devices from other vendors using the ZigBee PRO Feature Set.&lt;br /&gt;
&lt;br /&gt;
=== Flashing the airborne module ===&lt;br /&gt;
# Connect your XBee, start X-CTU, click READ&lt;br /&gt;
# Select the function set '''ZIGBEE END DEVICE AT''' (or ZIGBEE ROUTER AT).&lt;br /&gt;
# Set the PAN ID to any number, must be the same as the pan id of the coordinator (Ground Station).&lt;br /&gt;
# Set the Node Identifier (NI) to your aircraft name or any other appropriate name.&lt;br /&gt;
# Set the baudrate you want to use. 57600 is the maximum baudrate setting for bidirectional transfers to work correctly.&lt;br /&gt;
# Then write the firmware to the module.&lt;br /&gt;
&lt;br /&gt;
=== Flashing the ground station module ===&lt;br /&gt;
# Connect your XBee, start X-CTU, click READ&lt;br /&gt;
# Select the function set '''ZIGBEE COORDINATOR AT'''.&lt;br /&gt;
# Set the PAN ID to any number, must be the same as the pan id of the end device (aircraft).&lt;br /&gt;
# Set the Node Identifier (NI) to PPRZ_GROUND or any other appropriate name.&lt;br /&gt;
# Set the baudrate you want to use. 57600 is the maximum baudrate setting for bidirectional transfers to work correctly.&lt;br /&gt;
# Then write the firmware to the module.&lt;br /&gt;
&lt;br /&gt;
=== Pairing your Modems ===&lt;br /&gt;
&lt;br /&gt;
For maximum performance you can pair the ground modem to the airborne modem. Set the &amp;quot;DH - Destination Address High&amp;quot; and &amp;quot;DL - Destination Address Low&amp;quot; to the unique serial number &amp;quot;SH - Serial Number High&amp;quot; and &amp;quot;SL - Serial Number Low&amp;quot; of the other modem. Do so both on the ground modem and on the airborne modem. Failing to properly pair your modems will likely result in poor throughput and data loss between your airframe and your ground control station. If this is the case you may see errors on the Paparazzi Center console like &amp;lt;tt&amp;gt;Failure(&amp;quot;Pprz.values_of_payload, wrong argument: 00 08 &amp;quot;)&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Failure(&amp;quot;Pprz.values_of_payload, too many bytes in message PONG: 00 03 02 2a 00 00 00 00 00 00 00 00 00 00 00 00 &amp;quot;)&amp;lt;/tt&amp;gt;. Pairing does help and the error messages will disappear. &lt;br /&gt;
&lt;br /&gt;
=== Reviving a non-responding Xbee Pro ===&lt;br /&gt;
&lt;br /&gt;
To bring an apparently dead XBee Pro Series 2 back to life, do the following:&lt;br /&gt;
&lt;br /&gt;
#Connect the USB device that holds the XBee to your laptop/desktop (without the XBee connected).&lt;br /&gt;
#Open X-CTU.&lt;br /&gt;
#In the tab used to program the device, select the proper modem (normally you would do a READ to get the values).&lt;br /&gt;
#Choose the option you want to program (i.e., &amp;quot;END DEVICE&amp;quot; or &amp;quot;COORDINATOR&amp;quot;) as if you were programming it.&lt;br /&gt;
#With the XBee not in the device, click &amp;quot;WRITE&amp;quot;. It will hang, timeout, and bring up a dialog box.&lt;br /&gt;
#Before you click OK to the dialog box, plug in the XBee module (carefully).&lt;br /&gt;
#Click OK to clear the message and it should start programming automatically.&lt;br /&gt;
&lt;br /&gt;
=== Other tutorials ===&lt;br /&gt;
&lt;br /&gt;
[http://pixhawk.ethz.ch/tutorials/how_to_configure_xbee PixHawk: HowTo configure XBee]&lt;br /&gt;
&lt;br /&gt;
[http://wiki.openpilot.org/display/Doc/Configure+Xbee+via+Linux openpilot: XBee RF modems]&lt;br /&gt;
&lt;br /&gt;
== XBee Pro ZNet 2.5 (AT command set) ==&lt;br /&gt;
These are legacy modems and not recommended/sold by Digi anymore.&lt;br /&gt;
It is recommended to upgrade these to XBee Pro ZB with the [ftp://ftp1.digi.com/support/images/ZNet%202.5%20to%20ZB%20Conversion%20Kit.zip ZNet 2.5 to ZB Conversion Kit] from Digi.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to use ZNet 2.5 feature set nevertheless, here is how to configure it:&lt;br /&gt;
&lt;br /&gt;
=== Flashing the airborne module ===&lt;br /&gt;
# Connect your XBee, start X-CTU, click READ&lt;br /&gt;
# Select the function set '''ZNET 2.5 ROUTER/END DEVICE AT'''.&lt;br /&gt;
# Set the PAN ID to any number, must be the same as the pan id of the coordinator (Ground Station).&lt;br /&gt;
# Set the Node Identifier (NI) to your aircraft name or any other appropriate name.&lt;br /&gt;
# Set the baudrate you want to use. 57600 is the maximum baudrate setting for bidirectional transfers to work correctly.&lt;br /&gt;
# Then write the firmware to the module.&lt;br /&gt;
&lt;br /&gt;
=== Flashing the ground station module ===&lt;br /&gt;
# Connect your XBee, start X-CTU, click READ&lt;br /&gt;
# Select the function set '''ZNET 2.5 COORDINATOR DEVICE AT'''.&lt;br /&gt;
# Set the Destination Address Low (DL) to FFFF.&lt;br /&gt;
# Set the PAN ID to any number, must be the same as the pan id of the end device (aircraft).&lt;br /&gt;
# Set the Node Identifier (NI) to PPRZ_GROUND or any other appropriate name.&lt;br /&gt;
# Set the baudrate you want to use. 57600 is the maximum baudrate setting for bidirectional transfers to work correctly.&lt;br /&gt;
# Then write the firmware to the module.&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
For the ZigBee ZNet 2.5 and ZB modules to work one of the modules has to be flashed with the coordinator firmware. All the others in the same PAN can either run as routers or end-devices.&lt;br /&gt;
* Flash one module (ground station) with the coordinator AT firmware&lt;br /&gt;
* Flash aircraft module with router or end-device AT firmware&lt;br /&gt;
To allow modules to join any PAN set the PAN ID to zero (default setting). Then the coordinator will generate a random PAN ID and routers and end-devices will join the first PAN they find.&lt;br /&gt;
&lt;br /&gt;
If you operate in an environment with multiple zigbee PANs it is recommended to set the PAN ID explicitly:&lt;br /&gt;
* Set PAN ID to some unique (but same) ID on both modules&lt;br /&gt;
* Set a Node Identifier for each module (e.g. ground, aircraft)&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== XBee Pro DigiMesh / 802.15.4 (&amp;quot;Series 1&amp;quot;) ==&lt;br /&gt;
&lt;br /&gt;
=== Flashing the airborne module ===&lt;br /&gt;
# Connect your XBee, start X-CTU, click READ&lt;br /&gt;
# Leave the function set on '''XBEE PRO 802.15.4'''.&lt;br /&gt;
# Set the PAN ID to any number, must be the same as the pan id of the coordinator (Ground Station).&lt;br /&gt;
# Set the Node Identifier (NI) to your aircraft name or any other appropriate name.&lt;br /&gt;
# Set the baudrate you want to use. 57600 is the maximum baudrate setting for bidirectional transfers to work correctly.&lt;br /&gt;
# Then write the firmware to the module.&lt;br /&gt;
&lt;br /&gt;
=== Flashing the ground station module ===&lt;br /&gt;
# Connect your XBee, start X-CTU, click READ&lt;br /&gt;
# Leave the function set on '''XBEE PRO 802.15.4'''.&lt;br /&gt;
# '''Set Coordinator Enable to &amp;quot;1 - COORDINATOR&amp;quot;.'''&lt;br /&gt;
# Set the PAN ID to any number, must be the same as the pan id of the end device (aircraft).&lt;br /&gt;
# Set the Node Identifier (NI) to PPRZ_GROUND or any other appropriate name.&lt;br /&gt;
# Set the baudrate you want to use. 57600 is the maximum baudrate setting for bidirectional transfers to work correctly.&lt;br /&gt;
# Then write the firmware to the module.&lt;br /&gt;
&lt;br /&gt;
(Tested on XBP24 Firmwareversion 10E6)&lt;br /&gt;
&lt;br /&gt;
== XBee Pro 868 MHZ ==&lt;br /&gt;
&lt;br /&gt;
=== Getting Them Working ===&lt;br /&gt;
Even with the xbee868.xml telemetry file, XBee868s will not last over 6 minutes. There is a special 868 build flag (in slayer1.xml), and matching option for the datalink but I could not get this to work. Eventually, I got them to work for about 20 minutes, which happily is the flight endurance of a heavily overloaded GWS Formosa.&lt;br /&gt;
&lt;br /&gt;
I did this using a command window, but you could use X-CTU if you are a wuss or have Windows handy.&lt;br /&gt;
&lt;br /&gt;
#Attach Xbee and start serial comm program (I use &amp;lt;code&amp;gt;screen /dev/ttyUSB0 &amp;amp;lt;baud rate, just a number, no angled brackets&amp;amp;gt;&amp;lt;/code&amp;gt;, you can also use pico- or microcom)&lt;br /&gt;
#Type AT and enter. You should get an OK back.&lt;br /&gt;
#ATMT and enter. You should get a number&amp;amp;mdash;this represents the number of extra times each packet will be broadcast. We now need to change this to zero.&lt;br /&gt;
#ATMT0 and enter =&amp;gt; OK&lt;br /&gt;
#ATRR and enter. This number is the number of retries that will be sent if an ACK is not received. Disabling this will also have the side effect of disabling ACKs, giving us more packets to play with.&lt;br /&gt;
#ATRR0 and enter =&amp;gt; OK&lt;br /&gt;
#Type ATWR to store the new stuff in the firmware. You should get an OK.&lt;br /&gt;
#Set the datalink to transparent mode both in your airframe file and on the datalink.&lt;br /&gt;
&lt;br /&gt;
You may also want to drop the power level to 1mW for testing, or it won't actually work - they are just too damn powerful to talk to each other at a range of a couple of feet. I also used 1mW for flying - never lost the link, even after a mile. Didn't get round to range testing them though. &lt;br /&gt;
&lt;br /&gt;
You probably want to do this to both XBees (at least I did). I personally had the baud rate at 57600 for legacy reasons, but it should work just as well at any other baud rate. '''Thanks to CheBuzz for this info''', and for helping me work all this out at 11pm the night before EMAV09.&lt;br /&gt;
&lt;br /&gt;
== XBee 868LF ==&lt;br /&gt;
&lt;br /&gt;
These relativly new modems use the whole spectrum allowed in your country to avoid Duty Cycle restrictions.&lt;br /&gt;
&lt;br /&gt;
== XBee Pro XSC (900MHZ) ==&lt;br /&gt;
&lt;br /&gt;
== Configuring XBee API mode (xbee protocol) ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&amp;diff=21219</id>
		<title>Installation/Linux</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&amp;diff=21219"/>
		<updated>2016-05-03T17:15:54Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Installation of dependencies */ add architecture info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Installation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This page only describes the installation of the prerequisite tools and dependencies on Debian/Ubuntu needed for Paparazzi.&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''See the general [[Installation]] page for how to [[Installation#Getting_the_Source_Code|download Paparazzi]] and [[Installation#Launching_the_Software|launching it]] after you followed the instructions here.'''&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi is very easily installed on any laptop or workstation running [http://www.ubuntu.com/ Ubuntu], [http://www.debian.org/ Debian] (or any of their derivatives).&lt;br /&gt;
&lt;br /&gt;
The steps required to install the software needed to be able to let your UAS fly &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation/Linux#Installation_of_dependencies|Install the basic Paparazzi dependencies]] and the [[Installation/Linux#ARM_embedded_toolchain|ARM cross compiling toolchain.]]&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation#Getting_the_Source_Code|Download the source code from the source repository.]]&lt;br /&gt;
&amp;lt;li&amp;gt;Allow access to your PC hardware connection by adding appropriate [[Udev]] rules.&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation#Launching_the_Software|Compile the binaries from the sources and launch the software.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Users of other Linux flavors than a recent Ubuntu or Debian and anyone needing manual control of each individual package can [[Installation/Manual|install them independently]].&lt;br /&gt;
&lt;br /&gt;
===For the impatient===&lt;br /&gt;
&lt;br /&gt;
For Ubuntu add the [https://launchpad.net/~paparazzi-uav/+archive/ppa paparazzi-uav ppa] &amp;lt;tt&amp;gt;sudo add-apt-repository ppa:paparazzi-uav/ppa&amp;lt;/tt&amp;gt; and install the &amp;lt;tt&amp;gt;paparazzi-dev&amp;lt;/tt&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
Since Paparazzi v5.0 the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] is recommended.&lt;br /&gt;
Available as of Ubuntu 14.04, on older versions it can be [[Installation/Linux#ARM_embedded_toolchain|installed via tarball]].&lt;br /&gt;
&lt;br /&gt;
Or just use the [[Installation#Quickstart_on_Ubuntu_12.04|Quickstart for Ubuntu 12.04 LTS]].&lt;br /&gt;
&lt;br /&gt;
== Installation video Tutorials ==&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtubehd|SshFJrBuku8}} {{#ev:youtubehd|eW0PCSjrP78}}&lt;br /&gt;
&lt;br /&gt;
== Installation of dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu ===&lt;br /&gt;
'''Binary packages for Ubuntu are available for the ''i386'', ''amd64'' and ''armhf'' architectures.'''&lt;br /&gt;
&lt;br /&gt;
Add the installation sources for the Paparazzi software packages. Run from a terminal:&lt;br /&gt;
 sudo add-apt-repository ppa:paparazzi-uav/ppa&lt;br /&gt;
&lt;br /&gt;
Then update the systems package inventory and install the main Paparazzi software dependencies. This will take some time.&lt;br /&gt;
 sudo apt-get update &lt;br /&gt;
 sudo apt-get install paparazzi-dev&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
'''Binary packages for Debian are available for the ''i386'' and ''amd64'' architectures. ''armhf'' packages seem to be currently not supported by the OpenSUSE build service.'''&lt;br /&gt;
&lt;br /&gt;
For Debian Wheezy (7.0) and Jessie (8.0) packages are built using the [http://openbuildservice.org/ Open Build Service (OBS)] on [https://build.opensuse.org/project/show?project=home%3Aflixr%3Apaparazzi-uav OpenSUSE Build Service project home:flixr:paparazzi-uav]&lt;br /&gt;
&lt;br /&gt;
[http://software.opensuse.org/download/package?project=home:flixr:paparazzi-uav&amp;amp;package=paparazzi-dev Install paparazzi-dev]&lt;br /&gt;
&lt;br /&gt;
First add the key:&lt;br /&gt;
 wget -q &amp;quot;http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_8.0/Release.key&amp;quot; -O- | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
Add the appropriate repo, depending on your Debian version to sources.list&lt;br /&gt;
 echo &amp;quot;deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_7.0/ ./&amp;quot; | tee -a /etc/apt/sources.list&lt;br /&gt;
 echo &amp;quot;deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_8.0/ ./&amp;quot; | tee -a /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Update the systems package inventory and install the main Paparazzi software dependencies.&lt;br /&gt;
 sudo apt-get update &lt;br /&gt;
 sudo apt-get install paparazzi-dev&lt;br /&gt;
&lt;br /&gt;
== ARM embedded toolchain ==&lt;br /&gt;
&lt;br /&gt;
For current Paparazzi versions (v5.0 and above) the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] is recommended, which also supports the STM32F4 with FPU (hardware floating point).&lt;br /&gt;
&lt;br /&gt;
=== gcc-arm-none-eabi as Debian/Ubuntu package ===&lt;br /&gt;
&lt;br /&gt;
'''This is the recommended method'''&lt;br /&gt;
&lt;br /&gt;
Note that there are actually two '''different''' toolchains available that unfortunately have the same Debian package name (&amp;lt;tt&amp;gt;gcc-arm-none-eabi&amp;lt;/tt&amp;gt;)!&lt;br /&gt;
* [https://launchpad.net/gcc-arm-embedded/ ARM gcc-arm-embedded toolchain]&lt;br /&gt;
** includes libstdc++ and newlib-nano&lt;br /&gt;
* [https://packages.debian.org/jessie/gcc-arm-none-eabi Debian gcc-arm-none-eabi toolchain]&lt;br /&gt;
** does not include libstdc++&lt;br /&gt;
** does not include newlib-nano&lt;br /&gt;
&lt;br /&gt;
Both toolchains ''should'' work for most use-cases (if you don't need C++ or nano specs), although the [https://launchpad.net/gcc-arm-embedded/ ARM gcc-arm-embedded toolchain] is better tested.&lt;br /&gt;
&lt;br /&gt;
You can list the available versions with &amp;lt;tt&amp;gt;apt-cache policy gcc-arm-none-eabi&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gcc-arm-embedded toolchain ====&lt;br /&gt;
&lt;br /&gt;
'''This is the recommended toolchain'''&lt;br /&gt;
&lt;br /&gt;
On ''most'' Ubuntu versions the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] can be installed as a debian package from the [https://launchpad.net/~terry.guo/+archive/gcc-arm-embedded ppa]:&lt;br /&gt;
 sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install gcc-arm-none-eabi&lt;br /&gt;
&lt;br /&gt;
!!! If you are using Ubuntu 14.04 and later, please be careful because there are packages with same name but produced by Debian and inherited by Ubuntu.&lt;br /&gt;
Check available versions after adding the PPA with&lt;br /&gt;
&lt;br /&gt;
 apt-cache policy gcc-arm-none-eabi&lt;br /&gt;
&lt;br /&gt;
To install a specific version (the one from terry.guo PPA) specify the version explicitly, e.g.&lt;br /&gt;
 sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install gcc-arm-none-eabi=4.9.3.2015q3-1trusty1&lt;br /&gt;
Meanwhile we are working with Debian to consolidate and unify this toolchain.&lt;br /&gt;
&lt;br /&gt;
==== gcc-arm-none-eabi Debian toolchain ====&lt;br /&gt;
&lt;br /&gt;
Current Debian ('''jessie''') and Ubuntu (14.04 '''trusty''' and later) releases have the gcc-arm-none-eabi package in the official repositories ('''universe'''), and can be installed with:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install gcc-arm-none-eabi&lt;br /&gt;
&lt;br /&gt;
=== ARM gcc-arm-embedded tarball ===&lt;br /&gt;
Another way is to download and unpack the tarball and add it to your PATH:&lt;br /&gt;
&lt;br /&gt;
* Download gcc-arm-none-eabi-*-*-linux.tar.bz2 from [https://launchpad.net/gcc-arm-embedded/+download External Downloads] section of ARM gcc-arm-embedded project&lt;br /&gt;
* Unpack it to a directory of your choice&lt;br /&gt;
* Add the bin folder in to your PATH&lt;br /&gt;
&lt;br /&gt;
e.g.:&lt;br /&gt;
 cd ~&lt;br /&gt;
 wget https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2&lt;br /&gt;
 sudo tar -vjxf gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2 -C /opt&lt;br /&gt;
 rm -r gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2&lt;br /&gt;
 exportline=&amp;quot;PATH=$PATH:/opt/gcc-arm-none-eabi-4_7-2013q2/bin&amp;quot;&lt;br /&gt;
 if grep -Fxq &amp;quot;$exportline&amp;quot; ~/.profile; then echo nothing to do ; else echo $exportline &amp;gt;&amp;gt; ~/.profile; fi&lt;br /&gt;
 source ~/.profile&lt;br /&gt;
&lt;br /&gt;
The file .profile will be sourced in every bash after logging out and in again. Until then,&lt;br /&gt;
 source ~/.profile&lt;br /&gt;
can be used for every bash individually.&lt;br /&gt;
&lt;br /&gt;
If you can not access your toolchain with PATH working, look a the [[Installation/Linux#Troubleshooting]].&lt;br /&gt;
&lt;br /&gt;
=== Old toolchain for Paparazzi v4.x and earlier ===&lt;br /&gt;
&lt;br /&gt;
'''For Paparazzi v4.x''' and earlier you need to install the &amp;lt;tt&amp;gt;paparazzi-arm-multilib&amp;lt;/tt&amp;gt; package. It has support for both ARM7 (i.e. Tiny,TWOG,YAPA autopilot boards) as well as STM32F1 (i.e. LISA boards).&amp;lt;br&amp;gt;&lt;br /&gt;
'''This toolchain does not properly support STM32F4 based autopilots!!'''&lt;br /&gt;
&lt;br /&gt;
You can install it explicitly with:&lt;br /&gt;
 sudo apt-get install paparazzi-arm-multilib&lt;br /&gt;
&lt;br /&gt;
== Optional Packages ==&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;b&amp;gt;lpc21isp&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;openocd&amp;lt;/b&amp;gt; are normally '''automatically installed''' as they are recommended packages of paparazzi-dev, '''if not''' you can manually install them via:&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install lpc21isp openocd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;lpc21isp&amp;lt;/tt&amp;gt; is needed to serially flash the LPC2148 based autopilots (e.g. bootloader for tiny, twog, umarim), &amp;lt;tt&amp;gt;openocd&amp;lt;/tt&amp;gt; is for flashing via JTAG (e.g. for Lisa boards) and debugging.&lt;br /&gt;
&lt;br /&gt;
== Installing and running Paparazzi ==&lt;br /&gt;
&lt;br /&gt;
Please see [[Installation#Getting_the_Source_Code|Getting the Source Code on the general Installation page]] for details on downloading the Paparazzi source code, compiling and running it.&lt;br /&gt;
&lt;br /&gt;
== Udev rules ==&lt;br /&gt;
&lt;br /&gt;
Add the appropriate [[Udev]] rule (available in fhe file ''50-paparazzi.rules'') to the USB handler.  Simply copy as root &amp;lt;tt&amp;gt;conf/system/udev/rules/50-paparazzi.rules&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;/etc/udev/rules.d/&amp;lt;/tt&amp;gt;, e.g in a terminal:&lt;br /&gt;
&lt;br /&gt;
 cd &amp;lt;your paparazzi directory&amp;gt;&lt;br /&gt;
 sudo cp conf/system/udev/rules/50-paparazzi.rules /etc/udev/rules.d/&lt;br /&gt;
 sudo udevadm control --reload-rules&lt;br /&gt;
&lt;br /&gt;
See the [[Udev]] page for more details.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== No access rights for USB devices ===&lt;br /&gt;
&lt;br /&gt;
Some Linux distributions, don't allow standard (non admin) users to directly access the USB bus by default. On recent Ubuntu/Debian versions the first/main user is already a member of the ''plugdev'' group which should be sufficient for most cases.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have problems, make yourself a member of the ''plugdev'' and ''dialout'' groups:&lt;br /&gt;
&lt;br /&gt;
 sudo adduser &amp;lt;your login&amp;gt; plugdev&lt;br /&gt;
 sudo adduser &amp;lt;your login&amp;gt; dialout&lt;br /&gt;
&lt;br /&gt;
Logout and login again.&lt;br /&gt;
&lt;br /&gt;
=== arm-none-eabi-gcc: Command not found ===&lt;br /&gt;
Appeared on Debian Wheezy 7 (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)&amp;lt;br/&amp;gt;&lt;br /&gt;
If this error occurs, maybe the [https://packages.debian.org/de/wheezy/ia32-libs ia32-libs] are missing.&lt;br /&gt;
&lt;br /&gt;
Enable multiarch and install ia32-libs:&lt;br /&gt;
 dpkg --add-architecture i386&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install ia32-libs&lt;br /&gt;
&lt;br /&gt;
=== arm-linux-gnueabi-gcc cross-compiler not found ===&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu ===&lt;br /&gt;
 apt-get install gcc-arm-linux-gnueabi&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
Starting with jessie, there were [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771496#41 some changes] to the way cross-compilers are set up. To make it work you will have to add armel architecture and pick up some crossbuild tools.&lt;br /&gt;
&lt;br /&gt;
First edit your /etc/apt/sources.list and add the following line, to enable the emdebian repo:&lt;br /&gt;
 deb http://emdebian.org/tools/debian/ jessie main&lt;br /&gt;
&lt;br /&gt;
Run the following command in your terminal to add the keys for it&lt;br /&gt;
 curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
Then you could add armel architecture and fetch the missing cross-compiler packages&lt;br /&gt;
 dpkg --add-architecture armel&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install crossbuild-essential-armel&lt;br /&gt;
&lt;br /&gt;
You could find out more about cross-toolchains in jessie on debian [https://wiki.debian.org/CrossToolchains wiki page].&lt;br /&gt;
&lt;br /&gt;
Note that some of your repos might not mirror embedded architectures, which would give you an error when you try to update the sources. In that case you will have to specify which architecture you do want from them by editing the corresponding entry in your sources.list file, in a way described [https://wiki.debian.org/Multiarch/HOWTO here]. Like in this example with the crunchbang repo you could specify it by adding [arch=amd64,i386] to the line, so you only enable amd64 and i386 architectures:&lt;br /&gt;
 deb [arch=amd64,i386] http://packages.crunchbang.org/waldorf waldorf main&lt;br /&gt;
&lt;br /&gt;
===arm-none-eabi-gdb: error with libncurses.so.5===&lt;br /&gt;
Appeared on Xubuntu 14.04 LTS (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)&amp;lt;br/&amp;gt;&lt;br /&gt;
Terminal output: arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory&lt;br /&gt;
&lt;br /&gt;
If this error occours, maybe [http://packages.ubuntu.com/search?keywords=lib32ncurses5 lib32ncurses5] is missing. &amp;lt;br/&amp;gt;&lt;br /&gt;
Found on [https://answers.launchpad.net/gcc-arm-embedded/+question/226680 launchpad q&amp;amp;a]&lt;br /&gt;
&lt;br /&gt;
=== FTDI serial adapter not working on old Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
On older Linux distributions (not needed for lucid and later), the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get remove brltty&lt;br /&gt;
&lt;br /&gt;
=== Code not starting on autopilot after changing gcc ===&lt;br /&gt;
&lt;br /&gt;
If you changed the toolchain (e.g. installed a new one for having FPU-Support for the F4), you need to run&lt;br /&gt;
&lt;br /&gt;
 make clean &amp;amp;&amp;amp; make&lt;br /&gt;
&lt;br /&gt;
in sw/ext in order to rebuild the libs. Otherwise the embedded code can behave strange (most likely not start)&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=FAQ&amp;diff=21216</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=FAQ&amp;diff=21216"/>
		<updated>2016-05-01T19:57:44Z</updated>

		<summary type="html">&lt;p&gt;Flixr: add USB/DFU flashing entry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Is it possible to do XYZ?==&lt;br /&gt;
:Yes, sure! The beauty Paparazzi is that it is fully opensource'ed - '''Any''' feature or function you want '''can be added''' to the software and even the hardware.&lt;br /&gt;
&lt;br /&gt;
==How can I contribute?==&lt;br /&gt;
:See the [[Contributing| how to contribute]] wiki page.&lt;br /&gt;
&lt;br /&gt;
==How do I check which Paparazzi Version I'm using==&lt;br /&gt;
: Run ./paparazzi_version from you paparazzi directory.&lt;br /&gt;
: This simple script will run ''git describe'' to find the next reachable tag and print something like ''v5.1.1_testing-43-ge060371''.&lt;br /&gt;
: The output contains the most recent reachable tag, number of commits since then, SHA1 of that commit and whether the working directory was dirty.&lt;br /&gt;
: If you have an older version of Paparazzi that does not contain that script you can just run &amp;lt;tt&amp;gt;git describe --match &amp;quot;v[0-9].[0-9]*&amp;quot; --dirty --always --long&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==What equipment and components are suggested==&lt;br /&gt;
# Linux (Debian or Ubuntu) compatible or Apple Macintosh notebook computer, preferably with a very bright screen for outdoor use.&lt;br /&gt;
# Most any airframe that will accommodate a Paparazzi Autopilot and some extra weight and wiring - ''brushless motors are strongly suggested.''  See the [[Gallery|User's Gallery]] for some airframe examples.&lt;br /&gt;
# One of the [[Autopilots]] from one of the [[Get_Hardware|Paparazzi vendors]] or build your own from the downloadable plans/gerbers&lt;br /&gt;
# If it is not already included with the AP a external [[IMU]]&lt;br /&gt;
# A 2.4 GHz R/C Transmitter and Receiver with a 3-position switch and PPM output for selecting Manual/Stabilized/Auto.&lt;br /&gt;
# A pair of [[Modems]] along with any enclosures and antennas&lt;br /&gt;
# A [[Serial_Adapter|USB &amp;lt;-&amp;gt; UART]] adapter  for connecting the modem to your USB port and/or for serial flashing of bootloader code or tunnel access to the GPS receiver&lt;br /&gt;
# A standard Mini-B and Micro-B USB cable&lt;br /&gt;
# Lots of [[Other_Hardware#Wiring|very durable wire, crimpers, and molex pins or pre-crimped wire.]]&lt;br /&gt;
&lt;br /&gt;
==Are internal combustion engines supported?==&lt;br /&gt;
:Yes, not relying solely on inertial measurement, the Paparazzi system is very well suited for aircraft with high vibration levels.  Care must be taken to prevent oily exhaust residue buildup on the IR sensors and a simple variable must be added to properly address the special idle/kill needs of an IC engine.&lt;br /&gt;
&lt;br /&gt;
==Can Paparazzi fly a glider?==&lt;br /&gt;
:Sure.  Paparazzi uses throttle and pitch to control climb rate by default. You can fit an airspeed sensor and adjust your airframe configuration to maintain airspeed instead.&lt;br /&gt;
&lt;br /&gt;
==Will the autopilot provide enough 5V power for many/large/digital servos as well as a modem, video TX, etc.?==&lt;br /&gt;
:Depends on the Autopilot, compare the maximum output of the AP and the needed power&lt;br /&gt;
:The [[Tiny]] includes a high capacity and high efficiency switching voltage regulator intended to power servos, modems, video systems and other payloads. This regulator should be preferred to power the servos rather than a linear regulator.  While linear regulators may be rated for several amps, they require a great deal of cooling and can easily overheat with only a few hundred milliamps of continuous current without cooling.  By comparison, the switching regulator included on the Tiny can work continuously at 2A with little or no cooling. Be careful using high power or digital servos consuming a lot of current. If you use four or more of them on your airframe it is recommended to supply them separately. It is important to realize that the servos in any stabilized aircraft will operate continuously. Therefore a power supply that powers the servos reliably in manual flight may easily overheat or produce critical voltage drops in autonomous flight.&lt;br /&gt;
&lt;br /&gt;
==Do I need a separate battery or regulator to isolate the autopilot, servos, video, modem, etc. from one another?==&lt;br /&gt;
:The autopilot processor and sensors are powered by a 3.3V regulator and therefore are rather isolated from voltage fluctuations on the battery or 5V bus.&lt;br /&gt;
&lt;br /&gt;
==Can I use a Sirf, Trimble, etc. instead of the u-Blox GPS receiver?==&lt;br /&gt;
:Yes, but it would require a tremendous amount of work as some of the navigation code is dependent on some of the UBX messages.  NMEA does not provide messages in the desired form and substantial calculation would be required for conversion.  Any of the other proprietary protocols would work but you would need to write your own protocol handler. u-Blox (Hobbyking's costs &amp;lt;14€) offers great performance, size, and speed as well as the ability to easily configure the internal Kalman filter parameters to expect significant acceleration in 3-D space - a very important feature.&lt;br /&gt;
&lt;br /&gt;
==Does Paparazzi use DGPS, WAAS, EGNOS, or MSAS?==&lt;br /&gt;
:Most modern GPS receivers have the ability to process serial data sent from an external DGPS receiver, but the advent of WAAS/EGNOS has made the early ground-based DGPS transmitters nearly obsolete.  The u-Blox GPS receiver supports all common SBAS systems (WAAS, EGNOS, and MSAS), as well as any standard form of external DGPS.  It's important to understand that DGPS merely improves the ''accuracy'' of the position estimate by subtracting any static error.  The only way to improve the ''precision'' of the GPS is by improving the antenna or the GPS module itself.  See [http://en.wikipedia.org/wiki/Accuracy_and_precision Wikipedia:Accuracy and Precsion] for a detailed explanation of these terms.&lt;br /&gt;
&lt;br /&gt;
==How does the R/C receiver interface with the autopilot?==&lt;br /&gt;
:Standard hobby R/C transmitters multiplex up to 9 channels of PWM servo data into a single PPM signal which is encoded onto an FM wave for transmission, this signal is then decoded by the RF section of the R/C receiver back into the original PPM signal containing 9 servo position PWM values.  This signal is normally then sent to a demultiplexer (i.e. 4017) where it is separated into 9 individual servo signals on 9 individual pins.  The Paparazzi autopilot intercepts the signal between the RF section and the demultiplexer and does its own demultiplexing, filtering, and processing before multiplexing the manual or autonomous servo commands back into a single signal and passing them to the 4017 to be distributed to the servos.&lt;br /&gt;
&lt;br /&gt;
==Why does Paparazzi tap directly into the R/C receiver instead of using individual servo signals?==&lt;br /&gt;
:By connecting directly to the RF section of the R/C receiver we are able to obtain up to 9 channels of R/C servo data from a small, lightweight inexpensive 4 channel receiver with only 3 wires needed to connect the components.  Furthermore, the autopilot then has direct access to the raw R/C signal where it can be filtered, evaluated, and assessed for quality.  The autopilot can then alert the user of any loss of R/C signal as well as perform any pre-configured autonomous commands in response to a loss of signal.&lt;br /&gt;
&lt;br /&gt;
==Are PCM or 2.4GHz R/C systems compatible with Paparazzi?==&lt;br /&gt;
:Yes. Most good 2.4Ghz receivers can directly output a PPM signal on one servo pin. A general rule of thumb is that if you see any type of demultiplexer on your R/C receiver, you can look up the data sheet for it and likely tap into the input pin with success. Some information on compatible R/C receivers and how to find the PPM signal of your own receiver is given in the [[Other_Hardware#R.2FC_Receiver|RC receiver]] section.&lt;br /&gt;
&lt;br /&gt;
:If that's not possible, you can use the available PPM encoder board, to re-multiplex the servo channels into one PPM signal. This seems to be a common solution.&lt;br /&gt;
&lt;br /&gt;
==What R/C transmitters are compatible?==&lt;br /&gt;
:No mixing or programming is done in the transmitter so even the simplest models will suffice but one important requirement is a 3-position switch to select among the three autopilot modes: manual, stabilized only, and fully autonomous.  Those handy with electronics can replace a dial with a switch and resistor if needed.  The transmitter's PPM values need to be recorded and the channel used to control the autopilot mode must be stated.  Some commonly used transmitter configuration files are provided in the [http://cvs.savannah.gnu.org/viewvc/paparazzi/paparazzi3/conf/radios/ conf/radios] folder and the syntax of these files is easy to follow for those using other brands or models.&lt;br /&gt;
&lt;br /&gt;
==Can a gamepad/joystick be used to control the aircraft through the modem?==&lt;br /&gt;
:Yes, the code to do this was written some time ago though it was not tested in flight due to latency concerns with the primitive [[Modems#Coronis_WaveCard|Coronis]] modems used at the time.  Any of the [[modems]] currently recommended should work well in this manner but the theoretical reliability is still questionable due to the fact that no interrupt or prioritization structure exists for the telemetry data so any manual control inputs would be lumped in with the rest of the data to be lost or delayed as needed.&lt;br /&gt;
&lt;br /&gt;
==What do MANUAL/AUTO1/AUTO2 stand for?==&lt;br /&gt;
&lt;br /&gt;
:Those are the three modes that Paparazzi can operate in. Confer to [[AutopilotModes]] for more information.&lt;br /&gt;
&lt;br /&gt;
==What Electronic Speed Controllers (ESC) are compatible?==&lt;br /&gt;
:Any controller can be used, the exact PWM value that is sent to the controller for 0-100% throttle is completely configurable in the airframe file so all controllers are compatible and any controller will arm properly with or without the use of an R/C transmitter.  Upon each boot, the autopilot immediately sends whatever you have defined as 0% throttle (typically around 1200μs) and maintains that signal until a manual or autonomous command is given.  Most modern controllers are &amp;quot;auto calibrating&amp;quot; which is an undesirable feature for R/C pilots and even more so for autonomous systems but can be dealt with.  The calibration is done by defining the PWM value at boot to be 0% power and then defining some initial arbitrary mid-range value such as 1500μs to be 100% until a higher value is seen.  The net result of this behavior is that the motor is given full power at any command above 50% throttle until 100% throttle has actually been commanded at least once.  This is not an issue for planes that routinely take off at 100% throttle but can disrupt the throttle tuning and altitude control on any flights where 100% throttle has never been commanded. [http://www.castlecreations.com/products/products_fly.html Castle Creations Electronic Speed Controllers] can be configured for &amp;quot;fixed endpoints&amp;quot; so the ESC does not need to &amp;quot;learn&amp;quot; the endpoints at first takeoff this providing a consistent and predictable throttle response. By default this range 1250-1850μs but can be set at different values where needed.&lt;br /&gt;
&lt;br /&gt;
: For quadrocopters a ESc with a very low latency is highly recommended. That can be a cheap standard ESC with a upgraded firmware (which uses I2C as input) or a high quality esc (mocrocopter ESC)&lt;br /&gt;
&lt;br /&gt;
==Can traditional throttle stick programming be done on the ESC once connected to the autopilot?==&lt;br /&gt;
:Yes.  If the transmitter is on with the throttle at full or whatever is required for your ESC when the autopilot is first booted, the autopilot will immediately see the manual control signal and the throttle position and pass that along to the ESC as the first value, triggering the programming mode.&lt;br /&gt;
&lt;br /&gt;
==Does Paparazzi support digital servos?==&lt;br /&gt;
:Of course.  Digital servos use exactly the same electrical interface as their analog counterparts, the only difference being in the way they control the motor.  Analog servos use a '''P'''roportional feedback loop, meaning the voltage sent to the motor is proportional to the difference between the measured and intended position of the arm.  Digital servos use a '''P'''roportional + '''D'''erivative ('''PD''') feedback loop.  The derivative term considers the current speed and direction of the servo as well as the speed and direction of the pilot's stick command.  The derivative term will increase power to the motor if the servo is moving the wrong direction (providing faster direction changes) and will reduce/reverse power if the servo is near it's desired position but moving too fast (reducing overshoot).  The net effect of this is that a digital servo can use a much stronger '''P''' term without risk of oscillation and overshoot because the '''D''' term is there to intelligently dampen it as needed and boost it whenever it can.&lt;br /&gt;
:How does the inclusion of a '''D''' term make an analog servo become digital?  Analog servos use a simple opamp to linearly relate the motor voltage to the difference between the potentiometer reading and PWM signal, whereas digital servos use a microprocessor to analyze the potentiometer position and velocity as well as the current and recent PWM signals to calculate the optimum voltage to send to the motor.  &lt;br /&gt;
:'''Important:''' Please be aware that autonomous flight involves ''continuous'' movement of all servos.  Make sure your power supply is capable of handling this and that your servos are capable of continuous operation without overheating - especially if you use digital servos.&lt;br /&gt;
&lt;br /&gt;
==Can I solder wires directly to the autopilot instead of using the molex connectors?==&lt;br /&gt;
:Sure, only for some board it is easier to do than for others. Tiny: All of the molex headers are thru-hole and you can easily solder small gauge wire directly to the pins that protrude from these headers on the back of the board.  It's important to note that '''standard servo wire cannot be soldered reliably''' in this fashion - you must use only high-grade wire intended for soldering (no vinyl insulation!).  Direct soldering is not recommended, but it is possible ofcourse.  See the [[Other_Hardware#Wiring|Wiring]] section for suggested wire types and sources. If you want to go the direct soldering path, be sure to you have '''excellent soldering skills''' and use high quality wiring.&lt;br /&gt;
&lt;br /&gt;
==What are the paparazzi failsafe features and how do I configure them?==&lt;br /&gt;
The basic autopilot already has several built-in failsafe features ranging from lowlevel to highlevel and from implied to optional. For more details take a look on the [[Failsafe]] page.&lt;br /&gt;
&lt;br /&gt;
==Why do I only get a blank (black) GCS==&lt;br /&gt;
:The GCS stays blank until you get telemetry messages (either from the real aircraft or simulated) with the correct MD5 checksum meaning the autopilot has the correct and up to date flightplan/airframe/... programmed in it (in case of an MD5 problem you constantly get a lot of warnings in paparazzi center). &lt;br /&gt;
:'''Solution''': Probably your telemetry is not set up correctly, this is most likely a [[XBee configuration]] issue.[[Subsystem/telemetry#Configure_Options|Configure the baudrate for your XBee connected to the autopilot]] and [[Subsystem/telemetry#Set_GCS_baud_rate|set the baudrate for the link to the one the ground XBee uses]] (They don't need to be the same). Also make sure your xbee cable is correct, transmit (tx) of xbee goes to receive (rx) on the autopilot and vice versa.&lt;br /&gt;
&lt;br /&gt;
==Why do I get a Failure(&amp;quot;#of_world:no georef&amp;quot;) when trying to load map tiles==&lt;br /&gt;
:You get the georef error because the location is not initialized (probably GCS still blank and no aircraft are present). You can't get map tiles for nowhere...&lt;br /&gt;
:'''Solution''': Set up your telemetry properly so you get messages from the aircraft OR start a simulation with the appropriate coordinates then load the map tiles.&lt;br /&gt;
&lt;br /&gt;
==How do I check if my telemetry is working?==&lt;br /&gt;
:'''Solution''': Launch the link and messages tools in the Paparazzi Center. You should see the the messages coming in (blinking green) in the messages window.&lt;br /&gt;
: If you get an the error ''Failure(&amp;quot;Error opening modem serial device : fd &amp;lt; 0 (/dev/ttyUSB0)&amp;quot;)'' from ''link'', your modem is either not connected at all, or just available under a different device name. Check if you set the [[Installation#Setting_access_rights_for_USB_download|udev rules]] and if your modem becomes available under the device you set.&lt;br /&gt;
: You might need to adjust the device and baud-rate of the link according to your setup, e.g. &amp;lt;tt&amp;gt;link -d /dev/ttyUSB0 -s 57600&amp;lt;/tt&amp;gt;&lt;br /&gt;
: If you're stuck you can make ''link'' very verbose by setting the ''PPRZ_DEBUG'' environment variable to '' '*' ''&lt;br /&gt;
&lt;br /&gt;
==Why don't I get a GPS position?==&lt;br /&gt;
:'''Problem''': Your GPS seems to be working, but you cannot get a valid position fix. Speed and course are displayed correctly, though. Possibly you also see Invalid_argument(&amp;quot;Latlong.of_utm&amp;quot;) errors on the GCS log.&lt;br /&gt;
&lt;br /&gt;
This may happen if you have configured the wrong GPS subsystem for your Tiny board.&lt;br /&gt;
If you have the LEA-5H module on your Tiny board, but have configured&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;subsystem name=&amp;quot;gps&amp;quot; type=&amp;quot;ublox_utm&amp;quot;/&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
in your airframe file, this will occur because the 5H module does not support UTM position.&lt;br /&gt;
&lt;br /&gt;
:'''Solution''': Make sure your GPS is [[GPS#GPS_configuration_using_U-Center|configured]] correctly and change the gps type to &amp;quot;&amp;lt;tt&amp;gt;ublox&amp;lt;/tt&amp;gt;&amp;quot; if applicable.&lt;br /&gt;
&lt;br /&gt;
==Why do I get a CRITICAL **: murrine_style_draw_box: assertion `width &amp;gt;= -1' failed error message on starting the GCS==&lt;br /&gt;
:'''Solution''': This error is not critical at all and can be safely ignored.  &lt;br /&gt;
It is triggered by a bug in the Murrine GTK engine in combination with the default theme which Ubuntu uses, as detailed here:&lt;br /&gt;
https://bugs.launchpad.net/ubuntu/+source/light-themes/+bug/538499&lt;br /&gt;
&lt;br /&gt;
==Do Paparazzi autopilots support onboard datalogging with an uSD or SD card?==&lt;br /&gt;
:This depends on the board you are using. Writing to an SD card takes a considerable amount of processor resources, enough to significantly impact critical timings and autopilot performance on usual processors. For this reason, onboard datalogging is not supported on those autopilots. If logging is needed for these processors (say for use without a datalink) then a second board that &amp;quot;sniffs&amp;quot; the datalink telemetry is needed (see [[Data Logger]]). However, Recently introduced boards like the [[Apogee/v1.00]] using a faster processor and an on board SD card tray allow logging of flight recorder information and individual data of sensors if activated in the air frame file.&lt;br /&gt;
&lt;br /&gt;
==Telemetry not working==&lt;br /&gt;
:If you are receiving the error &amp;quot;Failure(&amp;quot;Error opening modem serial device : fd &amp;lt; 0 (/dev/ttyUSB0)&amp;quot;)&amp;quot; &lt;br /&gt;
:'''Solution''': You might need to add your user to the modems group (dialout), then log out and in again.&lt;br /&gt;
:write in terminal:$ sudo adduser &amp;lt;user&amp;gt; dialout&lt;br /&gt;
:it will be effective after your next login or simply write:&lt;br /&gt;
:$newgrp dialout&lt;br /&gt;
&lt;br /&gt;
==Can't flash autopilot==&lt;br /&gt;
:If you are trying to flash your autopilot board via USB and get e.g. &amp;lt;tt&amp;gt;can't find STM32 (autopilot) device&amp;lt;/tt&amp;gt;&lt;br /&gt;
:'''Solution''': Check if your board is recognized by the kernel and you have sufficient rights on the device (should normally be set by [[Udev]] rules).&lt;br /&gt;
:See also [[DFU#Troubleshooting]]&lt;br /&gt;
&lt;br /&gt;
==What does the name &amp;quot;Paparazzi&amp;quot; mean?==&lt;br /&gt;
:The original name of the project reads &amp;quot;PaparaDzIY&amp;quot; (http://www.nongnu.org/paparazzi/gallery_v0.html) which might be a French abbreviation, but the meaning of that name seems to be lost. In cases where the name &amp;quot;Paparazzi&amp;quot; is unfavourably (i.e. for serious applications not dealing with taking unasked pictures of persons) the use of the abbreviation PPRZ can be recommended.&lt;br /&gt;
&lt;br /&gt;
[[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&amp;diff=21203</id>
		<title>Installation/Linux</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/Linux&amp;diff=21203"/>
		<updated>2016-04-23T17:57:53Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Debian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Installation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This page only describes the installation of the prerequisite tools and dependencies on Debian/Ubuntu needed for Paparazzi.&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''See the general [[Installation]] page for how to [[Installation#Getting_the_Source_Code|download Paparazzi]] and [[Installation#Launching_the_Software|launching it]] after you followed the instructions here.'''&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi is very easily installed on any laptop or workstation running [http://www.ubuntu.com/ Ubuntu], [http://www.debian.org/ Debian] (or any of their derivatives).&lt;br /&gt;
&lt;br /&gt;
The steps required to install the software needed to be able to let your UAS fly &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation/Linux#Installation_of_dependencies|Install the basic Paparazzi dependencies]] and the [[Installation/Linux#ARM_embedded_toolchain|ARM cross compiling toolchain.]]&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation#Getting_the_Source_Code|Download the source code from the source repository.]]&lt;br /&gt;
&amp;lt;li&amp;gt;Allow access to your PC hardware connection by adding appropriate [[Udev]] rules.&lt;br /&gt;
&amp;lt;li&amp;gt;[[Installation#Launching_the_Software|Compile the binaries from the sources and launch the software.]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Users of other Linux flavors than a recent Ubuntu or Debian and anyone needing manual control of each individual package can [[Installation/Manual|install them independently]].&lt;br /&gt;
&lt;br /&gt;
===For the impatient===&lt;br /&gt;
&lt;br /&gt;
For Ubuntu add the [https://launchpad.net/~paparazzi-uav/+archive/ppa paparazzi-uav ppa] &amp;lt;tt&amp;gt;sudo add-apt-repository ppa:paparazzi-uav/ppa&amp;lt;/tt&amp;gt; and install the &amp;lt;tt&amp;gt;paparazzi-dev&amp;lt;/tt&amp;gt; package.&lt;br /&gt;
&lt;br /&gt;
Since Paparazzi v5.0 the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] is recommended.&lt;br /&gt;
Available as of Ubuntu 14.04, on older versions it can be [[Installation/Linux#ARM_embedded_toolchain|installed via tarball]].&lt;br /&gt;
&lt;br /&gt;
Or just use the [[Installation#Quickstart_on_Ubuntu_12.04|Quickstart for Ubuntu 12.04 LTS]].&lt;br /&gt;
&lt;br /&gt;
== Installation video Tutorials ==&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtubehd|SshFJrBuku8}} {{#ev:youtubehd|eW0PCSjrP78}}&lt;br /&gt;
&lt;br /&gt;
== Installation of dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu ===&lt;br /&gt;
&lt;br /&gt;
Add the installation sources for the Paparazzi software packages. Run from a terminal:&lt;br /&gt;
 sudo add-apt-repository ppa:paparazzi-uav/ppa&lt;br /&gt;
&lt;br /&gt;
Then update the systems package inventory and install the main Paparazzi software dependencies. This will take some time.&lt;br /&gt;
 sudo apt-get update &lt;br /&gt;
 sudo apt-get install paparazzi-dev&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
&lt;br /&gt;
For Debian Wheezy (7.0) and Jessie (8.0) packages are built using the [http://openbuildservice.org/ Open Build Service (OBS)] on [https://build.opensuse.org/project/show?project=home%3Aflixr%3Apaparazzi-uav OpenSUSE Build Service project home:flixr:paparazzi-uav]&lt;br /&gt;
&lt;br /&gt;
[http://software.opensuse.org/download/package?project=home:flixr:paparazzi-uav&amp;amp;package=paparazzi-dev Install paparazzi-dev]&lt;br /&gt;
&lt;br /&gt;
First add the key:&lt;br /&gt;
 wget -q &amp;quot;http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_8.0/Release.key&amp;quot; -O- | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
Add the appropriate repo, depending on your Debian version to sources.list&lt;br /&gt;
 echo &amp;quot;deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_7.0/ ./&amp;quot; | tee -a /etc/apt/sources.list&lt;br /&gt;
 echo &amp;quot;deb http://download.opensuse.org/repositories/home:/flixr:/paparazzi-uav/Debian_8.0/ ./&amp;quot; | tee -a /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Update the systems package inventory and install the main Paparazzi software dependencies.&lt;br /&gt;
 sudo apt-get update &lt;br /&gt;
 sudo apt-get install paparazzi-dev&lt;br /&gt;
&lt;br /&gt;
== ARM embedded toolchain ==&lt;br /&gt;
&lt;br /&gt;
For current Paparazzi versions (v5.0 and above) the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] is recommended, which also supports the STM32F4 with FPU (hardware floating point).&lt;br /&gt;
&lt;br /&gt;
=== gcc-arm-none-eabi as Debian/Ubuntu package ===&lt;br /&gt;
&lt;br /&gt;
'''This is the recommended method'''&lt;br /&gt;
&lt;br /&gt;
Note that there are actually two '''different''' toolchains available that unfortunately have the same Debian package name (&amp;lt;tt&amp;gt;gcc-arm-none-eabi&amp;lt;/tt&amp;gt;)!&lt;br /&gt;
* [https://launchpad.net/gcc-arm-embedded/ ARM gcc-arm-embedded toolchain]&lt;br /&gt;
** includes libstdc++ and newlib-nano&lt;br /&gt;
* [https://packages.debian.org/jessie/gcc-arm-none-eabi Debian gcc-arm-none-eabi toolchain]&lt;br /&gt;
** does not include libstdc++&lt;br /&gt;
** does not include newlib-nano&lt;br /&gt;
&lt;br /&gt;
Both toolchains ''should'' work for most use-cases (if you don't need C++ or nano specs), although the [https://launchpad.net/gcc-arm-embedded/ ARM gcc-arm-embedded toolchain] is better tested.&lt;br /&gt;
&lt;br /&gt;
You can list the available versions with &amp;lt;tt&amp;gt;apt-cache policy gcc-arm-none-eabi&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gcc-arm-embedded toolchain ====&lt;br /&gt;
&lt;br /&gt;
'''This is the recommended toolchain'''&lt;br /&gt;
&lt;br /&gt;
On ''most'' Ubuntu versions the [https://launchpad.net/gcc-arm-embedded/ gcc-arm-embedded toolchain] can be installed as a debian package from the [https://launchpad.net/~terry.guo/+archive/gcc-arm-embedded ppa]:&lt;br /&gt;
 sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install gcc-arm-none-eabi&lt;br /&gt;
&lt;br /&gt;
!!! If you are using Ubuntu 14.04 and later, please be careful because there are packages with same name but produced by Debian and inherited by Ubuntu.&lt;br /&gt;
Check available versions after adding the PPA with&lt;br /&gt;
&lt;br /&gt;
 apt-cache policy gcc-arm-none-eabi&lt;br /&gt;
&lt;br /&gt;
To install a specific version (the one from terry.guo PPA) specify the version explicitly, e.g.&lt;br /&gt;
 sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install gcc-arm-none-eabi=4.9.3.2015q3-1trusty1&lt;br /&gt;
Meanwhile we are working with Debian to consolidate and unify this toolchain.&lt;br /&gt;
&lt;br /&gt;
==== gcc-arm-none-eabi Debian toolchain ====&lt;br /&gt;
&lt;br /&gt;
Current Debian ('''jessie''') and Ubuntu (14.04 '''trusty''' and later) releases have the gcc-arm-none-eabi package in the official repositories ('''universe'''), and can be installed with:&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install gcc-arm-none-eabi&lt;br /&gt;
&lt;br /&gt;
=== ARM gcc-arm-embedded tarball ===&lt;br /&gt;
Another way is to download and unpack the tarball and add it to your PATH:&lt;br /&gt;
&lt;br /&gt;
* Download gcc-arm-none-eabi-*-*-linux.tar.bz2 from [https://launchpad.net/gcc-arm-embedded/+download External Downloads] section of ARM gcc-arm-embedded project&lt;br /&gt;
* Unpack it to a directory of your choice&lt;br /&gt;
* Add the bin folder in to your PATH&lt;br /&gt;
&lt;br /&gt;
e.g.:&lt;br /&gt;
 cd ~&lt;br /&gt;
 wget https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update/+download/gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2&lt;br /&gt;
 sudo tar -vjxf gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2 -C /opt&lt;br /&gt;
 rm -r gcc-arm-none-eabi-4_7-2013q2-20130614-linux.tar.bz2&lt;br /&gt;
 exportline=&amp;quot;PATH=$PATH:/opt/gcc-arm-none-eabi-4_7-2013q2/bin&amp;quot;&lt;br /&gt;
 if grep -Fxq &amp;quot;$exportline&amp;quot; ~/.profile; then echo nothing to do ; else echo $exportline &amp;gt;&amp;gt; ~/.profile; fi&lt;br /&gt;
 source ~/.profile&lt;br /&gt;
&lt;br /&gt;
The file .profile will be sourced in every bash after logging out and in again. Until then,&lt;br /&gt;
 source ~/.profile&lt;br /&gt;
can be used for every bash individually.&lt;br /&gt;
&lt;br /&gt;
If you can not access your toolchain with PATH working, look a the [[Installation/Linux#Troubleshooting]].&lt;br /&gt;
&lt;br /&gt;
=== Old toolchain for Paparazzi v4.x and earlier ===&lt;br /&gt;
&lt;br /&gt;
'''For Paparazzi v4.x''' and earlier you need to install the &amp;lt;tt&amp;gt;paparazzi-arm-multilib&amp;lt;/tt&amp;gt; package. It has support for both ARM7 (i.e. Tiny,TWOG,YAPA autopilot boards) as well as STM32F1 (i.e. LISA boards).&amp;lt;br&amp;gt;&lt;br /&gt;
'''This toolchain does not properly support STM32F4 based autopilots!!'''&lt;br /&gt;
&lt;br /&gt;
You can install it explicitly with:&lt;br /&gt;
 sudo apt-get install paparazzi-arm-multilib&lt;br /&gt;
&lt;br /&gt;
== Optional Packages ==&lt;br /&gt;
&lt;br /&gt;
The packages &amp;lt;b&amp;gt;lpc21isp&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;openocd&amp;lt;/b&amp;gt; are normally '''automatically installed''' as they are recommended packages of paparazzi-dev, '''if not''' you can manually install them via:&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install lpc21isp openocd&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;lpc21isp&amp;lt;/tt&amp;gt; is needed to serially flash the LPC2148 based autopilots (e.g. bootloader for tiny, twog, umarim), &amp;lt;tt&amp;gt;openocd&amp;lt;/tt&amp;gt; is for flashing via JTAG (e.g. for Lisa boards) and debugging.&lt;br /&gt;
&lt;br /&gt;
== Installing and running Paparazzi ==&lt;br /&gt;
&lt;br /&gt;
Please see [[Installation#Getting_the_Source_Code|Getting the Source Code on the general Installation page]] for details on downloading the Paparazzi source code, compiling and running it.&lt;br /&gt;
&lt;br /&gt;
== Udev rules ==&lt;br /&gt;
&lt;br /&gt;
Add the appropriate [[Udev]] rule (available in fhe file ''50-paparazzi.rules'') to the USB handler.  Simply copy as root &amp;lt;tt&amp;gt;conf/system/udev/rules/50-paparazzi.rules&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;/etc/udev/rules.d/&amp;lt;/tt&amp;gt;, e.g in a terminal:&lt;br /&gt;
&lt;br /&gt;
 cd &amp;lt;your paparazzi directory&amp;gt;&lt;br /&gt;
 sudo cp conf/system/udev/rules/50-paparazzi.rules /etc/udev/rules.d/&lt;br /&gt;
&lt;br /&gt;
See the [[Udev]] page for more details.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== No access rights for USB devices ===&lt;br /&gt;
&lt;br /&gt;
Some Linux distributions, don't allow standard (non admin) users to directly access the USB bus by default. On recent Ubuntu/Debian versions the first/main user is already a member of the ''plugdev'' group which should be sufficient for most cases.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have problems, make yourself a member of the ''plugdev'' and ''dialout'' groups:&lt;br /&gt;
&lt;br /&gt;
 sudo adduser &amp;lt;your login&amp;gt; plugdev&lt;br /&gt;
 sudo adduser &amp;lt;your login&amp;gt; dialout&lt;br /&gt;
&lt;br /&gt;
Logout and login again.&lt;br /&gt;
&lt;br /&gt;
=== arm-none-eabi-gcc: Command not found ===&lt;br /&gt;
Appeared on Debian Wheezy 7 (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)&amp;lt;br/&amp;gt;&lt;br /&gt;
If this error occurs, maybe the [https://packages.debian.org/de/wheezy/ia32-libs ia32-libs] are missing.&lt;br /&gt;
&lt;br /&gt;
Enable multiarch and install ia32-libs:&lt;br /&gt;
 dpkg --add-architecture i386&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install ia32-libs&lt;br /&gt;
&lt;br /&gt;
=== arm-linux-gnueabi-gcc cross-compiler not found ===&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu ===&lt;br /&gt;
 apt-get install gcc-arm-linux-gnueabi&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
Starting with jessie, there were [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771496#41 some changes] to the way cross-compilers are set up. To make it work you will have to add armel architecture and pick up some crossbuild tools.&lt;br /&gt;
&lt;br /&gt;
First edit your /etc/apt/sources.list and add the following line, to enable the emdebian repo:&lt;br /&gt;
 deb http://emdebian.org/tools/debian/ jessie main&lt;br /&gt;
&lt;br /&gt;
Run the following command in your terminal to add the keys for it&lt;br /&gt;
 curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
Then you could add armel architecture and fetch the missing cross-compiler packages&lt;br /&gt;
 dpkg --add-architecture armel&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get install crossbuild-essential-armel&lt;br /&gt;
&lt;br /&gt;
You could find out more about cross-toolchains in jessie on debian [https://wiki.debian.org/CrossToolchains wiki page].&lt;br /&gt;
&lt;br /&gt;
Note that some of your repos might not mirror embedded architectures, which would give you an error when you try to update the sources. In that case you will have to specify which architecture you do want from them by editing the corresponding entry in your sources.list file, in a way described [https://wiki.debian.org/Multiarch/HOWTO here]. Like in this example with the crunchbang repo you could specify it by adding [arch=amd64,i386] to the line, so you only enable amd64 and i386 architectures:&lt;br /&gt;
 deb [arch=amd64,i386] http://packages.crunchbang.org/waldorf waldorf main&lt;br /&gt;
&lt;br /&gt;
===arm-none-eabi-gdb: error with libncurses.so.5===&lt;br /&gt;
Appeared on Xubuntu 14.04 LTS (gcc-arm-none-eabi-4_8-2013q4 installed via tarball)&amp;lt;br/&amp;gt;&lt;br /&gt;
Terminal output: arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory&lt;br /&gt;
&lt;br /&gt;
If this error occours, maybe [http://packages.ubuntu.com/search?keywords=lib32ncurses5 lib32ncurses5] is missing. &amp;lt;br/&amp;gt;&lt;br /&gt;
Found on [https://answers.launchpad.net/gcc-arm-embedded/+question/226680 launchpad q&amp;amp;a]&lt;br /&gt;
&lt;br /&gt;
=== FTDI serial adapter not working on old Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
On older Linux distributions (not needed for lucid and later), the Braille TTY driver interferes with FTDI USB Serial adapters. If somehow your FTDI serial adapter does not work, remove the package via:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get remove brltty&lt;br /&gt;
&lt;br /&gt;
=== Code not starting on autopilot after changing gcc ===&lt;br /&gt;
&lt;br /&gt;
If you changed the toolchain (e.g. installed a new one for having FPU-Support for the F4), you need to run&lt;br /&gt;
&lt;br /&gt;
 make clean &amp;amp;&amp;amp; make&lt;br /&gt;
&lt;br /&gt;
in sw/ext in order to rebuild the libs. Otherwise the embedded code can behave strange (most likely not start)&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=RC_Receivers_and_Radios&amp;diff=21199</id>
		<title>RC Receivers and Radios</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=RC_Receivers_and_Radios&amp;diff=21199"/>
		<updated>2016-04-22T15:25:44Z</updated>

		<summary type="html">&lt;p&gt;Flixr: add hardware category tree on right&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages hideprefix=always&amp;gt;Hardware&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Introduction=&lt;br /&gt;
&lt;br /&gt;
To be able to test your airframe before it flies fully autonomous a regular RC transmitter in combination with a receiver can be used. This is essential for testing and tuning your airframe. For this to work the received steering commands have to leave the receiver. Only then with this flow of command data the autopilot when flown in manual mode can do something you tell it to. This page is to give you information of how to connect various receivers. Also how to modify receiver so they can talk to the autopilot.&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
&lt;br /&gt;
Once you have physically connected your receiver we need to setup the transmitter and receiver combination correctly. This can be an complex task due to the overwhelming amount of options. [[rc_transmitter_and_receiver_setup| To assist you in this setup quest a specific wiki page]] is available to help you out.&lt;br /&gt;
&lt;br /&gt;
If you have a new Graupner HOTT system, the [[Graupner_HOTT_setup| Graupner HOTT setup]] page will provide all key information about setting up the Graupner transmitter and receiverand correctly output a ppm sum stream.&lt;br /&gt;
&lt;br /&gt;
=2.4GHz Receivers=&lt;br /&gt;
&lt;br /&gt;
There are three output type in use which you can connect a 2.4GHz receiver to your autopilot board:&lt;br /&gt;
# CPPM, where the C stands for '''C'''ombined, the PPM sum stream output, supported on all current autopilot boards,  &lt;br /&gt;
# Spektrum serial data output&lt;br /&gt;
# S-BUS data output&lt;br /&gt;
&lt;br /&gt;
If you come across the term &amp;quot;Satellite Receiver&amp;quot;, it has nothing to do with satellites in earth orbit. It is just a term to describe an auxiliary receiver normally used to improve reception by plugging into the 'main' receiver.&lt;br /&gt;
&lt;br /&gt;
If your receiver can not output one of the signals above, maybe you need following:&lt;br /&gt;
&lt;br /&gt;
# Must have combined PPM pulsetrain out or use [[PPM_Encoder | PPM Encoder]] board. See the [[Get_Hardware| Get Hardware]] page for links to suppliers)&lt;br /&gt;
# At least one extra channel beyond those needed to control the servos and motor. (throttle-roll-pitch-mode)&lt;br /&gt;
&lt;br /&gt;
=HOTT=&lt;br /&gt;
&lt;br /&gt;
==CPPM output==&lt;br /&gt;
&lt;br /&gt;
===Graupner GR-12/GR-16/GR-20 HOTT===&lt;br /&gt;
&lt;br /&gt;
GR-12/GR-16/GR-20 are Transmitters from the [http://www.graupner.de/en/products/1736df13-32af-4183-aa8e-80f31a7f03cb/productcategory.aspx Graupner HOTT Series].&lt;br /&gt;
&lt;br /&gt;
* 2.4 GHz FHSS system&lt;br /&gt;
* regular software updates, good support&lt;br /&gt;
* different languages (also with voice output)&lt;br /&gt;
* receivers work with 3.6 V to 8.4 V (functional down to 2.5 V)&lt;br /&gt;
* highly adjustable&lt;br /&gt;
&lt;br /&gt;
For a detailed instructions for updates and setup look at the [[Graupner_HOTT_setup]] page.&lt;br /&gt;
&lt;br /&gt;
=Spektrum=&lt;br /&gt;
&lt;br /&gt;
The wildly popular Spektrum and other brands of receivers using the spectrum protocol are widely available. Below a few of the tested ones. It is very likly others will also work well with Paparazzi, the only diffrence is, we did not thest them yet. Best of all the protocol is well reverse engineered and almost all details are known and implemented in various opensource libraries.&lt;br /&gt;
&lt;br /&gt;
==DSM2 v.s. DSMX==&lt;br /&gt;
&lt;br /&gt;
If you have no specific reason, use DSMX equipment. '''DSMX''' is more robust against interference and '''advised''' over DSM2 receivers. [http://www.rcmodelreviews.com/dx8dsmxreview.shtml This very good article explains it all in depth]. We could not have explained it better ourselves.&lt;br /&gt;
&lt;br /&gt;
==CPPM output==&lt;br /&gt;
&lt;br /&gt;
A nice solution for e.g. Tiny and TWOG autopilot boards is use modern DSM and your trusty based autopilot board with the CPPM inputoption. This works as well on LPC and STM based boards. Note that for a configuration radio file on should choose an own one '''not spektrum''' regardless that the connection is over DSM the pulses are PPM out not the serial DSM.&lt;br /&gt;
&lt;br /&gt;
===OrangeRx R410X===&lt;br /&gt;
&lt;br /&gt;
[[Image:Orange_RX410X_cppm_out.jpg|thumb|left|Orange R410X Receiver]]&lt;br /&gt;
&lt;br /&gt;
OrangeRx R410X DSMX compatible 4Ch with '''6 Channels''' PWM/CPPM out. This is the prefered modern alternative if you are looking to replace your &amp;quot;Classic&amp;quot; 35/36/40/41/72mHz receivers PWM/CPPM out for a robust DSMX receiver at almost no cost. Last time we looked the receivers where sold for about 8 Euro (~ 10 USD)&lt;br /&gt;
&lt;br /&gt;
In order to use the receiver, failsafe has to be deactivated so the AP can detect the loss of signal (the rx still outputs PPM-frames if you don't). To deactivate it you have to give full thottle and also give full trim. Then you have to (re-)bind the rx. Check carefully if the GCS displays NONE if you switch of the tx.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===OrangeRx R615X===&lt;br /&gt;
	 	&lt;br /&gt;
[[Image:Orange_RX_615_with_CPPM.jpg|thumb|left|Orange R615X Receiver]]&lt;br /&gt;
	 	&lt;br /&gt;
Another option is to use the OrangeRx R615X 6Ch 2.4GHz Receiver with CPPM out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DT RX31c===&lt;br /&gt;
&lt;br /&gt;
A Deltang, with software v3.5 also DSMX support, so small it is sure worth mentioning:&lt;br /&gt;
[[Image:DT_RX31_CPPM.jpg|thumb|left|DT Receiver Rx31c 7ch SumPPM]]&lt;br /&gt;
&lt;br /&gt;
* Outputs combined PPM (Sum PPM),7 channels for e.g. a Spektrum DX8 and DX6 transmitter&lt;br /&gt;
* Subminiature receiver with full range. Only 0.21 grams!. Cost about EUR 30.&lt;br /&gt;
* The solution for very tiny aircraft.&lt;br /&gt;
* The channels order with Spectrum DX8  in acro mode: Throttle, Roll,Pitch, Gear, Mix, Flap,Aux2&lt;br /&gt;
 [http://www.deltang.co.uk/rx31b.htm This manufacturer has more interesting receivers, worth a look]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Direct serial output==&lt;br /&gt;
&lt;br /&gt;
===OrangeRx R110X===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Orange_RX110X.jpg|Orange DSMX small receiver&lt;br /&gt;
File:Orange_RX110XL.jpg|Orange DSMX small receiver with longer antenna&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OrangeRx R110X Satellite DSMX Receiver [http://www.hobbyking.com/hobbyking/store/__38393__OrangeRx_R110X_2_4Ghz_DSMX_Satellite_Receiver.html| R110X]. Works well, simple to connect. Although called, &amp;quot;Satellite Receiver&amp;quot; it is usable as a ful blown receiver when connected to an AP board. There is also a version with long antenna with two U.FL connectors on the PCB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Spektrum 9645===&lt;br /&gt;
&lt;br /&gt;
[[Image:Spektrum_9645_satellite_receiver.jpg|thumb|left|Spektrum 9645 satellite receiver]]&lt;br /&gt;
&lt;br /&gt;
[http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM9645| Spektrum 9645 satellite receiver]. Works well, simple to connect. the DSMX mode is not used, it is used in the DSM2 mode, the receiver is backards compatible with that protocol.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==S-Bus output Spektrum==&lt;br /&gt;
&lt;br /&gt;
Although drafted up by Futaba there are lots of receivers from other brands also giving S-Bus signal output. Paparazzi is perfectly capable to decode the S-Bus information from whatever receiver and use it.&lt;br /&gt;
&lt;br /&gt;
===Orange DSMX 3C 14ch SBus output===&lt;br /&gt;
&lt;br /&gt;
If you need a tiny DSMX receiver with SBus out to connect directly to your autopilot, a good option is to use this one&lt;br /&gt;
&lt;br /&gt;
[[File:Orange DSMX 3ch 14ch sbus out.jpg|thumbnail|left|Orange DSMX 14channel SBus output]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Orange DSMX 8C 14ch SBus output===&lt;br /&gt;
&lt;br /&gt;
For more reception redundancy, one can add a satellite receiver like the RX110XL, and still have SBus output&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Orange_RX800X.jpg|Orange DSMX 8 with 14CH SBus output&lt;br /&gt;
File:Orange_RX800X_and_RX110XL.jpg|Orange DSMX and a satellite&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=FASST=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Futaba FASST, Robust receivers. Read more about the FASST system [http://www.futaba-rc.com/technology/fasst.html here].&lt;br /&gt;
&lt;br /&gt;
==CPPM output==&lt;br /&gt;
&lt;br /&gt;
===Futaba FASST 7-channel receiver===&lt;br /&gt;
&lt;br /&gt;
[[Image:rs617fasst.jpg|thumb|left|Futaba RS 617]]&lt;br /&gt;
&lt;br /&gt;
* Pin 8 (upper right corner in picture) of the small IC on the right contains 5 PPM pulses and can go directly to paparazzi. Pulse 6 and 7 go directly to the servos. &lt;br /&gt;
* Best is to remove the resistors of one of the channels and connect a small wire to pin 8 to get the combined 5 pulses on the robust 1/10th inch header.&lt;br /&gt;
* Do not forget to use channel 3 (only failsafe channel) as mode switch with fail safe &amp;quot;throttle off&amp;quot; as mode 2.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Robbe RASST 7 &amp;amp; 8 channel receivers===&lt;br /&gt;
&lt;br /&gt;
Robbe has produced line of Futaba FASST compatible receivers that can output only PPM which results ablility to plug into autopilot without encoder.&lt;br /&gt;
* [http://www.robbe.de/empfaenger-r-6007-sp-2-4-g-rasst.html R6007SP 2,4 GHz RASST] - 7 channel, for small aircraft&lt;br /&gt;
* [http://www.robbe.de/empf-r6107sp-2-4-ghz-rasst.html R6107SP 2,4 GHz RASST] - 7 channel, &amp;gt;1000m range&lt;br /&gt;
* [http://www.robbe.de/empf-r6008sp-2-4-ghz-rasst.html R6008SP 2,4 GHz RASST] - 8 channel, upto 3000m range&lt;br /&gt;
&lt;br /&gt;
====Switch Assignment====&lt;br /&gt;
&lt;br /&gt;
To assign the three position switch to any other channel but channel 7 follow these steps:&lt;br /&gt;
# Set up aux2(refers to aux2 on rx not the switch on the tx. aka ch7) with its input selected as 3 pos switch.&lt;br /&gt;
# Set up this mix - Gear to Gear (Up=-100, Down=-100, Offset =0). This inhibits the gear switch.&lt;br /&gt;
# Set up another mix - Aux2 to Gear (Up=100, Down=100, Offset = 0).&lt;br /&gt;
Notes: &lt;br /&gt;
#Gear on a DX-7 Air is Channel 5 and AUX2 is CH7. Once again i am referring to the inputs which are labeled on the RX not what the switches are named on the TX. If your using a DX-7 heli please substitute the names for what the rx channels are named into this guide&lt;br /&gt;
# DX7 Heli the 3-pos switch is named &amp;quot;flight mode&amp;quot;&lt;br /&gt;
# DX7 Air the 3-pos switch is named &amp;quot;flaps&amp;quot;&lt;br /&gt;
&lt;br /&gt;
====Failsafe Setup====&lt;br /&gt;
&lt;br /&gt;
To set up the mode channel (3 pos switch) to default to auto2 if connection is lost between rx and tx follow these steps:&lt;br /&gt;
# Put 3 position Switch into AUTO2 Position&lt;br /&gt;
# Put in bind plug&lt;br /&gt;
# Power up&lt;br /&gt;
# REMOVE the bind plug&lt;br /&gt;
# Power up Tx while pushing bind button&lt;br /&gt;
# Wait until light becomes steady and not blinking (it may become steady right off but will then start blinking again so let it go at least 5 seconds)&lt;br /&gt;
&lt;br /&gt;
==S.bus output==&lt;br /&gt;
&lt;br /&gt;
===S.bus to CPPM===&lt;br /&gt;
&lt;br /&gt;
Frsky has an [http://www.frsky-rc.com/product/pro.php?pro_id=112 SBUS to CPPM converter] which can be used with S.bus receiver e.g. [http://www.gpdealera.com/cgi-bin/wgainf100p.pgm?I=FUTL7661 R6303SB]&lt;br /&gt;
&lt;br /&gt;
====Failsafe====&lt;br /&gt;
&lt;br /&gt;
To properly get the LOST bit when the S.bus receiver is out of range a hack for lpc21 is to use the led signal of the receiver (if the color is changed/tuned off when the signal is lost) and put this to a GPIO input. Then define some parameters to turn this into RC_LOST signal.&lt;br /&gt;
&lt;br /&gt;
See sw/airborne/arch/lpc21/subsystems/radio_control/ppm_arch.h:54&lt;br /&gt;
And for the airframe (for pin P0.17):&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;radio_control&amp;quot; type=&amp;quot;ppm&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;USE_PPM_RSSI_GPIO&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;PPM_RSSI_IOPIN&amp;quot; value=&amp;quot;IO0PIN&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;PPM_RSSI_PIN&amp;quot; value=&amp;quot;17&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;PPM_RSSI_VALID_LEVEL&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/subsystem&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=MULTIPLEX=&lt;br /&gt;
&lt;br /&gt;
==CPPM output==&lt;br /&gt;
&lt;br /&gt;
===Jeti Duplex 2.4 GHz Receiver Rsat 2===&lt;br /&gt;
&lt;br /&gt;
[[Image:Jeti_Duplex_Rsat2.jpg|thumb|left|Jeti RSat 2]]&lt;br /&gt;
* Outputs PPM, no soldering or PPM board required&lt;br /&gt;
* Only 12 gramms&lt;br /&gt;
* Full duplex technology provides safe radio link and redundant telemetry to standard paparazzi telemetry.&lt;br /&gt;
* [http://www.jetimodel.cz/index.php?page=products&amp;amp;old=0&amp;amp;category=4 Transmitter module] can be installed in any receiver.&lt;br /&gt;
&lt;br /&gt;
More information can be found a the [http://www.jetimodel.cz/index.php?page=product&amp;amp;id=165 Homepage of Jeti] and the [http://www.mikrokopter.de/ucwiki/JetiDuplex MikroKopter Wiki].&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=PCM Receivers=&lt;br /&gt;
&lt;br /&gt;
Most of the known PCM transmitter also can be set to PPM mode. If this is set, then the regular description for PPM applies since the PCM receiver like a JR/Gaupner SMC16 Scan can output PPM perfectly. &lt;br /&gt;
&lt;br /&gt;
However if setting up you transmitter to PPM out then the following applies:&lt;br /&gt;
&lt;br /&gt;
# Must use ppm encoder board. (See [[Get_Hardware|Get Hardware]] page for suppliers)&lt;br /&gt;
# At least one extra channel beyond those needed to control the servos and motor.&lt;br /&gt;
&lt;br /&gt;
= PPM Receivers =&lt;br /&gt;
&lt;br /&gt;
To use a 26/27/35/40/41/72/ MHz receiver a few requirements are necessary&lt;br /&gt;
&lt;br /&gt;
# At least one extra channel beyond those needed to control the servos and motor.&lt;br /&gt;
# A receiver or modified receiver which outputs a full ppm signal.&lt;br /&gt;
&lt;br /&gt;
== R/C Receiver Interface==&lt;br /&gt;
&lt;br /&gt;
All versions of the Paparazzi autopilot include a connector to interface with a standard R/C receiver for manual or semi-autonomous control during the testing and tuning phases.  Two interface options exist:&lt;br /&gt;
# Tap into the PPM signal running between the RF section and the servo driver of your receiver and route it to the Paparazzi.  Let the Paparazzi generate individual servo signals and connect all servos directly to the autopilot.  This method requires only 3 wires to the receiver (power and PPM), is compatible with all Paparazzi autopilots, and provides 8 manual R/C channels and the potential for more autonomous channels regardless of the capability of the R/C receiver.&lt;br /&gt;
# Cut the PPM trace and route it thru the autopilot and back to the receiver, using the servo driver IC on your R/C receiver to drive the servos.  This option requires 4 wires (Ground, PPM-in, PPM-out, Reset) and your receiver must have a supported servo driver IC.  This allows you to use the large servo connectors on your R/C receiver and does not require any modification to your servos or ESC but does require you to cut a trace on your R/C receiver and limits the number of servos to the capacity of your receiver.  Compatible with Classix and Tiny 1.1.&lt;br /&gt;
# Note that on the Classix the PPM_in pin is FOO2... &lt;br /&gt;
&lt;br /&gt;
Note 1: Exact value not critical. Depending on RC Transmitter type &amp;amp; Manufacturer.&amp;lt;br&amp;gt;&lt;br /&gt;
Note 2: Depending on Transmitter number of Channels and t,,n,, durations.&amp;lt;br&amp;gt;&lt;br /&gt;
Note 3: Not critical. Depending on Synchro detection method.&amp;lt;/small&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:RC_Receiver_Timing_Diagram.jpg||PPM Timing Diagram&lt;br /&gt;
Image:RC_Receiver_Tiny.jpg|3-Wire setup, driving servos from the autopilot&lt;br /&gt;
Image:RC_Receiver_classix.jpg|4-Wire setup, driving servos from the R/C receiver&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Common demux chips ===&lt;br /&gt;
&lt;br /&gt;
Typical used chips are the cmos [http://www.doctronics.co.uk/4015.htm 4015] and [http://www.doctronics.co.uk/4017.htm 4017]. &lt;br /&gt;
&lt;br /&gt;
The 4015 uses either pin 1 or pin 9 for the clock and the input is on 7 and 15. The 4017 has just one shift register and has its clock input on pin 14 and the enable on pint 13.&lt;br /&gt;
&lt;br /&gt;
In most receivers you are after the clock; though some may be pulsed; in which case you need the enable. Note that the 4017 enable has inverted logic (low to be enabled) whereas the input on the 4015 can be either (typically high). If the enable pin is held low (4017) or if the input pin (4015) is held high always;e.g. connected to the ground or the Vcc - then it is fair to assume that the PPM signal is most propably on the clock input. &lt;br /&gt;
&lt;br /&gt;
== 35/40Mhz RC Receivers ==&lt;br /&gt;
&lt;br /&gt;
Note that there is information on modifying other receiver models at [http://mikrokopter.de/ucwiki/RC-Empf%C3%A4nger mikrokopter.de]. It's in German however the pictures contain most of the information or use google translate.&lt;br /&gt;
Shielded wire is recommended for receiver and autopilot connection, as unshielded one may cause noise in receiver. &lt;br /&gt;
&lt;br /&gt;
=== Futaba FP-R116FB 6 Channel FM 35MHz receiver ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Rc_fut_web.jpg|thumb|left|Wiring of a Futaba R136]]&lt;br /&gt;
*Orange wire is connected to PPM signal&lt;br /&gt;
*Red wire is connected to VCC&lt;br /&gt;
*Brown wire is connected to GND&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Futaba R136F 6 Channel FM receiver ===&lt;br /&gt;
&lt;br /&gt;
[[Image:rx_futaba136.jpg|thumb|left|Wiring of a Futaba R136]]&lt;br /&gt;
*41 MHz&lt;br /&gt;
*White wire is connected to PPM signal&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Futaba R168DF 8 Channel dual FM receiver ===&lt;br /&gt;
&lt;br /&gt;
[[Image:rx_futaba168df.jpg|thumb|left|Wiring of a Futaba R168DF]]&lt;br /&gt;
*35 MHz&lt;br /&gt;
*PPM wire is connected to 862 receiver pin on the board. VCC and GND is on the 8/B original position.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ACT Micro-6 FM receiver ===&lt;br /&gt;
&lt;br /&gt;
[[Image:rx_act_micro-6.jpg|thumb|left|Wiring of a ACT Micro-6]]&lt;br /&gt;
*Available in 35 or 40 MHz versions&lt;br /&gt;
*White wire is connected to PPM signal&lt;br /&gt;
*[http://www.acteurope.com/Micro_6anl.pdf Datasheet (German)]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ACT DSL-4top [http://www.mikrokopter.de/ucwiki/DSL4top mikrokopter.de] version ===&lt;br /&gt;
&lt;br /&gt;
[[Image:DSL4top.jpg|thumb|left|DSL-4top mikrokopter.de version]]&lt;br /&gt;
* Special version for mikrokopter.de - Only available in their [https://www.mikrocontroller.com/index.php?main_page=product_info&amp;amp;products_id=215&amp;amp;zenid=8ce8bab70f3e9d684e01f724316d9690 shop]!&lt;br /&gt;
* '''Outputs PPM directly''' on the channel 1 connector!&lt;br /&gt;
* No soldering necessary&lt;br /&gt;
* ACT Lifetime warranty&lt;br /&gt;
* Sells for ~45 euro&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Futaba R115F 5 Channel FM receiver ===&lt;br /&gt;
&lt;br /&gt;
[[Image:pprz_rx115.jpg|thumb|left|Wiring of a Futaba R115]]&lt;br /&gt;
*Available in 35 and 40 MHz versions&lt;br /&gt;
*White wire is connected to PPM signal&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== JETI REX 5 plus (no MPD) receiver ===&lt;br /&gt;
&lt;br /&gt;
[[Image:520_Jeti_5_plus.jpg|thumb|left|Wiring of a REX 5]]&lt;br /&gt;
&lt;br /&gt;
*Popular Czech made micro r/c receiver, available in 35 or 40 MHz versions&lt;br /&gt;
*´folded´ PCB design with parts inside, mostly inaccessable&lt;br /&gt;
*Small grey wire is connected to via with PPM signal&lt;br /&gt;
*Unusual connector used for testing, soldering recommended&lt;br /&gt;
*shielded wire recommended, this one taken from PC parts recycling (former soundcard to m/b connector cable)&lt;br /&gt;
*[http://www.jetimodel.cz/eng/navody_en/rex5_eng.pdf Datasheet (English)]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:DSC02414.JPG|thumb|left|other Layout of REX 5]]&lt;br /&gt;
&lt;br /&gt;
=== Receiver RX-7-SYNTH IPD receiver [http://www.multiplex-rc.de/hp/produkte/artikel_detail.jsp?lfdnr=55880&amp;amp;action=add2notice&amp;amp;qty=1&amp;amp;cachenepper=1227896925116 Multiplex-rc.de] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:RX-7-SYNTH_IPD.jpg|thumb|left|Wiring of RX-7-SYNTH IPD]]&lt;br /&gt;
&lt;br /&gt;
*Available in 35, 36 and 40 MHz versions&lt;br /&gt;
*A compact, high-quality 7-channel single-conversion FM / PPM IPD receiver&lt;br /&gt;
*Easy modification through connectors, see pictures&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Protech 5FM 35 mHz Receiver ===&lt;br /&gt;
&lt;br /&gt;
The low cost Protech '5FM' receiver makes use of an SMD version of the standard 74AHC164[http://www.ic-on-line.cn/IOL/datasheet/74ahct164_18057.pdf] 8 bit shift register; you are after PIN 1 of this chip. The circuit board has a testpad for just this pin at the top side of the circuit board.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:protech-5fm.jpg|Figure 1. &amp;lt;br&amp;gt;Protech 5FM 35 mHZ Receiver, mark 2&lt;br /&gt;
Image:protech-5fm-pad.jpg|Figure 2. &amp;lt;br&amp;gt; PPM tap location for the Protech 5FM receiver, near the 74AHC164 shift register&lt;br /&gt;
Image:protech-5fm-scope.jpg|Figure 3.&amp;lt;br&amp;gt; Protech 5FM PPM signal - not very clean/digital&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two physical versions exist; the older one [http://www.protech.be/Manuals/PRO205manual%20web.pdf] and a newer one pictured (fig 1). It has been distributed by protech with various ready-to-fly planes; such as the Skyraider[http://www.modelbouwforum.nl/forums/beginners/50677-protech-skyraider.html].&lt;br /&gt;
&lt;br /&gt;
The solder/testpad you are after the one right next the 74x164 chip its pin 1. In this image it has a jellow wire soldered to it (the yellow wire at the top left is the normal antenna connector (fig 2). Note however that the signal is not very clean (1v/div) - which may cause issues - as shown in the above image (fig 3). &lt;br /&gt;
&lt;br /&gt;
This is further compunded by the relatively noisy electrical engines; which are not brushless. A ferrite coil does not seem to help enough - Papparazi and GPS loose sync often through Xbee. Replacing the engine by a brushless outrunnen resolve the issue completely.&lt;br /&gt;
&lt;br /&gt;
=== Profi Penta 35 MHz ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:DSC00547.JPG&lt;br /&gt;
Image:DSC00545.JPG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Graupner R16Scan ===&lt;br /&gt;
&lt;br /&gt;
The Graupner R16Scan and SMC16Scan are available in 35,36,40,41Mhz versions and belongs to one of the most reliable traditional receivers in it's class. It's a highly selective PLL SCAN narrow-band FM superhet receiver. Has 8 servo connections. And the best thing; No crystals swap is required with this receiver since it scans for your TX transmission frequency. Modified for PPM output, it can output 9 separate channels.&lt;br /&gt;
&lt;br /&gt;
To modify this receiver for use with an autopilot some soldering on tiny IC pins is needed. No additional electronic parts needed. &lt;br /&gt;
&lt;br /&gt;
# Desolder existing resistor from IC pin, fast and carefully&lt;br /&gt;
# solder a short wire to the pin on the other side of the IC as on the picture, preferably als put some isolation over it&lt;br /&gt;
# Solder this wire to the resistor, move isolation over resistor&lt;br /&gt;
# Use a little UHU por glue to make sure nothing moves when flying in rought conditions&lt;br /&gt;
&lt;br /&gt;
The PPM combined data is now available on connector 8. You still can power the receiver seperatly via + - pins if you want to. Or straight from the AP board 5v out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Graupner_R16Scan_pwm_modification_01.jpg|How to modify&lt;br /&gt;
Image:Graupner_R16Scan_pwm_modification_02.jpg|Modification from other side&lt;br /&gt;
Image:Graupner_R16Scan_pwm_modification_03.jpg|Modification Closeup&lt;br /&gt;
Image:Graupner_R16Scan_pwm_modification_04.jpg|Well... why not change them all in one go.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 72Mhz Receivers ==&lt;br /&gt;
&lt;br /&gt;
=== Castle Creations [http://www.castlecreations.com/products/berg_ms4l.html Berg 4L] ===&lt;br /&gt;
&lt;br /&gt;
[[Image:berg4L.jpg|thumb|left|Wiring of a Berg 4L]]&lt;br /&gt;
* Expect fantastic performance from these $40 USD parts but be warned that they are known to have unreliable crystal sockets and brittle antenna wire.  The ''Berg 7'' channel receiver should work equally well and is known to have a better crystal socket - note that either receiver will provide '''8 channels''' in manual R/C mode when used with Paparazzi.  Note: the rugged ''Berg 4'' cannot be modified, only the ''Berg 4L'' and ''Berg 7''.&lt;br /&gt;
&lt;br /&gt;
To Modify a Berg4L, follow these instructions:&lt;br /&gt;
# Remove the shrink wrap. Use a good knife and be careful to not damage any of the components on the receiver. I would recommend that you cut on the sides (edge of the PCB) to be sure to avoid damaging the shielding&lt;br /&gt;
# Desolder the headers. We will not use them with tiny AP as the servos are connected directly to the AP. This is pretty easy to do when you have a hot air rework station. If you don't have one, your best bet is to cut the header off and remove the left over pins one by one with a regular iron. There is a piece of shielding material that is connected to one of the ground pins of the header. You need to remove it carefully from the header without damaging it and re-solder it to the gnd pad.&lt;br /&gt;
# You need to solder 3 wires to the receiver. Gnd, +5V and PPM. To locate the PPM signal, first locate the PIC micro controller close to the location of the headers. The PPM signal is on the corner pin closest to the corner of the receiver. Soldering a 28guage wire directly to the PIN isn't very difficult. For the power connection, use the pads that were used for the header. The outside pin is Gnd, the second pin is +5V. What I did is solder the wires on the pad going straight down, then I looped the 3 wires 360 degrees and glued them to the PCB with hot glue. This provides good strain relief.&lt;br /&gt;
# While you have the PCB in your hands, take the opportunity to remove the crystal connector and solder your crystal directly to the PCB for added reliability.&lt;br /&gt;
# I also used some hot glue to add more strain relief to the antenna&lt;br /&gt;
# Use some large shrink wrap to cover the entire receiver again&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hitec Electron 6 72MHz Reciever ===&lt;br /&gt;
&lt;br /&gt;
This was written for MNAV from crossbow but is still usable with PPRZ.&lt;br /&gt;
&lt;br /&gt;
[[Image:Electron6mod.jpg|thumb|left]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Corona Synthesized Dual-Conv Receiver 8Ch ===&lt;br /&gt;
&lt;br /&gt;
[http://www.corona-rc.com/coproductshowE.asp?ArticleID=63 manual]&lt;br /&gt;
&lt;br /&gt;
This receiver is available in 27,35,36,40,72 mhz and a Synthesized receiver, meaning you do not need to change frequency crystals.&lt;br /&gt;
&lt;br /&gt;
How to modify for combined signal&lt;br /&gt;
&lt;br /&gt;
# Cut the 8th channel PWM output pin near the PCB.&lt;br /&gt;
# Connected a pin from the Atmel (see picture) to the 8th channel PWM signal. (optionally, weaving the wire through some holes on the board.) Make sure you have a fine tip on your soldering iron and a magnifying glass strapped to your head! &lt;br /&gt;
# Glue the wire down (CA works)&lt;br /&gt;
# Be sure to glue the pin that you cut in place (previously, being soldered to the board was holding the pin in place)&lt;br /&gt;
&lt;br /&gt;
It is maybe possible to reprogram the atmel with your own firmware. If you succeed in this plz add relevant info here.&lt;br /&gt;
&lt;br /&gt;
That pin provides a 1V to 2V signal, it works with the PPRZ, although its a bit gittery (the slew rate is not real good).&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Corona_Synthesized_Receiver_72Mhz_bottom.jpg&lt;br /&gt;
Image:Corona_Synthesized_Receiver_72Mhz_top.jpg&lt;br /&gt;
Image:Corona_Synthesized_Receiver_72Mhz_top_atmel.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= UHF Receivers =&lt;br /&gt;
&lt;br /&gt;
Note that in most countries an amateur radio license is required to use 433MHz UHF.&amp;lt;br/&amp;gt;&lt;br /&gt;
See also [[Modems#HAM_.2F_CEPT_Licence]].&lt;br /&gt;
&lt;br /&gt;
== Scherrer UHF ==&lt;br /&gt;
[[Image:ScherrerUHF.jpg|thumb|left|Scherrer UHF Rx]]&lt;br /&gt;
&lt;br /&gt;
The [http://www.webx.dk/rc/uhf-link3/uhf-link3.htm Scherrer UHF] is a high quality diversity radio control system. It has a PPM output and can be connected directely to Paparazzi. A ppm encoder board is not required. It has an RSSI output.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ImmersionRC EzUHF ==&lt;br /&gt;
[[Image:EzUHFTx.jpg|thumb|left|ImmersionRC Tx]]&lt;br /&gt;
&lt;br /&gt;
The [http://www.immersionrc.com/products.htm ImmersionRC EzUHF] is a high quality diversity radio control system. The recent firmwares have a PPM output on Ch. 1, but this needs to be activated through the PC configuration software with the proper firmware loaded. It connects directly to EzOSD and the TrackR2 which enables RSSI monitoring and head tracking for FPV.&lt;br /&gt;
&lt;br /&gt;
Some people had issues with the exact timing, where the ROLL channel disappeared. If the radio has more than 6 channels, there may be methods to slave another channel to the roll channel (usually for the operation of dual ailerons). The ezuhf configuration file is using this method, where channel 1 is copied to channel 6. The EzUHF modules receive the PPM output stream from the radio and need to interpret it. For this reason, the ezuhf configuration file should be verified for proper functioning and you may find that channels are remapped to others with different purposes.&lt;br /&gt;
&lt;br /&gt;
Search &amp;quot;sander style&amp;quot; antennas for a way to build your own cheap, high-quality antennas for these rx modules and which provide a range well beyond the horizon.&lt;br /&gt;
&lt;br /&gt;
See [http://www.immersionrc.com/EzUHF.htm EzUHF manual+firmware] for more information.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OrangeRx Open LRS 433MHz 9Ch Receiver==&lt;br /&gt;
No Image? Indeed, if you have this device, plz upload a photo.&lt;br /&gt;
&lt;br /&gt;
Via a firmware update this receiver is capable of CPPM output on Pin 5. A good option if you need very long range RC control. If you are able, it is posible to wriggle telemetry output in return for this module also. The Paparazzi Team has not tried it. So if you want to land up in the PPRZ hal of fame, try it and report back, that would be awesome!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Radios=&lt;br /&gt;
&lt;br /&gt;
The word radio here is a RC Transmitter (TX), nothing to do with a device to liten to your favorite music channel. Opensource enthousiasts as we are, there are also various opensource based RC transmiitter for even more flexibility.&lt;br /&gt;
We won't advise of specific brand here, the only keyword here is reliability. For 100% autonomous flight one could argue, no RC transmitter is needed. That is true, but experience shows that it is better to have a backup control device.&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Subsystem/ahrs&amp;diff=21197</id>
		<title>Subsystem/ahrs</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Subsystem/ahrs&amp;diff=21197"/>
		<updated>2016-04-22T10:01:25Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Complementary Quaternion (fixed point) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages hideprefix=always&amp;gt;Subsystems&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
== AHRS subsystem ==&lt;br /&gt;
The '''A'''ttitude and '''H'''eading '''R'''eference '''S'''ystem subsystem specifies which attitude estimation filter you are using.&lt;br /&gt;
&lt;br /&gt;
Currently possible AHRS subsystem types are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type !! Point type !! Firmwares !! Notes&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ahrs#Complementary_Quaternion_.28fixed_point.29|int_cmpl_quat]]''' || fixed || all ||&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ahrs#Complementary_Quaternion.2FRotation_Matrix_.28floating_point.29|float_cmpl]]''' || floating || all ||&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ahrs#DCM_.28floating_point.29|float_dcm]]''' || floating || fixedwing ||&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ahrs#Complementary_Euler_.28fixed_point.29|int_cmpl_euler]]'''  || fixed || rotorcraft ||&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ahrs#Kalman_Filter_Quaternion|float_mlkf]]''' || floating || rotorcraft ||&lt;br /&gt;
|-&lt;br /&gt;
| '''[[Subsystem/ahrs#Infrared|infrared]]''' ||  || fixedwing? ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
e.g. for the latest complementary filter:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;int_cmpl_quat&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
There is a test program ( sw/airborne/test/ahrs/compare_ahrs.py ) to compare different AHRS implementations on simple test cases.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;'''Caution!'''&amp;lt;/span&amp;gt; '''Please also see [https://github.com/paparazzi/paparazzi/issues/93 issue 93] about proper handling of BODY_TO_IMU in all AHRS algorithms.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Complementary Quaternion (fixed point) ===&lt;br /&gt;
&lt;br /&gt;
To measure attitude angles, gyrometers measurements are integrated. The result of integration is accurate for short term, but gyro bias is accumulated, which results in long term errors (drift). &lt;br /&gt;
On the other hand, accelerometers can be used to measure angles directly, but they suffer from noise due to vibrations. The measurement is then only accurate when averaged over a long term. Also, accelerometers alone are unable to give accurate angles when the vehicle is accelerating. &lt;br /&gt;
Complementary filter takes advantage of both sensors, using a low-pass filter on accelerometer readings and high pass filter on gyrometers readings, to estimate attitude angles.&lt;br /&gt;
* No danger of [http://en.wikipedia.org/wiki/Gimbal_lock gimbal lock], since quaternions are used.&lt;br /&gt;
* The arithmetic is [http://en.wikipedia.org/wiki/Fixed-point_arithmetic fixed point] and is thus suitable if the processor (on your board) has no [http://en.wikipedia.org/wiki/Floating_point_unit FPU].&lt;br /&gt;
* Estimates the gyro bias.&lt;br /&gt;
* For rotorcrafts: uses magnetometer for heading. Needs calibration!&amp;lt;br/&amp;gt;You can add &amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&amp;lt;configure name=&amp;quot;USE_MAGNETOMETER&amp;quot; value=&amp;quot;TRUE&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt; to be explicit about it.&lt;br /&gt;
* Also suitable for fixedwings, but you need GPS.&lt;br /&gt;
** Compensation of centrifugal force via GPS speed (to fly in circles with a fixedwing).&amp;lt;br/&amp;gt;Enabled with AHRS_GRAVITY_UPDATE_COORDINATED_TURN which is set by default for a fixedwing firmware.&lt;br /&gt;
** For fixedwing firmware, GPS course is used for heading estimation by default (and magnetometer disabled), add &amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&amp;lt;configure name=&amp;quot;USE_MAGNETOMETER&amp;quot; value=&amp;quot;FALSE&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt; if you want to be explicit.&lt;br /&gt;
** To use magnetometer for heading: &amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&amp;lt;configure name=&amp;quot;USE_MAGNETOMETER&amp;quot; value=&amp;quot;TRUE&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&amp;lt;configure name=&amp;quot;AHRS_USE_GPS_HEADING&amp;quot; value=&amp;quot;FALSE&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other flags of interest are:&lt;br /&gt;
*AHRS_PROPAGATE_LOW_PASS_RATES : apply a low pass filter on rotational velocity&lt;br /&gt;
*AHRS_MAG_UPDATE_ALL_AXES : use mag to also update roll/pitch and not only yaw (not recommended in most cases)&lt;br /&gt;
&lt;br /&gt;
* NEW since [https://github.com/paparazzi/paparazzi/commit/b40da0ae56e861e088017c01426d0c4ed7c43350 v5.1_devel-455-gb40da0a]:&lt;br /&gt;
** Proper scaling of corrections for 100Hz fixedwing or 500Hz for rotorcraft.&lt;br /&gt;
** Allow tuning of the accel and mag correction natural freqency and damping.&lt;br /&gt;
** Tunable gravity_heuristic_factor to reduce accelerometer influence only when the vehicle is accelerating (norm of ax,ay,az ~ 9,81 m/s2).&lt;br /&gt;
&lt;br /&gt;
* Flags of interest in master branch are:&lt;br /&gt;
** AHRS_PROPAGATE_FREQUENCY: IMU gyrometer reading frequency ( Hz, depend on IMU subsystem used and its configuration)&lt;br /&gt;
** AHRS_CORRECT_FREQUENCY: IMU accelerometer reading frequency (Hz)&lt;br /&gt;
** AHRS_MAG_CORRECT_FREQUENCY: IMU magnetometer reading frequency (Hz)&lt;br /&gt;
** AHRS_ACCEL_OMEGA: Complementary filter accelerometer cut-off frequency (rd/s). Default is 0.063 rd/s, the accelerometer reading are &amp;quot;averaged&amp;quot; over 100 seconds (= 2*pi/0.063) to correct gyro bias. Lower the cut-off frequency reduce the influence of accelerometers. WARNING: if ACCEL_OMEGA is set at a lower frequency, the gyro bias variations may not be corrected fast enough. As a result, the computed attitude may show significant static (or low frequency) errors. If accel_omega is set higher, the gyro bias will be well corrected and the static accuracy of the computed angle will be very good, but the dynamic error of the computed angle may be bad. &lt;br /&gt;
** AHRS_ACCEL_ZETA: Complementary filter accelerometer damping. Default is 0.9&lt;br /&gt;
** AHRS_MAG_OMEGA:Complementary filter magnetometer cut-off frequency (rd/s). Default is 0.04 rd/s. Acts the same as accelerometer but on the yaw axis.&lt;br /&gt;
** AHRS_MAG_ZETA:Complementary filter magnetometer damping. Default is 0.9&lt;br /&gt;
** AHRS_GRAVITY_HEURISTIC_FACTOR: Default is 30. Reduce accelerometer cut-off frequency when the vehicle is accelerating: norm(ax,ay,az) ~ 9,81 m/s2. WARNING: when the IMU is not well damped, the norm of accelerometers never equals to 9,81 m/s2. As a result, the GRAVITY_HEURISTIC_FACTOR will reduce the accelerometer bandwith even if the vehicle is not accelerating. Set AHRS_GRAVITY_HEURISTIC_FACTOR = 0 in case of vibrations.&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;int_cmpl_quat&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;section name=&amp;quot;AHRS&amp;quot; prefix=&amp;quot;AHRS_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_X&amp;quot; value=&amp;quot; 0.51562740288882&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_Y&amp;quot; value=&amp;quot;-0.05707735220832&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_Z&amp;quot; value=&amp;quot; 0.85490967783446&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Also see the [[Subsystem/ahrs#Local_Magnetic_Field|Local Magnetic Field]] section.&lt;br /&gt;
&lt;br /&gt;
To use '''int_cmpl_quat''' for fixedwings without magnetometer (GPS based heading estimation instead):&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;int_cmpl_quat&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;configure name=&amp;quot;USE_MAGNETOMETER&amp;quot; value=&amp;quot;FALSE&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Complementary Quaternion/Rotation Matrix (floating point) ===&lt;br /&gt;
* Estimates the gyro bias.&lt;br /&gt;
* By default uses magnetometer for heading for rotorcrafts.&lt;br /&gt;
* Choose either ''type=&amp;quot;float_cmpl_rmat&amp;quot;'' or ''type=&amp;quot;float_cmpl_quat&amp;quot;'', which define ''AHRS_PROPAGATE_RMAT'' or ''AHRS_PROPAGATE_QUAT'' respectively to select if the propagation is done in rotation matrix or quaternion representation.&lt;br /&gt;
* For fixedwings:&lt;br /&gt;
** Compensation of centrifugal force via GPS speed (to fly in circles with a fixedwing).&amp;lt;br/&amp;gt;Enabled with AHRS_GRAVITY_UPDATE_COORDINATED_TURN which is set by default for a fixedwing firmware.&lt;br /&gt;
** GPS based heading estimation: https://github.com/paparazzi/paparazzi/issues/130&lt;br /&gt;
Other flags of interest are:&lt;br /&gt;
* AHRS_PROPAGATE_LOW_PASS_RATES : apply a low pass filter on rotational velocity&lt;br /&gt;
* AHRS_MAG_UPDATE_ALL_AXES : use mag to also update roll/pitch and not only yaw (not recommended in most cases)&lt;br /&gt;
* AHRS_GRAVITY_HEURISTIC_FACTOR: Default is 30. Reduce accelerometer cut-off frequency when the vehicle is accelerating: norm(ax,ay,az) ~ 9,81 m/s2. WARNING: when the IMU is not well damped, the norm of accelerometers never equals to 9,81 m/s2. As a result, the GRAVITY_HEURISTIC_FACTOR will reduce the accelerometer bandwith even if the vehicle is not accelerating. Set AHRS_GRAVITY_HEURISTIC_FACTOR = 0 in case of vibrations&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;rotorcraft or fixedwing&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;float_cmpl_quat&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/subsystem&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;section name=&amp;quot;AHRS&amp;quot; prefix=&amp;quot;AHRS_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_X&amp;quot; value=&amp;quot; 0.51562740288882&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_Y&amp;quot; value=&amp;quot;-0.05707735220832&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_Z&amp;quot; value=&amp;quot; 0.85490967783446&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Also see the [[Subsystem/ahrs#Local_Magnetic_Field|Local Magnetic Field]] section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
No danger of [http://en.wikipedia.org/wiki/Gimbal_lock gimbal lock], since quaternions are used.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Suitable for fixedwings. Needs GPS!&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Suitable for rotorcraft if the magnetometer is calibrated.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The arithmetic is [http://en.wikipedia.org/wiki/Floating_point floating point] and is thus '''not''' suitable if the processor (on your board) has '''no''' [http://en.wikipedia.org/wiki/Floating_point_unit FPU].&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DCM (floating point) ===&lt;br /&gt;
* No direct gyro bias estimation, but also compensates for attitude drift.&lt;br /&gt;
* Uses GPS speed for heading.&lt;br /&gt;
* Compensation of centrifugal force via GPS speed (to fly in circles with a fixedwing).&lt;br /&gt;
* '''Careful, it doesn't handle all BODY_TO_IMU rotations (mounting positions) correctly!'''&lt;br /&gt;
&lt;br /&gt;
The algorithm was developed by William Premerlani and Paul Bizard. The theory can be found here: [[Media:DCMDraft2.pdf|DCMDraft2.pdf]]  The algorithm is also used in the AHRS systems of the AdruIMU.&lt;br /&gt;
The name DCM for the algorithm is really a misnomer, as that just means that the orientation is represented as a '''D'''irection'''C'''osine'''M'''atrix (rotation matrix). But since people already know it under that name, we kept it.&lt;br /&gt;
&lt;br /&gt;
Other flags of interest are:&lt;br /&gt;
*USE_MAGNETOMETER : use magnetometer to update yaw (UNTESTED. The magnetometer code has to be improved, since ferromagnetic materials affect the magnetic field. This is currently not implemented.)&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;float_dcm&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Complementary Euler (fixed point) ===&lt;br /&gt;
* Not recommended for fixedwings, as this filter doesn't compensate for centrifugal force when flying turns.&lt;br /&gt;
* Magnetometer is always only used for heading (yaw).&lt;br /&gt;
* '''Does not handle the accel and mag updates correctly if BODY_TO_IMU is used for more than just adjustment by a few degrees.'''&lt;br /&gt;
* In general, rather use ''[[Subsystem/ahrs#Complementary_Quaternion_.28fixed_point.29|int_cmpl_quat]]''&lt;br /&gt;
&lt;br /&gt;
Optional flags/defines are:&lt;br /&gt;
* FACE_REINJ_1 : defaults to 1024&lt;br /&gt;
* IMU_MAG_OFFSET : offset to subtract from the heading calculated by the magnetometer&lt;br /&gt;
* USE_NOISE_FILTER : apply a simple filter on the rate and accel inputs&lt;br /&gt;
* USE_NOISE_CUT : cut rate input at 1 rad/s and accel input at 20m/s²&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;int_cmpl_euler&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;section name=&amp;quot;MISC&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;FACE_REINJ_1&amp;quot; value=&amp;quot;1024&amp;quot;/&amp;gt; &amp;lt;!-- optional, defaults to 1024 --&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Possible danger of [http://en.wikipedia.org/wiki/Gimbal_lock gimbal lock], since quaternions are not used.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Repeat from above: '''Not''' suitable for fixedwings.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Suitable for rotorcraft. The magnetometer is used to determine the yaw and needs to be calibrated.&lt;br /&gt;
Recommended replacement: [[Subsystem/ahrs#Complementary_Quaternion_.28fixed_point.29|int_cmpl_quat]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The arithmetic is [http://en.wikipedia.org/wiki/Fixed-point_arithmetic fixed point] and is thus suitable if the processor (on your board) has no [http://en.wikipedia.org/wiki/Floating_point_unit FPU].&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Kalman Filter Quaternion ===&lt;br /&gt;
Multiplicative Linearized [http://en.wikipedia.org/wiki/Kalman_filter Kalman Filter] in quaternion formulation.&lt;br /&gt;
* Available in v5.0 and later&lt;br /&gt;
* Estimates the gyro bias.&lt;br /&gt;
* Uses magnetometer to update all 3 axes.&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;float_mlkf&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;section name=&amp;quot;AHRS&amp;quot; prefix=&amp;quot;AHRS_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_X&amp;quot; value=&amp;quot; 0.51562740288882&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_Y&amp;quot; value=&amp;quot;-0.05707735220832&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_Z&amp;quot; value=&amp;quot; 0.85490967783446&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Also see the [[Subsystem/ahrs#Local_Magnetic_Field|Local Magnetic Field]] section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
No danger of [http://en.wikipedia.org/wiki/Gimbal_lock gimbal lock], since quaternions are used.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Not''' suitable for fixedwings!&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Suitable for rotorcraft. The magnetometer is used and needs to be well calibrated.&lt;br /&gt;
Estimates attitude and heading. Does not use GPS.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The arithmetic is [http://en.wikipedia.org/wiki/Floating_point floating point] and is thus '''not''' suitable if the processor (on your board) has '''no''' [http://en.wikipedia.org/wiki/Floating_point_unit FPU].&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Infrared ===&lt;br /&gt;
For use with infrared sensors that detect aircraft attitude and the [[Module/infrared| infrared module]].&lt;br /&gt;
&lt;br /&gt;
== Local Magnetic Field ==&lt;br /&gt;
[[Image:Noaa_mag_data.png|thumb|right|200px|Screenshot of noaa page]]&lt;br /&gt;
[[Image:Normalised_mag_fields.png|thumb|right|200px|Screenshot of scilab page]]&lt;br /&gt;
'''This is needed if the magnetometer should be used !'''&amp;lt;br/&amp;gt;&lt;br /&gt;
Take also a look at [[ImuCalibration#Calibrating_for_the_Earth_magnetic_field| magnetometer calibration]] which should be done to increase accuracy !&lt;br /&gt;
&lt;br /&gt;
First the values of the local magnetic field vector are needed. They can be found at the states geological institute.&lt;br /&gt;
&lt;br /&gt;
USA [http://www.ngdc.noaa.gov/geomag-web/#igrfwmm ngdc.noaa.gov]&lt;br /&gt;
&lt;br /&gt;
Needed values are:&lt;br /&gt;
* north component (x)&lt;br /&gt;
* east component (y)&lt;br /&gt;
* vertical component (z)&lt;br /&gt;
&lt;br /&gt;
The vector components are in nanotesla (nT) but AHRS needs these values as a unit vector (the length of a unit vector is 1), so they need to be normalized.&lt;br /&gt;
&lt;br /&gt;
'''Convert them:'''&lt;br /&gt;
&lt;br /&gt;
Copy the north(x), east(y), and vertical(z) component values into scilab and execute &amp;quot;X/norm(X)&amp;quot; or run this in ipython:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=python&amp;gt;&lt;br /&gt;
import numpy as np&lt;br /&gt;
x = np.array([20875.1, 8480.2, -51279.8])&lt;br /&gt;
x/np.linalg.norm(x)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or enter this into [http://wolframalpha.com Wolfram Alpha]:&lt;br /&gt;
&amp;lt;source lang=python&amp;gt;&lt;br /&gt;
Normalize[{20875.1, 8480.2, -51279.8}]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lastly, enter the results into your airframe file as H_X, H_Y, and H_Z:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;section name=&amp;quot;AHRS&amp;quot; prefix=&amp;quot;AHRS_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_X&amp;quot; value=&amp;quot;0.372692&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_Y&amp;quot; value=&amp;quot;0.151401&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;H_Z&amp;quot; value=&amp;quot;-0.915521&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Update geomagnetic field vector based on GPS ===&lt;br /&gt;
You can also add the [http://docs.paparazziuav.org/latest/module__geo_mag.html geo_mag.xml module], which will update the normalized magnetic field at startup using GPS fix:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;modules&amp;gt;&lt;br /&gt;
    &amp;lt;load name=&amp;quot;geo_mag.xml&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Enabling External Sensors ==&lt;br /&gt;
&lt;br /&gt;
By default the AHRS algorithms will utilize onboard sensors. Paparazzi currently has support for external Magnetometers. In order to use an external sensor you must specify the ABI Message ID of the sensor.&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;float_cmpl_quat&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;AHRS_FC_MAG_ID&amp;quot; value=&amp;quot;MAG_HMC58XX_SENDER_ID&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/subsystem&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type !! AHRS_XXX_MAG_ID&lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ahrs#Complementary_Quaternion_.28fixed_point.29|int_cmpl_quat]]''' || AHRS_ICQ_MAG_ID &lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ahrs#Complementary_Quaternion.2FRotation_Matrix_.28floating_point.29|float_cmpl]]'''  || AHRS_FC_MAG_ID  &lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ahrs#DCM_.28floating_point.29|float_dcm]]''' || AHRS_DCM_MAG_ID &lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ahrs#Complementary_Euler_.28fixed_point.29|int_cmpl_euler]]'''  || AHRS_ICE_MAG_ID &lt;br /&gt;
|-&lt;br /&gt;
|'''[[Subsystem/ahrs#Kalman_Filter_Quaternion|float_mlkf]]''' || AHRS_MLKF_MAG_ID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:User_Documentation]] [[Category:Subsystems]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Radio_Control&amp;diff=21157</id>
		<title>Radio Control</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Radio_Control&amp;diff=21157"/>
		<updated>2016-04-18T14:01:31Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* PPM Radio Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== PPM Radio Configuration ==&lt;br /&gt;
&lt;br /&gt;
This XML file, usually located in the &amp;lt;tt&amp;gt;conf/radios&amp;lt;/tt&amp;gt; directory, contains a description of the radio control transmitter PPM signal. It should follow the grammar described in &amp;lt;tt&amp;gt;radio.dtd&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;'''CAUTION!'''&amp;lt;/span&amp;gt; &amp;lt;b&amp;gt;This is only used for receivers with PPM output, so it does not apply to receivers/satellites with serial output, e.g. SBus, Spektrum and [[SuperbitRF]].&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The contents are an '''ordered''' sequence of elements describing each channel with its name and its range:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;!DOCTYPE radio SYSTEM &amp;quot;radio.dtd&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;radio name=&amp;quot;cockpitMM&amp;quot; data_min=&amp;quot;900&amp;quot; data_max=&amp;quot;2100&amp;quot; sync_min =&amp;quot;5000&amp;quot; sync_max =&amp;quot;15000&amp;quot; pulse_type=&amp;quot;POSITIVE&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;D&amp;quot; function=&amp;quot;ROLL&amp;quot;     min=&amp;quot;2000&amp;quot; neutral=&amp;quot;1498&amp;quot; max=&amp;quot;1000&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;E&amp;quot; function=&amp;quot;MODE&amp;quot;     min=&amp;quot;2000&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1000&amp;quot; average=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;/radio&amp;gt;&amp;lt;/source&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The order of the channels must be the order of the pulses in the PPM signal.&lt;br /&gt;
&lt;br /&gt;
Among the top attributes, we find&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;: used only in debug traces.&lt;br /&gt;
* &amp;lt;tt&amp;gt;data_min&amp;lt;/tt&amp;gt; (resp. &amp;lt;tt&amp;gt;_max&amp;lt;/tt&amp;gt;): the minimum (resp. max) width (in microseconds) used to code one channel of the PPM signal.&lt;br /&gt;
* &amp;lt;tt&amp;gt;sync_min&amp;lt;/tt&amp;gt; (resp. &amp;lt;tt&amp;gt;_max&amp;lt;/tt&amp;gt;): the minimum (resp. max) width (in microseconds) between two impulses set of the PPM signal.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pulse_type&amp;lt;/tt&amp;gt;: the polarity of the PPM pulse. Can be either &amp;lt;tt&amp;gt;POSITIVE&amp;lt;/tt&amp;gt; (FUTABA, Hitec, Multiplex etc) or &amp;lt;tt&amp;gt;NEGATIVE&amp;lt;/tt&amp;gt; (JR, Graupner etc.).&amp;lt;br/&amp;gt;With &amp;lt;tt&amp;gt;POSITIVE&amp;lt;/tt&amp;gt; it will trigger on the rising flank to measure the time of the positive pulse, with &amp;lt;tt&amp;gt;NEGATIVE&amp;lt;/tt&amp;gt; on the falling flank (for a negative pulse width).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each channel is described with its transmitter name (&amp;lt;tt&amp;gt;ctl&amp;lt;/tt&amp;gt;), its &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; name, its range in microseconds and its neutral value in microseconds.&lt;br /&gt;
These values are used by the autopilot to compute a normalized input from the PPM signal (this file is preprocessed and the produced code is included in the airborne code). Note that the &amp;lt;tt&amp;gt;min&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;max&amp;lt;/tt&amp;gt; attributes can be exchanged to reverse the direction of the command.&lt;br /&gt;
&lt;br /&gt;
'''Wrong attributes of the &amp;quot;radio&amp;quot; element will prevent the decoder to recognize any PPM frame; same for a wrong number or channels.'''&lt;br /&gt;
&lt;br /&gt;
=== Number of channels ===&lt;br /&gt;
&lt;br /&gt;
Note that the number of channels in your radio file &amp;lt;b&amp;gt;must exactly match&amp;lt;/b&amp;gt; the number of channels in the ppm sum signal the autopilot receives.&amp;lt;br&amp;gt;&lt;br /&gt;
Also the ''function'' names must be unique.&lt;br /&gt;
&lt;br /&gt;
* in case of analog 35MHz receivers it is the RC - TRANSMITTER that makes the pulse train (receiver only does RF part) &lt;br /&gt;
** radio file depends on transmitter, you could swap to another receiver (and e.g. you can use a 4channel receiver to receive 9 pulses :-) )&lt;br /&gt;
* in case of digital receivers it is not the transmitter but the receiver that makes the pulses&lt;br /&gt;
** e.g. Futaba Fasst 6017: you can use any compatible transmitter without need to change the radio file&lt;br /&gt;
* in case of an encoder it is the encoder that makes the summed pulse&lt;br /&gt;
** if the encoder software makes 8 pulses, even with a 5 channel RC connected paparazzi will get 8: so the radio file should read 8&lt;br /&gt;
&lt;br /&gt;
This means if your transmitter sends for example a PPM18 (Graupner/JR) signal you have nine (9) different servo channels. Even if you use a receiver with less channels you must set up &amp;lt;b&amp;gt;all&amp;lt;/b&amp;gt; transmitting servos, even if you do not use them then you must use &amp;quot;bogus switches&amp;quot; related to functions. For example a six (6) servo channels out receiver with five (5) functions used in combination with a nine (9) servo channels transmitter would need four (4) bogus entries. (5 + 4 = 9)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;channel ctl=&amp;quot;NoneA&amp;quot;	              function=&amp;quot;NOTUSEDA&amp;quot;    	min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;channel ctl=&amp;quot;NoneB&amp;quot;	              function=&amp;quot;NOTUSEDB&amp;quot;    	min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;channel ctl=&amp;quot;NoneC&amp;quot;	              function=&amp;quot;NOTUSEDC&amp;quot;    	min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;channel ctl=&amp;quot;NoneD&amp;quot;	              function=&amp;quot;NOTUSEDD&amp;quot;    	min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;average&amp;lt;/tt&amp;gt; attribute must be set to '''1..x''' for ''discrete'' channels for which a trivial averaging filter will be applied. The neutral of a discrete channel need to be halfway through the min and max values. Otherwise it won't be mapped properly by the filter. Note that averaging a channel gives the output an additional small delay.&lt;br /&gt;
&lt;br /&gt;
== Direction ==&lt;br /&gt;
&lt;br /&gt;
The following signs have been used in the radio configuration files distributed in &amp;lt;tt&amp;gt;conf/radios&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* '''ROLL''': The &amp;lt;tt&amp;gt;min&amp;lt;/tt&amp;gt; attribute value stands for the right position of the stick (turning right)&lt;br /&gt;
* '''PITCH''': The &amp;lt;tt&amp;gt;max&amp;lt;/tt&amp;gt; attribute value stands for the up position of the stick (pitching up)&lt;br /&gt;
&lt;br /&gt;
''' From &amp;quot;v3.9&amp;quot; on this has been changed to follow standard aerospace conventions:'''&lt;br /&gt;
* '''ROLL''': The &amp;lt;tt&amp;gt;max&amp;lt;/tt&amp;gt; attribute value stands for the right position of the roll stick (banking right)&lt;br /&gt;
* '''PITCH''': The &amp;lt;tt&amp;gt;max&amp;lt;/tt&amp;gt; attribute value stands for the &amp;quot;up&amp;quot; position of the pitch stick pulled towards you (pitching up)&lt;br /&gt;
* '''YAW''': The &amp;lt;tt&amp;gt;max&amp;lt;/tt&amp;gt; attribute value stands for the right position of the yaw stick (yawing clock-wise)&lt;br /&gt;
&lt;br /&gt;
=== Practical test ===&lt;br /&gt;
In the RC message:&lt;br /&gt;
* when the ROLL stick is pulled to the right (aircraft banks right), you should see a value close to -MAX_PPRZ (-9600) in the ROLL channel&lt;br /&gt;
* When the PITCH stick is pulled (aircraft pitches up), you should see a value close to MAX_PPRZ (9600) in the PITCH channel&lt;br /&gt;
&lt;br /&gt;
''' From &amp;quot;v3.9&amp;quot; on this has been changed to follow standard aerospace conventions:'''&lt;br /&gt;
* when the ROLL stick is pulled to the right (aircraft banks right), you should see a value close to MAX_PPRZ (9600) in the ROLL channel&lt;br /&gt;
* When the PITCH stick is pulled (aircraft pitches up), you should see a value close to MAX_PPRZ (9600) in the PITCH channel&lt;br /&gt;
* When the YAW stick is pulled to the right (aircraft yawing clock-wise), you should see a value close to MAX_PPRZ (9600) in the YAW channel&lt;br /&gt;
&lt;br /&gt;
This works with all kind of radios (PPM, USB, 2.4GHz)&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Below you find an example of a radio file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
-- Attributes of root (Radio) tag :&lt;br /&gt;
-- name: name of RC&lt;br /&gt;
-- min: min width of a pulse to be considered as a data pulse&lt;br /&gt;
-- max: max width of a pulse to be considered as a data pulse&lt;br /&gt;
-- sync: min width of a pulse to be considered as a synchro pulse&lt;br /&gt;
-- min, max and sync are expressed in micro-seconds&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
-- Attributes of channel tag :&lt;br /&gt;
-- ctl: name of the command on the transmitter - only for displaying&lt;br /&gt;
-- function: logical command&lt;br /&gt;
-- average: (boolean) channel filtered through several frames (for discrete commands)&lt;br /&gt;
-- min: minimum pulse length (micro-seconds)&lt;br /&gt;
-- max: maximum pulse length (micro-seconds)&lt;br /&gt;
-- neutral: neutral pulse length (micro-seconds)&lt;br /&gt;
Note: a command may be reversed by exchanging min and max values&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;radio name=&amp;quot;GraupnerMC20&amp;quot; data_min=&amp;quot;950&amp;quot; data_max=&amp;quot;2150&amp;quot; sync_min=&amp;quot;5000&amp;quot; sync_max=&amp;quot;15000&amp;quot; pulse_type=&amp;quot;NEGATIVE&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;A&amp;quot; function=&amp;quot;THROTTLE&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1100&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt; &amp;lt;!-- left stick up/down --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;B&amp;quot; function=&amp;quot;ROLL&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;     &amp;lt;!-- right stick left/right --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;C&amp;quot; function=&amp;quot;PITCH&amp;quot; min=&amp;quot;1900&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1100&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;    &amp;lt;!-- right stick up/down --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;D&amp;quot; function=&amp;quot;YAW&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;	  &amp;lt;!-- left stick left/right--&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;E&amp;quot; function=&amp;quot;MODE&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;1&amp;quot;/&amp;gt;     &amp;lt;!-- left middle 3-pos switch --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;F&amp;quot; function=&amp;quot;GAIN1&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;    &amp;lt;!-- left slider prop channel --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;G&amp;quot; function=&amp;quot;GAIN2&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;    &amp;lt;!-- right slider prop channel --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;H&amp;quot; function=&amp;quot;SWITCH1&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;1&amp;quot;/&amp;gt;  &amp;lt;!-- switch (channel 8) --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;I&amp;quot; function=&amp;quot;UNUSED&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;1&amp;quot;/&amp;gt;   &amp;lt;!-- channel 9 is transmitted but cannot be controlled --&amp;gt;&lt;br /&gt;
&amp;lt;/radio&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PPM input to output chain ==&lt;br /&gt;
The chain from ppm input to servo output has intermediate steps and roughly looks like this:&lt;br /&gt;
&lt;br /&gt;
ppm input --(radio.xml)--&amp;gt; ppm_pulses[] --(radio.xml)--&amp;gt; radio_control.values[] --([[Fixedwing_Configuration#Manual|rc_commands]])--&amp;gt; commands[] --([[Fixedwing_Configuration#Servos|command_laws,servos]])--&amp;gt; actuators_pwm_values[]  ppm out&lt;br /&gt;
&lt;br /&gt;
Written in parenthesis is where you configure how to transform one value into the other.&lt;br /&gt;
&lt;br /&gt;
So in a simple case without fancy mixing, e.g. looking at the roll command / aileron servo while in MANUAL mode:&lt;br /&gt;
#PPM sum signal is read and split into channels as specified in your radio xml file.&amp;lt;br/&amp;gt;It does some sanity checking on the pulse length and frame lenght according to the top attributes in that file.&amp;lt;br/&amp;gt;This is written to the ppm_pulses array, where you now have the length of the pulse in system ticks.&lt;br /&gt;
#Now these get converted to radio_control.values array according to the channels in your radio xml file.&amp;lt;br/&amp;gt;They get scaled to MAX_PPRZ (9600), meaning what you specified as max is 9600, neutral is 0, etc.&amp;lt;br/&amp;gt;radio_control.values[RADIO_ROLL] now has the value 9600 if the pulse width of that channels was &amp;quot;max&amp;quot;&lt;br /&gt;
#Mapping of RC commands to the actual commands as specified in rc_commands section.&amp;lt;br/&amp;gt;In your case simply copy radio_control.values[RADIO_ROLL] to commands[COMMAND_ROLL]&lt;br /&gt;
#Applying command_laws (mixing) to get the commands for each servo.&amp;lt;br/&amp;gt;Again just copying in your case...&lt;br /&gt;
#Scaling from commands with MAX_PPRZ scale to the actual pwm output signal according to the servos section.&lt;br /&gt;
&lt;br /&gt;
== Measuring the PPM time values ==&lt;br /&gt;
&lt;br /&gt;
[[Image:RC_Receiver_Timing_Diagram.jpg|thumb|R/C receiver timing diagram]]&lt;br /&gt;
&lt;br /&gt;
There are two common ways to measure the time characteristics of the PPM signal:&lt;br /&gt;
# Using an oscilloscope: easy to achieve with a high level digital scope with capture and measure facilities.&lt;br /&gt;
# Using the telemetry of the autopilot: the '''PPM''' message (defined in &amp;lt;tt&amp;gt;conf/messages.xml&amp;lt;/tt&amp;gt;) contains the sequence of a (recently) received PPM signal.&lt;br /&gt;
&lt;br /&gt;
With the default telemetry configuration file (&amp;lt;tt&amp;gt;conf/telemetry/default_fixedwing.xml&amp;lt;/tt&amp;gt;), this message is '''not''' sent in the '''default''' fbw telemetry mode (numbered 0).&lt;br /&gt;
&lt;br /&gt;
There are two ways to enable this message:&lt;br /&gt;
* Use the settings mechanism to change the FBW telemetry mode while the autopilot is already running:&amp;lt;br/&amp;gt;In the GCS: Settings -&amp;gt; telemetry -&amp;gt; tele_FBW -&amp;gt; set to debug (1)&lt;br /&gt;
* This mode can be permanently changed to '''debug''' (numbered 1) in the airframe file by setting the '''TELEMETRY_MODE_FBW''' constant in your firmware section: &lt;br /&gt;
  &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;define name=&amp;quot;TELEMETRY_MODE_FBW&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Since &amp;quot;v3.9&amp;quot; the values in the PPM message are in µs.'''&lt;br /&gt;
&lt;br /&gt;
Before &amp;quot;v3.9&amp;quot; the time unit used in this '''PPM''' message was hardware dependent:&lt;br /&gt;
* On the obsolete AVR hardware, 1 microsecond = 16 units (because the crystal is running at 16MHz)&lt;br /&gt;
* on the LPC hardware, 1 microsecond = 15 units (because the cristal is running at 12MHz)&lt;br /&gt;
*:(&amp;lt;tt&amp;gt;conf/autopilot/tiny.h&amp;lt;/tt&amp;gt;), the CPU clock is 5 times more, the peripheral bus is 4 times less, and the timer is not prescaled (&amp;lt;tt&amp;gt;sw/airborne/arch/lpc21/mcu_periph/sys_time_arch.h&amp;lt;/tt&amp;gt;) !!!)&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
&lt;br /&gt;
If one has a good servo tester the output values at the receiver side can be measured&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Radio_Control&amp;diff=21156</id>
		<title>Radio Control</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Radio_Control&amp;diff=21156"/>
		<updated>2016-04-18T14:01:19Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* PPM Radio Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== PPM Radio Configuration ==&lt;br /&gt;
&lt;br /&gt;
This XML file, usually located in the &amp;lt;tt&amp;gt;conf/radios&amp;lt;/tt&amp;gt; directory, contains a description of the radio control transmitter PPM signal. It should follow the grammar described in &amp;lt;tt&amp;gt;radio.dtd&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;'''CAUTION!'''&amp;lt;/span&amp;gt; &amp;lt;b&amp;gt;This is only used for receivers with PPM output, so it does not apply to receivers/satellites with serial output, e.g. SBus, Spektrum and[[SuperbitRF]].&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The contents are an '''ordered''' sequence of elements describing each channel with its name and its range:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;!DOCTYPE radio SYSTEM &amp;quot;radio.dtd&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;radio name=&amp;quot;cockpitMM&amp;quot; data_min=&amp;quot;900&amp;quot; data_max=&amp;quot;2100&amp;quot; sync_min =&amp;quot;5000&amp;quot; sync_max =&amp;quot;15000&amp;quot; pulse_type=&amp;quot;POSITIVE&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;D&amp;quot; function=&amp;quot;ROLL&amp;quot;     min=&amp;quot;2000&amp;quot; neutral=&amp;quot;1498&amp;quot; max=&amp;quot;1000&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;E&amp;quot; function=&amp;quot;MODE&amp;quot;     min=&amp;quot;2000&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1000&amp;quot; average=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;/radio&amp;gt;&amp;lt;/source&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The order of the channels must be the order of the pulses in the PPM signal.&lt;br /&gt;
&lt;br /&gt;
Among the top attributes, we find&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;: used only in debug traces.&lt;br /&gt;
* &amp;lt;tt&amp;gt;data_min&amp;lt;/tt&amp;gt; (resp. &amp;lt;tt&amp;gt;_max&amp;lt;/tt&amp;gt;): the minimum (resp. max) width (in microseconds) used to code one channel of the PPM signal.&lt;br /&gt;
* &amp;lt;tt&amp;gt;sync_min&amp;lt;/tt&amp;gt; (resp. &amp;lt;tt&amp;gt;_max&amp;lt;/tt&amp;gt;): the minimum (resp. max) width (in microseconds) between two impulses set of the PPM signal.&lt;br /&gt;
* &amp;lt;tt&amp;gt;pulse_type&amp;lt;/tt&amp;gt;: the polarity of the PPM pulse. Can be either &amp;lt;tt&amp;gt;POSITIVE&amp;lt;/tt&amp;gt; (FUTABA, Hitec, Multiplex etc) or &amp;lt;tt&amp;gt;NEGATIVE&amp;lt;/tt&amp;gt; (JR, Graupner etc.).&amp;lt;br/&amp;gt;With &amp;lt;tt&amp;gt;POSITIVE&amp;lt;/tt&amp;gt; it will trigger on the rising flank to measure the time of the positive pulse, with &amp;lt;tt&amp;gt;NEGATIVE&amp;lt;/tt&amp;gt; on the falling flank (for a negative pulse width).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each channel is described with its transmitter name (&amp;lt;tt&amp;gt;ctl&amp;lt;/tt&amp;gt;), its &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; name, its range in microseconds and its neutral value in microseconds.&lt;br /&gt;
These values are used by the autopilot to compute a normalized input from the PPM signal (this file is preprocessed and the produced code is included in the airborne code). Note that the &amp;lt;tt&amp;gt;min&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;max&amp;lt;/tt&amp;gt; attributes can be exchanged to reverse the direction of the command.&lt;br /&gt;
&lt;br /&gt;
'''Wrong attributes of the &amp;quot;radio&amp;quot; element will prevent the decoder to recognize any PPM frame; same for a wrong number or channels.'''&lt;br /&gt;
&lt;br /&gt;
=== Number of channels ===&lt;br /&gt;
&lt;br /&gt;
Note that the number of channels in your radio file &amp;lt;b&amp;gt;must exactly match&amp;lt;/b&amp;gt; the number of channels in the ppm sum signal the autopilot receives.&amp;lt;br&amp;gt;&lt;br /&gt;
Also the ''function'' names must be unique.&lt;br /&gt;
&lt;br /&gt;
* in case of analog 35MHz receivers it is the RC - TRANSMITTER that makes the pulse train (receiver only does RF part) &lt;br /&gt;
** radio file depends on transmitter, you could swap to another receiver (and e.g. you can use a 4channel receiver to receive 9 pulses :-) )&lt;br /&gt;
* in case of digital receivers it is not the transmitter but the receiver that makes the pulses&lt;br /&gt;
** e.g. Futaba Fasst 6017: you can use any compatible transmitter without need to change the radio file&lt;br /&gt;
* in case of an encoder it is the encoder that makes the summed pulse&lt;br /&gt;
** if the encoder software makes 8 pulses, even with a 5 channel RC connected paparazzi will get 8: so the radio file should read 8&lt;br /&gt;
&lt;br /&gt;
This means if your transmitter sends for example a PPM18 (Graupner/JR) signal you have nine (9) different servo channels. Even if you use a receiver with less channels you must set up &amp;lt;b&amp;gt;all&amp;lt;/b&amp;gt; transmitting servos, even if you do not use them then you must use &amp;quot;bogus switches&amp;quot; related to functions. For example a six (6) servo channels out receiver with five (5) functions used in combination with a nine (9) servo channels transmitter would need four (4) bogus entries. (5 + 4 = 9)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;channel ctl=&amp;quot;NoneA&amp;quot;	              function=&amp;quot;NOTUSEDA&amp;quot;    	min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;channel ctl=&amp;quot;NoneB&amp;quot;	              function=&amp;quot;NOTUSEDB&amp;quot;    	min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;channel ctl=&amp;quot;NoneC&amp;quot;	              function=&amp;quot;NOTUSEDC&amp;quot;    	min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;channel ctl=&amp;quot;NoneD&amp;quot;	              function=&amp;quot;NOTUSEDD&amp;quot;    	min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Averaging ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;average&amp;lt;/tt&amp;gt; attribute must be set to '''1..x''' for ''discrete'' channels for which a trivial averaging filter will be applied. The neutral of a discrete channel need to be halfway through the min and max values. Otherwise it won't be mapped properly by the filter. Note that averaging a channel gives the output an additional small delay.&lt;br /&gt;
&lt;br /&gt;
== Direction ==&lt;br /&gt;
&lt;br /&gt;
The following signs have been used in the radio configuration files distributed in &amp;lt;tt&amp;gt;conf/radios&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* '''ROLL''': The &amp;lt;tt&amp;gt;min&amp;lt;/tt&amp;gt; attribute value stands for the right position of the stick (turning right)&lt;br /&gt;
* '''PITCH''': The &amp;lt;tt&amp;gt;max&amp;lt;/tt&amp;gt; attribute value stands for the up position of the stick (pitching up)&lt;br /&gt;
&lt;br /&gt;
''' From &amp;quot;v3.9&amp;quot; on this has been changed to follow standard aerospace conventions:'''&lt;br /&gt;
* '''ROLL''': The &amp;lt;tt&amp;gt;max&amp;lt;/tt&amp;gt; attribute value stands for the right position of the roll stick (banking right)&lt;br /&gt;
* '''PITCH''': The &amp;lt;tt&amp;gt;max&amp;lt;/tt&amp;gt; attribute value stands for the &amp;quot;up&amp;quot; position of the pitch stick pulled towards you (pitching up)&lt;br /&gt;
* '''YAW''': The &amp;lt;tt&amp;gt;max&amp;lt;/tt&amp;gt; attribute value stands for the right position of the yaw stick (yawing clock-wise)&lt;br /&gt;
&lt;br /&gt;
=== Practical test ===&lt;br /&gt;
In the RC message:&lt;br /&gt;
* when the ROLL stick is pulled to the right (aircraft banks right), you should see a value close to -MAX_PPRZ (-9600) in the ROLL channel&lt;br /&gt;
* When the PITCH stick is pulled (aircraft pitches up), you should see a value close to MAX_PPRZ (9600) in the PITCH channel&lt;br /&gt;
&lt;br /&gt;
''' From &amp;quot;v3.9&amp;quot; on this has been changed to follow standard aerospace conventions:'''&lt;br /&gt;
* when the ROLL stick is pulled to the right (aircraft banks right), you should see a value close to MAX_PPRZ (9600) in the ROLL channel&lt;br /&gt;
* When the PITCH stick is pulled (aircraft pitches up), you should see a value close to MAX_PPRZ (9600) in the PITCH channel&lt;br /&gt;
* When the YAW stick is pulled to the right (aircraft yawing clock-wise), you should see a value close to MAX_PPRZ (9600) in the YAW channel&lt;br /&gt;
&lt;br /&gt;
This works with all kind of radios (PPM, USB, 2.4GHz)&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Below you find an example of a radio file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
-- Attributes of root (Radio) tag :&lt;br /&gt;
-- name: name of RC&lt;br /&gt;
-- min: min width of a pulse to be considered as a data pulse&lt;br /&gt;
-- max: max width of a pulse to be considered as a data pulse&lt;br /&gt;
-- sync: min width of a pulse to be considered as a synchro pulse&lt;br /&gt;
-- min, max and sync are expressed in micro-seconds&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
-- Attributes of channel tag :&lt;br /&gt;
-- ctl: name of the command on the transmitter - only for displaying&lt;br /&gt;
-- function: logical command&lt;br /&gt;
-- average: (boolean) channel filtered through several frames (for discrete commands)&lt;br /&gt;
-- min: minimum pulse length (micro-seconds)&lt;br /&gt;
-- max: maximum pulse length (micro-seconds)&lt;br /&gt;
-- neutral: neutral pulse length (micro-seconds)&lt;br /&gt;
Note: a command may be reversed by exchanging min and max values&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;radio name=&amp;quot;GraupnerMC20&amp;quot; data_min=&amp;quot;950&amp;quot; data_max=&amp;quot;2150&amp;quot; sync_min=&amp;quot;5000&amp;quot; sync_max=&amp;quot;15000&amp;quot; pulse_type=&amp;quot;NEGATIVE&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;A&amp;quot; function=&amp;quot;THROTTLE&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1100&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt; &amp;lt;!-- left stick up/down --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;B&amp;quot; function=&amp;quot;ROLL&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;     &amp;lt;!-- right stick left/right --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;C&amp;quot; function=&amp;quot;PITCH&amp;quot; min=&amp;quot;1900&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1100&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;    &amp;lt;!-- right stick up/down --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;D&amp;quot; function=&amp;quot;YAW&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;	  &amp;lt;!-- left stick left/right--&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;E&amp;quot; function=&amp;quot;MODE&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;1&amp;quot;/&amp;gt;     &amp;lt;!-- left middle 3-pos switch --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;F&amp;quot; function=&amp;quot;GAIN1&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;    &amp;lt;!-- left slider prop channel --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;G&amp;quot; function=&amp;quot;GAIN2&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;0&amp;quot;/&amp;gt;    &amp;lt;!-- right slider prop channel --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;H&amp;quot; function=&amp;quot;SWITCH1&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;1&amp;quot;/&amp;gt;  &amp;lt;!-- switch (channel 8) --&amp;gt;&lt;br /&gt;
  &amp;lt;channel ctl=&amp;quot;I&amp;quot; function=&amp;quot;UNUSED&amp;quot; min=&amp;quot;1100&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1900&amp;quot; average=&amp;quot;1&amp;quot;/&amp;gt;   &amp;lt;!-- channel 9 is transmitted but cannot be controlled --&amp;gt;&lt;br /&gt;
&amp;lt;/radio&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== PPM input to output chain ==&lt;br /&gt;
The chain from ppm input to servo output has intermediate steps and roughly looks like this:&lt;br /&gt;
&lt;br /&gt;
ppm input --(radio.xml)--&amp;gt; ppm_pulses[] --(radio.xml)--&amp;gt; radio_control.values[] --([[Fixedwing_Configuration#Manual|rc_commands]])--&amp;gt; commands[] --([[Fixedwing_Configuration#Servos|command_laws,servos]])--&amp;gt; actuators_pwm_values[]  ppm out&lt;br /&gt;
&lt;br /&gt;
Written in parenthesis is where you configure how to transform one value into the other.&lt;br /&gt;
&lt;br /&gt;
So in a simple case without fancy mixing, e.g. looking at the roll command / aileron servo while in MANUAL mode:&lt;br /&gt;
#PPM sum signal is read and split into channels as specified in your radio xml file.&amp;lt;br/&amp;gt;It does some sanity checking on the pulse length and frame lenght according to the top attributes in that file.&amp;lt;br/&amp;gt;This is written to the ppm_pulses array, where you now have the length of the pulse in system ticks.&lt;br /&gt;
#Now these get converted to radio_control.values array according to the channels in your radio xml file.&amp;lt;br/&amp;gt;They get scaled to MAX_PPRZ (9600), meaning what you specified as max is 9600, neutral is 0, etc.&amp;lt;br/&amp;gt;radio_control.values[RADIO_ROLL] now has the value 9600 if the pulse width of that channels was &amp;quot;max&amp;quot;&lt;br /&gt;
#Mapping of RC commands to the actual commands as specified in rc_commands section.&amp;lt;br/&amp;gt;In your case simply copy radio_control.values[RADIO_ROLL] to commands[COMMAND_ROLL]&lt;br /&gt;
#Applying command_laws (mixing) to get the commands for each servo.&amp;lt;br/&amp;gt;Again just copying in your case...&lt;br /&gt;
#Scaling from commands with MAX_PPRZ scale to the actual pwm output signal according to the servos section.&lt;br /&gt;
&lt;br /&gt;
== Measuring the PPM time values ==&lt;br /&gt;
&lt;br /&gt;
[[Image:RC_Receiver_Timing_Diagram.jpg|thumb|R/C receiver timing diagram]]&lt;br /&gt;
&lt;br /&gt;
There are two common ways to measure the time characteristics of the PPM signal:&lt;br /&gt;
# Using an oscilloscope: easy to achieve with a high level digital scope with capture and measure facilities.&lt;br /&gt;
# Using the telemetry of the autopilot: the '''PPM''' message (defined in &amp;lt;tt&amp;gt;conf/messages.xml&amp;lt;/tt&amp;gt;) contains the sequence of a (recently) received PPM signal.&lt;br /&gt;
&lt;br /&gt;
With the default telemetry configuration file (&amp;lt;tt&amp;gt;conf/telemetry/default_fixedwing.xml&amp;lt;/tt&amp;gt;), this message is '''not''' sent in the '''default''' fbw telemetry mode (numbered 0).&lt;br /&gt;
&lt;br /&gt;
There are two ways to enable this message:&lt;br /&gt;
* Use the settings mechanism to change the FBW telemetry mode while the autopilot is already running:&amp;lt;br/&amp;gt;In the GCS: Settings -&amp;gt; telemetry -&amp;gt; tele_FBW -&amp;gt; set to debug (1)&lt;br /&gt;
* This mode can be permanently changed to '''debug''' (numbered 1) in the airframe file by setting the '''TELEMETRY_MODE_FBW''' constant in your firmware section: &lt;br /&gt;
  &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;define name=&amp;quot;TELEMETRY_MODE_FBW&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Since &amp;quot;v3.9&amp;quot; the values in the PPM message are in µs.'''&lt;br /&gt;
&lt;br /&gt;
Before &amp;quot;v3.9&amp;quot; the time unit used in this '''PPM''' message was hardware dependent:&lt;br /&gt;
* On the obsolete AVR hardware, 1 microsecond = 16 units (because the crystal is running at 16MHz)&lt;br /&gt;
* on the LPC hardware, 1 microsecond = 15 units (because the cristal is running at 12MHz)&lt;br /&gt;
*:(&amp;lt;tt&amp;gt;conf/autopilot/tiny.h&amp;lt;/tt&amp;gt;), the CPU clock is 5 times more, the peripheral bus is 4 times less, and the timer is not prescaled (&amp;lt;tt&amp;gt;sw/airborne/arch/lpc21/mcu_periph/sys_time_arch.h&amp;lt;/tt&amp;gt;) !!!)&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
&lt;br /&gt;
If one has a good servo tester the output values at the receiver side can be measured&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Simulation&amp;diff=21155</id>
		<title>Simulation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Simulation&amp;diff=21155"/>
		<updated>2016-04-17T10:47:42Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Available Simulators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Simulation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
This page describes the steps needed to run a simulated flight with an UAS.&lt;br /&gt;
&lt;br /&gt;
== Available Simulators ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi currently has two different simulator targets with different degrees of realism and intended purpose:&lt;br /&gt;
&lt;br /&gt;
# '''sim''': The basic fixedwing simulator written in OCaml without IMU simulation or any sensor models (noise, bias, etc) and mainly intended to test [[Flight_Plans|flight plan]] logic.&lt;br /&gt;
# '''nps''': [[NPS]] is a more advanced rotorcraft and fixedwing simulator with sensor models and commonly uses [[JSBSim]] as FDM ('''F'''light '''D'''ynamic '''M'''odel). Other FDM's can be integrated easily. At the moment CRRCSIM, YASIM and JSBSIM are tried as FDM backend.&lt;br /&gt;
&lt;br /&gt;
A FDM is a set of mathematical equations used to calculate the physical forces acting on a simulated aircraft, such as thrust, lift, and drag.&lt;br /&gt;
&lt;br /&gt;
== Compiling and starting ==&lt;br /&gt;
&lt;br /&gt;
'''This describes the basic fixedwing sim, for rotorcraft or advanced fixedwing simulation, see [[NPS]].'''&lt;br /&gt;
&lt;br /&gt;
From the [[Paparazzi_Center|Paparazzi Center]] select the Microjet aircraft (from the '''A/C''' combo box) which is configured with the &amp;lt;tt&amp;gt;basic.xml&amp;lt;/tt&amp;gt; flight plan. From the '''Target''' combo box, select &amp;lt;tt&amp;gt;sim&amp;lt;/tt&amp;gt; and click the '''Build''' button to compile the airbone code to be run on your Linux box. From the '''Session''' combo box, select &amp;lt;tt&amp;gt;Simulation&amp;lt;/tt&amp;gt; entry and click '''Execute''' to start the simulation. It will start &lt;br /&gt;
three processes which are listed in the window below:&lt;br /&gt;
* '''Microjet''' is the interface of a simulator program. It runs the same code as the one for the autopilot processor plus a rudimentary flight dynamic model. it allows you to test the interactions with the UAV and the flight plan execution.&lt;br /&gt;
* '''GCS''' ([[GCS|Ground Control Station]]) is the main window. It displays the track of the aircraft, as well as informations about the execution of its flight plans. This program provide menus for the datalink functions and is able to edit a flight plan.&lt;br /&gt;
* '''Server''' is a hidden process which won't be described here (see [[Overview|the architecture of the system]])&lt;br /&gt;
&lt;br /&gt;
== Start the Simulation ==&lt;br /&gt;
&lt;br /&gt;
The aircraft has automatically been booted, as if the autopilot board had been powered. Its position and its flight parameters are displayed in the GCS window. If you omit the -boot option of the sim the aircraft is not automatically booted and you can first place the aircraft where you want it to start from and then boot.&lt;br /&gt;
&lt;br /&gt;
The map widget is able use many map formats and display them according to many projections. To make things simple, we start by using images from [http://maps.google.com Google]. From the toolbar in the top right corner of the GCS, click the Google Earth icon ('''Google maps fill'''). The program attempts to download the required satellite images from the Google servers. If it succeeds, you should now see the nice countryside of Muret (a city close to Toulouse, France). Navigation and other features of the map are described on the [[GCS#map|GCS]] page.&lt;br /&gt;
&lt;br /&gt;
The lower part of the GCS displays the flight plan in a tree view. You see that the current flight plan is composed of several ''blocks'':&lt;br /&gt;
* '''wait GPS''' and '''geo init''' which are instructions to run this flight plan anywhere in the world, by translating the waypoints around the current location of aircraft as soon as it is reported by the GPS.&lt;br /&gt;
* '''Holding point''' (it  should be the current active block) which instructs the autopilot to wait for launch.  &lt;br /&gt;
* '''Takeoff''' which will instruct the aircraft to climb full throttle to a security altitude&lt;br /&gt;
* '''Standby''' which is a simple circle around the '''STDBY''' waypoint.&lt;br /&gt;
&lt;br /&gt;
Switch to the '''Takeoff''' block by a double click on the line or using the corresponding button (an icon figuring an airway) on the left side of the strip.&lt;br /&gt;
&lt;br /&gt;
== Fly ==&lt;br /&gt;
&lt;br /&gt;
In the Simulator ('''Microjet''' window), press the '''Launch''' button to simulate a hand launch or click the launch button in the GCS (the green aircraft icon). The autopilot detects the launch by monitoring the groundspeed. The flight time (in the aircraft label on the GCS) then starts to count.&lt;br /&gt;
&lt;br /&gt;
Position of the aircraft is displayed on the map: the aircraft goes to the '''CLIMB''' waypoint (to the norht-west) and then around the '''STDBY''' waypoint. Current block also changes accordingly in the flight plan display.&lt;br /&gt;
&lt;br /&gt;
The orange triangle (the carrot) on the map is the point that the aircraft is navigating toward.&lt;br /&gt;
&lt;br /&gt;
== Line ==&lt;br /&gt;
&lt;br /&gt;
Jump to this block with double-click on the &amp;lt;tt&amp;gt;Line 1-2&amp;lt;/tt&amp;gt; line in the flight plan or using the corresponding button in the strip (figuring a blue line between two white points). The aircraft will try to follow a line joining the waypoints '''1''' and '''2''', doing nice U-turns at both ends.&lt;br /&gt;
&lt;br /&gt;
=== Move waypoints ===&lt;br /&gt;
&lt;br /&gt;
While the aircraft is flying (or here while the simulator is integrating differential equations), you can move the waypoints on the GCS interface by cliking and dragging (with the left button). When the mouse button is released, a popup window allows you to change the altitude of the waypoint. After validation, the waypoint changes are sent to the autopilot and the followed track is changed accordingly.&lt;br /&gt;
&lt;br /&gt;
=== Coming back around ===&lt;br /&gt;
&lt;br /&gt;
Select the '''Standby''' block (the ''home'' blue icon) to instruct the aircraft to fly around the '''STDBY''' waypoint.&lt;br /&gt;
&lt;br /&gt;
== Fly too far ==&lt;br /&gt;
&lt;br /&gt;
If you unzoom the map (using the PageDown key or he mouse wheel), you will see a large circle around the waypoints. This circle show the allowed flying zone that the autopilot must not leave or it will enter an emergency navigation mode and circles the '''HOME''' waypoint until the further direction is received.&lt;br /&gt;
&lt;br /&gt;
Move the waypoint '''2''' out of this circle (close to the circle in the north-east corner) and switch back to the 'Line 1-2''' block to force the plane to get out of this safety zone.&lt;br /&gt;
&lt;br /&gt;
The aircraft flies to the '''2''' waypoint, cross the protection enveloppe and switches to ''home'' mode: the AP mode in the aircraft strip switches from '''AUTO2''' to '''HOME'''.&lt;br /&gt;
&lt;br /&gt;
To get out of this mode and switch back to the default '''AUTO2''', click on the '''AUTO2''' button in the aircraft strip. The aircraft then flies again towards '''too far''' and again swithes to '''HOME''' mode.&lt;br /&gt;
&lt;br /&gt;
== Change the environment ==&lt;br /&gt;
&lt;br /&gt;
Launch the '''Environment Simulator''' from the '''Tools' menu in the '''Paparazzi Center'''.&lt;br /&gt;
&lt;br /&gt;
[[file:PPRZ_Environment_settings_Gaia_GUI.png]]&lt;br /&gt;
&lt;br /&gt;
This interface, also known as '''Gaia''', allows the user to change:&lt;br /&gt;
&lt;br /&gt;
* The time-scale: This make the simulation of the flight speed up time, good if you have a extensive flightpland and you do not want to wait the real time it would taketo fly the aircraft in a real life flight. It is best not use a times-cale higher than 2x for a first tryout.&lt;br /&gt;
* The Wind speed: Set the wind speed while simulating. Try to set it to e.g. 5m/s and observe the trajectory and the speed evolution in the aircraft strip and in the '''PFD''' page of the notebook&lt;br /&gt;
* The Wind direction: Set the direction the wind comse from. For fun try to take of with stong wind from the side.&lt;br /&gt;
* A GPS failure: Simulate GPS loss on the aircraft ('''GPS OFF''') and observe the resulting mode ('''NO_GPS''') and trajectory. In this mode, the autopilot can for example use a the failsafe roll, pitch and throttle settings defined in the airframe file. Note that in a real flight, an aircraft without GPS won't be able to send it's position ... The simulation is cheating here! It must, otherwise not possible to show the path in the simulator ofcourse.&lt;br /&gt;
&lt;br /&gt;
Environment Simulator, Gaia can aslo be started with initial values set by commandline option. &lt;br /&gt;
&lt;br /&gt;
   -b Bus Default is 127.255.255.255:2010&lt;br /&gt;
   -t Set time scale (default: 1.0)&lt;br /&gt;
   -w Set wind speed (0-30m/s)&lt;br /&gt;
   -d Set wind direction 0-359 deg&lt;br /&gt;
   -g Turn off GPS&lt;br /&gt;
   -help  Display this list of options&lt;br /&gt;
   --help  Display this list of options&lt;br /&gt;
&lt;br /&gt;
If you are in the testfield and forgot the parameters, just use the &amp;quot;help&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 $ ./gaia --help&lt;br /&gt;
&lt;br /&gt;
This make testing more convieniet since on can save a session with this parameters and on restart imidately have the same settings again.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Starting gaia with the following parameters on the command line:&lt;br /&gt;
&lt;br /&gt;
 $ sw/simulator/gaia -t 3 -d 340 -w 11&lt;br /&gt;
&lt;br /&gt;
This sets a 3x speedup of the time with wind coming from 340 degrees with a windspeed of 11m/s&lt;br /&gt;
&lt;br /&gt;
== Other navigation patterns ==&lt;br /&gt;
&lt;br /&gt;
Using the buttons in the strip, you can play with other navigation patterns: figure of eights, oval, survey of a rectangle (with a north-south sweeping), ''Circle around here'' (which sets a waypoint to the current location of the plane and flies a circle around).&lt;br /&gt;
&lt;br /&gt;
== Landing ==&lt;br /&gt;
&lt;br /&gt;
To automatically land the aircraft:&lt;br /&gt;
* Set the '''TD''' (Touch Down) waypoint where you want to land. Be sure that the waypoint is on the ground (185m in Muret)&lt;br /&gt;
* Set the '''AF''' (Approach Fix) waypoint where you want to start the final descent (the ''glide''). If you have set some wind with Gaia, you probably want to fly '''AF-TD''' upwind (an estimation of the wind experienced by the aircraft is displayed in the left-upper corner of the map).&lt;br /&gt;
* Switch to the '''Land right''' or the '''Land left''' block (icons in the strip) according to the direction of the last turn you want to do (for example, if '''AF''' is on the east side of '''TD''' and you want to maneuvre from the north, choose a '''Land right''') &lt;br /&gt;
&lt;br /&gt;
== Multiple UAV Simulation ==&lt;br /&gt;
&lt;br /&gt;
To simulate multiple aircrafts, you just have to launch a second simulator (tools-&amp;gt;simulator, then -a yourairframe) and the server and the GCS should take care of the rest.&lt;br /&gt;
&lt;br /&gt;
== View the simulation in Flight Gear ==&lt;br /&gt;
&lt;br /&gt;
To view the simulation in [[FlightGear]], do the following:&lt;br /&gt;
* [[FlightGear|install Flight Gear]]&lt;br /&gt;
* In Paparazzi Center, add the option &amp;lt;tt&amp;gt;--fg_host 127.0.0.1&amp;lt;/tt&amp;gt; (replace the IP address if FG is running on another host as appropriate) to the Simulator line and restart it, e.g.:&lt;br /&gt;
 &amp;lt;path_to_paparazzi&amp;gt;/sw/simulator/pprzsim-launch --aircraft &amp;lt;your_ac_name&amp;gt; -t sim --boot --norc --fg_host 127.0.0.1&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
Prior to '''v5.0''' launchsitl was used instead of pprzsim-launch. Click expand to see the details.&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;path_to_paparazzi&amp;gt;/sw/simulator/launchsitl -a &amp;lt;your_ac_name&amp;gt; -boot -norc -fg 127.0.0.1&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
* Launch Flight Gear with the following command:&lt;br /&gt;
 fgfs --fdm=null --native-gui=socket,in,30,,5501,udp&lt;br /&gt;
&lt;br /&gt;
=== Old version ===&lt;br /&gt;
For Flight Gear visualization, version 2.12 or greater with rembrand visualisation options switched on is the nicest. If you wish to use a very old version, Flightgear v2.4 or lower, you must add the following to the firmware section of your airframe file:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
     &amp;lt;define name=&amp;quot;FG_2_4&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Simulation]] [[Category:Software]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Talk:Telemetry&amp;diff=21114</id>
		<title>Talk:Telemetry</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Talk:Telemetry&amp;diff=21114"/>
		<updated>2016-03-16T19:21:29Z</updated>

		<summary type="html">&lt;p&gt;Flixr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The add messages section seems to be out dated for version 5.8. The AIRSPEED messages are already implemented. I tried to get this working for a module I made following the instructions but it did not work. I think they need to be updated. Also the &amp;quot;find_free_msg_id.out&amp;quot; was replaced by *.ml script which I could not use. --[[User:Lethargi|Lethargi]]&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
  cd sw/tools&lt;br /&gt;
  make&lt;br /&gt;
  ./find_free_msg_id.out&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=AR_Drone_2&amp;diff=21082</id>
		<title>AR Drone 2</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=AR_Drone_2&amp;diff=21082"/>
		<updated>2016-03-14T22:31:11Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Autonomy */ ardrone2_sdk has been removed, use simply ardrone2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|align=right&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;AR Drone 2&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[[File:800px-Parrot_AR.Drone_2.JPG|thumb|300px|Parrot's AR Drone 2]] [[File:ARdrone_exploded.jpg|thumb|300px|Exploded view of the AR Drone 2.]]&lt;br /&gt;
&lt;br /&gt;
So you have this nice Parrot AR.Drone 2.0 and would like to let it perform autonomous flights; You came to the right place. The only thing you need beside an AR.Drone 2.0, is an accurate GPS receiver and a laptop with [http://www.ubuntu.com/download/desktop Ubuntu Linux] OS installed.&lt;br /&gt;
&lt;br /&gt;
Replace the current AR.Drone 2.0 brain by uploading paparazzi in current ARM chip and use the aready available sensors. Connect a GPS on the USB port, use Wifi for telemetry and optional manal control.&lt;br /&gt;
&lt;br /&gt;
No soldering or other modifications in the electronics to make. Only with Paparazzi software and a GPS receiver it is possible to let the AR.Drone 2.0 fly autonomous missions under spectacular better control than the original onboard control.&lt;br /&gt;
&lt;br /&gt;
...as simple as that, have fun and try it for yourself... &lt;br /&gt;
&lt;br /&gt;
=== Help ===&lt;br /&gt;
&lt;br /&gt;
Paparazzi is a very mature project that has existed since 2003. So your questions concerning paparazzi have possibly already been asked and answered on theso called &amp;quot;mailing list&amp;quot;. It would be best to first read through the [http://lists.gnu.org/archive/html/paparazzi-devel/ mailinglist ]. If the answer is not there please ask your question on this mailinglist or maybe even via the IRC channel [http://paparazzi.enac.fr/wiki/Main_Page icons on the top of main page]. You will find your question is likely addressed within hours or days. Paparazzi is a global project so in most cases somewhere in the world someone is reading your email/question and will reply.&lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
&lt;br /&gt;
On September 3rd 2012 two Delft University of Technology student teams started a new UAV robotics project under the guidance of [mailto:microuav@gmail.com ing. ir. B. D. W. Remes]. Both teams shared a similar objective, namely getting the AR Drone v2.0 to fly autonomously using the advanced opensource Paparazzi Software.&lt;br /&gt;
&lt;br /&gt;
{{#ev: youtubehd|oX423smmPEc}}&lt;br /&gt;
&lt;br /&gt;
=== Easy ===&lt;br /&gt;
&lt;br /&gt;
When you have finished you autonomous flight with paparazzi and want to fly with the standard [http://ardrone2.parrot.com/apps/| ARDrone2 apps], just unplugging and re-plugging the battery will make your drone a standard ARDrone2 again.&lt;br /&gt;
&lt;br /&gt;
== The Hardware ==&lt;br /&gt;
&lt;br /&gt;
[[File:Ardrone2_snow.gif|320pxleft|AR.Drine 2.0]]&lt;br /&gt;
&lt;br /&gt;
First some generic information about the airframe hardware just to satisfy curiosity.&lt;br /&gt;
&lt;br /&gt;
=== HD Video recording ===&lt;br /&gt;
&lt;br /&gt;
Get high definition live video streaming to your smartphone or tablet as you are flying. See a clean, sharp image just as if you were in the pilot seat.&lt;br /&gt;
&lt;br /&gt;
* HD Camera. 720p 30fps&lt;br /&gt;
* Wide angle lens : 92° diagonal&lt;br /&gt;
* H264 encoding base profile&lt;br /&gt;
* Low latency streaming&lt;br /&gt;
* Video storage on the fly with the remote device&lt;br /&gt;
* JPEG photo&lt;br /&gt;
* Video storage on the fly with Wi-Fi directly on your remote device or on a USB key&lt;br /&gt;
&lt;br /&gt;
=== Robust structure  ===&lt;br /&gt;
&lt;br /&gt;
Trying your most daring tricks won’t even challenge this cutting edge design which is made to last.&lt;br /&gt;
&lt;br /&gt;
* Carbon fiber tubes : Total weight 380g with outdoor hull, 420g with indoor hull&lt;br /&gt;
* High grade 30% fiber charged nylon plastic parts&lt;br /&gt;
* Foam to isolate the inertial center from the engines’ vibration&lt;br /&gt;
* EPP hull injected by a sintered metal mold&lt;br /&gt;
* Liquid Repellent Nano-Coating on ultrasound sensors&lt;br /&gt;
* Fully reparable: All parts and instructions for repairing available on the internet&lt;br /&gt;
&lt;br /&gt;
=== Electronic assistance ===&lt;br /&gt;
&lt;br /&gt;
AR.Drone 2.0 on-board technology gives you extreme precision control and automatic stabilization features.&lt;br /&gt;
&lt;br /&gt;
* 1GHz 32 bit ARM Cortex A8 processor with 800MHz video DSP TMS320DMC64x&lt;br /&gt;
* Linux 2.6.32&lt;br /&gt;
* 1Gbit DDR2 RAM at 200MHz&lt;br /&gt;
* USB 2.0 high speed for extensions&lt;br /&gt;
* Wi-Fi b,g,n&lt;br /&gt;
* 3 axis gyroscope 2000°/second precision&lt;br /&gt;
* 3 axis accelerometer +-50mg precision&lt;br /&gt;
* 3 axis magnetometer 6° precision&lt;br /&gt;
* Pressure sensor +/- 10 Pa precision&lt;br /&gt;
* Ultrasound sensors for ground altitude measurement&lt;br /&gt;
* 60 fps vertical QVGA camera for ground speed measurement&lt;br /&gt;
&lt;br /&gt;
=== Motor ===&lt;br /&gt;
&lt;br /&gt;
Fly high. Fly fast. Far away from the ground.&lt;br /&gt;
&lt;br /&gt;
* 4 brushless inrunner motors. 14.5W 28,500 RMP&lt;br /&gt;
* Micro ball bearing&lt;br /&gt;
* Low noise Nylatron gears for 1/8.75 propeller reductor&lt;br /&gt;
* Tempered steel propeller shaft&lt;br /&gt;
* Self-lubrificating bronze bearing&lt;br /&gt;
* Specific high propelled drag for great maneuverability&lt;br /&gt;
* 8 MIPS AVR CPU per motor controller&lt;br /&gt;
* 3 elements 1000 mA/H LiPo rechargeable battery (Autonomy: 12 minutes)&lt;br /&gt;
* Emergency stop controlled by software&lt;br /&gt;
* Fully reprogrammable motor controller&lt;br /&gt;
* Water resistant motor’s electronic controller&lt;br /&gt;
&lt;br /&gt;
== Autopilot ==&lt;br /&gt;
&lt;br /&gt;
[[File:ardrone2_mainboard.jpg|320pxleft|AP Mainboard]]&lt;br /&gt;
&lt;br /&gt;
The main board in the AR.Drone 2.0 '''IS''' the autopilot&lt;br /&gt;
&lt;br /&gt;
== GPS ==&lt;br /&gt;
&lt;br /&gt;
To fly autonomous to a certain geo coordinate a GPS is needed. Although it is theoretically possible to use the original orange Parrot GPS dongle it is not advised, the performance is just not good enough for great autonomous flights. The solution that '''is advised''' is to use an '''uBlox GPS''' module.&lt;br /&gt;
&lt;br /&gt;
See [[AR_Drone_2/GPS]] for details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
To be able to fly your AR.Drone 2.0 you need '''ARDrone2 firmware v2.4.8''' or higher on your ARDrone. And for your Paparazzi GCS laptop it's best to have Ubuntu Linux v14.04 LTS or higher installed&lt;br /&gt;
&lt;br /&gt;
Go to the [[AR_drone_2/Software_installation|Operating System and Paparazzi Installation page]] to follow instructions to install the operating system and Paparazzi.&lt;br /&gt;
&lt;br /&gt;
If you followed the [[AR_drone_2/Software_installation|Operating System and Paparazzi Installation page]] you now have a working fresh install of Ubuntu v12.04 or v14.04 operating system on your Wifi enabled laptop. Newer versions of Ubuntu '''might''' work as well, only are never tried at the time of writing.&lt;br /&gt;
&lt;br /&gt;
Note: the above is simply one long command to the Linux command interpreter. The &amp;amp;&amp;amp; are simply saying if the command to the left returns successful return code then run the command on the right .. and so on. So if the command fails the rest of the commands to the right will not be executed. It maybe helpful then to simply copy/paste each command one at a time. Just grab between the '&amp;amp;&amp;amp;'&lt;br /&gt;
&lt;br /&gt;
== Autonomy ==&lt;br /&gt;
&lt;br /&gt;
[[Image:GCSParrotardroneandpaparazzi.jpg|Right|570px|GCS for Paparazzi Parrot AR.Drone 2.0]]&lt;br /&gt;
&lt;br /&gt;
To give your ARDrone2 the autonomy essential for autonomous flight, the Paparazzi Control Center needs to be started by clicking on the paparazzi icon on your desktop (see installing paparazzi Wiki details).&lt;br /&gt;
&lt;br /&gt;
[[Image:Paparazzi_installed.png|500px]]&lt;br /&gt;
&lt;br /&gt;
'''Terminal''' at the terminal, just cut 'n paste the line below, in your terminal command prompt, then press enter&lt;br /&gt;
&lt;br /&gt;
 ~/paparazzi/paparazzi&lt;br /&gt;
&lt;br /&gt;
Paparazzi Center will launch for the very first time and show you a screen like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:1_first_paparazzi_center_start.png|Paparazzi Center first start]]&lt;br /&gt;
&lt;br /&gt;
Now that you have Paparazzi Center running grab your ARDrone2 to set it up for autonomous flight:&lt;br /&gt;
&lt;br /&gt;
# Insert the GPS module into your ARDrone2 and power it up by connecting the battery. &lt;br /&gt;
# Establish a Wifi connection between the ARDrone2 and your laptop&lt;br /&gt;
[[Image:1.1_select_ardrone2_in_list.png|500px|Select ardrone2_v2.4.3 in Wireless Network List]]&lt;br /&gt;
[[Image:1.2_connected_to_ardrone2.png|400px|Your AR.Drone2 is now connected]]&lt;br /&gt;
&lt;br /&gt;
At this moment it is important that you have an ARDrone2 that has it's GPS device connected and has established a Wifi connection with your computer. You can now continue uploading the Autopilot to the ARDrone2.&lt;br /&gt;
&lt;br /&gt;
# At Paparazzi Center select ''ardrone2'' at the &amp;quot;A/C&amp;quot; drop-down box &lt;br /&gt;
&lt;br /&gt;
[[Image:2_choose_ardrone2_sdk_from_ac_dropdown.png|Choose ardrone2 from A/C selection]]&lt;br /&gt;
&lt;br /&gt;
# Make sure &amp;quot;ap&amp;quot; (Autopilot) is set as Target&lt;br /&gt;
# Press the [Upload] button (NOTE: It will show 3 ignored errors, that's fine, don't worry...) &lt;br /&gt;
&lt;br /&gt;
[[Image:3_press_upload.png|Press Upload]]&lt;br /&gt;
&lt;br /&gt;
# now in In the Paparazzi control center Select ''Flight UDP/Wifi'' as session &lt;br /&gt;
&lt;br /&gt;
[[Image:4_select_ardrone_flight_session.png|Select &amp;quot;Flight UDP/Wifi&amp;quot; as session]]&lt;br /&gt;
&lt;br /&gt;
# Press the [Execute] button&lt;br /&gt;
&lt;br /&gt;
[[Image:5_press_execute.png|Press Execute]]&lt;br /&gt;
&lt;br /&gt;
== Flying ==&lt;br /&gt;
&lt;br /&gt;
Take your AR Drone and laptop outside. A clear view of the sky is essential for GPS to work properly.  A good GPS position signal is necessary for optimal autonomous flight. However GPS is only accurate to within  several meters, so make sure you have enough of free space around to let it fly without bumping into something.&lt;br /&gt;
&lt;br /&gt;
After waiting for about a minute a GPS signal will be found. The ARDrone2 location should now appear in your GCS map &lt;br /&gt;
&lt;br /&gt;
[[Image:GCSParrotardroneandpaparazzi.jpg|300px|GCS for Paparazzi Parrot AR.Drone 2.0]] &lt;br /&gt;
&lt;br /&gt;
When you fly the first time on this spot you need to download the Google map tiles on to your laptop. Connect your wifi to your wireless router, when you have connection click on the black GCS map. Once downloaded the tiles are saved so you will not need an Internet connection next time. You can also run the GCS in advance, get the tiles, and later fly without an Internet connection.&lt;br /&gt;
&lt;br /&gt;
[[Image:Paparazzi_GCS_Ardrone_layout_NoWifiNoTelemetryConnectionOrNoTilesDownloaded.jpg|300px|GCS for Paparazzi Parrot AR.Drone 2.0]] &lt;br /&gt;
&lt;br /&gt;
and press the keyboard key combination [CTRL+G]. You will see the map appear. When you are done downloading the tiles re-connect to you drone.&lt;br /&gt;
&lt;br /&gt;
[[Image:GCSParrotardroneandpaparazzi.jpg|300px|GCS for Paparazzi Parrot AR.Drone 2.0]]&lt;br /&gt;
&lt;br /&gt;
If no Wifi connection is availabe from your laptop to the ARDRone2, you will have a blank screen. That is perfectly normal. Just make sure you make a Wifi connection to your AR drone first.&lt;br /&gt;
&lt;br /&gt;
=== Takeoff===&lt;br /&gt;
&lt;br /&gt;
# Press the [Takeoff] button and keep a good eye on where your Drone flies.&lt;br /&gt;
&lt;br /&gt;
[[Image:GCSParrotardroneandpaparazziTakeoff.jpg|200|Takeoff Paparazzi Parrot AR.Drone 2.0]]&lt;br /&gt;
&lt;br /&gt;
When all worked out well the drone took off, followed a line back and forth and landed again, congratulations you made your first autonomous flight!&lt;br /&gt;
&lt;br /&gt;
=== Move waypoints===&lt;br /&gt;
&lt;br /&gt;
To have some fun with your AR.Drone 2.0 in flight, one could move the ''standby'' waypoint to another location close by.&lt;br /&gt;
&lt;br /&gt;
=== Home ===&lt;br /&gt;
Home: Let the ARDrone come back where you took off&lt;br /&gt;
&lt;br /&gt;
[[Image:GCSParrotardroneandpaparazziHome.jpg|200|Home Paparazzi Parrot AR.Drone 2.0]]&lt;br /&gt;
&lt;br /&gt;
=== Land ===&lt;br /&gt;
Land: Land the drone where you took off&lt;br /&gt;
&lt;br /&gt;
[[Image:GCSParrotardroneandpaparazziLAnd.jpg|200px|LAnd Paparazzi Parrot AR.Drone 2.0]]&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
Now that your Parrot AR.Drone 2.0 flew autonomously you can dive deeper into the world Paparazzi and it's [[Flight_Plans]]. Just browse around this Wiki and read and try things that interest you the most, have fun!&lt;br /&gt;
&lt;br /&gt;
== Experts==&lt;br /&gt;
&lt;br /&gt;
After you have now experienced your first feeling of quite some autonomous flights with your Paparazzi controlled UAV you might want to become an expert on the  AR.Drone 2.0.&lt;br /&gt;
Read on below to be able learn, change and create great new things...&lt;br /&gt;
&lt;br /&gt;
== Sign conventions ==&lt;br /&gt;
&lt;br /&gt;
This section will show the sign conventions used by the SDK of the Parrot AR.Drone 2.0. One can read these values directly from the AR.Drone software. This is a good refference also fro the PPRZ version.&lt;br /&gt;
&lt;br /&gt;
=== Body axis ===&lt;br /&gt;
&lt;br /&gt;
[[File:body axis convention.jpg|thumb|right|350px|Body axis convention]]&lt;br /&gt;
&lt;br /&gt;
Relevant units:&lt;br /&gt;
&lt;br /&gt;
* Velocities in x,y,z (Vx, Vy, Vz [mm/s])&lt;br /&gt;
* Accelerations in x,y,z (Ax, Ay, Az [mg])&lt;br /&gt;
* Position in z (altitude [mm])&lt;br /&gt;
&lt;br /&gt;
=== Angles ===&lt;br /&gt;
&lt;br /&gt;
[[File:roll convention.jpg|150px|Roll convention]]&lt;br /&gt;
[[File:pitch convention.jpg|150px|Pitch convention]]&lt;br /&gt;
[[File:yaw convention.jpg|150px|Yaw convention]]&lt;br /&gt;
&lt;br /&gt;
Relevant units:&lt;br /&gt;
* Angles psi (yaw), phi (roll), theta (pitch) [mdeg]&lt;br /&gt;
* Rates p (roll rate), q (pitch rate), r (yaw rate) [deg/s]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simulation ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This page will guide you through the creation of the mechanical model with JSBSim for Paparazzi.&lt;br /&gt;
&lt;br /&gt;
=== Setting up the simulation environment ===&lt;br /&gt;
&lt;br /&gt;
See [[Setting up simulation environment]].&lt;br /&gt;
&lt;br /&gt;
=== Creating the mechanical model ===&lt;br /&gt;
&lt;br /&gt;
Not every feature of the JSMSim model is needed for Paparazzi. Below is a list of features that should be included in the .xml file.&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* Metrics&lt;br /&gt;
* Mass balance&lt;br /&gt;
* Ground reactions&lt;br /&gt;
* Propulsion&lt;br /&gt;
&lt;br /&gt;
=== Example .xml file ===&lt;br /&gt;
&lt;br /&gt;
This section displays a standard .xml file, with some added comments per segment. For a more extensive guide on JSBSim read the extensive [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim manual]&lt;br /&gt;
&lt;br /&gt;
    '''&amp;lt;fileheader&amp;gt;'''&lt;br /&gt;
        &amp;lt;author&amp;gt; &amp;quot;Name of author&amp;quot; &amp;lt;/author&amp;gt;&lt;br /&gt;
        &amp;lt;filecreationdate&amp;gt; &amp;quot;Date of creation&amp;quot; &amp;lt;/filecreationdate&amp;gt;&lt;br /&gt;
        &amp;lt;version&amp;gt; &amp;quot;Version&amp;quot; &amp;lt;/version&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt; &amp;quot;Description&amp;quot; &amp;lt;/description&amp;gt;&lt;br /&gt;
   ''' &amp;lt;/fileheader&amp;gt; '''&lt;br /&gt;
&lt;br /&gt;
==== Metrics ====&lt;br /&gt;
Metrics&lt;br /&gt;
&lt;br /&gt;
    '''&amp;lt;metrics&amp;gt;'''&lt;br /&gt;
        &amp;lt;wingarea unit=&amp;quot;IN2&amp;quot;&amp;gt; 0 &amp;lt;/wingarea&amp;gt;&lt;br /&gt;
        &amp;lt;wingspan unit=&amp;quot;IN&amp;quot;&amp;gt; 0 &amp;lt;/wingspan&amp;gt;&lt;br /&gt;
        &amp;lt;chord unit=&amp;quot;IN&amp;quot;&amp;gt; 0 &amp;lt;/chord&amp;gt;&lt;br /&gt;
        &amp;lt;htailarea unit=&amp;quot;FT2&amp;quot;&amp;gt; 0 &amp;lt;/htailarea&amp;gt;&lt;br /&gt;
        &amp;lt;htailarm unit=&amp;quot;FT&amp;quot;&amp;gt; 0 &amp;lt;/htailarm&amp;gt;&lt;br /&gt;
        &amp;lt;vtailarea unit=&amp;quot;FT2&amp;quot;&amp;gt; 0 &amp;lt;/vtailarea&amp;gt;&lt;br /&gt;
        &amp;lt;vtailarm unit=&amp;quot;FT&amp;quot;&amp;gt; 0 &amp;lt;/vtailarm&amp;gt;&lt;br /&gt;
        &amp;lt;location name=&amp;quot;AERORP&amp;quot; unit=&amp;quot;IN&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;x&amp;gt; 0 &amp;lt;/x&amp;gt;&lt;br /&gt;
            &amp;lt;y&amp;gt; 0 &amp;lt;/y&amp;gt;&lt;br /&gt;
            &amp;lt;z&amp;gt; 0 &amp;lt;/z&amp;gt;&lt;br /&gt;
        &amp;lt;/location&amp;gt;&lt;br /&gt;
        &amp;lt;location name=&amp;quot;EYEPOINT&amp;quot; unit=&amp;quot;IN&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;x&amp;gt; 0 &amp;lt;/x&amp;gt;&lt;br /&gt;
            &amp;lt;y&amp;gt; 0 &amp;lt;/y&amp;gt;&lt;br /&gt;
            &amp;lt;z&amp;gt; 0 &amp;lt;/z&amp;gt;&lt;br /&gt;
        &amp;lt;/location&amp;gt;&lt;br /&gt;
        &amp;lt;location name=&amp;quot;VRP&amp;quot; unit=&amp;quot;IN&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;x&amp;gt; 0 &amp;lt;/x&amp;gt;&lt;br /&gt;
            &amp;lt;y&amp;gt; 0 &amp;lt;/y&amp;gt;&lt;br /&gt;
            &amp;lt;z&amp;gt; 0 &amp;lt;/z&amp;gt;&lt;br /&gt;
        &amp;lt;/location&amp;gt;&lt;br /&gt;
    '''&amp;lt;/metrics&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
==== Mass balance ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   ''' &amp;lt;mass_balance&amp;gt;'''&lt;br /&gt;
        &amp;lt;ixx unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0.1 &amp;lt;/ixx&amp;gt;&lt;br /&gt;
        &amp;lt;iyy unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0.1 &amp;lt;/iyy&amp;gt;&lt;br /&gt;
        &amp;lt;izz unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0.2 &amp;lt;/izz&amp;gt;&lt;br /&gt;
        &amp;lt;ixy unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0. &amp;lt;/ixy&amp;gt;&lt;br /&gt;
        &amp;lt;ixz unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0. &amp;lt;/ixz&amp;gt;&lt;br /&gt;
        &amp;lt;iyz unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0. &amp;lt;/iyz&amp;gt;&lt;br /&gt;
        &amp;lt;emptywt unit=&amp;quot;LBS&amp;quot;&amp;gt; 1 &amp;lt;/emptywt&amp;gt;&lt;br /&gt;
        &amp;lt;location name=&amp;quot;CG&amp;quot; unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;x&amp;gt; 0 &amp;lt;/x&amp;gt;&lt;br /&gt;
            &amp;lt;y&amp;gt; 0 &amp;lt;/y&amp;gt;&lt;br /&gt;
            &amp;lt;z&amp;gt; 0 &amp;lt;/z&amp;gt;&lt;br /&gt;
        &amp;lt;/location&amp;gt;&lt;br /&gt;
    '''&amp;lt;/mass_balance&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
==== Ground reactions ====&lt;br /&gt;
&lt;br /&gt;
This section creates contact points with the ground for the AR.Drone 2.0. The ground reactions were designed with aircraft wheels in mind. Therefore, the specifications and locations of the ground reactions do not really matter, due to the vertical take-off the quadrotor.  &lt;br /&gt;
&lt;br /&gt;
   '''&amp;lt;ground_reactions&amp;gt;'''&lt;br /&gt;
        &amp;lt;contact type=&amp;quot;STRUCTURE&amp;quot; name=&amp;quot;CONTACT_FRONT&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;x&amp;gt;-0.15 &amp;lt;/x&amp;gt;&lt;br /&gt;
                &amp;lt;y&amp;gt; 0 &amp;lt;/y&amp;gt;&lt;br /&gt;
                &amp;lt;z&amp;gt;-0.1 &amp;lt;/z&amp;gt;&lt;br /&gt;
            &amp;lt;/location&amp;gt;&lt;br /&gt;
            &amp;lt;static_friction&amp;gt;  0.8 &amp;lt;/static_friction&amp;gt;&lt;br /&gt;
            &amp;lt;dynamic_friction&amp;gt; 0.5 &amp;lt;/dynamic_friction&amp;gt;&lt;br /&gt;
            &amp;lt;spring_coeff unit=&amp;quot;N/M&amp;quot;&amp;gt; 500 &amp;lt;/spring_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff unit=&amp;quot;N/M/SEC&amp;quot;&amp;gt; 100 &amp;lt;/damping_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff_rebound type=&amp;quot;SQUARE&amp;quot; unit=&amp;quot;N/M2/SEC2&amp;quot;&amp;gt; 1000 &amp;lt;/damping_coeff_rebound&amp;gt;&lt;br /&gt;
            &amp;lt;max_steer unit=&amp;quot;DEG&amp;quot;&amp;gt; 0.0 &amp;lt;/max_steer&amp;gt;&lt;br /&gt;
            &amp;lt;brake_group&amp;gt; NONE &amp;lt;/brake_group&amp;gt;&lt;br /&gt;
            &amp;lt;retractable&amp;gt;0&amp;lt;/retractable&amp;gt;&lt;br /&gt;
        &amp;lt;/contact&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        &amp;lt;contact type=&amp;quot;STRUCTURE&amp;quot; name=&amp;quot;CONTACT_BACK&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;x&amp;gt; 0.15&amp;lt;/x&amp;gt;&lt;br /&gt;
                &amp;lt;y&amp;gt; 0   &amp;lt;/y&amp;gt;&lt;br /&gt;
                &amp;lt;z&amp;gt;-0.1 &amp;lt;/z&amp;gt;&lt;br /&gt;
            &amp;lt;/location&amp;gt;&lt;br /&gt;
            &amp;lt;static_friction&amp;gt;  0.8 &amp;lt;/static_friction&amp;gt;&lt;br /&gt;
            &amp;lt;dynamic_friction&amp;gt; 0.5 &amp;lt;/dynamic_friction&amp;gt;&lt;br /&gt;
            &amp;lt;spring_coeff unit=&amp;quot;N/M&amp;quot;&amp;gt; 500 &amp;lt;/spring_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff unit=&amp;quot;N/M/SEC&amp;quot;&amp;gt; 100 &amp;lt;/damping_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff_rebound type=&amp;quot;SQUARE&amp;quot; unit=&amp;quot;N/M2/SEC2&amp;quot;&amp;gt; 1000 &amp;lt;/damping_coeff_rebound&amp;gt;&lt;br /&gt;
            &amp;lt;max_steer unit=&amp;quot;DEG&amp;quot;&amp;gt; 0.0 &amp;lt;/max_steer&amp;gt;&lt;br /&gt;
            &amp;lt;brake_group&amp;gt; NONE &amp;lt;/brake_group&amp;gt;&lt;br /&gt;
            &amp;lt;retractable&amp;gt;0&amp;lt;/retractable&amp;gt;&lt;br /&gt;
        &amp;lt;/contact&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        &amp;lt;contact type=&amp;quot;STRUCTURE&amp;quot; name=&amp;quot;CONTACT_RIGHT&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;x&amp;gt; 0.  &amp;lt;/x&amp;gt;&lt;br /&gt;
                &amp;lt;y&amp;gt; 0.15&amp;lt;/y&amp;gt;&lt;br /&gt;
                &amp;lt;z&amp;gt;-0.1 &amp;lt;/z&amp;gt;&lt;br /&gt;
            &amp;lt;/location&amp;gt;&lt;br /&gt;
            &amp;lt;static_friction&amp;gt;  0.8 &amp;lt;/static_friction&amp;gt;&lt;br /&gt;
            &amp;lt;dynamic_friction&amp;gt; 0.5 &amp;lt;/dynamic_friction&amp;gt;&lt;br /&gt;
            &amp;lt;spring_coeff unit=&amp;quot;N/M&amp;quot;&amp;gt; 500 &amp;lt;/spring_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff unit=&amp;quot;N/M/SEC&amp;quot;&amp;gt; 100 &amp;lt;/damping_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff_rebound type=&amp;quot;SQUARE&amp;quot; unit=&amp;quot;N/M2/SEC2&amp;quot;&amp;gt; 1000 &amp;lt;/damping_coeff_rebound&amp;gt;&lt;br /&gt;
            &amp;lt;max_steer unit=&amp;quot;DEG&amp;quot;&amp;gt; 0.0 &amp;lt;/max_steer&amp;gt;&lt;br /&gt;
            &amp;lt;brake_group&amp;gt; NONE &amp;lt;/brake_group&amp;gt;&lt;br /&gt;
            &amp;lt;retractable&amp;gt;0&amp;lt;/retractable&amp;gt;&lt;br /&gt;
        &amp;lt;/contact&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        &amp;lt;contact type=&amp;quot;STRUCTURE&amp;quot; name=&amp;quot;CONTACT_LEFT&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;x&amp;gt; 0.  &amp;lt;/x&amp;gt;&lt;br /&gt;
                &amp;lt;y&amp;gt;-0.15&amp;lt;/y&amp;gt;&lt;br /&gt;
                &amp;lt;z&amp;gt;-0.1 &amp;lt;/z&amp;gt;&lt;br /&gt;
            &amp;lt;/location&amp;gt;&lt;br /&gt;
            &amp;lt;static_friction&amp;gt;  0.8 &amp;lt;/static_friction&amp;gt;&lt;br /&gt;
            &amp;lt;dynamic_friction&amp;gt; 0.5 &amp;lt;/dynamic_friction&amp;gt;&lt;br /&gt;
            &amp;lt;spring_coeff unit=&amp;quot;N/M&amp;quot;&amp;gt; 500 &amp;lt;/spring_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff unit=&amp;quot;N/M/SEC&amp;quot;&amp;gt; 100 &amp;lt;/damping_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff_rebound type=&amp;quot;SQUARE&amp;quot; unit=&amp;quot;N/M2/SEC2&amp;quot;&amp;gt; 1000 &amp;lt;/damping_coeff_rebound&amp;gt;&lt;br /&gt;
            &amp;lt;max_steer unit=&amp;quot;DEG&amp;quot;&amp;gt; 0.0 &amp;lt;/max_steer&amp;gt;&lt;br /&gt;
            &amp;lt;brake_group&amp;gt; NONE &amp;lt;/brake_group&amp;gt;&lt;br /&gt;
            &amp;lt;retractable&amp;gt;0&amp;lt;/retractable&amp;gt;&lt;br /&gt;
        &amp;lt;/contact&amp;gt;&lt;br /&gt;
    '''&amp;lt;/ground_reactions&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full configuration and Flight Dynamics Model (FDM) files to fly the AR.Drone autonomously in JSBsim. A very thorough [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSIM reference manual] can be found on the JSBSIM documentation page, in creating the .xml configuration file the team followed this manual closely. &lt;br /&gt;
&lt;br /&gt;
=== AR.Drone.xml ===&lt;br /&gt;
&lt;br /&gt;
'''FileHeader'''&lt;br /&gt;
&lt;br /&gt;
The configuration file will be prefixed with a FileHeader that includes information such as author, contact information, notes, dates, descriptions, and references.&lt;br /&gt;
   ''' &amp;lt;fileheader&amp;gt; '''&lt;br /&gt;
        &amp;lt;author&amp;gt; &amp;quot;Name of author&amp;quot; &amp;lt;/author&amp;gt;&lt;br /&gt;
        &amp;lt;filecreationdate&amp;gt; &amp;quot;Date of creation&amp;quot; &amp;lt;/filecreationdate&amp;gt;&lt;br /&gt;
        &amp;lt;version&amp;gt; &amp;quot;Version&amp;quot; &amp;lt;/version&amp;gt;&lt;br /&gt;
        &amp;lt;description&amp;gt; &amp;quot;Description&amp;quot; &amp;lt;/description&amp;gt;&lt;br /&gt;
   ''' &amp;lt;/fileheader&amp;gt; '''&lt;br /&gt;
&lt;br /&gt;
'''Metrics'''&lt;br /&gt;
&lt;br /&gt;
The start of the configuration file will be the physical characteristics of the AR.Drone2, in essence, those static measurements of the aircraft (e.g. weight, wing area, control surface arms, etc.). The values for the wing area and wingspan were measured off of the actual model, measured using a CAD model of the drone, and using official figures found online. It was concluded that all of these values were the same thus it was fairly certain that the figures found were correct. &lt;br /&gt;
    '''&amp;lt;metrics&amp;gt;'''&lt;br /&gt;
        &amp;lt;wingarea unit=&amp;quot;IN2&amp;quot;&amp;gt; 0 &amp;lt;/wingarea&amp;gt;&lt;br /&gt;
        &amp;lt;wingspan unit=&amp;quot;IN&amp;quot;&amp;gt; 0 &amp;lt;/wingspan&amp;gt;&lt;br /&gt;
        &amp;lt;chord unit=&amp;quot;IN&amp;quot;&amp;gt; 0 &amp;lt;/chord&amp;gt;&lt;br /&gt;
        &amp;lt;htailarea unit=&amp;quot;FT2&amp;quot;&amp;gt; 0 &amp;lt;/htailarea&amp;gt;&lt;br /&gt;
        &amp;lt;htailarm unit=&amp;quot;FT&amp;quot;&amp;gt; 0 &amp;lt;/htailarm&amp;gt;&lt;br /&gt;
        &amp;lt;vtailarea unit=&amp;quot;FT2&amp;quot;&amp;gt; 0 &amp;lt;/vtailarea&amp;gt;&lt;br /&gt;
        &amp;lt;vtailarm unit=&amp;quot;FT&amp;quot;&amp;gt; 0 &amp;lt;/vtailarm&amp;gt;&lt;br /&gt;
        &amp;lt;location name=&amp;quot;AERORP&amp;quot; unit=&amp;quot;IN&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;x&amp;gt; 0 &amp;lt;/x&amp;gt;&lt;br /&gt;
            &amp;lt;y&amp;gt; 0 &amp;lt;/y&amp;gt;&lt;br /&gt;
            &amp;lt;z&amp;gt; 0 &amp;lt;/z&amp;gt;&lt;br /&gt;
        &amp;lt;/location&amp;gt;&lt;br /&gt;
        &amp;lt;location name=&amp;quot;EYEPOINT&amp;quot; unit=&amp;quot;IN&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;x&amp;gt; 0 &amp;lt;/x&amp;gt;&lt;br /&gt;
            &amp;lt;y&amp;gt; 0 &amp;lt;/y&amp;gt;&lt;br /&gt;
            &amp;lt;z&amp;gt; 0 &amp;lt;/z&amp;gt;&lt;br /&gt;
        &amp;lt;/location&amp;gt;&lt;br /&gt;
        &amp;lt;location name=&amp;quot;VRP&amp;quot; unit=&amp;quot;IN&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;x&amp;gt; 0 &amp;lt;/x&amp;gt;&lt;br /&gt;
            &amp;lt;y&amp;gt; 0 &amp;lt;/y&amp;gt;&lt;br /&gt;
            &amp;lt;z&amp;gt; 0 &amp;lt;/z&amp;gt;&lt;br /&gt;
        &amp;lt;/location&amp;gt;&lt;br /&gt;
    '''&amp;lt;/metrics&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Mass Balance'''&lt;br /&gt;
&lt;br /&gt;
Building upon the metrics of the aircraft, the Mass Balance sections is where the center of gravity and moment of inertia are defined.&lt;br /&gt;
   ''' &amp;lt;mass_balance&amp;gt;'''&lt;br /&gt;
        &amp;lt;ixx unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0.1 &amp;lt;/ixx&amp;gt;&lt;br /&gt;
        &amp;lt;iyy unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0.1 &amp;lt;/iyy&amp;gt;&lt;br /&gt;
        &amp;lt;izz unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0.2 &amp;lt;/izz&amp;gt;&lt;br /&gt;
        &amp;lt;ixy unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0. &amp;lt;/ixy&amp;gt;&lt;br /&gt;
        &amp;lt;ixz unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0. &amp;lt;/ixz&amp;gt;&lt;br /&gt;
        &amp;lt;iyz unit=&amp;quot;SLUG*FT2&amp;quot;&amp;gt; 0. &amp;lt;/iyz&amp;gt;&lt;br /&gt;
        &amp;lt;emptywt unit=&amp;quot;LBS&amp;quot;&amp;gt; 1 &amp;lt;/emptywt&amp;gt;&lt;br /&gt;
        &amp;lt;location name=&amp;quot;CG&amp;quot; unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;x&amp;gt; 0 &amp;lt;/x&amp;gt;&lt;br /&gt;
            &amp;lt;y&amp;gt; 0 &amp;lt;/y&amp;gt;&lt;br /&gt;
            &amp;lt;z&amp;gt; 0 &amp;lt;/z&amp;gt;&lt;br /&gt;
        &amp;lt;/location&amp;gt;&lt;br /&gt;
    '''&amp;lt;/mass_balance&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Ground Reactions'''&lt;br /&gt;
&lt;br /&gt;
The points of contact which the aircraft has with the ground are defined in the Ground Reactions section of the configuration file.&lt;br /&gt;
   '''&amp;lt;ground_reactions&amp;gt;'''&lt;br /&gt;
        &amp;lt;contact type=&amp;quot;STRUCTURE&amp;quot; name=&amp;quot;CONTACT_FRONT&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;x&amp;gt;-0.15 &amp;lt;/x&amp;gt;&lt;br /&gt;
                &amp;lt;y&amp;gt; 0 &amp;lt;/y&amp;gt;&lt;br /&gt;
                &amp;lt;z&amp;gt;-0.1 &amp;lt;/z&amp;gt;&lt;br /&gt;
            &amp;lt;/location&amp;gt;&lt;br /&gt;
            &amp;lt;static_friction&amp;gt;  0.8 &amp;lt;/static_friction&amp;gt;&lt;br /&gt;
            &amp;lt;dynamic_friction&amp;gt; 0.5 &amp;lt;/dynamic_friction&amp;gt;&lt;br /&gt;
            &amp;lt;spring_coeff unit=&amp;quot;N/M&amp;quot;&amp;gt; 500 &amp;lt;/spring_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff unit=&amp;quot;N/M/SEC&amp;quot;&amp;gt; 100 &amp;lt;/damping_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff_rebound type=&amp;quot;SQUARE&amp;quot; unit=&amp;quot;N/M2/SEC2&amp;quot;&amp;gt; 1000 &amp;lt;/damping_coeff_rebound&amp;gt;&lt;br /&gt;
            &amp;lt;max_steer unit=&amp;quot;DEG&amp;quot;&amp;gt; 0.0 &amp;lt;/max_steer&amp;gt;&lt;br /&gt;
            &amp;lt;brake_group&amp;gt; NONE &amp;lt;/brake_group&amp;gt;&lt;br /&gt;
            &amp;lt;retractable&amp;gt;0&amp;lt;/retractable&amp;gt;&lt;br /&gt;
        &amp;lt;/contact&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        &amp;lt;contact type=&amp;quot;STRUCTURE&amp;quot; name=&amp;quot;CONTACT_BACK&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;x&amp;gt; 0.15&amp;lt;/x&amp;gt;&lt;br /&gt;
                &amp;lt;y&amp;gt; 0   &amp;lt;/y&amp;gt;&lt;br /&gt;
                &amp;lt;z&amp;gt;-0.1 &amp;lt;/z&amp;gt;&lt;br /&gt;
            &amp;lt;/location&amp;gt;&lt;br /&gt;
            &amp;lt;static_friction&amp;gt;  0.8 &amp;lt;/static_friction&amp;gt;&lt;br /&gt;
            &amp;lt;dynamic_friction&amp;gt; 0.5 &amp;lt;/dynamic_friction&amp;gt;&lt;br /&gt;
            &amp;lt;spring_coeff unit=&amp;quot;N/M&amp;quot;&amp;gt; 500 &amp;lt;/spring_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff unit=&amp;quot;N/M/SEC&amp;quot;&amp;gt; 100 &amp;lt;/damping_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff_rebound type=&amp;quot;SQUARE&amp;quot; unit=&amp;quot;N/M2/SEC2&amp;quot;&amp;gt; 1000 &amp;lt;/damping_coeff_rebound&amp;gt;&lt;br /&gt;
            &amp;lt;max_steer unit=&amp;quot;DEG&amp;quot;&amp;gt; 0.0 &amp;lt;/max_steer&amp;gt;&lt;br /&gt;
            &amp;lt;brake_group&amp;gt; NONE &amp;lt;/brake_group&amp;gt;&lt;br /&gt;
            &amp;lt;retractable&amp;gt;0&amp;lt;/retractable&amp;gt;&lt;br /&gt;
        &amp;lt;/contact&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        &amp;lt;contact type=&amp;quot;STRUCTURE&amp;quot; name=&amp;quot;CONTACT_RIGHT&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;x&amp;gt; 0.  &amp;lt;/x&amp;gt;&lt;br /&gt;
                &amp;lt;y&amp;gt; 0.15&amp;lt;/y&amp;gt;&lt;br /&gt;
                &amp;lt;z&amp;gt;-0.1 &amp;lt;/z&amp;gt;&lt;br /&gt;
            &amp;lt;/location&amp;gt;&lt;br /&gt;
            &amp;lt;static_friction&amp;gt;  0.8 &amp;lt;/static_friction&amp;gt;&lt;br /&gt;
            &amp;lt;dynamic_friction&amp;gt; 0.5 &amp;lt;/dynamic_friction&amp;gt;&lt;br /&gt;
            &amp;lt;spring_coeff unit=&amp;quot;N/M&amp;quot;&amp;gt; 500 &amp;lt;/spring_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff unit=&amp;quot;N/M/SEC&amp;quot;&amp;gt; 100 &amp;lt;/damping_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff_rebound type=&amp;quot;SQUARE&amp;quot; unit=&amp;quot;N/M2/SEC2&amp;quot;&amp;gt; 1000 &amp;lt;/damping_coeff_rebound&amp;gt;&lt;br /&gt;
            &amp;lt;max_steer unit=&amp;quot;DEG&amp;quot;&amp;gt; 0.0 &amp;lt;/max_steer&amp;gt;&lt;br /&gt;
            &amp;lt;brake_group&amp;gt; NONE &amp;lt;/brake_group&amp;gt;&lt;br /&gt;
            &amp;lt;retractable&amp;gt;0&amp;lt;/retractable&amp;gt;&lt;br /&gt;
        &amp;lt;/contact&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        &amp;lt;contact type=&amp;quot;STRUCTURE&amp;quot; name=&amp;quot;CONTACT_LEFT&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;x&amp;gt; 0.  &amp;lt;/x&amp;gt;&lt;br /&gt;
                &amp;lt;y&amp;gt;-0.15&amp;lt;/y&amp;gt;&lt;br /&gt;
                &amp;lt;z&amp;gt;-0.1 &amp;lt;/z&amp;gt;&lt;br /&gt;
            &amp;lt;/location&amp;gt;&lt;br /&gt;
            &amp;lt;static_friction&amp;gt;  0.8 &amp;lt;/static_friction&amp;gt;&lt;br /&gt;
            &amp;lt;dynamic_friction&amp;gt; 0.5 &amp;lt;/dynamic_friction&amp;gt;&lt;br /&gt;
            &amp;lt;spring_coeff unit=&amp;quot;N/M&amp;quot;&amp;gt; 500 &amp;lt;/spring_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff unit=&amp;quot;N/M/SEC&amp;quot;&amp;gt; 100 &amp;lt;/damping_coeff&amp;gt;&lt;br /&gt;
            &amp;lt;damping_coeff_rebound type=&amp;quot;SQUARE&amp;quot; unit=&amp;quot;N/M2/SEC2&amp;quot;&amp;gt; 1000 &amp;lt;/damping_coeff_rebound&amp;gt;&lt;br /&gt;
            &amp;lt;max_steer unit=&amp;quot;DEG&amp;quot;&amp;gt; 0.0 &amp;lt;/max_steer&amp;gt;&lt;br /&gt;
            &amp;lt;brake_group&amp;gt; NONE &amp;lt;/brake_group&amp;gt;&lt;br /&gt;
            &amp;lt;retractable&amp;gt;0&amp;lt;/retractable&amp;gt;&lt;br /&gt;
        &amp;lt;/contact&amp;gt;&lt;br /&gt;
    '''&amp;lt;/ground_reactions&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Propulsion'''&lt;br /&gt;
&lt;br /&gt;
Each of the four motors is defined in the Propulsion section.&lt;br /&gt;
 '''&amp;lt;propulsion&amp;gt;&lt;br /&gt;
  &amp;lt;engine file=&amp;quot;eng_150w&amp;quot; name=&amp;quot;front left&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;x&amp;gt; -0.2 &amp;lt;/x&amp;gt;&lt;br /&gt;
    &amp;lt;y&amp;gt;  0.2 &amp;lt;/y&amp;gt;&lt;br /&gt;
    &amp;lt;z&amp;gt;  0.0 &amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/location&amp;gt;&lt;br /&gt;
   &amp;lt;orient unit=&amp;quot;DEG&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;pitch&amp;gt; 90.00 &amp;lt;/pitch&amp;gt;&lt;br /&gt;
    &amp;lt;roll&amp;gt;   0.00 &amp;lt;/roll&amp;gt;&lt;br /&gt;
    &amp;lt;yaw&amp;gt;    0.00 &amp;lt;/yaw&amp;gt;&lt;br /&gt;
   &amp;lt;/orient&amp;gt;&lt;br /&gt;
   &amp;lt;feed&amp;gt;0&amp;lt;/feed&amp;gt;&lt;br /&gt;
   &amp;lt;thruster file=&amp;quot;18x8&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt; -0.2   &amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt;  0.2   &amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;  0.025 &amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/location&amp;gt;&lt;br /&gt;
    &amp;lt;orient unit=&amp;quot;DEG&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;pitch&amp;gt; 90.00 &amp;lt;/pitch&amp;gt;&lt;br /&gt;
     &amp;lt;roll&amp;gt;   0.00 &amp;lt;/roll&amp;gt;&lt;br /&gt;
     &amp;lt;yaw&amp;gt;    0.00 &amp;lt;/yaw&amp;gt;&lt;br /&gt;
    &amp;lt;/orient&amp;gt;&lt;br /&gt;
    &amp;lt;sense&amp;gt; 1 &amp;lt;/sense&amp;gt;&lt;br /&gt;
    &amp;lt;p_factor&amp;gt; 10 &amp;lt;/p_factor&amp;gt;&lt;br /&gt;
   &amp;lt;/thruster&amp;gt;&lt;br /&gt;
  &amp;lt;/engine&amp;gt;&lt;br /&gt;
  &amp;lt;engine file=&amp;quot;eng_150w&amp;quot; name=&amp;quot;front right&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;x&amp;gt; 0.2 &amp;lt;/x&amp;gt;&lt;br /&gt;
    &amp;lt;y&amp;gt; 0.2 &amp;lt;/y&amp;gt;&lt;br /&gt;
    &amp;lt;z&amp;gt; 0.0 &amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/location&amp;gt;&lt;br /&gt;
   &amp;lt;orient unit=&amp;quot;DEG&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;pitch&amp;gt; 90.00 &amp;lt;/pitch&amp;gt;&lt;br /&gt;
    &amp;lt;roll&amp;gt;   0.00 &amp;lt;/roll&amp;gt;&lt;br /&gt;
    &amp;lt;yaw&amp;gt;    0.00 &amp;lt;/yaw&amp;gt;&lt;br /&gt;
   &amp;lt;/orient&amp;gt;&lt;br /&gt;
   &amp;lt;feed&amp;gt;0&amp;lt;/feed&amp;gt;&lt;br /&gt;
   &amp;lt;thruster file=&amp;quot;18x8&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt; 0.2   &amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt; 0.2   &amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt; 0.025 &amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/location&amp;gt;&lt;br /&gt;
    &amp;lt;orient unit=&amp;quot;DEG&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;pitch&amp;gt; 90.00 &amp;lt;/pitch&amp;gt;&lt;br /&gt;
     &amp;lt;roll&amp;gt;   0.00 &amp;lt;/roll&amp;gt;&lt;br /&gt;
     &amp;lt;yaw&amp;gt;    0.00 &amp;lt;/yaw&amp;gt;&lt;br /&gt;
    &amp;lt;/orient&amp;gt;&lt;br /&gt;
    &amp;lt;sense&amp;gt; 1 &amp;lt;/sense&amp;gt;&lt;br /&gt;
    &amp;lt;p_factor&amp;gt; 10 &amp;lt;/p_factor&amp;gt;&lt;br /&gt;
   &amp;lt;/thruster&amp;gt;&lt;br /&gt;
  &amp;lt;/engine&amp;gt;&lt;br /&gt;
  &amp;lt;engine file=&amp;quot;eng_150w&amp;quot; name=&amp;quot;rear left&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;x&amp;gt; -0.2 &amp;lt;/x&amp;gt;&lt;br /&gt;
    &amp;lt;y&amp;gt; -0.2 &amp;lt;/y&amp;gt;&lt;br /&gt;
    &amp;lt;z&amp;gt;  0.0 &amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/location&amp;gt;&lt;br /&gt;
   &amp;lt;orient unit=&amp;quot;DEG&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;pitch&amp;gt; 90.00 &amp;lt;/pitch&amp;gt;&lt;br /&gt;
    &amp;lt;roll&amp;gt;   0.00 &amp;lt;/roll&amp;gt;&lt;br /&gt;
    &amp;lt;yaw&amp;gt;    0.00 &amp;lt;/yaw&amp;gt;&lt;br /&gt;
   &amp;lt;/orient&amp;gt;&lt;br /&gt;
   &amp;lt;feed&amp;gt;0&amp;lt;/feed&amp;gt;&lt;br /&gt;
   &amp;lt;thruster file=&amp;quot;18x8&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt; -0.2   &amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt; -0.2   &amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;  0.025 &amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/location&amp;gt;&lt;br /&gt;
    &amp;lt;orient unit=&amp;quot;DEG&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;pitch&amp;gt; 90.00 &amp;lt;/pitch&amp;gt;&lt;br /&gt;
     &amp;lt;roll&amp;gt;   0.00 &amp;lt;/roll&amp;gt;&lt;br /&gt;
     &amp;lt;yaw&amp;gt;    0.00 &amp;lt;/yaw&amp;gt;&lt;br /&gt;
    &amp;lt;/orient&amp;gt;&lt;br /&gt;
    &amp;lt;sense&amp;gt; -1 &amp;lt;/sense&amp;gt;&lt;br /&gt;
    &amp;lt;p_factor&amp;gt; 10 &amp;lt;/p_factor&amp;gt;&lt;br /&gt;
   &amp;lt;/thruster&amp;gt;&lt;br /&gt;
  &amp;lt;/engine&amp;gt;&lt;br /&gt;
  &amp;lt;engine file=&amp;quot;eng_150w&amp;quot; name=&amp;quot;rear right&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;x&amp;gt;  0.2 &amp;lt;/x&amp;gt;&lt;br /&gt;
    &amp;lt;y&amp;gt; -0.2 &amp;lt;/y&amp;gt;&lt;br /&gt;
    &amp;lt;z&amp;gt;  0.0 &amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/location&amp;gt;&lt;br /&gt;
   &amp;lt;orient unit=&amp;quot;DEG&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;pitch&amp;gt; 90.00 &amp;lt;/pitch&amp;gt;&lt;br /&gt;
    &amp;lt;roll&amp;gt;   0.00 &amp;lt;/roll&amp;gt;&lt;br /&gt;
    &amp;lt;yaw&amp;gt;    0.00 &amp;lt;/yaw&amp;gt;&lt;br /&gt;
   &amp;lt;/orient&amp;gt;&lt;br /&gt;
   &amp;lt;feed&amp;gt;0&amp;lt;/feed&amp;gt;&lt;br /&gt;
   &amp;lt;thruster file=&amp;quot;18x8&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;x&amp;gt;  0.2   &amp;lt;/x&amp;gt;&lt;br /&gt;
     &amp;lt;y&amp;gt; -0.2   &amp;lt;/y&amp;gt;&lt;br /&gt;
     &amp;lt;z&amp;gt;  0.025 &amp;lt;/z&amp;gt;&lt;br /&gt;
    &amp;lt;/location&amp;gt;&lt;br /&gt;
    &amp;lt;orient unit=&amp;quot;DEG&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;pitch&amp;gt; 90.00 &amp;lt;/pitch&amp;gt;&lt;br /&gt;
     &amp;lt;roll&amp;gt;   0.00 &amp;lt;/roll&amp;gt;&lt;br /&gt;
     &amp;lt;yaw&amp;gt;    0.00 &amp;lt;/yaw&amp;gt;&lt;br /&gt;
    &amp;lt;/orient&amp;gt;&lt;br /&gt;
    &amp;lt;sense&amp;gt; -1 &amp;lt;/sense&amp;gt;&lt;br /&gt;
    &amp;lt;p_factor&amp;gt; 10 &amp;lt;/p_factor&amp;gt;&lt;br /&gt;
   &amp;lt;/thruster&amp;gt;&lt;br /&gt;
  &amp;lt;/engine&amp;gt;&lt;br /&gt;
  &amp;lt;tank type=&amp;quot;FUEL&amp;quot; number=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;location unit=&amp;quot;M&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;x&amp;gt;   0.00 &amp;lt;/x&amp;gt;&lt;br /&gt;
       &amp;lt;y&amp;gt;   0.00 &amp;lt;/y&amp;gt;&lt;br /&gt;
       &amp;lt;z&amp;gt;  -0.07 &amp;lt;/z&amp;gt;&lt;br /&gt;
     &amp;lt;/location&amp;gt;&lt;br /&gt;
     &amp;lt;capacity unit=&amp;quot;KG&amp;quot;&amp;gt; 0.480 &amp;lt;/capacity&amp;gt;&lt;br /&gt;
     &amp;lt;contents unit=&amp;quot;KG&amp;quot;&amp;gt; 0.480 &amp;lt;/contents&amp;gt;&lt;br /&gt;
  &amp;lt;/tank&amp;gt;&lt;br /&gt;
 '''&amp;lt;/propulsion&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Flight Control'''&lt;br /&gt;
&lt;br /&gt;
 '''&amp;lt;flight_control name=&amp;quot;FCS: quad-copter&amp;quot;&amp;gt;'''&lt;br /&gt;
  &amp;lt;channel name=&amp;quot;Control Input&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;summer name=&amp;quot;Pitch Command Sum&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;input&amp;gt;fcs/elevator-cmd-norm&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;fcs/pitch-trim-cmd-norm&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;clipto&amp;gt;&lt;br /&gt;
     &amp;lt;min&amp;gt;-1&amp;lt;/min&amp;gt;&lt;br /&gt;
     &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
    &amp;lt;/clipto&amp;gt;&lt;br /&gt;
   &amp;lt;/summer&amp;gt; &lt;br /&gt;
   &amp;lt;summer name=&amp;quot;Roll Command Sum&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;fcs/aileron-cmd-norm&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;fcs/roll-trim-cmd-norm&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;clipto&amp;gt;&lt;br /&gt;
     &amp;lt;min&amp;gt;-1&amp;lt;/min&amp;gt;&lt;br /&gt;
     &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
    &amp;lt;/clipto&amp;gt;&lt;br /&gt;
   &amp;lt;/summer&amp;gt;&lt;br /&gt;
   &amp;lt;summer name=&amp;quot;Yaw Command Sum&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;fcs/rudder-cmd-norm&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;input&amp;gt;fcs/yaw-trim-cmd-norm&amp;lt;/input&amp;gt;&lt;br /&gt;
    &amp;lt;clipto&amp;gt;&lt;br /&gt;
     &amp;lt;min&amp;gt; -1 &amp;lt;/min&amp;gt;&lt;br /&gt;
     &amp;lt;max&amp;gt;  1 &amp;lt;/max&amp;gt;&lt;br /&gt;
    &amp;lt;/clipto&amp;gt;&lt;br /&gt;
   &amp;lt;/summer&amp;gt;&lt;br /&gt;
  &amp;lt;/channel&amp;gt;&lt;br /&gt;
  &amp;lt;channel name=&amp;quot;Power&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;fcs_function name=&amp;quot;Power FWD&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;function&amp;gt;&lt;br /&gt;
     &amp;lt;sum&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/throttle-cmd-norm[0]&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.58&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/roll-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/pitch-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;-0.28&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/yaw-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;-0.14&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
     &amp;lt;/sum&amp;gt;&lt;br /&gt;
     &amp;lt;clipto&amp;gt;&lt;br /&gt;
      &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
      &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
     &amp;lt;/clipto&amp;gt;&lt;br /&gt;
    &amp;lt;/function&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;fcs/throttle-pos-norm[0]&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
   &amp;lt;fcs_function name=&amp;quot;Power Aft&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;function&amp;gt;&lt;br /&gt;
     &amp;lt;sum&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/throttle-cmd-norm[1]&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.58&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/roll-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/pitch-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.28&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/yaw-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;-0.14&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
     &amp;lt;/sum&amp;gt;&lt;br /&gt;
     &amp;lt;clipto&amp;gt;&lt;br /&gt;
      &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
      &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
     &amp;lt;/clipto&amp;gt;&lt;br /&gt;
    &amp;lt;/function&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;fcs/throttle-pos-norm[1]&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
   &amp;lt;fcs_function name=&amp;quot;Power Left&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;function&amp;gt;&lt;br /&gt;
     &amp;lt;sum&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/throttle-cmd-norm[2]&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.58&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/roll-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;-0.28&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/pitch-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/yaw-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.14&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
     &amp;lt;/sum&amp;gt;&lt;br /&gt;
     &amp;lt;clipto&amp;gt;&lt;br /&gt;
      &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
      &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
     &amp;lt;/clipto&amp;gt;&lt;br /&gt;
    &amp;lt;/function&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;fcs/throttle-pos-norm[2]&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
   &amp;lt;fcs_function name=&amp;quot;Power Right&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;function&amp;gt;&lt;br /&gt;
     &amp;lt;sum&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/throttle-cmd-norm[3]&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.58&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/roll-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.28&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/pitch-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.0&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
      &amp;lt;product&amp;gt;&lt;br /&gt;
       &amp;lt;property&amp;gt;fcs/yaw-command-sum&amp;lt;/property&amp;gt;&lt;br /&gt;
       &amp;lt;value&amp;gt;0.14&amp;lt;/value&amp;gt;&lt;br /&gt;
      &amp;lt;/product&amp;gt;&lt;br /&gt;
     &amp;lt;/sum&amp;gt;&lt;br /&gt;
     &amp;lt;clipto&amp;gt;&lt;br /&gt;
      &amp;lt;min&amp;gt;0&amp;lt;/min&amp;gt;&lt;br /&gt;
      &amp;lt;max&amp;gt;1&amp;lt;/max&amp;gt;&lt;br /&gt;
     &amp;lt;/clipto&amp;gt;&lt;br /&gt;
    &amp;lt;/function&amp;gt;&lt;br /&gt;
    &amp;lt;output&amp;gt;fcs/throttle-pos-norm[3]&amp;lt;/output&amp;gt;&lt;br /&gt;
   &amp;lt;/fcs_function&amp;gt;&lt;br /&gt;
  &amp;lt;/channel&amp;gt;&lt;br /&gt;
 '''&amp;lt;/flight_control&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aerodynamics'''&lt;br /&gt;
 '''&amp;lt;aerodynamics&amp;gt;'''&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;LIFT&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;DRAG&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;function name=&amp;quot;aero/coefficient/CD0&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;description&amp;gt;Overall Drag&amp;lt;/description&amp;gt;&lt;br /&gt;
       &amp;lt;product&amp;gt;&lt;br /&gt;
           &amp;lt;property&amp;gt;aero/qbar-psf&amp;lt;/property&amp;gt;&lt;br /&gt;
           &amp;lt;property&amp;gt;metrics/Sw-sqft&amp;lt;/property&amp;gt;&lt;br /&gt;
           &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;br /&gt;
       &amp;lt;/product&amp;gt;&lt;br /&gt;
    &amp;lt;/function&amp;gt;&lt;br /&gt;
  &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;SIDE&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;ROLL&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;PITCH&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;YAW&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;/axis&amp;gt;&lt;br /&gt;
 '''&amp;lt;/aerodynamics&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== AR.Drone-set.xml ===&lt;br /&gt;
The set .xml file is used by Flightgear for the simulation of the aircraft and sees no further use by JSBSIM for the creation of the FDM. All variables and settings within this particular .xml file are implemented in the drone simulation (e.g. sounds, sights, systems, etc.). A CAD model of the drone is also used herein for visual representation. The model was animated in the [http://www.blender.org/ Blender] open-source 3D computer graphics software. Therein it was imported as a .stl file from a CAD editor and exported as a .ac file which Flightgear could implement as a visual during simulation. At the time of writing this was the most straightforward method for importing and exporting the model although it required the implementation of an additional python script. These import and export features will soon be default in Blender distributions.&lt;br /&gt;
&lt;br /&gt;
'''Simulation and Visuals'''&lt;br /&gt;
&lt;br /&gt;
An autopilot system is used during the simulation; the autopilot system is from the Malolo1 DIY Drones ArduPlane repository on Google Code, it can be found in full [http://code.google.com/p/ardupilot-mega/source/browse/Tools/autotest/aircraft/Rascal/Systems/110-autopilot.xml?name=ArduCopter-2.5 here]. The code for the Malolo1 is distributed, free of costs, under the GNU General Public License. It was implemented in the Flightgear simulation of the AR.Drone2 as a reliable autopilot system to maintain stable flight. When implementing it in your own code take special care to ensure that all paths and directories are appropriate for your own project. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;sim&amp;gt;&lt;br /&gt;
  &amp;lt;description&amp;gt; Parrot AR.Drone 2.0 &amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;author&amp;gt; Author &amp;lt;/author&amp;gt;&lt;br /&gt;
  &amp;lt;aircraft-version&amp;gt; 0.0 &amp;lt;/aircraft-version&amp;gt;&lt;br /&gt;
  &amp;lt;status&amp;gt; beta version &amp;lt;/status&amp;gt; &lt;br /&gt;
  &amp;lt;flight-model&amp;gt;jsb&amp;lt;/flight-model&amp;gt;&lt;br /&gt;
  &amp;lt;aero&amp;gt;AR.Drone&amp;lt;/aero&amp;gt;&lt;br /&gt;
  &amp;lt;systems&amp;gt;&lt;br /&gt;
   &amp;lt;autopilot&amp;gt;&lt;br /&gt;
    &amp;lt;path&amp;gt;Aircraft/Malolo1/Systems/110-autopilot.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
   &amp;lt;/autopilot&amp;gt;&lt;br /&gt;
   &amp;lt;electrical&amp;gt;&lt;br /&gt;
    &amp;lt;path&amp;gt;Aircraft/Malolo1/Systems/electrical.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
   &amp;lt;/electrical&amp;gt;&lt;br /&gt;
  &amp;lt;/systems&amp;gt;&lt;br /&gt;
  &amp;lt;sound&amp;gt;&lt;br /&gt;
   &amp;lt;path&amp;gt;Aircraft/Generic/generic-sound.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
  &amp;lt;/sound&amp;gt;&lt;br /&gt;
  &amp;lt;panel&amp;gt;&lt;br /&gt;
   &amp;lt;visibility archive=&amp;quot;n&amp;quot;&amp;gt;false&amp;lt;/visibility&amp;gt;&lt;br /&gt;
  &amp;lt;/panel&amp;gt;&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
   &amp;lt;path archive=&amp;quot;y&amp;quot;&amp;gt;Aircraft/AR.Drone/Models/visualmodels.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
  &amp;lt;view&amp;gt;&lt;br /&gt;
   &amp;lt;internal archive=&amp;quot;y&amp;quot;&amp;gt;true&amp;lt;/internal&amp;gt;&lt;br /&gt;
   &amp;lt;config&amp;gt;&lt;br /&gt;
     &amp;lt;x-offset-m archive=&amp;quot;y&amp;quot;&amp;gt;0.0&amp;lt;/x-offset-m&amp;gt;&lt;br /&gt;
     &amp;lt;y-offset-m archive=&amp;quot;y&amp;quot;&amp;gt;0.15&amp;lt;/y-offset-m&amp;gt;&lt;br /&gt;
     &amp;lt;z-offset-m archive=&amp;quot;y&amp;quot;&amp;gt;0.90&amp;lt;/z-offset-m&amp;gt;&lt;br /&gt;
     &amp;lt;pitch-offset-deg&amp;gt;0&amp;lt;/pitch-offset-deg&amp;gt;&lt;br /&gt;
   &amp;lt;/config&amp;gt;&lt;br /&gt;
  &amp;lt;/view&amp;gt;&lt;br /&gt;
        &amp;lt;chase-distance-m archive=&amp;quot;y&amp;quot; type=&amp;quot;double&amp;quot;&amp;gt;-5.5&amp;lt;/chase-distance-m&amp;gt;&lt;br /&gt;
  &amp;lt;help&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt; Parrot AR.Drone &amp;lt;/title&amp;gt;&lt;br /&gt;
  &amp;lt;/help&amp;gt;&lt;br /&gt;
 &amp;lt;/sim&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Controls, Consumables, Payload, and Nasal'''&lt;br /&gt;
 &amp;lt;controls&amp;gt;&lt;br /&gt;
  &amp;lt;flight&amp;gt;&lt;br /&gt;
   &amp;lt;aileron-trim&amp;gt;0.00&amp;lt;/aileron-trim&amp;gt;   &amp;lt;!-- fixed --&amp;gt;&lt;br /&gt;
   &amp;lt;elevator-trim&amp;gt;0.00&amp;lt;/elevator-trim&amp;gt; &amp;lt;!-- controllable --&amp;gt;&lt;br /&gt;
  &amp;lt;/flight&amp;gt;&lt;br /&gt;
 &amp;lt;/controls&amp;gt;&lt;br /&gt;
 &amp;lt;consumables&amp;gt;&lt;br /&gt;
  &amp;lt;fuel&amp;gt;&lt;br /&gt;
   &amp;lt;tank n=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;level-gal_us&amp;gt;0.1667&amp;lt;/level-gal_us&amp;gt;&lt;br /&gt;
   &amp;lt;/tank&amp;gt;&lt;br /&gt;
  &amp;lt;/fuel&amp;gt;&lt;br /&gt;
 &amp;lt;/consumables&amp;gt; &lt;br /&gt;
 &amp;lt;payload&amp;gt;&lt;br /&gt;
  &amp;lt;weight&amp;gt;&lt;br /&gt;
   &amp;lt;name type=&amp;quot;string&amp;quot;&amp;gt;Payload&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;weight-lb alias=&amp;quot;/fdm/jsbsim/inertia/pointmass-weight-lbs[0]&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;min-lb type=&amp;quot;double&amp;quot;&amp;gt;0.0&amp;lt;/min-lb&amp;gt;&lt;br /&gt;
   &amp;lt;max-lb type=&amp;quot;double&amp;quot;&amp;gt;1.0&amp;lt;/max-lb&amp;gt;&lt;br /&gt;
  &amp;lt;/weight&amp;gt;&lt;br /&gt;
 &amp;lt;/payload&amp;gt; &lt;br /&gt;
 &amp;lt;nasal&amp;gt;&lt;br /&gt;
  &amp;lt;AR.Drone&amp;gt;&lt;br /&gt;
   &amp;lt;script&amp;gt;&lt;br /&gt;
     setlistener(&amp;quot;/sim/signals/fdm-initialized&amp;quot;, func {&lt;br /&gt;
         var left  = screen.display.new(20, 10);&lt;br /&gt;
         left.add(&amp;quot;/fdm/jsbsim/fcs/throttle-pos-norm[0]&amp;quot;);&lt;br /&gt;
         left.add(&amp;quot;/fdm/jsbsim/fcs/throttle-pos-norm[1]&amp;quot;);&lt;br /&gt;
         left.add(&amp;quot;/fdm/jsbsim/fcs/throttle-pos-norm[2]&amp;quot;);&lt;br /&gt;
         left.add(&amp;quot;/fdm/jsbsim/fcs/throttle-pos-norm[3]&amp;quot;);&lt;br /&gt;
         left.add(&amp;quot;/orientation/pitch-deg&amp;quot;);&lt;br /&gt;
         var right = screen.display.new(-250, 20);&lt;br /&gt;
         right.add(&amp;quot;/fdm/jsbsim/moments/l-prop-lbsft&amp;quot;);&lt;br /&gt;
         right.add(&amp;quot;/fdm/jsbsim/moments/m-prop-lbsft&amp;quot;);&lt;br /&gt;
         right.add(&amp;quot;/fdm/jsbsim/moments/n-prop-lbsft&amp;quot;);&lt;br /&gt;
     });&lt;br /&gt;
   &amp;lt;/script&amp;gt;&lt;br /&gt;
  &amp;lt;/AR.Drone&amp;gt;&lt;br /&gt;
 &amp;lt;/nasal&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Flightgear ==&lt;br /&gt;
&lt;br /&gt;
This section will explain the installation of FlightGear and the creation of an visual model for Flightgear.&lt;br /&gt;
&lt;br /&gt;
[[Image:Flightgear Screenshot indoor.png|thumb|right|400px|An example AR.Drone flying in FlightGear]]&lt;br /&gt;
&lt;br /&gt;
=== Download FlightGear ===&lt;br /&gt;
&lt;br /&gt;
FlightGear can be downloaded from http://www.flightgear.org/download/ . Installation should be self-explanatory. The aircraft models will be located in: (...\FlightGear\Data\Aircraft).&lt;br /&gt;
&lt;br /&gt;
=== Visual model ===&lt;br /&gt;
&lt;br /&gt;
Flightgear uses .ac files from the AC3D program, a 3D design program by Inivis[http://www.inivis.com/]. A free alternative is Blender[http://www.blender.org/], which can export its files to the .ac format with a plugin[http://wiki.blender.org/index.php/Extensions:2.4/Py/Scripts/Export/AC3D] (instructions on how to install also found in link).&lt;br /&gt;
&lt;br /&gt;
Our minor group used an existing model[http://grabcad.com/library/ar-drone-parrot], (registering required), which we exported to .stl in Autodesk. Then we imported the .stl files with Blender, and exported them again in the required .ac format.&lt;br /&gt;
&lt;br /&gt;
==== Moving parts ====&lt;br /&gt;
&lt;br /&gt;
To use animated moving parts in the model, all the moving parts have to be exported individually. All parts are linked together by the model's set file.&lt;br /&gt;
&lt;br /&gt;
== Setting up the folder == &lt;br /&gt;
Inside your aircraft folder (...\FlightGear\Data\Aircraft\&amp;quot;Aircraft name&amp;quot;), a .xml file is needed to enable Flightgear to load the model. This file should be named as: &amp;quot;Aircraft name&amp;quot;-set.xml. Inside, it links to main visual model file. All visual model files should go into the &amp;quot;Models&amp;quot; folder of the aircraft:  (...\FlightGear\Data\Aircraft\&amp;quot;Aircraft name&amp;quot;\Models). The main .xml file should indicate the lay-out of the model (see Example files).&lt;br /&gt;
&lt;br /&gt;
==== Clarification of the .xml files ====&lt;br /&gt;
main.xml:&lt;br /&gt;
&lt;br /&gt;
The .ac file contains the body model of the quadrotor:&lt;br /&gt;
 &amp;lt;path&amp;gt;myquadrotor.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 4 &amp;lt;model&amp;gt; nodes contain information about the location and orientation of the propellors. The &amp;lt;path&amp;gt; links to the location of the engine file. The &amp;lt;offsets&amp;gt; manually places the propellors in (about) the right place. This has no consequences for the performance of the aircraft. For the FlightGear coordinate system, see: [http://www.city-gallery.com/knoblock/projects/flightgear/Docs/coords.html]. The &amp;lt;pitch/yaw/roll-deg&amp;gt; can be used if the imported file has the wrong orientation.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
 &amp;lt;!-- LF --&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Engine1&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;path&amp;gt;Aircraft/myquadrotor/Models/engine1.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
   &amp;lt;offsets&amp;gt;&lt;br /&gt;
    &amp;lt;x-m&amp;gt;0.3&amp;lt;/x-m&amp;gt;&lt;br /&gt;
    &amp;lt;y-m&amp;gt;-0.2&amp;lt;/y-m&amp;gt;&lt;br /&gt;
    &amp;lt;z-m&amp;gt;0.0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;pitch-deg&amp;gt;0&amp;lt;/pitch-deg&amp;gt;&lt;br /&gt;
   &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using &amp;lt;offsets&amp;gt; the orientation of the model was corrected:&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;offsets&amp;gt;&lt;br /&gt;
   &amp;lt;heading-deg&amp;gt;270&amp;lt;/heading-deg&amp;gt;&lt;br /&gt;
  &amp;lt;/offsets&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
engine1.xml:&lt;br /&gt;
&lt;br /&gt;
Contains the model of the rotor:&lt;br /&gt;
 &amp;lt;path&amp;gt;rotor.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Animation&amp;gt; is used for the animation of the propeller. You can declare the type of animation (spin), the center of the animation, around which axis to spin and in which direction (clockwise or ccw). &lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;spin&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;propeller&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;engines/engine[0]/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;1&amp;lt;/factor&amp;gt;   &lt;br /&gt;
   &amp;lt;centre&amp;gt;&lt;br /&gt;
    &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
    &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
    &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/centre&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
    &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
    &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
    &amp;lt;z&amp;gt;-1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example files ===&lt;br /&gt;
main.xml file:&lt;br /&gt;
 &amp;lt;PropertyList&amp;gt;&lt;br /&gt;
  &amp;lt;path&amp;gt;myquadrotor.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
 &amp;lt;!-- LF --&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Engine1&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;path&amp;gt;Aircraft/myquadrotor/Models/engine1.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
   &amp;lt;offsets&amp;gt;&lt;br /&gt;
    &amp;lt;x-m&amp;gt;0.3&amp;lt;/x-m&amp;gt;&lt;br /&gt;
    &amp;lt;y-m&amp;gt;-0.2&amp;lt;/y-m&amp;gt;&lt;br /&gt;
    &amp;lt;z-m&amp;gt;0.0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;pitch-deg&amp;gt;0&amp;lt;/pitch-deg&amp;gt;&lt;br /&gt;
   &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
 &amp;lt;!-- RB --&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Engine2&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;path&amp;gt;Aircraft/myquadrotor/Models/engine2.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
   &amp;lt;offsets&amp;gt;&lt;br /&gt;
    &amp;lt;x-m&amp;gt; -0.3&amp;lt;/x-m&amp;gt;&lt;br /&gt;
    &amp;lt;y-m&amp;gt;0.2&amp;lt;/y-m&amp;gt;&lt;br /&gt;
    &amp;lt;z-m&amp;gt; 0.0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;pitch-deg&amp;gt;0&amp;lt;/pitch-deg&amp;gt;&lt;br /&gt;
   &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
 &amp;lt;!-- RF --&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Engine3&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;path&amp;gt;Aircraft/myquadrotor/Models/engine3.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
   &amp;lt;offsets&amp;gt;&lt;br /&gt;
    &amp;lt;x-m&amp;gt;-0.3&amp;lt;/x-m&amp;gt;&lt;br /&gt;
    &amp;lt;y-m&amp;gt;-0.2&amp;lt;/y-m&amp;gt;&lt;br /&gt;
    &amp;lt;z-m&amp;gt; 0.0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;pitch-deg&amp;gt;0&amp;lt;/pitch-deg&amp;gt;&lt;br /&gt;
   &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;model&amp;gt;&lt;br /&gt;
 &amp;lt;!-- LB --&amp;gt;&lt;br /&gt;
   &amp;lt;name&amp;gt;Engine4&amp;lt;/name&amp;gt;&lt;br /&gt;
   &amp;lt;path&amp;gt;Aircraft/myquadrotor/Models/engine4.xml&amp;lt;/path&amp;gt;&lt;br /&gt;
   &amp;lt;offsets&amp;gt;&lt;br /&gt;
    &amp;lt;x-m&amp;gt; 0.3&amp;lt;/x-m&amp;gt;&lt;br /&gt;
    &amp;lt;y-m&amp;gt; 0.2 &amp;lt;/y-m&amp;gt;&lt;br /&gt;
    &amp;lt;z-m&amp;gt; 0.0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
    &amp;lt;pitch-deg&amp;gt;0&amp;lt;/pitch-deg&amp;gt;&lt;br /&gt;
   &amp;lt;/offsets&amp;gt;&lt;br /&gt;
  &amp;lt;/model&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;offsets&amp;gt;&lt;br /&gt;
   &amp;lt;heading-deg&amp;gt;270&amp;lt;/heading-deg&amp;gt;&lt;br /&gt;
  &amp;lt;/offsets&amp;gt;&lt;br /&gt;
 &amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
engine1.xml file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;PropertyList&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;path&amp;gt;rotor.ac&amp;lt;/path&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;animation&amp;gt;&lt;br /&gt;
   &amp;lt;type&amp;gt;spin&amp;lt;/type&amp;gt;&lt;br /&gt;
   &amp;lt;object-name&amp;gt;propeller&amp;lt;/object-name&amp;gt;&lt;br /&gt;
   &amp;lt;property&amp;gt;engines/engine[0]/rpm&amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;factor&amp;gt;1&amp;lt;/factor&amp;gt;   &lt;br /&gt;
   &amp;lt;centre&amp;gt;&lt;br /&gt;
    &amp;lt;x-m&amp;gt;0&amp;lt;/x-m&amp;gt;&lt;br /&gt;
    &amp;lt;y-m&amp;gt;0&amp;lt;/y-m&amp;gt;&lt;br /&gt;
    &amp;lt;z-m&amp;gt;0&amp;lt;/z-m&amp;gt;&lt;br /&gt;
   &amp;lt;/centre&amp;gt;&lt;br /&gt;
   &amp;lt;axis&amp;gt;&lt;br /&gt;
    &amp;lt;x&amp;gt;0&amp;lt;/x&amp;gt;&lt;br /&gt;
    &amp;lt;y&amp;gt;0&amp;lt;/y&amp;gt;&lt;br /&gt;
    &amp;lt;z&amp;gt;-1&amp;lt;/z&amp;gt;&lt;br /&gt;
   &amp;lt;/axis&amp;gt;&lt;br /&gt;
  &amp;lt;/animation&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/PropertyList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== View ARDrone 2 live video ==&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Simple low quality MJPEG over RTP ===&lt;br /&gt;
&lt;br /&gt;
Add the '''video_stream_rtp.xml''' module to your airframe file. (you can save higher quality frames by clicking on the snapshot setting in the ground-station)&lt;br /&gt;
&lt;br /&gt;
Make a text file with extension .sdp and add the following content [https://github.com/tudelft/ardrone2_gstreamer/blob/master/sdp/x86_config-mjpeg.sdp link]&lt;br /&gt;
&lt;br /&gt;
  v=0&lt;br /&gt;
  m=video 5000 RTP/AVP 26&lt;br /&gt;
  c=IN IP4 0.0.0.0&lt;br /&gt;
&lt;br /&gt;
Open the SDP file with VLC or another video viewer while the code with module is running on the drone.&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Use the precompiled gstreamer with MP4 encoding on the DSP ===&lt;br /&gt;
&lt;br /&gt;
  git clone https://github.com/tudelft/ardrone2_gstreamer.git&lt;br /&gt;
&lt;br /&gt;
Once connected to the ARDrone2 you can upload gstreamer to the ARDrone using (make sure you did not already add a lot of data to the drone like pictures etc because gstreamer will need all normally available free space):&lt;br /&gt;
&lt;br /&gt;
  cd ardrone2_gstreamer/&lt;br /&gt;
  make drone   (or manually untar arm_light.tgz and mount and start dsp images: see ardrone.py script for details: reboot drone if starting dsp mp4 images fails)&lt;br /&gt;
&lt;br /&gt;
Before you start encoding video on ARDrone2 the DSP inside the OMAP, it must still load the proper binaries (see todo/basescript.sh for an alternative)&lt;br /&gt;
&lt;br /&gt;
  ./ardrone2.py startvideo  (this step must be repeated every time you reboot the drone)&lt;br /&gt;
&lt;br /&gt;
After this you can use gstreamer on the drone: telnet to the drone and run for instance: &lt;br /&gt;
&lt;br /&gt;
  telnet 192.168.1.1&lt;br /&gt;
  gst-launch v4l2src device=/dev/video1 ! videorate ! 'video/x-raw-yuv,framerate=15/1' ! videoscale ! video/x-raw-yuv, width=320, height=240 ! dspmp4venc ! rtpmp4vpay config-interval=2 ! udpsink host=192.168.1.255 port=5000&lt;br /&gt;
&lt;br /&gt;
(to open video1, downrate, downsample, MP4-encode on dsp, add RTP protocol, UDP stream to IP:port)&lt;br /&gt;
&lt;br /&gt;
and view and save the stream on your PC using the opposite chain:&lt;br /&gt;
&lt;br /&gt;
  gst-launch-0.10 udpsrc uri=udp://0.0.0.0:5000  caps = 'application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, payload=(int)96' ! rtpmp4vdepay ! ffdec_mpeg4 ! ffmpegcolorspace ! tee name=split ! ximagesink split. ! queue ! ffmpegcolorspace ! ffenc_mpeg4 ! avimux ! filesink location=video.avi&lt;br /&gt;
&lt;br /&gt;
==== don't have gstreamer on your PC yet? ====&lt;br /&gt;
&lt;br /&gt;
Install gstreamer with codecs on unbuntu: make install should achieve this &lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install gstreamer0.10-ffmpeg&lt;br /&gt;
&lt;br /&gt;
device=/dev/video1 is front camera&lt;br /&gt;
device=/dev/video2 is bottom camera&lt;br /&gt;
&lt;br /&gt;
Other way to video client in ubuntu: &lt;br /&gt;
e.g.: &lt;br /&gt;
  gst-launch-0.10 -vvv playbin uri=file:///home/YOURNAME_AND_SUBFOLDER/ardrone2_gstreamer/sdp/x86_config-mp4.sdp&lt;br /&gt;
or see https://github.com/tudelft/ardrone2_gstreamer/blob/master/sdp/Makefile for options&lt;br /&gt;
&lt;br /&gt;
if the above command fails for Ubuntu 12.04 users, you can try this&lt;br /&gt;
  gst-launch-0.10 udpsrc uri=udp://0.0.0.0:5000  caps = 'application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, payload=(int)96' ! rtpmp4vdepay ! ffdec_mpeg4 ! ffmpegcolorspace ! ximagesink&lt;br /&gt;
&lt;br /&gt;
5) if you want to kill your video on the drone&lt;br /&gt;
  telnet 192.168.1.1&lt;br /&gt;
  killall -9 gst-launch&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Making Gstreamer Plugins for the ARDrone ==&lt;br /&gt;
&lt;br /&gt;
To combine your own vision with efficient exising gstreamer functions (like dspmp4encode) you should create a plugin and add it to the gstreamer chain: &lt;br /&gt;
&lt;br /&gt;
=== Install ===&lt;br /&gt;
&lt;br /&gt;
We first must install the framework on your development PC. We assume you already have installed the Paparazzi sourcecode. If not, please do that first, then come back to this page.&lt;br /&gt;
&lt;br /&gt;
  git clone https://github.com/tudelft/ardrone2_vision.git&lt;br /&gt;
  cd ardrone2_vision&lt;br /&gt;
  make install   (install some tools needed; scratchbox2 and qemu)&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
If you need to change your cross compiler:&lt;br /&gt;
&lt;br /&gt;
  gedit ./ardrone2_gstreamer/Makefile &lt;br /&gt;
&lt;br /&gt;
And add edit the path to your ardrone crosscompiler and '''make install''' again to setup sb2&lt;br /&gt;
&lt;br /&gt;
Make your own vision plugin&lt;br /&gt;
&lt;br /&gt;
  ./create_new_plugin.py&lt;br /&gt;
&lt;br /&gt;
== OpenCV 3 ==&lt;br /&gt;
&lt;br /&gt;
Here the description on how to get OpenCV 3 on your AR.Drone 2.0. If there is not so much text of explanation here... it is your turn to extend this Wikipage with your knowledge please.&lt;br /&gt;
 &lt;br /&gt;
[http://docs.opencv.org/doc/tutorials/introduction/crosscompilation/arm_crosscompile_with_cmake.html]&lt;br /&gt;
&lt;br /&gt;
== Tips and Tricks==&lt;br /&gt;
&lt;br /&gt;
=== Transfer files ===&lt;br /&gt;
&lt;br /&gt;
For transferring files the File Transfer Protocol (FTP) used in this project, was FileZilla. When you installed FileZilla, it will be pretty easy to transfer files.&lt;br /&gt;
&lt;br /&gt;
First you need to connect to the AR.Drone 2, by entering the ip-address of the AR.Drone 2 which is by default &amp;quot;192.168.1.1&amp;quot;. Leave all other settings of FileZilla the same and press connect. When you are connected to the AR.Drone 2, keep in mind that programs need to be transferred in binary mode which can be set in the FileZilla Settings.&lt;br /&gt;
&lt;br /&gt;
=== Into the Brain ===&lt;br /&gt;
&lt;br /&gt;
=== login to console on AR.Drone2 via telnet ===&lt;br /&gt;
To connect to AR.Drone2 you need a telnet client, so that you can connect with the busybox telnet server on the AR.Drone2.&lt;br /&gt;
When your computer is connected trough wifi with the the AR.Drone2, the drone's IP-address defaults to 192.168.1.1.&lt;br /&gt;
&lt;br /&gt;
You can now connect by typing:&lt;br /&gt;
&lt;br /&gt;
 $ telnet 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
A busybox welcome message will show when you connect.&lt;br /&gt;
&lt;br /&gt;
It is convenient to make a hosts definition so you can type:&lt;br /&gt;
&lt;br /&gt;
 $ telnet ardrone2&lt;br /&gt;
&lt;br /&gt;
You do this by adding &amp;lt;code&amp;gt;192.168.1.1 ardrone2&amp;lt;/code&amp;gt; to /etc/hosts&lt;br /&gt;
&lt;br /&gt;
=== Change WiFi channel ===&lt;br /&gt;
&lt;br /&gt;
Sometimes it is nice to be able to change a Wifi channel in an area where there a lot of Wifi devices are in one place. Do it via:&lt;br /&gt;
&lt;br /&gt;
  # iwconfig ath0 channel X commit&lt;br /&gt;
&lt;br /&gt;
=== Connect via a router ===&lt;br /&gt;
&lt;br /&gt;
To have a more flexible network setting the drone to use a router would be a good device to use. [[ardrone2userouter | This page explains how to use a router icw a AR.Drone 2.0]]&lt;br /&gt;
&lt;br /&gt;
=== Eclipse Post-build steps ===&lt;br /&gt;
&lt;br /&gt;
While developing with the arm [toolchain] to create some test applications for AR.Drone2 we used a post-build step to quickly upload the file from development computer to the AR.Drone2.&lt;br /&gt;
&lt;br /&gt;
publish.sh&lt;br /&gt;
 echo &amp;quot;Release script&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # first call a telnet script that stops the test program&lt;br /&gt;
 /home/dhensen/telnet_stop_script.sh | telnet&lt;br /&gt;
 &lt;br /&gt;
 # requires having 192.168.1.1 ardrone2 in /etc/hosts&lt;br /&gt;
 ftp ardrone2 &amp;lt;&amp;lt;END_SCRIPT&lt;br /&gt;
 # type an arbitrary username on the next line &lt;br /&gt;
 dhensen&lt;br /&gt;
 # change the source and target dir to fullfill your needs&lt;br /&gt;
 put /home/dhensen/workspace/test/Release/test /bin/test&lt;br /&gt;
 quit&lt;br /&gt;
 END_SCRIPT&lt;br /&gt;
 &lt;br /&gt;
 # lastly call a telnet script that gives the test program the right permissions&lt;br /&gt;
 /home/dhensen/telnet_permission.sh | telnet&lt;br /&gt;
 &lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
telnet_stop_script.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 host=ardrone2&lt;br /&gt;
 port=23&lt;br /&gt;
 login=notneeded&lt;br /&gt;
 passwd=notneeded&lt;br /&gt;
 cmd=&amp;quot;killall -9 test&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo open ${host} ${port}&lt;br /&gt;
 sleep 0.1&lt;br /&gt;
 echo ${cmd}&lt;br /&gt;
 sleep 0.1&lt;br /&gt;
 echo exit&lt;br /&gt;
&lt;br /&gt;
telnet_permission.sh&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 host=ardrone2&lt;br /&gt;
 port=23&lt;br /&gt;
 login=notneeded&lt;br /&gt;
 passwd=notneeded&lt;br /&gt;
 cmd=&amp;quot;chmod 777 /data/video/bin/test&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo open ${host} ${port}&lt;br /&gt;
 sleep 0.1&lt;br /&gt;
 echo ${cmd}&lt;br /&gt;
 sleep 0.1&lt;br /&gt;
 echo exit&lt;br /&gt;
&lt;br /&gt;
You can use publish.sh in eclipse by opening Project Properties -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; Build Steps.&lt;br /&gt;
Then in the Post-build steps section in the Command field type: /&amp;lt;your_path_to_file&amp;gt;/publish.sh while replacing your_path_to_file with the path where you saved publish.sh.&lt;br /&gt;
&lt;br /&gt;
After building this script will now push your program called &amp;lt;code&amp;gt;test&amp;lt;/code&amp;gt; to the AR.Drone2 automatically. This saves a lot of time, but you still have to run it yourself or adapt the script above to run it automatically. We did not require an automatic run script so we left it out here.&lt;br /&gt;
&lt;br /&gt;
[[Category: AR Drone 2]]&lt;br /&gt;
&lt;br /&gt;
=== Console Fixing ===&lt;br /&gt;
&lt;br /&gt;
==== The traditional pinout ====&lt;br /&gt;
&lt;br /&gt;
[[File:Ardrone2_hw1.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware V2 ====&lt;br /&gt;
&lt;br /&gt;
The new 6 pin of 2013 PCB design. '''Warning''', mind pin 1, there is the full 12V battery voltage! Access the port via /dev/ttyO3&lt;br /&gt;
&lt;br /&gt;
[[File:ArDrone2_SerialConsoleNewPinout2013.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== View Printf ====&lt;br /&gt;
&lt;br /&gt;
First upload from paparazzi center, then telenet into you Drone's brain:&lt;br /&gt;
&lt;br /&gt;
 $ telnet 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
On the Drone to show all running processed:&lt;br /&gt;
&lt;br /&gt;
 # ps -aux&lt;br /&gt;
&lt;br /&gt;
To kill AP process:&lt;br /&gt;
&lt;br /&gt;
 # killall -9 ap.elf&lt;br /&gt;
&lt;br /&gt;
To restart the main autopilot PPRZ process:&lt;br /&gt;
&lt;br /&gt;
 # cd /data/video/paparazzi&lt;br /&gt;
 # ./ap.elf&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
==== Serial Console Cable ====&lt;br /&gt;
&lt;br /&gt;
Via the bottom USB port &lt;br /&gt;
&lt;br /&gt;
Debugging is much easier if we have a console cable. For this your USB to serial terminal cable is connected on /dev/ttyUSB0, found via e.g.&lt;br /&gt;
&lt;br /&gt;
 $ dmesg&lt;br /&gt;
&lt;br /&gt;
To login to the drone in your regular Linux terminal use:&lt;br /&gt;
&lt;br /&gt;
 $ screen /dev/ttyUSB0 115200&lt;br /&gt;
&lt;br /&gt;
=== Repair firmware via serial connection ===&lt;br /&gt;
&lt;br /&gt;
Sometimes your AR.Drone 2.0 is quite messed up since you e.g .deleted some crucial files needed to boot your drone. You need to have a serial cable&lt;br /&gt;
&lt;br /&gt;
http://forum.parrot.com/ardrone/en/viewtopic.php?id=5331&lt;br /&gt;
&lt;br /&gt;
=== Repairing Firmware ===&lt;br /&gt;
&lt;br /&gt;
If your ARdrone2 is really inaccessible, a.k.a. bricked, there is work for you to be done, sice so far no one managed to flash the firmware with external opensource tools. Theoretically possible, just n one ever managed.&lt;br /&gt;
&lt;br /&gt;
=== Downgrade firmware ===&lt;br /&gt;
&lt;br /&gt;
 If you would like to downgrade, upgrade, or re-install firmware you can do so at your own risk by using these files and instructions.&lt;br /&gt;
&lt;br /&gt;
Abbreviated instructions:&lt;br /&gt;
&lt;br /&gt;
* Download the version you want below. (Don’t change the filename.)&lt;br /&gt;
* Power up your AR.Drone&lt;br /&gt;
* Connect your computer to the AR.Drone’s network&lt;br /&gt;
* Open a telnet session to 192.168.1.1&lt;br /&gt;
* type the following:  echo “1.1.1″ &amp;gt; /firmware/version.txt&lt;br /&gt;
* press enter&lt;br /&gt;
* type the following:  echo “1.1.1″ &amp;gt; /update/version.txt&lt;br /&gt;
* Connect an FTP client to 192.168.1.1 Port: 5551&lt;br /&gt;
* Upload the downloaded plf file to the FTP server (AR.Drone)&lt;br /&gt;
* Disconnect your computer from the AR.Drone&lt;br /&gt;
*  Disconnect the battery from the AR.Drone&lt;br /&gt;
* Reconnect the battery&lt;br /&gt;
* Wait about 5 minutes while the upgrade completes, leave your drone switched on= &lt;br /&gt;
&lt;br /&gt;
=== GDB ===&lt;br /&gt;
&lt;br /&gt;
The Drone has GDB (GNU Debugger) installed by default&lt;br /&gt;
&lt;br /&gt;
Connect to GDB via: {TODO}&lt;br /&gt;
&lt;br /&gt;
== Boot sequence ==&lt;br /&gt;
&lt;br /&gt;
Note that this section of the page is a work in progress, lease add more info if you have discovered more infrmation.&lt;br /&gt;
&lt;br /&gt;
http://omappedia.org/wiki/Bootloader_Project&lt;br /&gt;
&lt;br /&gt;
The drone 2.0 is based on a Texas Instruments OMAP3630, modified of course.&lt;br /&gt;
&lt;br /&gt;
v1 process (it's similar but not the same, and there is no &amp;quot;load from USB&amp;quot; bootloader available for the 2.0 like there was for the v1):&lt;br /&gt;
http://embedded-software.blogspot.co.uk&lt;br /&gt;
&lt;br /&gt;
How the boot process works:&lt;br /&gt;
* http://omappedia.org/wiki/Bootloader_Project&lt;br /&gt;
&lt;br /&gt;
Parrot has modified it with their own bootloader(s) though.&lt;br /&gt;
&lt;br /&gt;
Tools to load a different bootloader over UART:&lt;br /&gt;
* http://projects.goldelico.com/p/gta04-m … erialBoot/&lt;br /&gt;
&lt;br /&gt;
Note that you won't be able to use his s-boot.bin, it's for a different board of course.&lt;br /&gt;
&lt;br /&gt;
You can make the drone look for a bootloader over UART by plugging a device into the USB port. It might also work if you connect pin 2 to a 5v supply (I think this is VUSB in). You'll know it is working because the drone will wait for 2 seconds before you see the &amp;quot;Parrotboot&amp;quot; message.&lt;br /&gt;
&lt;br /&gt;
Unlike the v1 there is no &amp;quot;flash via USB/UART&amp;quot; bootloader made available by Parrot, so you will have to make your own. There are 3630 configs for x-loader floating around on the web, but none will work out of the box. You need to modify it to set up the Parrot hardware correctly. And mae sure you set the required config for x-loader to make it ask for a 2nd stage bootloader over UART instead of USB. Maybe check out http://barebox.org too. Some hardware config info might be found in Parrot's GPL kernel modifications.&lt;br /&gt;
&lt;br /&gt;
You might be able to use similar tools to load bootloaders from USB instead of UART (i.e. similarly to the tools available for the v1), but I personally have not managed to get as far with USB connection as others in this thread. Maybe my pins are broken.&lt;br /&gt;
&lt;br /&gt;
Some complications you will run into:&lt;br /&gt;
&lt;br /&gt;
# I found that even though I could upload a first stage bootloader via UART and the drone would try to execute it, the &amp;quot;regular&amp;quot; boot never stopped so it was hard to see what was going on. I also think I was getting errors on the upload, checksums failing etc.&lt;br /&gt;
# The serial number of your drone hardware is embedded in the NAND flash filesystem. When the Parrot kernel boots and tries to run, it checks this. So overwriting the system partition with one from a working drone will not work. You would need to reverse engineer this process somehow.&lt;br /&gt;
&lt;br /&gt;
If you are were willing to spend another 6 weeks on it, try this:&lt;br /&gt;
&lt;br /&gt;
# Get a bootloader working - x-loader, u-boot, barebox etc&lt;br /&gt;
# Try to get installer.plf to execute. Maybe it will ask for ardrone2_update.plf and execute it. If you're lucky, your broken files will be amongst those updated.&lt;br /&gt;
# If that fails, try to get to the point where you can mount the NAND filesystem, and modify it by hand.&lt;br /&gt;
&lt;br /&gt;
http://embedded-software.blogspot.nl/2010/12/ar-drone-usb.html&lt;br /&gt;
&lt;br /&gt;
== AR.Drone 1.0 ==&lt;br /&gt;
&lt;br /&gt;
Some information on the AR.Drone 1.0 is still relevand for the AR.Drone 2.0&lt;br /&gt;
'+ BELOW FOR AR-DRONE 1 (ONE)+'&lt;br /&gt;
&lt;br /&gt;
* http://awesome-drone.blogspot.nl/2011/01/ardrone-mainboard-overview.html&lt;br /&gt;
* http://arsmash.blogspot.nl/2011/04/watchdog-command.html&lt;br /&gt;
* http://blog.perquin.com/blog/ar-drone-gpio/&lt;br /&gt;
&lt;br /&gt;
=== Boot sequence 1.0 ===&lt;br /&gt;
&lt;br /&gt;
A.R. Drone's boot sequence&lt;br /&gt;
&lt;br /&gt;
In order to be able to flash a custom kernel to A.R. Drone, it is necessary to understand it's boot sequence:&lt;br /&gt;
&lt;br /&gt;
    After reset, the program counter starts at the beginning P6 internal ROM. In this internal ROM, some kind of pre-bootloader exists that evaluates external pins and selects the corresponding boot mode (e.g. boot over USB, NAND, IIC, UART, ... ). Depending on the selected mode, the peripherals are set-up and it is tried to boot over this peripheral.&lt;br /&gt;
        Boot over NAND: The pre-bootloader starts the memory controller, copies the bootloader from NAND to internal RAM and sets the program counter to the address in internal RAM which basically starts the bootloader.&lt;br /&gt;
        Boot over USB: The pre-bootloader listens to USB and waits for the &amp;quot;Hello P6&amp;quot; command. If received, it replies and awaits an image (the usb_bootloader.bin). The received data is copied to internal RAM and the program counter is changed to the internal RAM address wich in effect starts the bootloader.&lt;br /&gt;
&lt;br /&gt;
    Depending on the started bootloader, either the UBI partitions are &amp;quot;mounted&amp;quot; and the kernel image is read or the bootloader waits until the kernel image is sent over USB.&lt;br /&gt;
    If the installer.plf (which is basically a kernel image) is booted over USB, the &amp;quot;init&amp;quot; command of this image awaits the actual firmware (ardrone_update.plf) over USB and installs the content to NAND.&lt;br /&gt;
&lt;br /&gt;
=== Custom firmware ===&lt;br /&gt;
&lt;br /&gt;
Reading navigation data directly from Navboard&lt;br /&gt;
On A.R. Drones navigation board, the following sensors exist:&lt;br /&gt;
&lt;br /&gt;
    IDG-500 (Dual-axis gyroscope)&lt;br /&gt;
    XV-3500CB (Z-axis gyroscope)&lt;br /&gt;
    BMA150 (3-axis accelerometer)&lt;br /&gt;
    Some ultrasonic stuff&lt;br /&gt;
&lt;br /&gt;
For handling these sensors, a PIC24 is used. This device does the A/D conversion of the gyroscope data and the I2C communication with the BMA150.&lt;br /&gt;
Periodically, the sensor data is sent over UART to the mainboard where it is used by program.elf to control the Drone.&lt;br /&gt;
&lt;br /&gt;
So... how to get this data without using program.elf?&lt;br /&gt;
&lt;br /&gt;
First, start the sensor acquisition by calling:&lt;br /&gt;
&lt;br /&gt;
echo -e -n &amp;quot;\1&amp;quot; &amp;gt; /dev/ttyPA2&lt;br /&gt;
&lt;br /&gt;
Now, periodically, the nav boards sends a 0x2E sized frame to UART2.. so read it with:&lt;br /&gt;
&lt;br /&gt;
dd if=/dev/ttyPA2 count=1 bs=46 | hexdump -C&lt;br /&gt;
&lt;br /&gt;
The data seems to have the following format:&lt;br /&gt;
&lt;br /&gt;
struct nav_data_tag&lt;br /&gt;
{&lt;br /&gt;
  u16 size;                /* +0x00 Size of the following data (0x2C) */&lt;br /&gt;
  u16 sequence;            /* +0x02 Sequence number */&lt;br /&gt;
  u16 raw_accs[3];         /* +0x04 Raw data of the accelerometers*/&lt;br /&gt;
  u16 raw_gyros[3];        /* +0x0A Raw data for the gyros */&lt;br /&gt;
  u16 raw_gyros_110[2];    /* +0x10 4.5x Raw data (IDG) */&lt;br /&gt;
  u16 uk_0x14;             /* +0x14 Unkown. Maybe accs temperature */&lt;br /&gt;
  u16 gyro_temp;           /* +0x16 Gyro temperature (IDG) */&lt;br /&gt;
  u16 vrefEpson;           /* +0x18 Gyro v_ref (Epson) */&lt;br /&gt;
  u16 vrefIDG;             /* +0x1A Gyro v_ref (IDG) */&lt;br /&gt;
  u16 uk_0x1C;             /* Unkown */&lt;br /&gt;
  u16 checksum;            /* +0x1E Checksum */&lt;br /&gt;
  u16 us_debut_echo;       /* +0x20 Ultrasonic parameter */&lt;br /&gt;
  u16 us_fin_echo;         /* +0x22 Ultrasonic parameter */&lt;br /&gt;
  u16 us_association_echo; /* +0x24 Ultrasonic parameter */&lt;br /&gt;
  u16 us_distance_echo;    /* +0x26 Ultrasonic parameter */&lt;br /&gt;
  u16 us_courbe_temps;     /* +0x28 Ultrasonic parameter */&lt;br /&gt;
  u16 us_courbe_valeur;    /* +0x2A Ultrasonic parameter */&lt;br /&gt;
  u16 us_courbe_ref;       /* +0x2C Ultrasonic parameter */ &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
I haven't figured out much yet, but here are my first analysis results:&lt;br /&gt;
&lt;br /&gt;
    size: always 0x2C&lt;br /&gt;
    sequence: increases every update&lt;br /&gt;
    raw_accs: seems to contain the BMA values left-shifted by 2&lt;br /&gt;
    raw_gyros: 12-bit A/D converted voltage of the gyros&lt;br /&gt;
    raw_gyros_110: gyro values wieth another resolution (see IDG-500 datasheet)&lt;br /&gt;
    gyro_temp: 12-bit A/D converted voltage of IDG's temperature sensor&lt;br /&gt;
    vrefEpson: 12-bit A/D converted reference voltage of the Epson sensor&lt;br /&gt;
    vrefIDG: as vrefEpson, but for IDG sensor&lt;br /&gt;
    checksum: checksum (have to figure out how to calculate..&lt;br /&gt;
    all others haven't yet figured out what they mean&lt;br /&gt;
&lt;br /&gt;
Posted by es at 8:33 PM 9 comments&lt;br /&gt;
Email ThisBlogThis= Share to TwitterShare to Facebook&lt;br /&gt;
Labels: A.R. Drone&lt;br /&gt;
Wednesday, January 19, 2011&lt;br /&gt;
Creating, testing (and flashing -- TBD) a custom kernel&lt;br /&gt;
In my last post, I announced that creating and uploading a custom kernel works. Now I will explain how this can be done.&lt;br /&gt;
&lt;br /&gt;
Thanks to MAPGPS from http://www.ardrone-flyers.com for testing my tools.&lt;br /&gt;
&lt;br /&gt;
You need:&lt;br /&gt;
&lt;br /&gt;
- Linux=  I used Ubuntu 10.10&lt;br /&gt;
- ARDrone linux kernel source (get it from [1])&lt;br /&gt;
- ARDrone linux kernel config (get it from [2])&lt;br /&gt;
- The Sourcery G++ toolchain (get it from [3] or [4] )&lt;br /&gt;
- My plftool, usb_flash tool (see below)&lt;br /&gt;
- The old parrot flash tool (for ardrone_usb_bootloader.bin)&lt;br /&gt;
- libusb-0.1 (linux) or libusb-win32 (windows)&lt;br /&gt;
- zlib&lt;br /&gt;
&lt;br /&gt;
Getting &amp;amp; Compiling plftool + usb_flash tool&lt;br /&gt;
&lt;br /&gt;
These tools are not yet released. Thus I will not provide binaries for windows, instead you have to compile them by yourself. For windows, you need to use mingw32.&lt;br /&gt;
&lt;br /&gt;
Getting the sources&lt;br /&gt;
&lt;br /&gt;
The sources are stored at my google code project. In order to get them, you need to install a svn client. For linux you then call something like this:&lt;br /&gt;
&lt;br /&gt;
svn checkout http://ardrone-tool.googlecode.com/svn/projects/libplf/trunk libplf&lt;br /&gt;
svn checkout http://ardrone-tool.googlecode.com/svn/projects/usb_flash/trunk usb_flash&lt;br /&gt;
svn checkout http://ardrone-tool.googlecode.com/svn/projects/plftool/trunk plftool&lt;br /&gt;
&lt;br /&gt;
Compiling&lt;br /&gt;
&lt;br /&gt;
Now that you got the sources, you need to compile them. First start with libplf as this is needed by all projects. The library contains the code to read and write .plf files.&lt;br /&gt;
&lt;br /&gt;
 $ cd libplf &lt;br /&gt;
 $ make&lt;br /&gt;
 $ cd ..&lt;br /&gt;
&lt;br /&gt;
When compiling with mingw32 call &amp;quot;make -f Makefile.w32&amp;quot; instead.&lt;br /&gt;
&lt;br /&gt;
If libplf was compiled succesfully you should get either a libplf.so or libplf.dll file.&lt;br /&gt;
Next compile plftool and usb_flash:&lt;br /&gt;
&lt;br /&gt;
 $ cd plftool&lt;br /&gt;
 $ make&lt;br /&gt;
 $ cd ..&lt;br /&gt;
 $ cd usb_flash&lt;br /&gt;
 $ make&lt;br /&gt;
 $ cd ..&lt;br /&gt;
&lt;br /&gt;
When compiling with mingw32, call &amp;quot;make -f Makefile.w32&amp;quot; instead.&lt;br /&gt;
&lt;br /&gt;
This should create plftool(.exe) and usb_flash(.exe).&lt;br /&gt;
&lt;br /&gt;
For Linux, if you do not want to install the libplf.so file, you need to call plftool and usb_flash with LD_LIBRARY_PATH=&amp;lt;path_to_the_folder_where_libplf.so_is_located&amp;gt;  prefix.&lt;br /&gt;
&lt;br /&gt;
E.g.&lt;br /&gt;
&lt;br /&gt;
 LD_LIBRARY_PATH=/home/$USER/projects/ardrone/tools/libplf plftool &lt;br /&gt;
&lt;br /&gt;
For Windows, you need to add the folder where libplf.dll is located to your PATH variable before calling usb_flash or plftool.&lt;br /&gt;
&lt;br /&gt;
Patching the kernel&lt;br /&gt;
&lt;br /&gt;
As Parrot's published source code does not match the kernel delivered with firmware &amp;gt; 1.3.3, a patch is required to ensure correct behaviour. This patch mainly affects p6_sdhci.c.&lt;br /&gt;
&lt;br /&gt;
You can get the patch from here. To apply it, just call:&lt;br /&gt;
&lt;br /&gt;
 $ cd linux-2.6.27&lt;br /&gt;
 $ patch -p1 &amp;lt; p6_sdhci-patch1.patch&lt;br /&gt;
&lt;br /&gt;
Compiling the kernel&lt;br /&gt;
Now as the kernel is patched, you should use Parrot's original config [2] and cross-compile the sources with Sourcery G++. Basically you need to do something like this (don't forget to add the Sourcery' bin directory to your PATH):&lt;br /&gt;
&lt;br /&gt;
 $ cp ARDrone_Version_20100809_1_2-busybox.config .config&lt;br /&gt;
 $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- zImage &lt;br /&gt;
&lt;br /&gt;
After a few minutes (or hours) make informs you that the zImage file is available:&lt;br /&gt;
&lt;br /&gt;
Kernel: arch/arm/boot/Image is ready&lt;br /&gt;
Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
&lt;br /&gt;
Creating a kernel.plf file&lt;br /&gt;
&lt;br /&gt;
If you got your zImage, it is time to build a kernel.plf file from it. This is done by plftool. plftool expects a build-ini file that describes the plf file. A sample ini file can be found at plftool/samples/kernel. Using the sample kernel.ini, you only have to modify the &amp;quot;File=&amp;quot; parameters in section &amp;quot;[zImage]&amp;quot; and &amp;quot;[BootParams]&amp;quot; so they point to the zImage file and to a text file, the boot parameters are located in (e.g. called bootparams.txt).&lt;br /&gt;
&lt;br /&gt;
To create the kernel.plf from the kernel.ini, just call:&lt;br /&gt;
&lt;br /&gt;
 $ plftool -b kernel.ini -o kernel.plf &lt;br /&gt;
&lt;br /&gt;
The tool should output something similar to this and create the kernel.plf file.&lt;br /&gt;
&lt;br /&gt;
Creating kernel.plf based on this config:&lt;br /&gt;
File [HdrVersion: 11 EntryPoint: 0x40800000; Version: 0.0.0&lt;br /&gt;
TargetPlat=4, TargetAppl=78, HwCompat=0, LangZone=0]&lt;br /&gt;
  zImage     @ 0x40800000 (zImage)&lt;br /&gt;
  initrd     @ ---------- (no initrd)&lt;br /&gt;
  bootparams @ 0x40700000 (bootparams.txt)&lt;br /&gt;
&lt;br /&gt;
 *** kernel.plf created ***&lt;br /&gt;
&lt;br /&gt;
Testing the kernel.plf file&lt;br /&gt;
If  kernel.plf file was created, it is time to test this file. First inspect it with plftool:&lt;br /&gt;
&lt;br /&gt;
 $ plftool -d -i kernel.plf&lt;br /&gt;
&lt;br /&gt;
Have a look at dwFileType, dwEntryPoint and Section-&amp;gt;LoadAddr.&lt;br /&gt;
&lt;br /&gt;
If it looks okay, it is time to start (not flash= ) the kernel:&lt;br /&gt;
&lt;br /&gt;
# Copy ardrone_usb_bootloader.bin to the folder of usb_flash&lt;br /&gt;
# Connect the drone to your PC via USB (the LED should be RED)&lt;br /&gt;
# Connect the BATTERY to your drone (the LED becomes GREEN) &lt;br /&gt;
# Check if the device was found (with lsusb)&lt;br /&gt;
# Start usb_flash in TEST mode:&lt;br /&gt;
&lt;br /&gt;
usb_flash -t kernel.plf&lt;br /&gt;
&lt;br /&gt;
This will load (NOT flash) the kernel over USB. In general, it is helpful to observe A.R. Drone's serial port, as the whole boot sequence is shown there. usb_flash outputs on success:&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Mode: kernel test&lt;br /&gt;
&lt;br /&gt;
*** VERIFICATION ***&lt;br /&gt;
Verifying ardrone_usb_bootloader.bin&lt;br /&gt;
Verifying test_kernel.plf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*** DOWNLOADING USB BOOTLOADER ***&lt;br /&gt;
Try [00/10] to connect to VID: 0x19cf PID: 0x1000&lt;br /&gt;
Found a possible device:&lt;br /&gt;
- Manufacturer: Parrot SA&lt;br /&gt;
- Product: P6 USB Stage1&lt;br /&gt;
- Serialnumber: ?&lt;br /&gt;
- Number of configurations: 1&lt;br /&gt;
Sending bootloader (0x5b20 bytes)&lt;br /&gt;
- Send Hello P6 (0xA3)&lt;br /&gt;
Success=== &lt;br /&gt;
&lt;br /&gt;
Checksum returned: 0x5256 Expected: 0x5256 =&amp;gt; OK&lt;br /&gt;
Starting the bootloader...&lt;br /&gt;
&lt;br /&gt;
*** INSTALLER DOWNLOAD ***&lt;br /&gt;
Closing usb connection...&lt;br /&gt;
Try [00/10] to connect to VID: 0x19cf PID: 0x1000&lt;br /&gt;
Found a possible device:&lt;br /&gt;
- Manufacturer: Parrot SA&lt;br /&gt;
- Product: P6 USB Stage1&lt;br /&gt;
- Serialnumber: ?&lt;br /&gt;
- Number of configurations: 1&lt;br /&gt;
loading installer&lt;br /&gt;
Uploading file: test_kernel.plf&lt;br /&gt;
Error Code returned: 0x00000000  ==&amp;gt; OK&lt;br /&gt;
*** INSTALLATION DONE ***&lt;br /&gt;
&lt;br /&gt;
If everything works, the kernel boots up, WiFi ist started and you should be able to connect to the drone with telnet.&lt;br /&gt;
&lt;br /&gt;
Check the kernel version with&lt;br /&gt;
&lt;br /&gt;
uname -a&lt;br /&gt;
&lt;br /&gt;
If the default kernel starts without problems, you can now begin to modify the kernel config.&lt;br /&gt;
Flashing the kernel to NAND works but I still need to modify the plftool.. so stay tuned.&lt;br /&gt;
&lt;br /&gt;
Happy hacking :-)&lt;br /&gt;
&lt;br /&gt;
# https://projects.ardrone.org/documents/show/19&lt;br /&gt;
# https://projects.ardrone.org/documents/show/18&lt;br /&gt;
# https://projects.ardrone.org/documents/show/20&lt;br /&gt;
# http://www.codesourcery.com/sgpp/lite/arm/portal/release858&lt;br /&gt;
Posted by es at 2:23 AM 7 comments&lt;br /&gt;
Email ThisBlogThis= Share to TwitterShare to Facebook&lt;br /&gt;
Labels: A.R. Drone, Custom Kernel, Flashing&lt;br /&gt;
Tuesday, January 11, 2011&lt;br /&gt;
Creating + Flashing Custom Kernel&lt;br /&gt;
Yeah...&lt;br /&gt;
&lt;br /&gt;
Creating a kernel.plf file from zImage+initrd --&amp;gt; WORKS= &lt;br /&gt;
Booting this kernel.plf file over USB --&amp;gt; WORKS= &lt;br /&gt;
Flashing this kernel.plf to NAND --&amp;gt; to be done...&lt;br /&gt;
&lt;br /&gt;
More will follow soon :-)&lt;br /&gt;
Posted by es at 11:53 PM 1 comments&lt;br /&gt;
Email ThisBlogThis= Share to TwitterShare to Facebook&lt;br /&gt;
Labels: A.R. Drone, Custom Kernel, Flashing&lt;br /&gt;
Sunday, January 9, 2011&lt;br /&gt;
Tools for A.R. Drone&lt;br /&gt;
I finally released some tools for A.R. Drone:&lt;br /&gt;
&lt;br /&gt;
    libplf - A library to read / write plf files&lt;br /&gt;
    plf_inst_extract - A tool to extract and patch a ardrone_installer.plf from a given ardrone_update.plf&lt;br /&gt;
    usb_flash - A tool to flash a ardrone_update.plf over USB. This tool requires:&lt;br /&gt;
        ardrone_update.plf - the firmware to flash&lt;br /&gt;
        ardrone_installer.plf - can be obtained from ardrone_update.plf with plf_inst_extract&lt;br /&gt;
        ardrone_usb_bootloader.bin - was delivered with the old flash tool. I will probably write an open-source boot loader sooner or later.&lt;br /&gt;
&lt;br /&gt;
Have a look at my google code project:&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/ardrone-tool&lt;br /&gt;
Posted by es at 2:17 AM 0 comments&lt;br /&gt;
Email ThisBlogThis= Share to TwitterShare to Facebook&lt;br /&gt;
Labels: A.R. Drone, Flashing, USB&lt;br /&gt;
A.R. Drone's boot sequence&lt;br /&gt;
In order to be able to flash a custom kernel to A.R. Drone, it is necessary to understand it's boot sequence:&lt;br /&gt;
&lt;br /&gt;
    After reset, the program counter starts at the beginning P6 internal ROM. In this internal ROM, some kind of pre-bootloader exists that evaluates external pins and selects the corresponding boot mode (e.g. boot over USB, NAND, IIC, UART, ... ). Depending on the selected mode, the peripherals are set-up and it is tried to boot over this peripheral.&lt;br /&gt;
        Boot over NAND: The pre-bootloader starts the memory controller, copies the bootloader from NAND to internal RAM and sets the program counter to the address in internal RAM which basically starts the bootloader.&lt;br /&gt;
        Boot over USB: The pre-bootloader listens to USB and waits for the &amp;quot;Hello P6&amp;quot; command. If received, it replies and awaits an image (the usb_bootloader.bin). The received data is copied to internal RAM and the program counter is changed to the internal RAM address wich in effect starts the bootloader.&lt;br /&gt;
&lt;br /&gt;
    Depending on the started bootloader, either the UBI partitions are &amp;quot;mounted&amp;quot; and the kernel image is read or the bootloader waits until the kernel image is sent over USB.&lt;br /&gt;
    If the installer.plf (which is basically a kernel image) is booted over USB, the &amp;quot;init&amp;quot; command of this image awaits the actual firmware (ardrone_update.plf) over USB and installs the content to NAND.&lt;br /&gt;
&lt;br /&gt;
== Datainterchange with other electronics ==&lt;br /&gt;
&lt;br /&gt;
THe Ardrone 2 has various options:&lt;br /&gt;
&lt;br /&gt;
# Use debug serial port&lt;br /&gt;
# USB to serial FTDI cable&lt;br /&gt;
# Extra Wifi dongle&lt;br /&gt;
# USB to Ethernet cable&lt;br /&gt;
# LED to PWM in&lt;br /&gt;
&lt;br /&gt;
== Odroid XU ==&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
&lt;br /&gt;
1x FTDO&lt;br /&gt;
&lt;br /&gt;
=== Option ===&lt;br /&gt;
&lt;br /&gt;
== The past ==&lt;br /&gt;
&lt;br /&gt;
Some info on older documentation but in certain cases very useful.&lt;br /&gt;
&lt;br /&gt;
=== Reversing ===&lt;br /&gt;
&lt;br /&gt;
Here info of a part of how the electronics where revered to make it possible to run PPRZ&lt;br /&gt;
&lt;br /&gt;
* https://wiki.paparazziuav.org/wiki/AR_Drone_2/Motor_driver&lt;br /&gt;
* https://wiki.paparazziuav.org/wiki/AR_Drone_2/NAV_board&lt;br /&gt;
&lt;br /&gt;
=== The &amp;quot;SDK&amp;quot; mode ===&lt;br /&gt;
&lt;br /&gt;
The SDK mode is a thing from the past, '''no real reason to use it''', the links below are left as a reference.&lt;br /&gt;
&lt;br /&gt;
* https://wiki.paparazziuav.org/wiki/AR_Drone_2/AT_Commands&lt;br /&gt;
* https://wiki.paparazziuav.org/wiki/AR_Drone_2/GPS&lt;br /&gt;
&lt;br /&gt;
=== Past interesting projects ===&lt;br /&gt;
&lt;br /&gt;
As an honor to the developers some links still here what all was achieved in the past:&lt;br /&gt;
&lt;br /&gt;
* https://wiki.paparazziuav.org/wiki/TU_Delft_-_Search_and_Rescue_with_AR_Drone_2&lt;br /&gt;
* https://wiki.paparazziuav.org/wiki/TU_Delft_-_Lasergame_with_Autonomous_AR_Drone&lt;br /&gt;
* https://wiki.paparazziuav.org/wiki/AR_Drone_2/Multidirectional_distance_measurement&lt;br /&gt;
* https://wiki.paparazziuav.org/wiki/AR_Drone_2/Mapping&lt;br /&gt;
* https://wiki.paparazziuav.org/wiki/OLSR&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://ardrone2.parrot.com  Manufacturer's site with all info about AR.Drone2 (Parrot)]&lt;br /&gt;
* [[http://embedded-software.blogspot.com/2011/01/ar-drones-boot-sequence.html Boot sequence]]&lt;br /&gt;
&lt;br /&gt;
* https://play.google.com/store/apps/details?id=com.parrot.freeflight&amp;amp;hl=en&lt;br /&gt;
* https://itunes.apple.com/us/app/ar.race-2/id547160291&lt;br /&gt;
&lt;br /&gt;
* AR.Drone 2.0 Blog http://blog.parrot.com/category/ar-drone/&lt;br /&gt;
&lt;br /&gt;
* [[http://ardrone2.parrot.com/photos/photo-album/ | Press photos]]&lt;br /&gt;
* [[AR.Drone 2.0 reviews]]&lt;br /&gt;
&lt;br /&gt;
* [[SDK http://ardrone.parrot.com/parrot-ar-drone/dev/developers | Parrot's own developer zone not PPRZ related]]&lt;br /&gt;
* [[https://projects.ardrone.org/wiki/ardrone-api/Gpl | Open source Software Licences]]&lt;br /&gt;
&lt;br /&gt;
* [[http://ardrone2.parrot.com/ar-drone-academy/ | AR.Drone Academy]]&lt;br /&gt;
&lt;br /&gt;
* [[http://www.parrotshopping.com/fr/p_parrot_listing.aspx?f=3377 | Spare parts]]&lt;br /&gt;
* [[http://www.youtube.com/playlist?list=PLDB67195526DEEE63&amp;amp;feature=plcp | Repair videos]]&lt;br /&gt;
&lt;br /&gt;
[[Category:AR Drone 2]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Airframe_Configuration&amp;diff=21081</id>
		<title>Airframe Configuration</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Airframe_Configuration&amp;diff=21081"/>
		<updated>2016-03-14T22:23:43Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Board targets */ ardrone2_sdk has been removed with https://github.com/paparazzi/paparazzi/pull/1222&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Airframe_Configuration&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
The airframe file is the most important configuration file and contains all the hardware and software settings for your airframe. It describes what hardware you have and which firmware, sensors, algorithms, etc. you want to use and also holds your configuration parameters. All gains, trims, and behavior settings are defined with standard XML elements.&lt;br /&gt;
&lt;br /&gt;
The XML airframe configuration file is located in &amp;lt;tt&amp;gt;conf/airframes/&amp;lt;yourairframe&amp;gt;.xml&amp;lt;/tt&amp;gt; and always begins with a &amp;lt;!DOCTYPE airframe SYSTEM &amp;quot;airframe.dtd&amp;quot;&amp;gt; line and should look like this&lt;br /&gt;
{{Box Code|conf/airframes/&amp;lt;yourairframe&amp;gt;.xml|&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE airframe SYSTEM &amp;quot;airframe.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;airframe name=&amp;quot;yourairframe&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!-- The airframe configuration goes here. --&amp;gt;&lt;br /&gt;
&amp;lt;/airframe&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Also see the wiki pages for [[Fixedwing_Configuration|fixedwing specific configuration]] and [[Rotorcraft_Configuration|rotorcraft specific configuration]].&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Aircraft ==&lt;br /&gt;
&lt;br /&gt;
While the airframe file is where you configure most aspects of your aircraft, a fully specified aircraft needs several XML configuration files:&lt;br /&gt;
* Airframe (what this page is about)&lt;br /&gt;
* [[Flight_Plans|Flight Plan]]&lt;br /&gt;
* [[Settings]]&lt;br /&gt;
* [[Radio_Control|Radio]] (if you use a PPM based R/C system)&lt;br /&gt;
* [[Telemetry]]&lt;br /&gt;
* [[settings_modules]]&lt;br /&gt;
Each aircraft is assigned a name, unique ID and the associated configuration files in [[Conf.xml|&amp;lt;tt&amp;gt;conf/conf.xml&amp;lt;/tt&amp;gt;]]. To create a new Aircraft, click new in the menu A/C in the [[Paparazzi_Center|Paparazzi Center]] and select your new airframe file, etc. (or specify it by hand in [[Conf.xml|&amp;lt;tt&amp;gt;conf/conf.xml&amp;lt;/tt&amp;gt;]]).&lt;br /&gt;
&lt;br /&gt;
== Firmware and Hardware definitions ==&lt;br /&gt;
First you should specify which firmware you want to use, that is if you have a &amp;lt;tt&amp;gt;[[Fixedwing_Configuration|fixedwing]]&amp;lt;/tt&amp;gt; aircraft or a &amp;lt;tt&amp;gt;[[Rotorcraft_Configuration|rotorcraft]]&amp;lt;/tt&amp;gt;:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Select your Board ===&lt;br /&gt;
&lt;br /&gt;
To specify autopilot hardware you are using and it's low-level settings you have to add a ''target''-tag.&lt;br /&gt;
Each ''target'' has two attributes, which are ''name'' and a corresponding ''board'' attribute.&lt;br /&gt;
The ''name'' attribute is either &amp;quot;ap&amp;quot; (autopilot) or &amp;quot;sim/jsbsim/nps&amp;quot; (simulation).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;target name=&amp;quot;sim&amp;quot; board=&amp;quot;pc&amp;quot;/&amp;gt; &amp;lt;!-- For simulation. --&amp;gt;&lt;br /&gt;
    &amp;lt;target name=&amp;quot;ap&amp;quot;  board=&amp;quot;lisa_m_1.0&amp;quot;/&amp;gt; &amp;lt;!-- Select your board here --&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Simulation targets ====&lt;br /&gt;
&lt;br /&gt;
target name=&amp;quot;sim&amp;quot;,&amp;quot;jsbsim&amp;quot;,&amp;quot;nps&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
board=&amp;quot;pc&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More Information at [[Simulation]].&lt;br /&gt;
&lt;br /&gt;
==== Board targets ====&lt;br /&gt;
&lt;br /&gt;
target name=&amp;quot;ap&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
board=&lt;br /&gt;
&amp;quot;apogee_0.99&amp;quot;,&lt;br /&gt;
&amp;quot;apogee_1.0&amp;quot;,&lt;br /&gt;
&amp;quot;ardrone2&amp;quot;,&lt;br /&gt;
&amp;quot;booz_1.0&amp;quot;,&lt;br /&gt;
&amp;quot;classix&amp;quot;,&lt;br /&gt;
&amp;quot;hb_1.1&amp;quot;,&lt;br /&gt;
&amp;quot;krooz_sd&amp;quot;,&lt;br /&gt;
&amp;quot;lisa_l_1.0&amp;quot;, &lt;br /&gt;
&amp;quot;lisa_l_1.1&amp;quot;, &lt;br /&gt;
&amp;quot;lisa_m_1.0&amp;quot;, &lt;br /&gt;
&amp;quot;lisa_m_2.0&amp;quot;,&lt;br /&gt;
&amp;quot;lisa_mx_2.0&amp;quot;,&lt;br /&gt;
&amp;quot;lisa_s_0.1&amp;quot;,&lt;br /&gt;
&amp;quot;logom_2.6&amp;quot;,&lt;br /&gt;
&amp;quot;navgo_1.0&amp;quot;, &lt;br /&gt;
&amp;quot;sdlog_1.0&amp;quot;, &lt;br /&gt;
&amp;quot;stm32f4_discovery&amp;quot;,&lt;br /&gt;
&amp;quot;tiny_0.99&amp;quot;, &lt;br /&gt;
&amp;quot;tiny_1.1&amp;quot;, &lt;br /&gt;
&amp;quot;tiny_2.1&amp;quot;, &lt;br /&gt;
&amp;quot;tiny_2.11&amp;quot;, &lt;br /&gt;
&amp;quot;twog_1.0&amp;quot;, &lt;br /&gt;
&amp;quot;umarim_1.0&amp;quot;,&lt;br /&gt;
&amp;quot;umarim_lite_2.0&amp;quot;,&lt;br /&gt;
&amp;quot;yapa_2.0&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
All targets can be found in /conf/boards.&lt;br /&gt;
&lt;br /&gt;
==== Direct Makefile ====&lt;br /&gt;
&lt;br /&gt;
Optionally you can also add a raw [http://en.wikipedia.org/wiki/Makefile Makefile] section. This is only needed in very advanced setups. For example when testing newly developed hardware.&lt;br /&gt;
&lt;br /&gt;
=== LEDs ===&lt;br /&gt;
&lt;br /&gt;
You can configure the LEDs on the autopilot to be used for different status indicators:&lt;br /&gt;
; ''SYS_TIME_LED'': blinks with 1Hz&lt;br /&gt;
; ''AHRS_ALIGNER_LED'': blinks until the AHRS is aligned (gyro bias initialized) and then stays on&lt;br /&gt;
; ''GPS_LED'': blinking if trying to get a fix, on if 3D fix&lt;br /&gt;
; ''RADIO_CONTROL_LED'': on if RC signal is ok&lt;br /&gt;
; ''BARO_LED'' : only on booz and navgo boards: blinks until baro offset is initialized and then stays on&lt;br /&gt;
&lt;br /&gt;
Depending on your board some of the LEDs on it are already assigned to some indicators by default, check the appropriate autopilot board makefile for the defaults.&lt;br /&gt;
&lt;br /&gt;
To reconfigure the default assignment, assign the indicator to an other value. Use ''none'' if indicator should not be assigned to any LED.&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
     &amp;lt;configure name=&amp;quot;SYS_TIME_LED&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;configure name=&amp;quot;RADIO_CONTROL_LED&amp;quot; value=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;configure name=&amp;quot;GPS_LED&amp;quot; value=&amp;quot;none&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Beware that you can only assign '''one''' indicator to a LED number. So if the LED you want to use is already in use because another indicator is set to that number by default you have to disable that other indicator by setting it to ''none'' or reconfigure it to an other LED.&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Since '''v5.8''' it is possible to safely replace ''subsystem'' by ''module'' in your airframe file. The roadmap of Paparazzi is to convert existing subsystems to [[modules]].&lt;br /&gt;
|}&lt;br /&gt;
Each autopilot features certain [[Subsystems|subsystems]] which need to be configured properly.&lt;br /&gt;
The most important ones are described below.&lt;br /&gt;
&lt;br /&gt;
=== IMU ===&lt;br /&gt;
&lt;br /&gt;
Add the [[Subsystem/imu|imu subsystem]] with the type you are using.&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;imu&amp;quot;       type=&amp;quot;aspirin_v1.5&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
See the [[Subsystem/imu|imu subsystem]] page for more details.&lt;br /&gt;
Also see the [[ImuCalibration|IMU calibration]] page.&lt;br /&gt;
&lt;br /&gt;
=== AHRS ===&lt;br /&gt;
&lt;br /&gt;
The [[Subsystem/ahrs|AHRS subsystem]] specifies which attitude estimation filter you are using, e.g. for the complementary filter:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;int_cmpl_euler&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
All AHRS algorithms depend on an imu subsystem, except for the ahrs_infrared which depends on the infrared module.&lt;br /&gt;
See the [[Subsystem/ahrs|AHRS subsystem page]] for more details.&lt;br /&gt;
&lt;br /&gt;
If the magnetometer should be used the [[Subsystem/ahrs#Local_Magnetic_Field|local magnetic field section]] must be filled in.&lt;br /&gt;
&lt;br /&gt;
=== Radio Control ===&lt;br /&gt;
&lt;br /&gt;
Supported types are:&lt;br /&gt;
* ''ppm''&lt;br /&gt;
* ''spektrum''&lt;br /&gt;
* ''datalink''&lt;br /&gt;
&lt;br /&gt;
Just specify the appropriate [[Subsystem/radio_control|radio control subsystem]] in your firmware section, e.g.:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;radio_control&amp;quot;     type=&amp;quot;ppm&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Telemetry (Modem) ===&lt;br /&gt;
&lt;br /&gt;
The modem protocol and baud rate must be set in both the airframe file and ground station.  Any standard baud rate can be used, with 9600 being adequate and 57600 recommended for most users to allow high speed telemetry for more detailed flight data analysis.  The actual data rate is determined by the number of messages being sent and the period of each message as defined in your [[Telemetry|telemetry file]], e.g. &amp;lt;tt&amp;gt;conf/telemetry/default.xml&amp;lt;/tt&amp;gt;.  Those wishing to experiment with &amp;quot;alternative&amp;quot; modems can reduce the number and period of each telemetry message to fit within most any bandwidth constraint.&lt;br /&gt;
&lt;br /&gt;
The [[Subsystem/telemetry|telemetry subsystem]] supports the following modem protocols:&lt;br /&gt;
* Standard transparent serial (pprz) - this is compatible with all modems and can be used to connect the autopilot directly to a PC for testing without a modem.&lt;br /&gt;
* Maxstream API protocol (xbee) - compatible with all Maxstream modems including the 9XTend and Zigbee.  This protocol enables hardware addressing, allowing multiple aircraft to be managed from a single ground modem.&lt;br /&gt;
&lt;br /&gt;
Just specify the appropriate [[Subsystem/telemetry|telemetry subsystem]] in your firmware section. You can currently choose between the types ''transparent'', ''transparent_usb'' and ''xbee_api''.&lt;br /&gt;
&lt;br /&gt;
'''The default baudrate is 57600 baud, see the [[Subsystem/telemetry|telemetry subsystem]] page for more details and configuration options.'''&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;telemetry&amp;quot;     type=&amp;quot;transparent&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== GPS ===&lt;br /&gt;
&lt;br /&gt;
The serial port settings must match that of the GPS and are configured here along with the necessary files to interpret the u-blox UBX binary protocol:&lt;br /&gt;
&lt;br /&gt;
Just specify the appropriate [[Subsystem/gps|gps subsystem]] in your firmware section. You can currently choose between the types '''ublox''' and '''ublox_utm''' for the older series 4 modules which still provide a UTM message.&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing or rotorcraft&amp;quot;&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;gps&amp;quot;               type=&amp;quot;ublox&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The correct UART is already defined by default according to your board.&lt;br /&gt;
The default GPS baudrate is 38400baud.&lt;br /&gt;
&lt;br /&gt;
If you need to set different baud rates or UART see the [[Subsystem/gps]] page for the options.&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* u-blox GPS modules are factory configured for 9600 baud, 38,400 baud is recommended along with the other required changes.  The GPS can be accessed directly through the [[tunnel|UART Tunnel]] and [[GPS#GPS_configuration_using_U-Center|Configured with u-center]]&lt;br /&gt;
&lt;br /&gt;
== XML Parameters ==&lt;br /&gt;
&lt;br /&gt;
'''When defining parameters you can use [[Units|automatic unit conversion]] to conveniently set it in e.g. degrees.'''&lt;br /&gt;
&lt;br /&gt;
=== Commands ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;commands&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; lists the abstract commands you need to control the aircraft. In a simple fixed-wing example, we have only three:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;commands&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;THROTTLE&amp;quot; failsafe_value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;ROLL&amp;quot;     failsafe_value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;PITCH&amp;quot;    failsafe_value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/commands&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For rotorcraft, it is usually:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;commands&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;PITCH&amp;quot;    failsafe_value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;ROLL&amp;quot;     failsafe_value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;YAW&amp;quot;      failsafe_value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;axis name=&amp;quot;THRUST&amp;quot;   failsafe_value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/commands&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each command is also associated with a failsafe value which will be used if no controller is active, for example during initialization of the autopilot board. The range of these values is [-9600:9600]. For &amp;lt;tt&amp;gt;&amp;quot;THROTTLE&amp;quot;&amp;lt;/tt&amp;gt;, the range is [0, 9600] and in the corresponding &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;servo&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; definition the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;neutral&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;min&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; are usually the same for PWM based servos (see below). Note that these commands do not necessarily match the servo actuators. For example, the &amp;lt;tt&amp;gt;&amp;quot;ROLL&amp;quot;&amp;lt;/tt&amp;gt; command is typically linked to two aileron actuators.&lt;br /&gt;
&lt;br /&gt;
=== Servos ===&lt;br /&gt;
&lt;br /&gt;
The above commands get translated to the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;servos&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; here. In the example below we use two elevons and a motor. ([http://en.wikipedia.org/wiki/Elevon ''Elevons''] are surfaces used for both pitch and roll as on a flying wing.) These servos are listed in the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;servos&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; section:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;servos&amp;gt;&lt;br /&gt;
  &amp;lt;servo name=&amp;quot;THROTTLE&amp;quot;         no=&amp;quot;0&amp;quot; min=&amp;quot;1000&amp;quot; neutral=&amp;quot;1000&amp;quot; max=&amp;quot;2000&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;servo name=&amp;quot;ELEVON_LEFTSIDE&amp;quot;  no=&amp;quot;1&amp;quot; min=&amp;quot;2000&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;1000&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;servo name=&amp;quot;ELEVON_RIGHTSIDE&amp;quot; no=&amp;quot;2&amp;quot; min=&amp;quot;1000&amp;quot; neutral=&amp;quot;1500&amp;quot; max=&amp;quot;2000&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/servos&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Names are associated to the corresponding '''real physical connector''' to which a servo is connected '''on the autopilot board'''. For example no=&amp;quot;2&amp;quot; means connector two on the board. Also the servo neutral value, total range and direction are defined.  Min/max/neutral values are expressed in microseconds. The direction of travel can be reversed by exchanging min with max (as in &amp;lt;tt&amp;gt;&amp;quot;ELEVON_LEFTSIDE&amp;quot;&amp;lt;/tt&amp;gt;, above).  The ''standard'' travel for a hobby servo is 1000µs - 2000µs with a 1500µs neutral. Trim can be added by changing this neutral value. Absolute servo travel limits can be increased or reduced with the min/max values.  The &amp;lt;tt&amp;gt;&amp;quot;THROTTLE&amp;quot;&amp;lt;/tt&amp;gt; servo typically has the same value for the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;neutral&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;min&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The attribute &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;driver&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; for &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;servos&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; node tells which actuators' driver is associated to the listed servos. After the version '''v4.9_devel-164-gdb0d004''', multiple servos sections can be defined and used together, if the correct [[Subsystem/actuators| actuators subsystems]] are loaded. Some boards are automatically loading a default driver, the one used when no &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;driver&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; attribute is specified.&lt;br /&gt;
&lt;br /&gt;
Note the following important tips:&lt;br /&gt;
* Reverse the servo direction by exchanging min/max&lt;br /&gt;
* Trim should always be adjusted mechanically if possible to avoid asymmetrical travel&lt;br /&gt;
* Any reduction of the total travel range should be done mechanically to maintain precision&lt;br /&gt;
* Many servos will respond well to values slightly outside the normal 1000-2000µs range but experiment carefully as the servo may not operate reliably outside this range and may even suffer permanent damage.&lt;br /&gt;
* Board connector numbering starts with &amp;lt;b&amp;gt;zero (0)&amp;lt;/b&amp;gt; not with one&lt;br /&gt;
* Servos are also known under the synonym &amp;lt;b&amp;gt;actuators&amp;lt;/b&amp;gt;&lt;br /&gt;
* (after version '''v4.9_devel-164-gdb0d004''') For I2C based motor speed control using the [[Rotorcraft_Configuration#Motor_Mixing|motor mixing]]:&lt;br /&gt;
** min: command to stop the motor&lt;br /&gt;
** neutral: motor idle command&lt;br /&gt;
** max: max thrust command&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;servos&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; are then linked to the commands in the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;command_laws&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; section:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;command_laws&amp;gt;&lt;br /&gt;
  &amp;lt;let var=&amp;quot;aileron&amp;quot;            value=&amp;quot;@ROLL  * 0.3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;let var=&amp;quot;elevator&amp;quot;           value=&amp;quot;@PITCH * 0.7&amp;quot;/&amp;gt;  &lt;br /&gt;
  &amp;lt;set servo=&amp;quot;THROTTLE&amp;quot;         value=&amp;quot;@THROTTLE&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;set servo=&amp;quot;ELEVON_LEFTSIDE&amp;quot;  value=&amp;quot;$elevator + $aileron&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;set servo=&amp;quot;ELEVON_RIGHTSIDE&amp;quot; value=&amp;quot;$elevator - $aileron&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/command_laws&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:airframe_sign_conventions.jpg|thumb|Sign conventions for flight dynamics]]&lt;br /&gt;
where the third line is the simplest: the throttle servo value equals throttle command value. The other lines define and control the pitch/roll mixing.  Elevon values are computed with a combination of two commands, '''ROLL''' and '''PITCH'''. This ''mixer'' is defined with two intermediate variables '''aileron''' and '''elevator''' introduced with the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;let&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; element.  The '''@''' symbol is used to reference a command value in the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;value&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; attribute of the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;set&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;let&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; elements.  In the above example, the servos are limited to +/- 70% of their full travel for pitch and 30% for roll, only in combination can the servos reach 100% deflection.  Note that these numbers ''should add up 100% or more, never less''.  For example, you may want 100% travel available for pitch - this means if a roll is commanded along with maximum pitch only one servo will respond to the roll command as the other has already reached its mechanical limit.  If you find after tuning that these numbers add to less than 100% consider reducing the surface travel mechanically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the signs used in the description follow the standard convention.&lt;br /&gt;
&lt;br /&gt;
After '''v4.9_devel-164-gdb0d004''', the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;command_laws&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; section is mandatory for both fixedwing and rotorcraft firmwares, only for fixedwing otherwise.&lt;br /&gt;
&lt;br /&gt;
=== Battery === &lt;br /&gt;
&lt;br /&gt;
This section gives characteristics for monitoring the main power battery.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;MILLIAMP_AT_FULL_THROTTLE&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; represents the actual current (in mA) when full THROTTLE is applied. Note that when flying the current typically is significantly lower than in static tests at home on your workbench. &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;MILLIAMP_AT_FULL_THROTTLE&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; is used to compute the &amp;lt;tt&amp;gt;energy&amp;lt;/tt&amp;gt; value of the &amp;lt;tt&amp;gt;BAT&amp;lt;/tt&amp;gt; message when no [[Current_sensor|Current sensor]] is mounted in the airframe. This value can also be used in flight plans. For example, if at full throttle your motor consumes 10 Amps, use a value of 10000. You can &amp;quot;tweak&amp;quot; this number after a few flights to match the capacity of your battery. If upon landing your bat.energy messages says that you used 2500 mAh while the energy recharged into the battery is only 2000 mAh, you could reduce the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;MILLIAMP_AT_FULL_THROTTLE&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; value by 20% to match your in-flight current consumption. This tweaking is most precise if you fly full throttle only (respectively no throttle to glide down again).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;CURRENT_ESTIMATION_NONLINEARITY&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; can be added to tweak the energy estimation for non full throttle cruise. As the current consumption is nonlinear, at 50% throttle it is likely to be substantially less than 50%. A superellipse is used to approximate this nonlinearity. The default setting is 1.2 and is used if the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;CURRENT_ESTIMATION_NONLINEARITY&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; is not defined in your airframe file. A value 1 corresponds to linear behaviour, 1.5 corresponds to strong nonlinearity. The tweaking is done same as described above for &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;MILLIAMP_AT_FULL_THROTTLE&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt;, but only partial throttle (cruise throttle) should be applied in flight.&lt;br /&gt;
&lt;br /&gt;
If both &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;MILLIAMP_AT_FULL_THROTTLE&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;CURRENT_ESTIMATION_NONLINEARITY&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; are tweaked well, you get precise energy estimations with less than 5% error independent of your flight pattern without even requiring a [[Current_sensor|current sensor]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;CATASTROPHIC_BAT_LEVEL&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; (was previously &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;LOW_BATTERY&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt;) value defines the voltage at which the autopilot will lock the throttle at 0% in autonomous mode (kill_throttle mode). This value is also used by the ground server to issue a '''CATASTROPHIC''' alarm message on the bus (this message will be displayed in the console of the GCS).  &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;CRITIC&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;LOW&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; values will also used as threshold for '''CRITIC''' and '''WARNING''' alarms. They are optional and the respective defaults are 10.0 and 10.5V.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;MAX_BAT_LEVEL&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; may be specified to improve the display of the battery gauge in the strip or in &amp;quot;papgets&amp;quot;. Note that this definition is optional, with a default value of 12.5V.&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware name=&amp;quot;fixedwing&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ADC_CHANNEL_VSUPPLY&amp;quot; value=&amp;quot;ADC_4&amp;quot; /&amp;gt; &lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;section name=&amp;quot;BAT&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;MILLIAMP_AT_FULL_THROTTLE&amp;quot; value=&amp;quot;12000&amp;quot; unit=&amp;quot;mA&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;CATASTROPHIC_BAT_LEVEL&amp;quot; value=&amp;quot;6.0&amp;quot; unit=&amp;quot;V&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;CRITIC_BAT_LEVEL&amp;quot; value=&amp;quot;6.5&amp;quot; unit=&amp;quot;V&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;LOW_BAT_LEVEL&amp;quot; value=&amp;quot;7.0&amp;quot; unit=&amp;quot;V&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;MAX_BAT_LEVEL&amp;quot; value=&amp;quot;8.4&amp;quot; unit=&amp;quot;V&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The conversion of ADC measurements to Voltage is already defined for the different autopilot boards, if you need to override these defaults you can use the &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;VoltageOfAdc(adc)&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; define and also specify offsets or anything else you might need, e.g.:&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;section name=&amp;quot;BAT&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;define name=&amp;quot;VOLTAGE_ADC_SCALE&amp;quot; value=&amp;quot;0.0177531&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;VOLTAGE_OFFSET&amp;quot; value=&amp;quot;0.5&amp;quot; unit=&amp;quot;V&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;VoltageOfAdc(adc)&amp;quot; value=&amp;quot;(VOLTAGE_ADC_SCALE * adc + VOLTAGE_OFFSET)&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Calculating '''VOLTAGE_ADC_SCALE''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;VOLTAGE\_ADC\_SCALE=\frac{Vref}{ADCresolution-1}\div\frac{R2}{R1+R2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Vref - Voltage reference for the ADC (will be 3.3V in most cases, can be found in mcu/adc datasheet)&lt;br /&gt;
*ADCresolution - ADC bit depth (e.g. 2^12=4096 for a 12 bit ADC)&lt;br /&gt;
*R1 - Resistor between battery and ADC input pin of MCU&lt;br /&gt;
*R2 - Resistor between ADC input pin of the MCU and GND&lt;br /&gt;
&lt;br /&gt;
It is also a good idea to measure the actual voltage of the battery with a precision voltage meter, compare it with the calculated value from the autopilot (e.g. via [[Paparazzi_Center#Messages]]) and edit the vales for ADC scaling. Since the resistors have a tolerance, this can fine tune the measurement.&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
&lt;br /&gt;
The [[Modules|modules]] allow to add new code in a flexible way with initialisation, periodic and event functions without modifying the main AP loop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;modules main_freq=&amp;quot;60&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;load name=&amp;quot;demo_module.xml&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The main_freq parameter (in Hz) allows to specify the frequency of the main loop. Default is 60 Hz&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Since '''v5.8''' it is possible to safely replace ''subsystem'' by ''module'' in your airframe file. It is therefore also possible to use the modules the same way subsystems used to be (i.e. as children of the ''firmware'' node and not only the ''modules'' node as presented above. The roadmap of Paparazzi is to convert existing subsystems to [[modules]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GCS ===&lt;br /&gt;
&lt;br /&gt;
[[Image:ac_icon_multi_uav.png|thumb|Various A/C icons demonstrated on a multi UAV simulation session]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Icons_Theme_Default.png|thumb|Default Theme]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Icons_Theme_Flat.png|thumb|Flat Theme]]&lt;br /&gt;
&lt;br /&gt;
Use this &amp;lt;b&amp;gt;optional&amp;lt;/b&amp;gt; section to help customize parts of the GCS for a specific airframe:&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;section name=&amp;quot;GCS&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ICONS_THEME&amp;quot; value=&amp;quot;flat_theme&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ALT_SHIFT_PLUS_PLUS&amp;quot; value=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ALT_SHIFT_PLUS&amp;quot; value=&amp;quot;5&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ALT_SHIFT_MINUS&amp;quot; value=&amp;quot;-5&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;SPEECH_NAME&amp;quot; value=&amp;quot;Quad&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;AC_ICON&amp;quot; value=&amp;quot;flyingwing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;ICONS_THEME&amp;lt;/tt&amp;gt; can be used to define an alternate/custom GCS icons theme for a given aircraft The '''flat_theme''' is one example of an alternate set of GCS icons.&lt;br /&gt;
* &amp;lt;tt&amp;gt;ALT_SHIFT_PLUS_PLUS&amp;lt;/tt&amp;gt; sets the number of metres the target altitude will change when the double up arrow button is pressed on the [[GCS#Strips|strip]]&lt;br /&gt;
* &amp;lt;tt&amp;gt;ALT_SHIFT_PLUS&amp;lt;/tt&amp;gt; sets the number of metres the target altitude will change when the up arrow button is pressed on the [[GCS#Strips|strip]]&lt;br /&gt;
* &amp;lt;tt&amp;gt;ALT_SHIFT_MINUS&amp;lt;/tt&amp;gt; sets the number of metres the target altitude will change when the down arrow button is pressed on the [[GCS#Strips|strip]]&lt;br /&gt;
* &amp;lt;tt&amp;gt;SPEECH_NAME&amp;lt;/tt&amp;gt; a string ([a-zA-Z0-9_]) that will be used in place of the aircraft name specified in &amp;lt;tt&amp;gt;conf.xml&amp;lt;/tt&amp;gt; for the [[Speech|speech]] and [[GCS#Alarms|alarms]] functionality. Set this to &amp;quot;_&amp;quot; to prevent the speech function from saying the aircraft name. Useful if your aircraft name takes a long time to say (i.e. &amp;quot;UAV1-A_with_spektrum&amp;quot; can be shortened to &amp;quot;Plane&amp;quot;).&lt;br /&gt;
* &amp;lt;tt&amp;gt;AC_ICON&amp;lt;/tt&amp;gt; can be used to define the vehicle icon (or overwrite the default icon) that shows up on the 2D-map of the GCS. Available values are: &amp;lt;tt&amp;gt;flyingwing&amp;lt;/tt&amp;gt; , &amp;lt;tt&amp;gt;fixedwing&amp;lt;/tt&amp;gt; , &amp;lt;tt&amp;gt;rotorcraft&amp;lt;/tt&amp;gt; , &amp;lt;tt&amp;gt;quadrotor&amp;lt;/tt&amp;gt; , &amp;lt;tt&amp;gt;hexarotor&amp;lt;/tt&amp;gt; , &amp;lt;tt&amp;gt;octorotor&amp;lt;/tt&amp;gt; , &amp;lt;tt&amp;gt;quadrotor_x&amp;lt;/tt&amp;gt; , &amp;lt;tt&amp;gt;hexarotor_x&amp;lt;/tt&amp;gt; , &amp;lt;tt&amp;gt;octorotor_x&amp;lt;/tt&amp;gt; , &amp;lt;tt&amp;gt;home&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Custom Icons Theme Support ====&lt;br /&gt;
&lt;br /&gt;
A custom icons theme is supported through the use of the '''ICONS_THEME''' attribute. Set the '''ICONS_THEME''' attribute ''value'' to the path of your custom icons theme directory and the given aircraft will now display your custom icons. Note that the path is relative to the default GCS icons path root: ''$PAPARAZZI_HOME/data/pictures/gcs_icons''&lt;br /&gt;
&lt;br /&gt;
{{Box Code|code snippet|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;section name=&amp;quot;GCS&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;ICONS_THEME&amp;quot; value=&amp;quot;myawesome_icons&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The directory that contains your custom icons, in this example named ''myawesome_icons'', is located at ''$PAPARAZZI_HOME/data/pictures/gcs_icons''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:User_Documentation]] [[Category:Airframe_Configuration]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=JSBSim&amp;diff=21070</id>
		<title>JSBSim</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=JSBSim&amp;diff=21070"/>
		<updated>2016-03-11T17:20:36Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* From Source */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Simulation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
[http://jsbsim.org JSBSim] is an open source flight dynamics model (FDM) used in [[NPS]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Debian Package ===&lt;br /&gt;
On Debian/Ubuntu you can install the paparazzi-jsbsim package.&lt;br /&gt;
 sudo apt-get install paparazzi-jsbsim&lt;br /&gt;
If you don't have that in your sources, see [[Installation/Linux#Adding_the_APT_repository]]&lt;br /&gt;
&lt;br /&gt;
=== From Source ===&lt;br /&gt;
Compile JSBSIM from source (with specified date to make sure it works and API hasn't changed)&lt;br /&gt;
  cvs -z3 -d:pserver:anonymous@jsbsim.cvs.sourceforge.net:/cvsroot/jsbsim co -D &amp;quot;23 Feb 2015&amp;quot; -P JSBSim &lt;br /&gt;
  cd JSBSim&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./configure --enable-libraries --enable-shared --prefix=/opt/jsbsim&lt;br /&gt;
  make&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
When building a [[NPS]] simulator target, the build system will first try to find JSBSim via pkg-config and fall back to ''/opt/jsbsim''.&lt;br /&gt;
&lt;br /&gt;
If you want to install to a different location, change the ''prefix'' to your liking.&lt;br /&gt;
And you need to add a &amp;lt;tt&amp;gt;&amp;lt;makefile&amp;gt;&amp;lt;/tt&amp;gt; section to your airframe file and add the correct flags to point to the include files and libraries, depending on where it is installed.&lt;br /&gt;
&lt;br /&gt;
With the default installation to &amp;lt;tt&amp;gt;/usr/local/&amp;lt;/tt&amp;gt;, this would look like&lt;br /&gt;
  &amp;lt;makefile location=&amp;quot;after&amp;quot;&amp;gt;&lt;br /&gt;
    nps.CFLAGS += -I/usr/local/include/JSBSim&lt;br /&gt;
    nps.LDFLAGS += -L/usr/local/lib&lt;br /&gt;
  &amp;lt;/makefile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On OSX ===&lt;br /&gt;
* Install the JSBSim libraries onto your system. This should already be installed with &amp;lt;tt&amp;gt;paparazzi-tools&amp;lt;/tt&amp;gt;, but if it isn't:&lt;br /&gt;
  &amp;lt;code&amp;gt;$ sudo port install jsbsim&amp;lt;/code&amp;gt;&lt;br /&gt;
It uses code from the cvs repo, so it should be the most up-to-date source.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
* If you get an error like &amp;quot;undefined reference to `pcre_compile'&amp;quot;, edit file conf/Makefile.jsbsim, look for the line that begins with LDFLAGS and add -lpcre, e.g.:&lt;br /&gt;
 LDFLAGS += $($(TARGET).LDFLAGS) -lpcre&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Simulation]] [[Category:Software]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=JSBSim&amp;diff=21069</id>
		<title>JSBSim</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=JSBSim&amp;diff=21069"/>
		<updated>2016-03-11T17:17:04Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* From Source */ adjust date to currently used version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Simulation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
[http://jsbsim.org JSBSim] is an open source flight dynamics model (FDM) used in [[NPS]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Debian Package ===&lt;br /&gt;
On Debian/Ubuntu you can install the paparazzi-jsbsim package.&lt;br /&gt;
 sudo apt-get install paparazzi-jsbsim&lt;br /&gt;
If you don't have that in your sources, see [[Installation/Linux#Adding_the_APT_repository]]&lt;br /&gt;
&lt;br /&gt;
=== From Source ===&lt;br /&gt;
Compile JSBSIM from source (with specified date to make sure it works and API hasn't changed)&lt;br /&gt;
  cvs -z3 -d:pserver:anonymous@jsbsim.cvs.sourceforge.net:/cvsroot/jsbsim co -D &amp;quot;23 Feb 2015&amp;quot; -P JSBSim &lt;br /&gt;
  cd JSBSim&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./configure --enable-libraries --enable-shared --prefix=/opt/jsbsim&lt;br /&gt;
  make&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
If you want to install to a different location, change the ''prefix'' to your liking.&lt;br /&gt;
And you need to add a &amp;lt;tt&amp;gt;&amp;lt;makefile&amp;gt;&amp;lt;/tt&amp;gt; section to your airframe file and add the correct flags to point to the include files and libraries, depending on where it is installed.&lt;br /&gt;
&lt;br /&gt;
With the default installation to &amp;lt;tt&amp;gt;/usr/local/&amp;lt;/tt&amp;gt;, this would look like&lt;br /&gt;
  &amp;lt;makefile location=&amp;quot;after&amp;quot;&amp;gt;&lt;br /&gt;
    jsbsim.CFLAGS += -I/usr/local/include/JSBSim&lt;br /&gt;
    jsbsim.LDFLAGS += -L/usr/local/lib&lt;br /&gt;
  &amp;lt;/makefile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On OSX ===&lt;br /&gt;
* Install the JSBSim libraries onto your system. This should already be installed with &amp;lt;tt&amp;gt;paparazzi-tools&amp;lt;/tt&amp;gt;, but if it isn't:&lt;br /&gt;
  &amp;lt;code&amp;gt;$ sudo port install jsbsim&amp;lt;/code&amp;gt;&lt;br /&gt;
It uses code from the cvs repo, so it should be the most up-to-date source.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
* If you get an error like &amp;quot;undefined reference to `pcre_compile'&amp;quot;, edit file conf/Makefile.jsbsim, look for the line that begins with LDFLAGS and add -lpcre, e.g.:&lt;br /&gt;
 LDFLAGS += $($(TARGET).LDFLAGS) -lpcre&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Simulation]] [[Category:Software]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=FirmwareArchitecture&amp;diff=21068</id>
		<title>FirmwareArchitecture</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=FirmwareArchitecture&amp;diff=21068"/>
		<updated>2016-03-11T16:43:24Z</updated>

		<summary type="html">&lt;p&gt;Flixr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Low Level drivers ==&lt;br /&gt;
low level code organization is roughly:&lt;br /&gt;
* '''sw/airborne/mcu_periph''' : interfaces/drivers for MCU peripherals like I2C, SPI, ADC, etc... (the HAL)&lt;br /&gt;
* '''sw/airborne/peripherals''' : drivers for external peripherals, like sensor chips, etc...&lt;br /&gt;
* '''sw/airborne/arch''' : everything that is architecture specific (''lpc21'', ''stm32'', ''linux'', ..)&lt;br /&gt;
* '''sw/airborne/boards''' : board definitions, pinout, etc... (no need to touch this unless you want to support a new board)&lt;br /&gt;
&lt;br /&gt;
== Subsystems ==&lt;br /&gt;
[[Subsystems]] are just a convention used to provide several implementations of a peripheral (like microcontroller peripherals, an external imu board...), protocol (gps, communications...) or algorithm (control, estimation...). Function calls are written &amp;quot;by hand&amp;quot; and the build system takes care to compile the particular implementation.&lt;br /&gt;
&lt;br /&gt;
They are selected and configured with a &amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&amp;lt;subsystem name=&amp;quot;foo&amp;quot; type=&amp;quot;bar&amp;quot;&amp;gt;&amp;lt;/source&amp;gt; in the [[Airframe_Configuration#Firmware_and_Hardware_definitions|firmware section of the airframe file]]. All this does is basically include a makefile &amp;lt;tt&amp;gt;foo_bar.makefile&amp;lt;/tt&amp;gt; that adds the respective sources and adds a few configuration options. (See &amp;lt;tt&amp;gt;conf/autopilot/subsystems/...&amp;lt;/tt&amp;gt;)&lt;br /&gt;
This makes it easier to put an airframe file together (they replace the old raw makefile section) and also allows us to change the code and move/rename files behind the scenes without breaking everyones airframe files.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Since '''v5.8''' it is possible to safely replace ''subsystem'' by ''module'' in your airframe file. The roadmap of Paparazzi is to convert existing subsystems to [[modules]].&lt;br /&gt;
|}&lt;br /&gt;
=== Creating a new Subsystem ===&lt;br /&gt;
A new subsystem is required when adding support for new or alternate core functionalities, as listed above. Some new subsystems will rely on underlying peripheral or MCU peripheral drivers (for example a new IMU subsystem), others do not need this (for example a new set of control loops). An MCU peripheral uses on-chip hardware peripherals in the main microcontroller (such as the SPI hardware), while normal peripherals are external hardware such as an analog to digital converter integrated circuit (such as the MAX1168).&lt;br /&gt;
&lt;br /&gt;
The general strategy for adding a new subsystem should be something along the lines of:&lt;br /&gt;
*(if required) write a peripheral driver for the specific device or device family in &amp;lt;tt&amp;gt;sw/airborne/peripherals/&amp;lt;/tt&amp;gt;&lt;br /&gt;
*(if required) in the peripheral driver, use the &amp;lt;tt&amp;gt;sw/airborne/mcu_periph/*.[c|h]&amp;lt;/tt&amp;gt; arch-independent mcu peripheral drivers to handle the communication and input-output operations&lt;br /&gt;
*(if required) you may wish to use a family generic c header (&amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt;) file for register definitions, etc., if the driver could be used with a family of peripheral devices&lt;br /&gt;
*write a subsystem driver for the new functionality, device or device family in &amp;lt;tt&amp;gt;sw/airborne/subsystems/TYPE/&amp;lt;/tt&amp;gt;&lt;br /&gt;
*you may wish to use a family generic c header (&amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt;) file for register definitions, etc., if the driver could be used with a family of peripheral devices&lt;br /&gt;
*if you need to add complex features (for example, use a gpio for a reset, use an interrupt for data ready, etc), you will need to add some arch specific files in the correct location to handle some of the extra initialization and operation, for example in &amp;lt;tt&amp;gt;sw/airborne/arch/ARCHTYPE/subsystems|peripherals|mcu_periph|ETC/&amp;lt;/tt&amp;gt;&lt;br /&gt;
*write a subsystem makefile to aid in building the code, found in &amp;lt;tt&amp;gt;conf/firmwares/subsystems/fixedwing|rotorcraft|shared/&amp;lt;/tt&amp;gt;&lt;br /&gt;
*even though you technically need to make a new one, you can undoubtedly use existing examples to make your life easier. For example, for an IMU, try looking at the adxl345 peripheral driver, or possibly the imu_b2.[c|h] (which uses for example the ms2100 and max1168 peripherals) for some ideas&lt;br /&gt;
*last thing, make sure you USE MASTER for all development, and take a look at the [[Contributing]] page, and be sure to review the coding style guidelines&lt;br /&gt;
*heavily comment the code, especially regarding any magic numbers and operations (for example, scaling the input of a sensor)&lt;br /&gt;
Finally, master is always being updated and changed, so if you aren't quite sure about something, don't hesitate to ask on the mailing list. In addition, there may be style differences between newer, updated subsystems and older subsystems.&lt;br /&gt;
&lt;br /&gt;
== Modules ==&lt;br /&gt;
[[Modules]] use code generation in order to allow people to use them by only editing the vehicle's xml configuration as opposed to changing/adding to  the code of the autopilot. Typically, function calls are generated for initialisation and in the mainloop for timers (periodic in paparazzi slang) and events. The event and periodic functions of the Modules get called at the end of event_task_ap and periodic_task_ap respectively.&lt;br /&gt;
&lt;br /&gt;
=== Creating a new Module ===&lt;br /&gt;
*See [[Modules]] for more information&lt;br /&gt;
&lt;br /&gt;
== Discussion ==&lt;br /&gt;
So the difference is that with subsystems you explicitly call the functions (e.g. control loops) from the main ap loop, whereas the event/periodic functions of the Modules get called at the end of the main event/periodic tasks. So Modules are perfect to add stuff like extra payload and sensors, but Subsystems give you tighter control over when and in what order to call functions (e.g. for estimation/control).&lt;br /&gt;
&lt;br /&gt;
Modules naturally provide the &amp;quot;several implementations&amp;quot; feature of the Subsystems. So, we could have a &amp;quot;generic&amp;quot; main.c consisting only in calls to the generated functions.&lt;br /&gt;
Nevertheless, care should be taken that switching to a &amp;quot;module only&amp;quot; configuration doesn't become detrimental to the readability and debugability of the code.&lt;br /&gt;
&lt;br /&gt;
You can also wrap some subsystem code as a modules (e.g. infrared), or the other way round (e.g. imu_ppzuav). As you can see with the imu_ppzuav module it also still expects a direct ImuEvent call from main_ap, so you could say it's not a &amp;quot;pure&amp;quot; module.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:Developer_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Docker&amp;diff=21066</id>
		<title>Docker</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Docker&amp;diff=21066"/>
		<updated>2016-03-10T10:09:02Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* On Mac */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Docker is an open platform used to build, ship, and run distributed applications. You can learn more about Docker by visiting its website, https://docker.com.&lt;br /&gt;
&lt;br /&gt;
In particular, if you're just getting started using Docker with Paparazzi, we encourage you to make use of the following resources:&lt;br /&gt;
&lt;br /&gt;
* [https://www.docker.com/whatisdocker/ What is Docker] - A page that will give you excelent high level overview of Docker and its purpose.&lt;br /&gt;
* [https://docs.docker.com/ Documentation] - Browse the online documentation and references to find information about Docker's various functions and tools.&lt;br /&gt;
* [https://forums.docker.com/ Forums] - If you need help, just ask! Docker has a great user community, with lots of people willing to help answer any questions you might have.&lt;br /&gt;
* [https://groups.google.com/forum/#!forum/docker-userl Mailing list] - Another way to start a discussion and follow community activities. &lt;br /&gt;
&lt;br /&gt;
For new users of Docker, those resources will provide you with most of the information you'll need to get familiar with the platform. Additional information pertaining to using Docker for Paparazzi can be found on this page.&lt;br /&gt;
&lt;br /&gt;
You can test out Docker right now using a live online tutorial, try it out yourself: [http://docs.docker.com/linux/started/ Linux] / [http://docs.docker.com/mac/started/ Mac]. &lt;br /&gt;
&lt;br /&gt;
We have some images and scripts to easily build/test Paparazzi within a container.&lt;br /&gt;
&lt;br /&gt;
== Pulling Paparazzi images ==&lt;br /&gt;
There are prebuilt images containing all the Paparazzi dependencies on [https://hub.docker.com/u/flixr/ Docker hub], which you can just pull:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
docker pull flixr/pprz-dep&lt;br /&gt;
docker pull flixr/pprz-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Or in your local clone of the Paparazzi repository:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd docker&lt;br /&gt;
make pull&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The pprz-dep image contains all dependencies, the pprz-dev image adds some convenience stuff and a pprz user. Normally you will want to use the pprz-dev image.&lt;br /&gt;
&lt;br /&gt;
== Building and Running Paparazzi inside Docker ==&lt;br /&gt;
You can simply start a shell inside the pprz-dev container&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
docker run -it flixr/pprz-dev bash&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You could now clone the paparazzi repo inside this container and build it.&lt;br /&gt;
However this does not give you access to the X-Server, USB, etc..&lt;br /&gt;
&lt;br /&gt;
To make Docker more useful to us and enable using and editing Paparazzi files from the host system, the repo contains a [https://github.com/paparazzi/paparazzi/blob/master/docker/run.sh helper script]. See also https://github.com/paparazzi/paparazzi/pull/1272&lt;br /&gt;
&lt;br /&gt;
Starting a shell (or [[Paparazzi Center]] directly) through this script will enable access to the X-Server, USB devices and audio and set mount your current Paparazzi directory in the home directory of the pprz user inside the container.&lt;br /&gt;
That way you can edit your code and configuration files from your host system using your favourite tools/IDE and then build and use them within Docker.&lt;br /&gt;
&lt;br /&gt;
In your local clone of the Paparazzi repository:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./docker/run.sh -it flixr/pprz-dev bash&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or even easier:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd docker&lt;br /&gt;
make bash&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
And you get a new bash shell inside the Paparazzi Docker container... There you can just run &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; to build Paparazzi.&lt;br /&gt;
Once built, you can also directly use &amp;lt;tt&amp;gt;make paparazzi&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;make start&amp;lt;/tt&amp;gt; accordingly to start the Paparazzi Center or the start.py tool.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
When using the run.sh script, you are sharing the paparazzi directly between your host system and the Docker container. This means that if you previously had Paparazzi built on your host system, you will need to rebuild it inside the Docker environment (&amp;lt;tt&amp;gt;make clean &amp;amp;&amp;amp; make&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== On Mac ===&lt;br /&gt;
There is currently no audio forwarding on OSX and X-Server access might be slower, see https://github.com/paparazzi/paparazzi/pull/1425&lt;br /&gt;
&lt;br /&gt;
Possibly helpful pages:&lt;br /&gt;
* http://wiki.ros.org/docker/Tutorials/GUI&lt;br /&gt;
&lt;br /&gt;
[[Category:Testing]] [[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=21065</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=21065"/>
		<updated>2016-03-09T10:56:27Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Quickstart for Ubuntu users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Installation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux] or Apple Macintosh running [http://en.wikipedia.org/wiki/OS_X Mac OS X]. There is also work being done to port Paparazzi to Windows.&lt;br /&gt;
&lt;br /&gt;
The steps required to install the software needed to be able to let your UAS fly are:&lt;br /&gt;
&lt;br /&gt;
# Install tools and prerequisites needed by Paparazzi.&lt;br /&gt;
# Download the source code from the source repository.&lt;br /&gt;
# Compile the Paparazzi software from sourcecode&lt;br /&gt;
# Complete any final configuration&lt;br /&gt;
&lt;br /&gt;
== Quickstart for Ubuntu users ==&lt;br /&gt;
Love one-liners? To get the latest Paparazzi up and running on your '''Ubuntu 12.04 or higher OS''', make sure you have internet, then just copy and paste the text below into your terminal and press [enter] ... and wait a while...&lt;br /&gt;
&lt;br /&gt;
 sudo add-apt-repository -y ppa:paparazzi-uav/ppa &amp;amp;&amp;amp; sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded &amp;amp;&amp;amp; sudo apt-get update &amp;amp;&amp;amp; \ &lt;br /&gt;
 sudo apt-get -f -y install paparazzi-dev paparazzi-jsbsim gcc-arm-none-eabi &amp;amp;&amp;amp; cd ~ &amp;amp;&amp;amp; &amp;lt;nowiki&amp;gt;git clone --origin upstream https://github.com/paparazzi/paparazzi.git&amp;lt;/nowiki&amp;gt; &amp;amp;&amp;amp; \&lt;br /&gt;
 cd ~/paparazzi &amp;amp;&amp;amp; git remote update -p &amp;amp;&amp;amp; \&lt;br /&gt;
 git checkout -b v5.8 upstream/v5.8 &amp;amp;&amp;amp; sudo cp conf/system/udev/rules/*.rules /etc/udev/rules.d/ &amp;amp;&amp;amp; \&lt;br /&gt;
 echo -e &amp;quot;export PAPARAZZI_HOME=~/paparazzi&amp;quot; &amp;gt;&amp;gt; ~/.bashrc &amp;amp;&amp;amp; echo -e &amp;quot;export PAPARAZZI_SRC=~/paparazzi&amp;quot; &amp;gt;&amp;gt; ~/.bashrc &amp;amp;&amp;amp; source ~/.bashrc &amp;amp;&amp;amp; \&lt;br /&gt;
 make clean &amp;amp;&amp;amp; make &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&lt;br /&gt;
                [[File:Done.jpg|frameless|center|Done!]]&lt;br /&gt;
If all went well, and you've flown Paparazzi before, the Paparazzi Center should now be running... '''skip''' the rest of this page, go fly! &lt;br /&gt;
&lt;br /&gt;
If you are new you'll need to do some more things before you go fly like configuring your XML definition file detailing your airframe configuration. There is help here for that: [[Airframe_Configuration]]&lt;br /&gt;
&lt;br /&gt;
In case you have no autopilot hardware yet, no problem, go get hardware [[Get_Hardware|here]] or just buy a ready to fly aircraft that can run Paparazzi Software like the Parrot Drones [http://www.parrot.com/products/bebop-drone/ Parrot Bebop] and run Paparazzi on your Parrot [[AR_Drone_2|ARDRone2]], [[Bebop|Bebop]] and Bebop2 (soon the Disco drone).&lt;br /&gt;
&lt;br /&gt;
== OS Specific Instructions ==&lt;br /&gt;
&lt;br /&gt;
For Linux an instruction video explaining it all in detail can be watched here https://www.youtube.com/watch?v=eW0PCSjrP78&lt;br /&gt;
&lt;br /&gt;
The process of installing the prerequisite tools and dependencies needed by Paparazzi is specific to the operating system you are using. For detailed installation instructions, please see the following pages:&lt;br /&gt;
*[[Installation/Linux|Installing prerequisites tools on Linux]]&lt;br /&gt;
*[[Installation/MacOSX|Installing prerequisites tools on Mac OS X]]&lt;br /&gt;
*[[Installation/RaspberryPi|Installing prerequisites tools on the RaspberryPi (Raspbian)]]&lt;br /&gt;
&lt;br /&gt;
For more advanced installation information or developers, please see the following pages:&lt;br /&gt;
*[[Installation/FromScratch|Installing everything from scratch]] For non Debian based Linux distributions or if one just wants to be able to use all the latest and greatest compilers, or source code of everything to improve something. Then there is no other way than to install from scratch.&lt;br /&gt;
*[[Installation/Windows|Installing prerequisite tools on Windows]] Note that this is '''a work in progress, and not finished yet'''. It would be fantastic if you are interested in running Paparazzi on this OS to help out with the porting. Being able to help is one of opensource software main features. If your skil- set is not so good in this area, but you still insist using Windows OS, then it is best to install a VirtualMachine from within Windows where you run the free Ubuntu OS of choice.&lt;br /&gt;
&lt;br /&gt;
=== Virtual Machines ===&lt;br /&gt;
&lt;br /&gt;
It is also possible to have your Debian/Ubuntu running in a virtual machine, for instance with [http://www.virtualbox.org/ VirtualBox]. This requires minimal changes to your computer setup, as you can run the VM from all common platforms (Windows, OS X, Linux). The virtual machine image can easily be transferred between different laptops, giving greater flexibility. Unfortunately, the Open-Source Edition of VirtualBox doesn't include the necessary USB support, so you'll need to get the regular version from the website.&lt;br /&gt;
&lt;br /&gt;
If you are new and this is your first time installing it is suggested you keep it simple. Use the standard Linux or OS X install. Select a system you can dedicate to the Linux installation. No VMs or dual boot configurations. The idea is do a very simple generic installation that is certain to have no issues. This reassures you that the installation process works and you can see and use a working Paparazzi install for some time before you try a more complicated install. The install is well documented and certain to succeed if followed exactly. Most issues arise when someone unfamiliar with Paparazzi or their OS tries a non-standard install that requires special steps that are not documented. Generally, commands can be copied and pasted for easy, step-by-step installation.&lt;br /&gt;
&lt;br /&gt;
== Getting the Source Code ==&lt;br /&gt;
The Paparazzi source code is hosted on [https://github.com/paparazzi/paparazzi Github]. While you can download it as a tarball from https://github.com/paparazzi/paparazzi/releases, it is recommended to clone the repository with [[git]].&lt;br /&gt;
&lt;br /&gt;
From the directory of your choice type:&lt;br /&gt;
 git clone --origin upstream https://github.com/paparazzi/paparazzi.git&lt;br /&gt;
Check out the released stable version branch:&lt;br /&gt;
 git checkout v5.8&lt;br /&gt;
&lt;br /&gt;
'''If this whole &amp;quot;Git&amp;quot; thing is new to you, more options and information can be found on the [[git|Git page]].'''&lt;br /&gt;
&lt;br /&gt;
== Launching the Software ==&lt;br /&gt;
Make sure you have installed the &amp;lt;tt&amp;gt;paparazzi-dev&amp;lt;/tt&amp;gt; package as described above. Without these you will not be able to compile the sourcecode.&lt;br /&gt;
The first step is to compile. From the &amp;lt;tt&amp;gt;paparazzi&amp;lt;/tt&amp;gt; directory (&amp;lt;tt&amp;gt;cd ~/paparazzi&amp;lt;/tt&amp;gt;), run&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
You will have to run this command after each update of the source (&amp;lt;tt&amp;gt;git pull&amp;lt;/tt&amp;gt; command).&lt;br /&gt;
Launch the software from the &amp;lt;tt&amp;gt;paparazzi&amp;lt;/tt&amp;gt; directory with&lt;br /&gt;
&lt;br /&gt;
 ./paparazzi&lt;br /&gt;
&lt;br /&gt;
From the [[Paparazzi_Center|Paparazzi Center]] interface, select the ''Microjet'' aircraft, select the ''sim'' target and ''Build'' it. Then ''Execute'' the ''Simulation'' session. The procedure is detailed in the [[Simulation]] page.&lt;br /&gt;
&lt;br /&gt;
=== Environment Variables ===&lt;br /&gt;
&lt;br /&gt;
If ('''and only if''') you want to directly launch some Paparazzi agents (the ''Tools'' of the [[Paparazzi_Center|Paparazzi Center]]) from the command line, without using the Paparazzi Center, you must have the Paparazzi source and home environment variables set correctly in your shell. These variables can be automatically set in your shell by adding the following lines to your .bashrc file:&lt;br /&gt;
{{Box Code|~/.bashrc|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export PAPARAZZI_HOME=''your paparazzi software directory''&lt;br /&gt;
export PAPARAZZI_SRC=''your paparazzi software directory''&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Verify that your variables are set correctly with the following command:&lt;br /&gt;
:&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;env | grep PAPARAZZI&amp;lt;/source&amp;gt;&lt;br /&gt;
which should return the following:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
PAPARAZZI_HOME=''your paparazzi software directory''&lt;br /&gt;
PAPARAZZI_SRC=''your paparazzi software directory''&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you wish to manually set the env variables (i.e. when compiling a backup copy of your code in a different folder) execute the following command from the folder you wish to set as your active paparazzi folder:&lt;br /&gt;
:&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export PAPARAZZI_HOME=`pwd`;export PAPARAZZI_SRC=`pwd`&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Software Updates ==&lt;br /&gt;
'''We manage the software with the git version control system. Learn it! If you are new to it, see the [[Git|Git wiki page]].'''&lt;br /&gt;
&lt;br /&gt;
Paparazzi is a very rapidly evolving project and as such you might want to update your software regularly. See the [[RepositoryStructure|branching model and release process page]].&lt;br /&gt;
&lt;br /&gt;
Any new files you created will not be lost/overwritten when updating (like your own airframe file). Nevertheless, as with all things, backups are advised.&lt;br /&gt;
If you modified source code, the best way is of course to use the version control system [[Git]] to commit your changes. Otherwise at least use the brute force method and save everything in another directory.&lt;br /&gt;
&lt;br /&gt;
Update your software with care and caution, and always test the functionality on the ground and in the air as some updates will affect tuning parameters. You might need to update your airframe file as well. The compiler will usually complain if there is a problem, at which point you can look at the [[Airframe_Configuration|Airframe Configuration wiki page]] again, look on the [[Contact#Mailing_List|mailing list]] or some of the most recent airframe files on git to find the proper syntax.&lt;br /&gt;
&lt;br /&gt;
'''See also the [[Release Upgrades]] page for information on how to update your configuration from one release to the next.'''&lt;br /&gt;
&lt;br /&gt;
=== Quick'n dirty description ===&lt;br /&gt;
&lt;br /&gt;
To download and automatically merge any updated source files, run the following command from your Paparazzi directory&lt;br /&gt;
 git pull&lt;br /&gt;
&lt;br /&gt;
After any git update or source code modification the code can be recompiled from ''your paparazzi software directory'' with the following command:&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
The ''make'' command will only recompile portions of the software where changed have been detected.&lt;br /&gt;
If it does not behave as expected you can delete all compiled files and recompile from scratch with the following commands:&lt;br /&gt;
&lt;br /&gt;
 make clean&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
If you'd like to check that the code compiles all example airframes then you can run the test suite using the command&lt;br /&gt;
&lt;br /&gt;
 make test&lt;br /&gt;
&lt;br /&gt;
For more details see the [[Builds/Tests|tests page]].&lt;br /&gt;
&lt;br /&gt;
== Using the Live CD ==&lt;br /&gt;
&lt;br /&gt;
There is a [[LiveCD]] available, but it dates back to 2008. It is still an easy way to get a first glimpse of Paparazzi however without installing anything.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=DevGuide/Server_GCS_com&amp;diff=20924</id>
		<title>DevGuide/Server GCS com</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=DevGuide/Server_GCS_com&amp;diff=20924"/>
		<updated>2016-02-28T20:29:47Z</updated>

		<summary type="html">&lt;p&gt;Flixr: /* Advanced format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The communication between the '''[[Server|server]]''' and the '''[[GCS]]''' is based on the [[Ivy]] middleware as described in the [[Overview#System_Architecture|system overview]].&lt;br /&gt;
&lt;br /&gt;
The mechanism described below apply mainly to the Ocaml library provided by paparazzi (sw/lib/ocaml/pprz.ml*), even if the basic send/bind functions of Ivy can be used directly in C programs.&lt;br /&gt;
&lt;br /&gt;
= How Ivy is used =&lt;br /&gt;
&lt;br /&gt;
== Normal bind/send mechanism ==&lt;br /&gt;
&lt;br /&gt;
[[Ivy]] is based on message subscription (based on [http://en.wikipedia.org/wiki/Regular_expression regular expression]):&lt;br /&gt;
* the '''bind''' function takes two parameters: a regular expression and a callback function.&lt;br /&gt;
* the '''send''' function sends strings and is used like the 'printf' C function.&lt;br /&gt;
when someone has a message to send that is matching the regular expression of one or more '''bind''', it will trigger the associated callback with the string as a parameter.&lt;br /&gt;
&lt;br /&gt;
== Advanced request mechanism ==&lt;br /&gt;
&lt;br /&gt;
In order to let a agent ask for some information, a answer/request mechanism has been integrated using the normal bind/send mechanism.&lt;br /&gt;
&lt;br /&gt;
* the '''answerer''' function takes a message name (ex: MSG_NAME) and a callback function as parameters&lt;br /&gt;
** it binds to MSG_NAME_REQ messages&lt;br /&gt;
** it sends back a MSG_NAME message when the MSG_NAME_REQ callback is triggered&lt;br /&gt;
* the '''request''' function takes a message name (ex: MSG_NAME), a callback function and some values as parameters&lt;br /&gt;
** it binds to MSG_NAME message with the callback function given as parameter&lt;br /&gt;
** it sends a MSG_NAME_REQ message with the values given as parameters&lt;br /&gt;
** after receiving the reply from the answer and applying the callback function to the returned values, it unbinds from the message MSG_NAME&lt;br /&gt;
&lt;br /&gt;
= Format of messages =&lt;br /&gt;
&lt;br /&gt;
The messages used in paparazzi are described in the file ''conf/messages.xml''. Most of the messages used by the '''[[GCS]]''' or the '''server''' are from the class '''ground'''. Each message is composed of:&lt;br /&gt;
* a unique name (among all the messages)&lt;br /&gt;
* a unique ID (among its class)&lt;br /&gt;
* a list of ''fields'' with a name and a type&lt;br /&gt;
&lt;br /&gt;
In the following subsections, ''anything'' means that a field can match any string that doesn't have whitespace, ''anything...'' means that the field can contain several or none ''anything'' separated by whitespace.&lt;br /&gt;
&lt;br /&gt;
== Normal format ==&lt;br /&gt;
&lt;br /&gt;
The normal format of the message when using the '''send''' function:&lt;br /&gt;
 [timestamp] sender_name msg_name ''anything...''&lt;br /&gt;
timestamp is optional, default is false.&lt;br /&gt;
&lt;br /&gt;
The normal '''bind''' function looks for messages of the form:&lt;br /&gt;
 [timestamp or nothing] sender_name msg_name ''anything...''  when a sender name is given as a parameter&lt;br /&gt;
 [timestamp or nothing] ''anything'' msg_name ''anything...'' else&lt;br /&gt;
This allow to receive the messages coming from a given sender or from anyone.&lt;br /&gt;
&lt;br /&gt;
== Advanced format ==&lt;br /&gt;
&lt;br /&gt;
When using the answer/request mechanism a unique request ID is added to the normal format. The format of this ID is '''pid_index'''. The Unix Process ID (pid) is unique for each running program, the index is incremented at each request. There is no timestamp.&lt;br /&gt;
&lt;br /&gt;
The '''request''' send format:&lt;br /&gt;
 sender_name request_id msg_name_REQ ''anything...''&lt;br /&gt;
&lt;br /&gt;
The '''request''' bind format:&lt;br /&gt;
 request_id ''anything'' msg_name ''anything...''&lt;br /&gt;
&lt;br /&gt;
The '''answerer''' send format:&lt;br /&gt;
 request_id sender_name msg_name ''anything...''&lt;br /&gt;
&lt;br /&gt;
The '''answerer''' bind format:&lt;br /&gt;
 ''anything'' ''anything'' msg_name_REQ ''anything...''&lt;br /&gt;
&lt;br /&gt;
= Server &amp;lt;-&amp;gt; GCS communication =&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
The '''server''' sends synthetic messages based on the telemetry data received from the UAVs (normal period is 500ms, 1s for alarms, 5s for WIND):&lt;br /&gt;
* NEW_AIRCRAFT (when a telemetry message ALIVE is received (and correct) for the first time)&lt;br /&gt;
* FLIGHT_PARAM&lt;br /&gt;
* NAV_STATUS&lt;br /&gt;
* ENGINE_STATUS&lt;br /&gt;
* AP_STATUS&lt;br /&gt;
* FLY_BY_WIRE&lt;br /&gt;
* DL_VALUES&lt;br /&gt;
* WAYPOINT_MOVED&lt;br /&gt;
* CAM_STATUS&lt;br /&gt;
* CIRCLE_STATUS&lt;br /&gt;
* SEGMENT_STATUS&lt;br /&gt;
* SURVEY_STATUS&lt;br /&gt;
* WIND&lt;br /&gt;
* TELEMETRY_STATUS&lt;br /&gt;
* TELEMETRY_ERROR&lt;br /&gt;
* BAT_LOW (trigger alarm)&lt;br /&gt;
* AIRPROX (alarm but not used anymore)&lt;br /&gt;
It answer to some requests:&lt;br /&gt;
* AIRCRAFTS (sends the list of all running aircraft known by the server)&lt;br /&gt;
* CONFIG (sends the configuration of a given aircraft)&lt;br /&gt;
It binds to:&lt;br /&gt;
* MOVE_WAYPOINT&lt;br /&gt;
* DL_SETTING&lt;br /&gt;
* GET_DL_SETTING&lt;br /&gt;
* JUMP_TO_BLOCK&lt;br /&gt;
* RAW_DATALINK&lt;br /&gt;
* WIND_CLEAR&lt;br /&gt;
* all messages of the class telemetry&lt;br /&gt;
&lt;br /&gt;
== GCS ==&lt;br /&gt;
&lt;br /&gt;
The '''[[GCS]]''' binds to all the messages sent by the '''server''' (except AIRPROX). It also binds the the messages TCAS_TA, TCAS_RA and DC_SHOT, which are direct telemetry messages.&lt;br /&gt;
&lt;br /&gt;
It sends messages:&lt;br /&gt;
* MOVE_WAYPOINT&lt;br /&gt;
* DL_SETTING&lt;br /&gt;
* GET_DL_SETTING&lt;br /&gt;
* JUMP_TO_BLOCK&lt;br /&gt;
* RAW_DATALINK&lt;br /&gt;
&lt;br /&gt;
It can request for CONFIG and AIRCRAFTS.&lt;br /&gt;
&lt;br /&gt;
== Initialization sequence ==&lt;br /&gt;
&lt;br /&gt;
When the '''server''' starts, the initialization is as follow:&lt;br /&gt;
* bind to ALIVE message and send a NEW_AIRCRAFT message when the callback is triggered&lt;br /&gt;
* bind to the messages sent by the GCS&lt;br /&gt;
* set '''answerer''' for AIRCRAFTS and CONFIG&lt;br /&gt;
&lt;br /&gt;
When the '''[[GCS]]''' starts, the initialization is as follow:&lt;br /&gt;
* send request for AIRCRAFTS&lt;br /&gt;
** when the callback function is triggered with the list of working aircraft, send requests CONFIG for each of them&lt;br /&gt;
* bind to NEW_AIRCRAFT&lt;br /&gt;
** when the callback function is triggered with a new aircraft, send request CONFIG for it&lt;br /&gt;
* bind to messages sent by the '''server''' + some extra messages&lt;br /&gt;
&lt;br /&gt;
The result is that the GCS asks for the aircraft already known by the server and then receives new aircraft when they appears.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:Developer_Documentation]]&lt;/div&gt;</summary>
		<author><name>Flixr</name></author>
	</entry>
</feed>