<?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=Fabien-B</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=Fabien-B"/>
	<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/wiki/Special:Contributions/Fabien-B"/>
	<updated>2026-04-28T11:52:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=26139</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=26139"/>
		<updated>2023-02-06T16:10:47Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: redirect to sphinx doc&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]. After Microsoft introduced Ubuntu on Windows, now it is possible to run Paparazzi on [https://en.wikipedia.org/wiki/Windows_10 Windows 10]. There is also another work being done to port Paparazzi to Windows with a different approach to work on all versions of 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;
&lt;br /&gt;
Follow the instructions from the new documentation: https://paparazzi-uav.readthedocs.io/en/latest/quickstart/install.html&lt;br /&gt;
&lt;br /&gt;
If all went well the Paparazzi Center should now be running... '''skip the rest of instructions on this page''' and go fly! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&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 v6.1&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;
In case you obtain an error indicating that your environmental variables are not set up correctly (for example 'ocamlfind: Package `pprz.xlib' not found') it should be noted that some shells or versions of make can not handle the '~/paparazzi' path. Try setting it to '/home/username/paparazzi' instead. &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 Virtual Machine image ==&lt;br /&gt;
&lt;br /&gt;
Virtual machine image based on [https://www.vmware.com/products/workstation-player.html VMWare Player]  Available at [http://data.recherche.enac.fr/drones/Paparazzi/ http://data.recherche.enac.fr/drones/Paparazzi/]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/Windows10&amp;diff=26126</id>
		<title>Installation/Windows10</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/Windows10&amp;diff=26126"/>
		<updated>2022-04-26T11:19:22Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &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;
=Intro=&lt;br /&gt;
[[File:Win+papa.jpg|250px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
This page describes the installation of paparazzi on Microsoft Windows10.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are many Windows users who like to use paparazzi on this popular OS. Be-aware it's '''less efficient''' to use paparazzi on Windows OS but it could be helpful in some cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
Since Microsoft introduced the possibility of installing Ubuntu on windows 10, you can run Paparazzi on it with some little efforts.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installing Ubuntu on windows=&lt;br /&gt;
First you need to install Ubuntu on Windows 10. (Ensure you are using a '''64-bit''' version of windows 10, since it cannot be run on a 32-bit version.&lt;br /&gt;
Start an Administrator PowerShell, and run this command:&lt;br /&gt;
 wsl --install&lt;br /&gt;
Get more details in the microsoft documentation if needed: https://docs.microsoft.com/windows/wsl/install&lt;br /&gt;
&lt;br /&gt;
Ubuntu can now be launched in the same way as any other Windows 10 application, such as searching for and selecting Ubuntu in the Start menu.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When launched for the first time, Ubuntu will inform you that it's ‘Installing' and you'll need to wait a few moments.&lt;br /&gt;
&lt;br /&gt;
[[File:Installing.png|450px]]&lt;br /&gt;
&lt;br /&gt;
When complete, you'll be asked for a username and password specific to your Ubuntu installation. These don't need to be the same as your Windows 10 credentials. &lt;br /&gt;
&lt;br /&gt;
[[File:New user.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With this step complete, you'll find yourself at the Ubuntu bash command line.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installing Paparazzi=&lt;br /&gt;
You can now install Paparazzi with the regular procedure: https://paparazzi-uav.readthedocs.io/en/latest/quickstart/install.html&lt;br /&gt;
&lt;br /&gt;
It should now works if you have Windows 10 build 21364 or higher. If you don't, continue reading this guide.&lt;br /&gt;
&lt;br /&gt;
=Graphical Interface=&lt;br /&gt;
&lt;br /&gt;
Ubuntu on windows 10 is only command line and there is no GUI. So after finishing this step, you likly get an error like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Fatal error: exception Gtk.Error(“GtkMain.init: initialization failed\nml_gtk_init: initialization falied”)&lt;br /&gt;
[[File:Gtk error.png|450px]]&lt;br /&gt;
&lt;br /&gt;
It is because it wants to run the graphical Paparazzi Center, but there is no GUI on the Ubuntu for Windows at that moment. Lucky us, there is a way to have Graphical interface non the less.&lt;br /&gt;
&lt;br /&gt;
* '''Step One: Install an X server'''&lt;br /&gt;
&lt;br /&gt;
There are several different X servers you could install on Windows, [https://sourceforge.net/projects/xming/ Xming] and [https://sourceforge.net/projects/vcxsrv/ vcxsrv] are both recommended.&lt;br /&gt;
You may prefer [https://sourceforge.net/projects/vcxsrv/ Vcxsrv] as the applications looks better on it.&lt;br /&gt;
Download it and install it on your Windows 10 PC.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the installation, launch it &amp;lt;strong&amp;gt;with the access control disabled&amp;lt;/strong&amp;gt;. It won't work otherwise.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;'''Hint:'''&amp;lt;/span&amp;gt; Every time you want to run a graphical interface from Ubuntu, make sure that Vcxsrv (or Xming) is running. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Step Two: Set Your Display Environment Variable'''&lt;br /&gt;
Now, you’ll need to set the “DISPLAY” environment variable to point at the X server running on your Windows 10 PC. If you don’t do this, graphical applications will simply fail to launch.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To do this, run the following command in the Bash environment:&lt;br /&gt;
 export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0&lt;br /&gt;
&lt;br /&gt;
This setting only applies to your current Bash session. If you close the window, Bash will forget it. You’ll have to run this command each time you reopen Bash and want to run a graphical application.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also install [https://wiki.gnome.org/Apps/Gedit gedit], to be able to edit your aircraft files (airframe, flight plan, etc) from within the center, since it is the default app that Paparazzi center uses.&lt;br /&gt;
 sudo apt-get install gedit&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
After that you can launch Paparazzi. (Or use the [[Paparazzi_Center/Evolutions#New_Paparazzi_Center|new Paparazzi center]] which works seamless on windows) &lt;br /&gt;
 cd ~/paparazzi &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Paparazzi on windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right now you can use Paparazzi for Simulation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Simulation windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you build for an aircraft, the processes will end, but it may not automatically remove the indicator. You may need to press “''Stop/Remove All Processes''” button.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Stop windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Programming Autopilot=&lt;br /&gt;
Right now, to program the autopilot, you should copy the HEX/BIN file manually to your windows OS, You can find your ubuntu home directory files in the following directory:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 C:\Users\NAME\AppData\Local\Packages\DISTRO_FOLDER\LocalState\rootfs&lt;br /&gt;
&lt;br /&gt;
'''DISTRO_FOLDER''' for Ubuntu is:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc&lt;br /&gt;
&lt;br /&gt;
Then use a windows program to upload firmware to the autopilot&amp;lt;br /&amp;gt;&lt;br /&gt;
(For example [https://www.st.com/en/development-tools/stsw-stm32080.html DfuSe] or STM32 [https://www.st.com/en/development-tools/stsw-link004.html ST-LINK Utility] for ST microcontrollers)&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
DfuSE.PNG|DfuSE &lt;br /&gt;
ST-Link Utility.png|ST-Link Utility&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= A Better Terminal =&lt;br /&gt;
&lt;br /&gt;
The opensource Terminal application for Microsoft one can have multiple tabs and easily switch between Bash, Powershell and CMD, '''very useful''' great terminal.&lt;br /&gt;
&lt;br /&gt;
Find it here https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701&lt;br /&gt;
&lt;br /&gt;
=Using Telemetry=&lt;br /&gt;
After you connect your telemetry device to the PC, usually it's recognized under COMx in Windows. Find the port number first.&amp;lt;br /&amp;gt;&lt;br /&gt;
In the Ubuntu, you can access it by &amp;quot;''/dev/ttySx''&amp;quot;. For example, COM15 on windows can be accessed on &amp;quot;''/dev/ttyS15''&amp;quot; on Ubuntu.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First you need to give it the proper permissions. Run this command&lt;br /&gt;
 sudo chmod 666 /dev/ttyS15&lt;br /&gt;
Replacing 15 with the correct number. Now in the Paparazzi center you can use this port to connect to the aircraft using Paparazzi link application.&lt;br /&gt;
 sw/ground_segment/tmtc/link -d /dev/ttyS15&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/Windows10&amp;diff=26125</id>
		<title>Installation/Windows10</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/Windows10&amp;diff=26125"/>
		<updated>2022-04-26T11:18:05Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &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;
=Intro=&lt;br /&gt;
[[File:Win+papa.jpg|250px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
This page describes the installation of paparazzi on Microsoft Windows10.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are many Windows users who like to use paparazzi on this popular OS. Be-aware it's '''less efficient''' to use paparazzi on Windows OS but it could be helpful in some cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
Since Microsoft introduced the possibility of installing Ubuntu on windows 10, you can run Paparazzi on it with some little efforts.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installing Ubuntu on windows=&lt;br /&gt;
First you need to install Ubuntu on Windows 10. (Ensure you are using a '''64-bit''' version of windows 10, since it cannot be run on a 32-bit version.&lt;br /&gt;
Start an Administrator PowerShell, and run this command:&lt;br /&gt;
 wsl --install&lt;br /&gt;
Get more details in the microsoft documentation if needed: https://docs.microsoft.com/windows/wsl/install&lt;br /&gt;
&lt;br /&gt;
Ubuntu can now be launched in the same way as any other Windows 10 application, such as searching for and selecting Ubuntu in the Start menu.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When launched for the first time, Ubuntu will inform you that it's ‘Installing' and you'll need to wait a few moments.&lt;br /&gt;
&lt;br /&gt;
[[File:Installing.png|450px]]&lt;br /&gt;
&lt;br /&gt;
When complete, you'll be asked for a username and password specific to your Ubuntu installation. These don't need to be the same as your Windows 10 credentials. &lt;br /&gt;
&lt;br /&gt;
[[File:New user.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With this step complete, you'll find yourself at the Ubuntu bash command line.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installing Paparazzi=&lt;br /&gt;
You can now install Paparazzi with the regular procedure: https://paparazzi-uav.readthedocs.io/en/latest/quickstart/install.html&lt;br /&gt;
&lt;br /&gt;
It should now works if you have Windows 10 build 21364 or higher. If you don't, continue reading this guide.&lt;br /&gt;
&lt;br /&gt;
=Graphical Interface=&lt;br /&gt;
&lt;br /&gt;
Ubuntu on windows 10 is only command line and there is no GUI. So after finishing this step, you likly get an error like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Fatal error: exception Gtk.Error(“GtkMain.init: initialization failed\nml_gtk_init: initialization falied”)&lt;br /&gt;
[[File:Gtk error.png|450px]]&lt;br /&gt;
&lt;br /&gt;
It is because it wants to run the graphical Paparazzi Center, but there is no GUI on the Ubuntu for Windows at that moment. Lucky us, there is a way to have Graphical interface non the less.&lt;br /&gt;
&lt;br /&gt;
* '''Step One: Install an X server'''&lt;br /&gt;
&lt;br /&gt;
There are several different X servers you could install on Windows, [https://sourceforge.net/projects/xming/ Xming] and [https://sourceforge.net/projects/vcxsrv/ vcxsrv] are both recommended.&lt;br /&gt;
You may prefer [https://sourceforge.net/projects/vcxsrv/ Vcxsrv] as the applications looks better on it.&lt;br /&gt;
Download it and install it on your Windows 10 PC.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the installation, launch it &amp;lt;strong&amp;gt;with the access control disabled&amp;lt;/strong&amp;gt;. It won't work otherwise.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Xming windows.png|300px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;'''Hint:'''&amp;lt;/span&amp;gt; Every time you want to run a graphical interface from Ubuntu, make sure that Xming is running. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Step Two: Set Your Display Environment Variable'''&lt;br /&gt;
Now, you’ll need to set the “DISPLAY” environment variable to point at the X server running on your Windows 10 PC. If you don’t do this, graphical applications will simply fail to launch.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To do this, run the following command in the Bash environment:&lt;br /&gt;
 export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0&lt;br /&gt;
&lt;br /&gt;
This setting only applies to your current Bash session. If you close the window, Bash will forget it. You’ll have to run this command each time you reopen Bash and want to run a graphical application.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also install [https://wiki.gnome.org/Apps/Gedit gedit], to be able to edit your aircraft files (airframe, flight plan, etc) from within the center, since it is the default app that Paparazzi center uses.&lt;br /&gt;
 sudo apt-get install gedit&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
After that you can launch Paparazzi. (Or use the [[Paparazzi_Center/Evolutions#New_Paparazzi_Center|new Paparazzi center]] which works seamless on windows) &lt;br /&gt;
 cd ~/paparazzi &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Paparazzi on windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right now you can use Paparazzi for Simulation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Simulation windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you build for an aircraft, the processes will end, but it may not automatically remove the indicator. You may need to press “''Stop/Remove All Processes''” button.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Stop windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Programming Autopilot=&lt;br /&gt;
Right now, to program the autopilot, you should copy the HEX/BIN file manually to your windows OS, You can find your ubuntu home directory files in the following directory:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 C:\Users\NAME\AppData\Local\Packages\DISTRO_FOLDER\LocalState\rootfs&lt;br /&gt;
&lt;br /&gt;
'''DISTRO_FOLDER''' for Ubuntu is:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc&lt;br /&gt;
&lt;br /&gt;
Then use a windows program to upload firmware to the autopilot&amp;lt;br /&amp;gt;&lt;br /&gt;
(For example [https://www.st.com/en/development-tools/stsw-stm32080.html DfuSe] or STM32 [https://www.st.com/en/development-tools/stsw-link004.html ST-LINK Utility] for ST microcontrollers)&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
DfuSE.PNG|DfuSE &lt;br /&gt;
ST-Link Utility.png|ST-Link Utility&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= A Better Terminal =&lt;br /&gt;
&lt;br /&gt;
The opensource Terminal application for Microsoft one can have multiple tabs and easily switch between Bash, Powershell and CMD, '''very useful''' great terminal.&lt;br /&gt;
&lt;br /&gt;
Find it here https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701&lt;br /&gt;
&lt;br /&gt;
=Using Telemetry=&lt;br /&gt;
After you connect your telemetry device to the PC, usually it's recognized under COMx in Windows. Find the port number first.&amp;lt;br /&amp;gt;&lt;br /&gt;
In the Ubuntu, you can access it by &amp;quot;''/dev/ttySx''&amp;quot;. For example, COM15 on windows can be accessed on &amp;quot;''/dev/ttyS15''&amp;quot; on Ubuntu.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First you need to give it the proper permissions. Run this command&lt;br /&gt;
 sudo chmod 666 /dev/ttyS15&lt;br /&gt;
Replacing 15 with the correct number. Now in the Paparazzi center you can use this port to connect to the aircraft using Paparazzi link application.&lt;br /&gt;
 sw/ground_segment/tmtc/link -d /dev/ttyS15&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/Windows10&amp;diff=26124</id>
		<title>Installation/Windows10</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/Windows10&amp;diff=26124"/>
		<updated>2022-04-26T10:58:58Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: edit export display command&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;
=Intro=&lt;br /&gt;
[[File:Win+papa.jpg|250px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
This page describes the installation of paparazzi on Microsoft Windows10.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are many Windows users who like to use paparazzi on this popular OS. Be-aware it's '''less efficient''' to use paparazzi on Windows OS but it could be helpful in some cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
Since Microsoft introduced the possibility of installing Ubuntu on windows 10, you can run Paparazzi on it with some little efforts.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installing Ubuntu on windows=&lt;br /&gt;
First you need to install Ubuntu on Windows 10. (Ensure you are using a '''64-bit''' version of windows 10, since it cannot be run on a 32-bit version.&lt;br /&gt;
Start an Administrator PowerShell, and run this command:&lt;br /&gt;
 wsl --install&lt;br /&gt;
Get more details in the microsoft documentation if needed: https://docs.microsoft.com/windows/wsl/install&lt;br /&gt;
&lt;br /&gt;
Ubuntu can now be launched in the same way as any other Windows 10 application, such as searching for and selecting Ubuntu in the Start menu.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When launched for the first time, Ubuntu will inform you that it's ‘Installing' and you'll need to wait a few moments.&lt;br /&gt;
&lt;br /&gt;
[[File:Installing.png|450px]]&lt;br /&gt;
&lt;br /&gt;
When complete, you'll be asked for a username and password specific to your Ubuntu installation. These don't need to be the same as your Windows 10 credentials. &lt;br /&gt;
&lt;br /&gt;
[[File:New user.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With this step complete, you'll find yourself at the Ubuntu bash command line.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installing Paparazzi=&lt;br /&gt;
You can now install Paparazzi with the regular procedure: https://paparazzi-uav.readthedocs.io/en/latest/quickstart/install.html&lt;br /&gt;
&lt;br /&gt;
It should now works if you have Windows 10 build 21364 or higher. If you don't, continue reading this guide.&lt;br /&gt;
&lt;br /&gt;
=Graphical Interface=&lt;br /&gt;
&lt;br /&gt;
Ubuntu on windows 10 is only command line and there is no GUI. So after finishing this step, you likly get an error like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Fatal error: exception Gtk.Error(“GtkMain.init: initialization failed\nml_gtk_init: initialization falied”)&lt;br /&gt;
[[File:Gtk error.png|450px]]&lt;br /&gt;
&lt;br /&gt;
It is because it wants to run the graphical Paparazzi Center, but there is no GUI on the Ubuntu for Windows at that moment. Lucky us, there is a way to have Graphical interface non the less.&lt;br /&gt;
&lt;br /&gt;
* '''Step One: Install an X server'''&lt;br /&gt;
&lt;br /&gt;
There are several different X servers you could install on Windows, [https://sourceforge.net/projects/xming/ Xming] and [https://sourceforge.net/projects/vcxsrv/ vcxsrv] are both recommended. Download it and install it on your Windows 10 PC.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installation process is simple, You can just accept the default settings. It will then automatically launch and run in your system tray, waiting for you to run graphical programs.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Xming windows.png|300px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;'''Hint:'''&amp;lt;/span&amp;gt; Every time you want to run a graphical interface from Ubuntu, make sure that Xming is running. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Step Two: Set Your Display Environment Variable'''&lt;br /&gt;
Now, you’ll need to set the “DISPLAY” environment variable to point at the X server running on your Windows 10 PC. If you don’t do this, graphical applications will simply fail to launch.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To do this, run the following command in the Bash environment:&lt;br /&gt;
 export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0&lt;br /&gt;
&lt;br /&gt;
This setting only applies to your current Bash session. If you close the window, Bash will forget it. You’ll have to run this command each time you reopen Bash and want to run a graphical application.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also install [https://wiki.gnome.org/Apps/Gedit gedit], to be able to edit your aircraft files (airframe, flight plan, etc) from within the center, since it is the default app that Paparazzi center uses.&lt;br /&gt;
 sudo apt-get install gedit&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
After that you can launch Paparazzi. (Or use the [[Paparazzi_Center/Evolutions#New_Paparazzi_Center|new Paparazzi center]] which works seamless on windows) &lt;br /&gt;
 cd ~/paparazzi &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Paparazzi on windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right now you can use Paparazzi for Simulation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Simulation windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you build for an aircraft, the processes will end, but it may not automatically remove the indicator. You may need to press “''Stop/Remove All Processes''” button.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Stop windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Programming Autopilot=&lt;br /&gt;
Right now, to program the autopilot, you should copy the HEX/BIN file manually to your windows OS, You can find your ubuntu home directory files in the following directory:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 C:\Users\NAME\AppData\Local\Packages\DISTRO_FOLDER\LocalState\rootfs&lt;br /&gt;
&lt;br /&gt;
'''DISTRO_FOLDER''' for Ubuntu is:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc&lt;br /&gt;
&lt;br /&gt;
Then use a windows program to upload firmware to the autopilot&amp;lt;br /&amp;gt;&lt;br /&gt;
(For example [https://www.st.com/en/development-tools/stsw-stm32080.html DfuSe] or STM32 [https://www.st.com/en/development-tools/stsw-link004.html ST-LINK Utility] for ST microcontrollers)&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
DfuSE.PNG|DfuSE &lt;br /&gt;
ST-Link Utility.png|ST-Link Utility&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= A Better Terminal =&lt;br /&gt;
&lt;br /&gt;
The opensource Terminal application for Microsoft one can have multiple tabs and easily switch between Bash, Powershell and CMD, '''very useful''' great terminal.&lt;br /&gt;
&lt;br /&gt;
Find it here https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701&lt;br /&gt;
&lt;br /&gt;
=Using Telemetry=&lt;br /&gt;
After you connect your telemetry device to the PC, usually it's recognized under COMx in Windows. Find the port number first.&amp;lt;br /&amp;gt;&lt;br /&gt;
In the Ubuntu, you can access it by &amp;quot;''/dev/ttySx''&amp;quot;. For example, COM15 on windows can be accessed on &amp;quot;''/dev/ttyS15''&amp;quot; on Ubuntu.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First you need to give it the proper permissions. Run this command&lt;br /&gt;
 sudo chmod 666 /dev/ttyS15&lt;br /&gt;
Replacing 15 with the correct number. Now in the Paparazzi center you can use this port to connect to the aircraft using Paparazzi link application.&lt;br /&gt;
 sw/ground_segment/tmtc/link -d /dev/ttyS15&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/Windows10&amp;diff=26123</id>
		<title>Installation/Windows10</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/Windows10&amp;diff=26123"/>
		<updated>2022-04-26T09:04:42Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: Simplify WSL2 installation&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;
=Intro=&lt;br /&gt;
[[File:Win+papa.jpg|250px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
This page describes the installation of paparazzi on Microsoft Windows10.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are many Windows users who like to use paparazzi on this popular OS. Be-aware it's '''less efficient''' to use paparazzi on Windows OS but it could be helpful in some cases.&amp;lt;br /&amp;gt;&lt;br /&gt;
Since Microsoft introduced the possibility of installing Ubuntu on windows 10, you can run Paparazzi on it with some little efforts.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installing Ubuntu on windows=&lt;br /&gt;
First you need to install Ubuntu on Windows 10. (Ensure you are using a '''64-bit''' version of windows 10, since it cannot be run on a 32-bit version.&lt;br /&gt;
Start an Administrator PowerShell, and run this command:&lt;br /&gt;
 wsl --install&lt;br /&gt;
Get more details in the microsoft documentation if needed: https://docs.microsoft.com/windows/wsl/install&lt;br /&gt;
&lt;br /&gt;
Ubuntu can now be launched in the same way as any other Windows 10 application, such as searching for and selecting Ubuntu in the Start menu.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When launched for the first time, Ubuntu will inform you that it's ‘Installing' and you'll need to wait a few moments.&lt;br /&gt;
&lt;br /&gt;
[[File:Installing.png|450px]]&lt;br /&gt;
&lt;br /&gt;
When complete, you'll be asked for a username and password specific to your Ubuntu installation. These don't need to be the same as your Windows 10 credentials. &lt;br /&gt;
&lt;br /&gt;
[[File:New user.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With this step complete, you'll find yourself at the Ubuntu bash command line.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installing Paparazzi=&lt;br /&gt;
You can now install Paparazzi with the regular procedure: https://paparazzi-uav.readthedocs.io/en/latest/quickstart/install.html&lt;br /&gt;
&lt;br /&gt;
It should now works if you have Windows 10 build 21364 or higher. If you don't, continue reading this guide.&lt;br /&gt;
&lt;br /&gt;
=Graphical Interface=&lt;br /&gt;
&lt;br /&gt;
Ubuntu on windows 10 is only command line and there is no GUI. So after finishing this step, you likly get an error like this:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Fatal error: exception Gtk.Error(“GtkMain.init: initialization failed\nml_gtk_init: initialization falied”)&lt;br /&gt;
[[File:Gtk error.png|450px]]&lt;br /&gt;
&lt;br /&gt;
It is because it wants to run the graphical Paparazzi Center, but there is no GUI on the Ubuntu for Windows at that moment. Lucky us, there is a way to have Graphical interface non the less.&lt;br /&gt;
&lt;br /&gt;
* '''Step One: Install an X server'''&lt;br /&gt;
&lt;br /&gt;
There are several different X servers you could install on Windows, [https://sourceforge.net/projects/xming/ Xming] and [https://sourceforge.net/projects/vcxsrv/ vcxsrv] are both recommended. Download it and install it on your Windows 10 PC.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installation process is simple, You can just accept the default settings. It will then automatically launch and run in your system tray, waiting for you to run graphical programs.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Xming windows.png|300px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;'''Hint:'''&amp;lt;/span&amp;gt; Every time you want to run a graphical interface from Ubuntu, make sure that Xming is running. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Step Two: Set Your Display Environment Variable'''&lt;br /&gt;
Now, you’ll need to set the “DISPLAY” environment variable to point at the X server running on your Windows 10 PC. If you don’t do this, graphical applications will simply fail to launch.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To do this, run the following command in the Bash environment:&lt;br /&gt;
 export DISPLAY=:0&lt;br /&gt;
&lt;br /&gt;
This setting only applies to your current Bash session. If you close the window, Bash will forget it. You’ll have to run this command each time you reopen Bash and want to run a graphical application.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also install [https://wiki.gnome.org/Apps/Gedit gedit], to be able to edit your aircraft files (airframe, flight plan, etc) from within the center, since it is the default app that Paparazzi center uses.&lt;br /&gt;
 sudo apt-get install gedit&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
After that you can launch Paparazzi. (Or use the [[Paparazzi_Center/Evolutions#New_Paparazzi_Center|new Paparazzi center]] which works seamless on windows) &lt;br /&gt;
 cd ~/paparazzi &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Paparazzi on windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right now you can use Paparazzi for Simulation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Simulation windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you build for an aircraft, the processes will end, but it may not automatically remove the indicator. You may need to press “''Stop/Remove All Processes''” button.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Stop windows.png|700px]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Programming Autopilot=&lt;br /&gt;
Right now, to program the autopilot, you should copy the HEX/BIN file manually to your windows OS, You can find your ubuntu home directory files in the following directory:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 C:\Users\NAME\AppData\Local\Packages\DISTRO_FOLDER\LocalState\rootfs&lt;br /&gt;
&lt;br /&gt;
'''DISTRO_FOLDER''' for Ubuntu is:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc&lt;br /&gt;
&lt;br /&gt;
Then use a windows program to upload firmware to the autopilot&amp;lt;br /&amp;gt;&lt;br /&gt;
(For example [https://www.st.com/en/development-tools/stsw-stm32080.html DfuSe] or STM32 [https://www.st.com/en/development-tools/stsw-link004.html ST-LINK Utility] for ST microcontrollers)&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
DfuSE.PNG|DfuSE &lt;br /&gt;
ST-Link Utility.png|ST-Link Utility&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= A Better Terminal =&lt;br /&gt;
&lt;br /&gt;
The opensource Terminal application for Microsoft one can have multiple tabs and easily switch between Bash, Powershell and CMD, '''very useful''' great terminal.&lt;br /&gt;
&lt;br /&gt;
Find it here https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701&lt;br /&gt;
&lt;br /&gt;
=Using Telemetry=&lt;br /&gt;
After you connect your telemetry device to the PC, usually it's recognized under COMx in Windows. Find the port number first.&amp;lt;br /&amp;gt;&lt;br /&gt;
In the Ubuntu, you can access it by &amp;quot;''/dev/ttySx''&amp;quot;. For example, COM15 on windows can be accessed on &amp;quot;''/dev/ttyS15''&amp;quot; on Ubuntu.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First you need to give it the proper permissions. Run this command&lt;br /&gt;
 sudo chmod 666 /dev/ttyS15&lt;br /&gt;
Replacing 15 with the correct number. Now in the Paparazzi center you can use this port to connect to the aircraft using Paparazzi link application.&lt;br /&gt;
 sw/ground_segment/tmtc/link -d /dev/ttyS15&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=26117</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=26117"/>
		<updated>2022-04-11T13:39:12Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &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]. After Microsoft introduced Ubuntu on Windows, now it is possible to run Paparazzi on [https://en.wikipedia.org/wiki/Windows_10 Windows 10]. There is also another work being done to port Paparazzi to Windows with a different approach to work on all versions of 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 16.04 or Ubuntu 18.04''', make sure you have a working internet connection and the '''universe''' packages activated in 'Software &amp;amp; Updates', then just copy and paste the text below into your terminal and press [enter] ... and wait a while...&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;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; sudo apt-get -f -y install paparazzi-dev paparazzi-jsbsim gcc-arm-embedded dfu-util &amp;amp;&amp;amp; cd ~ &amp;amp;&amp;amp; git clone --origin upstream https://github.com/paparazzi/paparazzi.git &amp;amp;&amp;amp; cd ~/paparazzi &amp;amp;&amp;amp; git remote update -p &amp;amp;&amp;amp; git checkout -b v6.1 upstream/v6.1 &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; make &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On '''Ubuntu 20.04 or above?''', only then use the one below:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo add-apt-repository -y ppa:paparazzi-uav/ppa &amp;amp;&amp;amp; sudo apt-get update &amp;amp;&amp;amp; sudo apt-get -f -y install paparazzi-dev paparazzi-jsbsim pprzgcs python-is-python3 python3-serial gcc-arm-none-eabi gdb-multiarch dfu-util &amp;amp;&amp;amp; cd ~ &amp;amp;&amp;amp; git clone --origin upstream https://github.com/paparazzi/paparazzi.git &amp;amp;&amp;amp; cd ~/paparazzi &amp;amp;&amp;amp; git remote update -p &amp;amp;&amp;amp; git checkout -b v6.1 upstream/v6.1 &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; make &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&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 instructions on this page''' and go fly! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&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 v6.1&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;
In case you obtain an error indicating that your environmental variables are not set up correctly (for example 'ocamlfind: Package `pprz.xlib' not found') it should be noted that some shells or versions of make can not handle the '~/paparazzi' path. Try setting it to '/home/username/paparazzi' instead. &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 Virtual Machine image ==&lt;br /&gt;
&lt;br /&gt;
Virtual machine image based on [https://www.vmware.com/products/workstation-player.html VMWare Player]  Available at [http://data.recherche.enac.fr/drones/Paparazzi/ http://data.recherche.enac.fr/drones/Paparazzi/]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=GCS&amp;diff=25942</id>
		<title>GCS</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=GCS&amp;diff=25942"/>
		<updated>2021-10-15T10:20:37Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &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;GCS&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
Ground Control Station&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|__TOC__&lt;br /&gt;
|&lt;br /&gt;
[[Image:gcs.jpg|frame|left|The Paparazzi Ground Control Station is the heart of the system and the user's primary interaction interface.]] [[Image:GCSParrotardroneandpaparazzi.jpg|frame|right|The GCS is very flexible in the way you can change the look and add functionality. One only need to change a configuration file. For example, the look when using the configuration GCS setting for Paparazzi Parrot AR Drone 2]]	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
!New: There is a new GCS available at https://github.com/Fabien-B/PprzGCS!&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The [[GCS_Configuration | versatile]] Paparazzi Ground Control Station is an operator control unit ground control software for unmanned aircraft. It allows to visualize and control an unmanned aircraft during development and operation, both indoors and outdoors. With a flexible software architecture it supports multiple UA types/autopilot projects. The purpose of the '''G'''round '''C'''ontrol '''S'''tation is real-time monitoring of an UA.&lt;br /&gt;
&lt;br /&gt;
= Features = &lt;br /&gt;
&lt;br /&gt;
The Paparazzi GroundControlStation is a feature-rich application with fully customizable views, each containing a collection of the most useful interface components for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
* Simultaneous flying '''multi UAS''' support&lt;br /&gt;
* Multi-system support (multiple procotols, multiple autopilots/projects) by writing a IVY Plugin&lt;br /&gt;
* 2D Map capable of displaying Google Satellite, OpenStreetMaps Images and  Microsoft Satellite Maps&lt;br /&gt;
* Mission planning &lt;br /&gt;
* '''Realtime movable waypoints'''&lt;br /&gt;
* Realtime flightplan adjustments if needed&lt;br /&gt;
* System status overview&lt;br /&gt;
* '''Realtime''' Airframe '''in Air tuning''' and calibration&lt;br /&gt;
* Supports rotary and fixed-wing e.g. Airplanes, helicopters, coaxial and quadrotors&lt;br /&gt;
* Definable '''Hotkeys''' for quick simple in the field control&lt;br /&gt;
* '''Voice''' status output&lt;br /&gt;
* Full freely '''configurable GUI layout'''&lt;br /&gt;
&lt;br /&gt;
= Configuration Options =&lt;br /&gt;
The [[GCS_Configuration|GCS is highly configurable]] and modules can be added, removed, or resized as needed. In addition to this the GCS has many '''command line options''' which can be used when launching the GCS&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[GCS_Configuration|'''GCS configuration''']] page for details.&lt;br /&gt;
&lt;br /&gt;
= Simulation of Flightplan =&lt;br /&gt;
Your flight plans can, and should, always be tested prior to a real autonomous flight. Testing end adjusting is possible from within the same GCS. See the [[Simulation|simulation]] page for details.&lt;br /&gt;
&lt;br /&gt;
= Options =&lt;br /&gt;
&lt;br /&gt;
== Strips ==&lt;br /&gt;
&lt;br /&gt;
Each A/C has an associated strip that displays information about the A/C and provides buttons for common commands. The strip has the following layout by default. Paparazzi GCS is very flexible and the strip can have more or less buttons according to your configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:strip.png|Aircraft information strip]]&lt;br /&gt;
&lt;br /&gt;
=== Displayed information ===&lt;br /&gt;
&lt;br /&gt;
* Left: Flight information&lt;br /&gt;
* Center: Navigation information&lt;br /&gt;
* Right: Navigation control&lt;br /&gt;
* Bottom: Custom navigation and setting buttons&lt;br /&gt;
&lt;br /&gt;
=== Actions ===&lt;br /&gt;
&lt;br /&gt;
Every change in the waypoints (position or/and [[Altitude_definitions|altitude]]) must be confirmed with the dialog box that appears after the move. A modified waypoint remains animated on the map and the GCS continues to re-send the move request until confirmation is received from the aircraft.&lt;br /&gt;
When clicked, the '''Mark''' button places a mark on the map at the A/C position. A snapshot from the video plugin is associated to this mark and can be viewed by moving the mouse over the mark. A click on the mark opens a dialog box allowing to delete the mark.&lt;br /&gt;
A click on the colored bar at the top selects the corresponding A/C in the [[#notebook|Notebook]].&lt;br /&gt;
&lt;br /&gt;
== Map ==&lt;br /&gt;
&lt;br /&gt;
[[Image:GCSmap.png|thumb|400px|Sample map showing the various features]]&lt;br /&gt;
&lt;br /&gt;
=== Display ===&lt;br /&gt;
&lt;br /&gt;
The map display contains the following information:&lt;br /&gt;
* The A/C track: it can be erased ''via'' the ''Clear track'' option from the A/C menu.&lt;br /&gt;
* The A/C label (in clear blue near the A/C) contains the name of the A/C (Plaster), it's altitude (218 m) and it's ground speed (11.99 m/s). This option default is off. It can be activated with the ''A/C label'' option from the A/C menu.&lt;br /&gt;
* The carrot (the orange triangle). This is the point the A/C is following during autonomous navigation.&lt;br /&gt;
* The waypoints defined in the flight plan (blue diamonds).&lt;br /&gt;
* The intended trajectory is shown as a green line, in this example a circle around waypoint 2.&lt;br /&gt;
* The default background is black. [[Maps|Maps]] can be loaded to provide navigation reference.&lt;br /&gt;
* The camera footprint (the grey polygon) is representative of the swath of land currently seen by the onboard camera. This option default is off. It can be activated with the ''[[Cam_Footprint|Cam footprint]]'' option from the A/C menu. see also [[Pan_Tilt_Camera]]&lt;br /&gt;
* The WGS84 coordinates of the mouse cursor are displayed at the top right hand corner (43.462019   1.270474).&lt;br /&gt;
* A UTM kilometric grid can be added to the background ''via'' the ''UTM grid'' option from the ''Nav'' menu.&lt;br /&gt;
* The [[Altitude_definitions|height Above Ground Level (AGL)]] displays the ground altitude of the mouse near the geographic position in the top right hand corner. The [http://srtm.usgs.gov/ SRTM] option must be enabled in the ''Nav'' menu and the height data must be downloaded as described [[Maps#Height_Data|here]]. If SRTM data is not enabled and downloaded, the height above mean sea level [[Altitude_definitions#MSL|MSL]] will be displayed instead.&lt;br /&gt;
&lt;br /&gt;
=== Navigation ===&lt;br /&gt;
&lt;br /&gt;
You can pan/zoom the map using the following:&lt;br /&gt;
* Pan with the blue arrows on the map or use the arrow keys on the keyboard&lt;br /&gt;
* zoom in/out with the mouse scroll wheel, the page up/page down buttons or the small up/down buttons at the top right hand corner where the zoom factor is displayed&lt;br /&gt;
* fit the map to the window, in order to see all the waypoints and A/C, with the '''f''' key or the ''Fit'' option from the ''Nav'' menu;&lt;br /&gt;
* center the map on an A/C with the ''Center A/C'' option from the corresponding A/C menu.&lt;br /&gt;
&lt;br /&gt;
=== Map Photo Tiles ===&lt;br /&gt;
The default black background can be automatically filled with calibrated satellite photo tiles from Openstreetmaps, Google Maps or MS Maps. Note: If you download too much map data from Google into the GCS you may be blocked for downloading further map data for 24 hours. With OpenStreetmaps data and MS data there is no such limitation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[Maps]] page for more info.&lt;br /&gt;
&lt;br /&gt;
=== Waypoint Editing ===&lt;br /&gt;
&lt;br /&gt;
The properties of any waypoint in the currently loaded flight plan can be modified by two methods:&lt;br /&gt;
* Drag and drop the waypoints to a new location (a confirmation dialog will appear).&lt;br /&gt;
* A single left click on a waypoint opens a dialog box where you can edit the waypoint's coordinates and altitude.&lt;br /&gt;
&lt;br /&gt;
Waypoint edits are sent to the aircraft immediately upon confirmation in the dialog box.  The GCS will re-send the data and the waypoint will animate until the aircraft confirms receipt of the move request.  New waypoints cannot be added during flight.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[Flight_Plans|Flight plans]] and [[Flight_Plan_Editor|Flight Plan Editor]] pages for more information on waypoints.&lt;br /&gt;
&lt;br /&gt;
== Notebook ==&lt;br /&gt;
&lt;br /&gt;
The notebook frame contains one page for each running aircraft. Each aircraft page is itself divided into subpages displaying telemetry data and giving access to the autopilot tuning parameters.&lt;br /&gt;
&lt;br /&gt;
Note that the colored tabs at the top of this section allow the user to select among multiple aircraft.&lt;br /&gt;
&lt;br /&gt;
=== Flight Plan ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:GCSfp.png|Flight plan tree]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full tree of the flight plan is given in this page. The current block and the current stage are highlighted. A double-click on a block allows the operator to immediately switch navigation to this block.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[Flight_Plans|Flight plans]] and [[Flight_Plan_Editor|Flight Plan Editor]] pages for more information on flight plans.&lt;br /&gt;
&lt;br /&gt;
=== Settings ===&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:GCSsettings.png|Settings tab]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The setting page allows the operator to change variable values during flight. The layout of the page is generated from the &amp;lt;tt&amp;gt;dl_settings&amp;lt;/tt&amp;gt; section of the settings.xml file, one tab is associated to every section and sub-section.&lt;br /&gt;
&lt;br /&gt;
On each line is displayed (from left to right), the name of the variable, its current value (periodically sent by the A/C), a slider or radio buttons for user input, and commit/undo buttons. Also note, clicking on the current value will send a request to obtain the current value from the aircraft.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[Telemetry#Settings|Telemetry]] page for more information on settings.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The save button of this tab opens the following popup which proposes to the user to save the current values in the airframe file (according to the &amp;lt;tt&amp;gt;param&amp;lt;/tt&amp;gt; attribute in the [[Telemetry#Settings|setttings]] configuration file). The values of the checked rows will be saved in the airframe file (or any other file) for further use. Units (e.g. deg or rad) are taken into account. '''It is recommended to backup the airframe file before overwriting it with this utility''' (even if time-stamped copy of the airframe file is actually automatically done).&lt;br /&gt;
&lt;br /&gt;
Symetrically, the Upload button of this dialog button will send all the checked values of the airframe file to the live aircraft.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:Save settings.png|Settings tab]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PFD ===&lt;br /&gt;
&lt;br /&gt;
[[Image:GCSpfd.png|Primary Flight Display]]&lt;br /&gt;
&lt;br /&gt;
The Primary Flight Display contains an artificial horizon and two scales displaying the current ground speed (left side) and the altitude (right side). Minimum and maximum speeds are shown under and above the speed scale. A click on the scale resets these values to the current speed value.&lt;br /&gt;
&lt;br /&gt;
=== GPS, Infrared, Wind ===&lt;br /&gt;
&lt;br /&gt;
The '''GPS''' page gives the list of satellites tracked by the receiver and their respective signal strengths in dB.&lt;br /&gt;
(35 is low, 45 is excellent) and if they are used to compute the fix (green: used, red:not used). This page may help to tune the position of the receiver on the aircraft relatively to other components (e.g. datalink and video transmitters).&lt;br /&gt;
&lt;br /&gt;
The '''Infrared''' page is only used for aircraft not equipped with the vertical infrared sensor. This page reports the required pre-flight calibration value as well as the evolution of the in-flight calibration correction factor (from hybridization with the GPS information).&lt;br /&gt;
&lt;br /&gt;
The '''Misc''' page displays the estimated wind velocity computed by the ground station during flight and relayed back to the aircraft.  Wind velocity is estimated by vector addition of the GPS-measured ground speed in many different directions during level flight.  This computation may soon be performed by the autopilot instead of the ground station.&lt;br /&gt;
&lt;br /&gt;
== Video Plugin ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;-mplayer&amp;lt;/tt&amp;gt; option of GCS allows the user to display a video stream in this window.  The video window can also be exchanged with the map by clicking anywhere inside the frame or from the menu.&lt;br /&gt;
Use the following line in your [[Control_panel.xml|control panel]] to enable the video window.&lt;br /&gt;
 &amp;lt;tt&amp;gt;(paparazzi folder path)/sw/ground_segment/cockpit/gcs -mplayer rtsp://localhost:7070/video -layout appropriate_layout.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
Note that a &amp;lt;tt&amp;gt;plugin&amp;lt;/tt&amp;gt; widget must be specified in the used layout:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt; &amp;lt;widget size=&amp;quot;300&amp;quot; name=&amp;quot;plugin&amp;quot;/&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
A useful example of how to configure the GCS to show video from a USB DVB-T tuner with composite input follows:&lt;br /&gt;
&lt;br /&gt;
If you have an Avermedia DVB-T usb tuner like the Aver-Tv Hybrid Volar HX (Avermedia finally released Ubuntu Linux drivers)&lt;br /&gt;
then in order to use the usb tuner as video input to the GCS you have to complete the following steps:&lt;br /&gt;
&lt;br /&gt;
First download and install the drivers and check that the Usb tuner works well by connecting a video signal to the composite input&lt;br /&gt;
and then opening a console window and typing: &lt;br /&gt;
&lt;br /&gt;
'''mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=1:device=/dev/video1:noaudio'''&lt;br /&gt;
&lt;br /&gt;
Remember to change the &amp;quot;device=/dev/video1&amp;quot; in the above line with whatever your new usb tuner is registered with (if needed).&lt;br /&gt;
Type &amp;quot;dmesg&amp;quot; in a console immediately after you connect the usb tuner and you should see a line stating the video device your usb tuner got registered with.&lt;br /&gt;
If it says video0 change &amp;quot;device=/dev/video1&amp;quot; with &amp;quot;device=/dev/video0&amp;quot;&lt;br /&gt;
Mine is registered as &amp;quot;video1&amp;quot; because &amp;quot;video0&amp;quot; is the  built in laptop camera.&lt;br /&gt;
If everything is ok then a blue or similar LED on the usb tuner dongle should light up indicating that the tuner driver is loaded&lt;br /&gt;
and you should be able to watch the video on the pc screen (no audio yet).&lt;br /&gt;
Now close the console and remove the Usb tuner as it is time to configure the control_panel.xml file by editing the GCS command line.&lt;br /&gt;
Locate the line in the &amp;quot;control_panel.xml&amp;quot; file, usually located in &amp;quot;/Your Paparazzi directory/conf/&amp;quot; (mine is in &amp;quot;/paparazzi/conf/&amp;quot;),&lt;br /&gt;
that starts with &amp;quot;&amp;lt;program name=&amp;quot;GCS&amp;quot; command=&amp;quot;sw/ground_segment/cockpit/gcs......&amp;quot;.&lt;br /&gt;
For example let's say that the complete line looks like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt; &amp;lt;program name=&amp;quot;GCS&amp;quot; command=&amp;quot;sw/ground_segment/cockpit/gcs -layout horizontal.xml&amp;quot;&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now add the below line at the end (before the quotes) of the original line:&lt;br /&gt;
&lt;br /&gt;
'''-mplayer 'tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=1:device=/dev/video1:alsa:adevice=hw.2,0:amode=1:audiorate=48000:forceaudio:volume=100:immediatemode=0''''&lt;br /&gt;
&lt;br /&gt;
The original line should look now like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;program name=&amp;quot;GCS&amp;quot; command=&amp;quot;sw/ground_segment/cockpit/gcs -layout horizontal.xml -mplayer &lt;br /&gt;
'tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=1:device=/dev/video1:alsa:adevice=hw.2,0:amode=1:audiorate=48000:forceaudio:volume=100:immediatemode=0'&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The above line is one complete and uninterrupted line but it is just too long to show it in one line here.&lt;br /&gt;
Please remember to change the &amp;quot;NTSC&amp;quot; with &amp;quot;PAL&amp;quot; if you do not use the NTSC video system (if your airborne camera is PAL for example). &lt;br /&gt;
This will load the mplayer, select the composite video input of the tuner and enable the sound input.&lt;br /&gt;
Read the mplayer documentation so you can tweak the resolution etc. later to suit your particular setup.&lt;br /&gt;
The resolution above is set to 320x240 here but you can set it to 640x480 by replacing the numbers in the command line above.&lt;br /&gt;
&lt;br /&gt;
Finally you have to add the plugin widget to your GCS layout configuration file.&lt;br /&gt;
If you noticed the GCS command line in the &amp;quot;control_panel.xml&amp;quot; file, it has a part that reads &amp;quot;-layout horizontal.xml&amp;quot; &lt;br /&gt;
so our layout configuration file is the &amp;quot;horizontal.xml&amp;quot; which is located always in &amp;quot;/Your Paparazzi directory/conf/gcs/&amp;quot; &lt;br /&gt;
(mine is in &amp;quot;/paparazzi/conf/gcs/&amp;quot;).&lt;br /&gt;
Open the file and add or uncomment the below line (in &amp;quot;horizontal.xml&amp;quot; the plugin widget is there but commented out):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;widget NAME=&amp;quot;plugin&amp;quot; SIZE=&amp;quot;300&amp;quot;/&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the file should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;rows&amp;gt;&lt;br /&gt;
  &amp;lt;widget size=&amp;quot;500&amp;quot; name=&amp;quot;map2d&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;columns&amp;gt;&lt;br /&gt;
   &amp;lt;rows size=&amp;quot;375&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;widget size=&amp;quot;200&amp;quot; name=&amp;quot;strips&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;/rows&amp;gt;&lt;br /&gt;
   &amp;lt;widget size=&amp;quot;400&amp;quot; name=&amp;quot;aircraft&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;widget name=&amp;quot;alarms&amp;quot;/&amp;gt;  &lt;br /&gt;
   &amp;lt;widget NAME=&amp;quot;plugin&amp;quot; SIZE=&amp;quot;300&amp;quot;/&amp;gt; &lt;br /&gt;
  &amp;lt;/columns&amp;gt;&lt;br /&gt;
 &amp;lt;/rows&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's it, Enjoy!&lt;br /&gt;
&lt;br /&gt;
Tested in Ubuntu 10.04 LTS but probably the same method should work fine on different versions too.&lt;br /&gt;
&lt;br /&gt;
See this [http://www.youtube.com/watch?v=7OCcMA4vluM screen capture] as an example of the resulting GCS (Y-UAV).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;-plugin&amp;lt;/tt&amp;gt; option is another way to use the plugin widget: the X subwindow id is given to the provided command:&lt;br /&gt;
 &amp;lt;tt&amp;gt;(paparazzi folder path)/sw/ground_segment/cockpit/gcs -plugin &amp;quot;mplayer video_stream -wid &amp;quot; -layout appropriate_layout.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &amp;lt;tt&amp;gt;(paparazzi folder path)/sw/ground_segment/cockpit/gcs -plugin &amp;quot;cvlc video_stream --drawable-xid=&amp;quot; -layout appropriate_layout.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
The &amp;lt;tt&amp;gt;--vout-event=3&amp;lt;/tt&amp;gt; option can be used for vlc to disable mouse and keyboard events handling&lt;br /&gt;
&lt;br /&gt;
== Altitude graph widget ==&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:altgraph.png|400px|The GCS with the altitude graph]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An altitude graph can be displayed in the GCS by adding the widget ''altgraph'' in the layout configuration (See the [[GCS_Configuration|GCS configuration]] page). An example is provided in conf/gcs/alt.xml. To use this layout add -layout alt.xml to the /conf/control_panel.xml file. This type of layout is more suited to a multi UAV set up. The Papget ruler is a much less intrusive and better tool when you are only flying a single aircraft.&lt;br /&gt;
&lt;br /&gt;
==Papgets==&lt;br /&gt;
Graphical objects can be added to 2D maps: text, rule, gauge, buttons, .... These objects are named ''papgets''. The following snapshot&lt;br /&gt;
shows an example with buttons (left side), gauges (lower left corner), text (upper right corner) and ruler (right side). This example&lt;br /&gt;
has been produced with a layout file provided in the distribution:&lt;br /&gt;
&lt;br /&gt;
 .../gcs -layout papgets.xml &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:papgets.png|516px|A 2D map augmented with papgets]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Telemetry data report===&lt;br /&gt;
The easiest way to create a papget displaying telemetry data is to drag&amp;amp;drop a message field from the Messages window onto the 2D map of the GCS. The default rendering is then a string of text. Clicking on it allows the user to change its type (currently text, ruler or gauge) and some of its attributes (color, size, range for a gauge, format for a text ...). A papget can be moved by simply dragging it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:papget_editor.png|Main characteristics of a papget can be dynamically edited]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Papgets can be saved in the layout of the GCS (from the Nav menu). The description is saved in an XML file (in &amp;lt;tt&amp;gt;conf/gcs/&amp;lt;/tt&amp;gt; folder) which can be manually edited:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;papget type=&amp;quot;message_field&amp;quot; display=&amp;quot;gauge&amp;quot; x=&amp;quot;47&amp;quot; y=&amp;quot;414&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;field&amp;quot; value=&amp;quot;BAT:voltage&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;scale&amp;quot; value=&amp;quot;0.1&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;min&amp;quot; value=&amp;quot;0.&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;max&amp;quot; value=&amp;quot;15.&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;size&amp;quot; value=&amp;quot;50.&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;text&amp;quot; value=&amp;quot;Bat(V)&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/papget&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file is used later by giving it to the gcs process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 .../gcs -layout my_fancy_papgets.xml&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
In the same way, user buttons from the strip can be dragged&amp;amp;dropped on the 2D map. However, they currently cannot be directly edited, and&lt;br /&gt;
attributes changes have to be done in the XML file. Two types of button are provided to jump to a block or to set a value:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;papget type=&amp;quot;goto_block&amp;quot; display=&amp;quot;button&amp;quot; x=&amp;quot;10&amp;quot; y=&amp;quot;300&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;block_name&amp;quot; value=&amp;quot;Standby&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;icon&amp;quot; value=&amp;quot;home.png&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/papget&amp;gt;&lt;br /&gt;
 &amp;lt;papget type=&amp;quot;variable_setting&amp;quot; display=&amp;quot;button&amp;quot; x=&amp;quot;10&amp;quot; y=&amp;quot;250&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;variable&amp;quot; value=&amp;quot;launch&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;value&amp;quot; value=&amp;quot;1.&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;icon&amp;quot; value=&amp;quot;launch.png&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/papget&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Video on Papget===&lt;br /&gt;
A video stream can be rendered in a &amp;lt;tt&amp;gt;video_plugin&amp;lt;/tt&amp;gt; papget, using the ''mplayer'' player:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;papget type=&amp;quot;video_plugin&amp;quot; display=&amp;quot;mplayer&amp;quot; x=&amp;quot;300&amp;quot; y=&amp;quot;250&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;video_feed&amp;quot; value=&amp;quot;my video source&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;width&amp;quot; VALUE=&amp;quot;320&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;height&amp;quot; VALUE=&amp;quot;240&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/papget&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or any video player which takes in option the X window id, here for example ''VLC'':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;papget type=&amp;quot;video_plugin&amp;quot; display=&amp;quot;plugin&amp;quot; x=&amp;quot;300&amp;quot; y=&amp;quot;250&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;command&amp;quot; value=&amp;quot;cvlc video_source --drawable-xid=&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;property NAME=&amp;quot;width&amp;quot; VALUE=&amp;quot;320&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;property NAME=&amp;quot;height&amp;quot; VALUE=&amp;quot;240&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/papget&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Aircraft binding===&lt;br /&gt;
Upto Paparazzi '''v5.4''', Papgets could not not bound to a specific aircraft. This had the effect that it will work with any of them, and when multiple aircraft are flying the display of messages is mixed and the buttons will send command or settings to all active aircraft.&lt;br /&gt;
&lt;br /&gt;
Since Paparazzi '''v5.6''', Papgets are bound to a single aircraft, which means that they can safely be used with several active aircraft. It is also possible to add a property to the GCS layout file to specify the aircraft ID:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;property name=&amp;quot;ac_id&amp;quot; value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid IDs are from 1 to 255 (0 being reserved to GCS). '''When''' this property is '''not''' defined, the Papget will bind to '''any aircraft like before'''. This can be useful if you intent to build a generic layout. When saving a layout from the GCS, if their are some Papgets to save, a question box will prompt the user to ask if the &amp;lt;tt&amp;gt;ac_id&amp;lt;/tt&amp;gt; property should be saved or not.&lt;br /&gt;
&lt;br /&gt;
===Papget Development===&lt;br /&gt;
Graphical appearence of papgets is defined in &amp;lt;tt&amp;gt;sw/lib/ocaml/papget_renderer.ml&amp;lt;/tt&amp;gt;. A renderer must implement the Papget_renderer.t class type interface (&amp;lt;tt&amp;gt;canvas_text&amp;lt;/tt&amp;gt; is probably the simpler example) and listed in the &amp;lt;tt&amp;gt;renderers&amp;lt;/tt&amp;gt; list to be available&lt;br /&gt;
in the edit popup box.&lt;br /&gt;
&lt;br /&gt;
The XML configuration is parsed in &amp;lt;tt&amp;gt;sw/ground_segment/cockpit/papgets.ml&amp;lt;/tt&amp;gt;: a new created papget identifier must listed here.&lt;br /&gt;
&lt;br /&gt;
== Alarms ==&lt;br /&gt;
&lt;br /&gt;
The alarm window displays a list of recent errors such as:&lt;br /&gt;
* Low battery warning&lt;br /&gt;
* Low altitude warning&lt;br /&gt;
* Autopilot mode changes (i.e. Manual, Auto2)&lt;br /&gt;
* Flight plan block changes&lt;br /&gt;
&lt;br /&gt;
These alarms can be provided via the speaker using the [[speech]] function.&lt;br /&gt;
&lt;br /&gt;
== Airframe Specific GCS Customizations ==&lt;br /&gt;
&lt;br /&gt;
Items related to the ''aircraft icon'', ''altitude shift values'', ''speech id'', and the overall ''icon theme'' of the GCS can be customized in each aircraft's [[Airframe_Configuration#GCS|airframe configuration file GCS section]].&lt;br /&gt;
&lt;br /&gt;
=Related Links=&lt;br /&gt;
&lt;br /&gt;
* [[GettingTheGCSRunningonAGumstixBoard | Getting the GCS running on a Gumstix board]]&lt;br /&gt;
* [[RaspberryPi | Getting the GCS running on a Raspberry Pi board]]&lt;br /&gt;
* [[PPRZonDroid | PPRZonDroid: a Remote GCS Android application]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:GCS]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=GCS&amp;diff=25941</id>
		<title>GCS</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=GCS&amp;diff=25941"/>
		<updated>2021-10-15T10:19:10Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &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;GCS&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
Ground Control Station&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|__TOC__&lt;br /&gt;
|&lt;br /&gt;
[[Image:gcs.jpg|frame|left|The Paparazzi Ground Control Station is the heart of the system and the user's primary interaction interface.]] [[Image:GCSParrotardroneandpaparazzi.jpg|frame|right|The GCS is very flexible in the way you can change the look and add functionality. One only need to change a configuration file. For example, the look when using the configuration GCS setting for Paparazzi Parrot AR Drone 2]]	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
!New: There is a new GCS available at [https://gihutb.com/Fabien-B/PprzGCS]!&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The [[GCS_Configuration | versatile]] Paparazzi Ground Control Station is an operator control unit ground control software for unmanned aircraft. It allows to visualize and control an unmanned aircraft during development and operation, both indoors and outdoors. With a flexible software architecture it supports multiple UA types/autopilot projects. The purpose of the '''G'''round '''C'''ontrol '''S'''tation is real-time monitoring of an UA.&lt;br /&gt;
&lt;br /&gt;
= Features = &lt;br /&gt;
&lt;br /&gt;
The Paparazzi GroundControlStation is a feature-rich application with fully customizable views, each containing a collection of the most useful interface components for a particular purpose.&lt;br /&gt;
&lt;br /&gt;
* Simultaneous flying '''multi UAS''' support&lt;br /&gt;
* Multi-system support (multiple procotols, multiple autopilots/projects) by writing a IVY Plugin&lt;br /&gt;
* 2D Map capable of displaying Google Satellite, OpenStreetMaps Images and  Microsoft Satellite Maps&lt;br /&gt;
* Mission planning &lt;br /&gt;
* '''Realtime movable waypoints'''&lt;br /&gt;
* Realtime flightplan adjustments if needed&lt;br /&gt;
* System status overview&lt;br /&gt;
* '''Realtime''' Airframe '''in Air tuning''' and calibration&lt;br /&gt;
* Supports rotary and fixed-wing e.g. Airplanes, helicopters, coaxial and quadrotors&lt;br /&gt;
* Definable '''Hotkeys''' for quick simple in the field control&lt;br /&gt;
* '''Voice''' status output&lt;br /&gt;
* Full freely '''configurable GUI layout'''&lt;br /&gt;
&lt;br /&gt;
= Configuration Options =&lt;br /&gt;
The [[GCS_Configuration|GCS is highly configurable]] and modules can be added, removed, or resized as needed. In addition to this the GCS has many '''command line options''' which can be used when launching the GCS&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[GCS_Configuration|'''GCS configuration''']] page for details.&lt;br /&gt;
&lt;br /&gt;
= Simulation of Flightplan =&lt;br /&gt;
Your flight plans can, and should, always be tested prior to a real autonomous flight. Testing end adjusting is possible from within the same GCS. See the [[Simulation|simulation]] page for details.&lt;br /&gt;
&lt;br /&gt;
= Options =&lt;br /&gt;
&lt;br /&gt;
== Strips ==&lt;br /&gt;
&lt;br /&gt;
Each A/C has an associated strip that displays information about the A/C and provides buttons for common commands. The strip has the following layout by default. Paparazzi GCS is very flexible and the strip can have more or less buttons according to your configuration.&lt;br /&gt;
&lt;br /&gt;
[[Image:strip.png|Aircraft information strip]]&lt;br /&gt;
&lt;br /&gt;
=== Displayed information ===&lt;br /&gt;
&lt;br /&gt;
* Left: Flight information&lt;br /&gt;
* Center: Navigation information&lt;br /&gt;
* Right: Navigation control&lt;br /&gt;
* Bottom: Custom navigation and setting buttons&lt;br /&gt;
&lt;br /&gt;
=== Actions ===&lt;br /&gt;
&lt;br /&gt;
Every change in the waypoints (position or/and [[Altitude_definitions|altitude]]) must be confirmed with the dialog box that appears after the move. A modified waypoint remains animated on the map and the GCS continues to re-send the move request until confirmation is received from the aircraft.&lt;br /&gt;
When clicked, the '''Mark''' button places a mark on the map at the A/C position. A snapshot from the video plugin is associated to this mark and can be viewed by moving the mouse over the mark. A click on the mark opens a dialog box allowing to delete the mark.&lt;br /&gt;
A click on the colored bar at the top selects the corresponding A/C in the [[#notebook|Notebook]].&lt;br /&gt;
&lt;br /&gt;
== Map ==&lt;br /&gt;
&lt;br /&gt;
[[Image:GCSmap.png|thumb|400px|Sample map showing the various features]]&lt;br /&gt;
&lt;br /&gt;
=== Display ===&lt;br /&gt;
&lt;br /&gt;
The map display contains the following information:&lt;br /&gt;
* The A/C track: it can be erased ''via'' the ''Clear track'' option from the A/C menu.&lt;br /&gt;
* The A/C label (in clear blue near the A/C) contains the name of the A/C (Plaster), it's altitude (218 m) and it's ground speed (11.99 m/s). This option default is off. It can be activated with the ''A/C label'' option from the A/C menu.&lt;br /&gt;
* The carrot (the orange triangle). This is the point the A/C is following during autonomous navigation.&lt;br /&gt;
* The waypoints defined in the flight plan (blue diamonds).&lt;br /&gt;
* The intended trajectory is shown as a green line, in this example a circle around waypoint 2.&lt;br /&gt;
* The default background is black. [[Maps|Maps]] can be loaded to provide navigation reference.&lt;br /&gt;
* The camera footprint (the grey polygon) is representative of the swath of land currently seen by the onboard camera. This option default is off. It can be activated with the ''[[Cam_Footprint|Cam footprint]]'' option from the A/C menu. see also [[Pan_Tilt_Camera]]&lt;br /&gt;
* The WGS84 coordinates of the mouse cursor are displayed at the top right hand corner (43.462019   1.270474).&lt;br /&gt;
* A UTM kilometric grid can be added to the background ''via'' the ''UTM grid'' option from the ''Nav'' menu.&lt;br /&gt;
* The [[Altitude_definitions|height Above Ground Level (AGL)]] displays the ground altitude of the mouse near the geographic position in the top right hand corner. The [http://srtm.usgs.gov/ SRTM] option must be enabled in the ''Nav'' menu and the height data must be downloaded as described [[Maps#Height_Data|here]]. If SRTM data is not enabled and downloaded, the height above mean sea level [[Altitude_definitions#MSL|MSL]] will be displayed instead.&lt;br /&gt;
&lt;br /&gt;
=== Navigation ===&lt;br /&gt;
&lt;br /&gt;
You can pan/zoom the map using the following:&lt;br /&gt;
* Pan with the blue arrows on the map or use the arrow keys on the keyboard&lt;br /&gt;
* zoom in/out with the mouse scroll wheel, the page up/page down buttons or the small up/down buttons at the top right hand corner where the zoom factor is displayed&lt;br /&gt;
* fit the map to the window, in order to see all the waypoints and A/C, with the '''f''' key or the ''Fit'' option from the ''Nav'' menu;&lt;br /&gt;
* center the map on an A/C with the ''Center A/C'' option from the corresponding A/C menu.&lt;br /&gt;
&lt;br /&gt;
=== Map Photo Tiles ===&lt;br /&gt;
The default black background can be automatically filled with calibrated satellite photo tiles from Openstreetmaps, Google Maps or MS Maps. Note: If you download too much map data from Google into the GCS you may be blocked for downloading further map data for 24 hours. With OpenStreetmaps data and MS data there is no such limitation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[Maps]] page for more info.&lt;br /&gt;
&lt;br /&gt;
=== Waypoint Editing ===&lt;br /&gt;
&lt;br /&gt;
The properties of any waypoint in the currently loaded flight plan can be modified by two methods:&lt;br /&gt;
* Drag and drop the waypoints to a new location (a confirmation dialog will appear).&lt;br /&gt;
* A single left click on a waypoint opens a dialog box where you can edit the waypoint's coordinates and altitude.&lt;br /&gt;
&lt;br /&gt;
Waypoint edits are sent to the aircraft immediately upon confirmation in the dialog box.  The GCS will re-send the data and the waypoint will animate until the aircraft confirms receipt of the move request.  New waypoints cannot be added during flight.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[Flight_Plans|Flight plans]] and [[Flight_Plan_Editor|Flight Plan Editor]] pages for more information on waypoints.&lt;br /&gt;
&lt;br /&gt;
== Notebook ==&lt;br /&gt;
&lt;br /&gt;
The notebook frame contains one page for each running aircraft. Each aircraft page is itself divided into subpages displaying telemetry data and giving access to the autopilot tuning parameters.&lt;br /&gt;
&lt;br /&gt;
Note that the colored tabs at the top of this section allow the user to select among multiple aircraft.&lt;br /&gt;
&lt;br /&gt;
=== Flight Plan ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:GCSfp.png|Flight plan tree]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full tree of the flight plan is given in this page. The current block and the current stage are highlighted. A double-click on a block allows the operator to immediately switch navigation to this block.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[Flight_Plans|Flight plans]] and [[Flight_Plan_Editor|Flight Plan Editor]] pages for more information on flight plans.&lt;br /&gt;
&lt;br /&gt;
=== Settings ===&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:GCSsettings.png|Settings tab]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The setting page allows the operator to change variable values during flight. The layout of the page is generated from the &amp;lt;tt&amp;gt;dl_settings&amp;lt;/tt&amp;gt; section of the settings.xml file, one tab is associated to every section and sub-section.&lt;br /&gt;
&lt;br /&gt;
On each line is displayed (from left to right), the name of the variable, its current value (periodically sent by the A/C), a slider or radio buttons for user input, and commit/undo buttons. Also note, clicking on the current value will send a request to obtain the current value from the aircraft.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See the [[Telemetry#Settings|Telemetry]] page for more information on settings.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The save button of this tab opens the following popup which proposes to the user to save the current values in the airframe file (according to the &amp;lt;tt&amp;gt;param&amp;lt;/tt&amp;gt; attribute in the [[Telemetry#Settings|setttings]] configuration file). The values of the checked rows will be saved in the airframe file (or any other file) for further use. Units (e.g. deg or rad) are taken into account. '''It is recommended to backup the airframe file before overwriting it with this utility''' (even if time-stamped copy of the airframe file is actually automatically done).&lt;br /&gt;
&lt;br /&gt;
Symetrically, the Upload button of this dialog button will send all the checked values of the airframe file to the live aircraft.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:Save settings.png|Settings tab]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PFD ===&lt;br /&gt;
&lt;br /&gt;
[[Image:GCSpfd.png|Primary Flight Display]]&lt;br /&gt;
&lt;br /&gt;
The Primary Flight Display contains an artificial horizon and two scales displaying the current ground speed (left side) and the altitude (right side). Minimum and maximum speeds are shown under and above the speed scale. A click on the scale resets these values to the current speed value.&lt;br /&gt;
&lt;br /&gt;
=== GPS, Infrared, Wind ===&lt;br /&gt;
&lt;br /&gt;
The '''GPS''' page gives the list of satellites tracked by the receiver and their respective signal strengths in dB.&lt;br /&gt;
(35 is low, 45 is excellent) and if they are used to compute the fix (green: used, red:not used). This page may help to tune the position of the receiver on the aircraft relatively to other components (e.g. datalink and video transmitters).&lt;br /&gt;
&lt;br /&gt;
The '''Infrared''' page is only used for aircraft not equipped with the vertical infrared sensor. This page reports the required pre-flight calibration value as well as the evolution of the in-flight calibration correction factor (from hybridization with the GPS information).&lt;br /&gt;
&lt;br /&gt;
The '''Misc''' page displays the estimated wind velocity computed by the ground station during flight and relayed back to the aircraft.  Wind velocity is estimated by vector addition of the GPS-measured ground speed in many different directions during level flight.  This computation may soon be performed by the autopilot instead of the ground station.&lt;br /&gt;
&lt;br /&gt;
== Video Plugin ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;-mplayer&amp;lt;/tt&amp;gt; option of GCS allows the user to display a video stream in this window.  The video window can also be exchanged with the map by clicking anywhere inside the frame or from the menu.&lt;br /&gt;
Use the following line in your [[Control_panel.xml|control panel]] to enable the video window.&lt;br /&gt;
 &amp;lt;tt&amp;gt;(paparazzi folder path)/sw/ground_segment/cockpit/gcs -mplayer rtsp://localhost:7070/video -layout appropriate_layout.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
Note that a &amp;lt;tt&amp;gt;plugin&amp;lt;/tt&amp;gt; widget must be specified in the used layout:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt; &amp;lt;widget size=&amp;quot;300&amp;quot; name=&amp;quot;plugin&amp;quot;/&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
A useful example of how to configure the GCS to show video from a USB DVB-T tuner with composite input follows:&lt;br /&gt;
&lt;br /&gt;
If you have an Avermedia DVB-T usb tuner like the Aver-Tv Hybrid Volar HX (Avermedia finally released Ubuntu Linux drivers)&lt;br /&gt;
then in order to use the usb tuner as video input to the GCS you have to complete the following steps:&lt;br /&gt;
&lt;br /&gt;
First download and install the drivers and check that the Usb tuner works well by connecting a video signal to the composite input&lt;br /&gt;
and then opening a console window and typing: &lt;br /&gt;
&lt;br /&gt;
'''mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=1:device=/dev/video1:noaudio'''&lt;br /&gt;
&lt;br /&gt;
Remember to change the &amp;quot;device=/dev/video1&amp;quot; in the above line with whatever your new usb tuner is registered with (if needed).&lt;br /&gt;
Type &amp;quot;dmesg&amp;quot; in a console immediately after you connect the usb tuner and you should see a line stating the video device your usb tuner got registered with.&lt;br /&gt;
If it says video0 change &amp;quot;device=/dev/video1&amp;quot; with &amp;quot;device=/dev/video0&amp;quot;&lt;br /&gt;
Mine is registered as &amp;quot;video1&amp;quot; because &amp;quot;video0&amp;quot; is the  built in laptop camera.&lt;br /&gt;
If everything is ok then a blue or similar LED on the usb tuner dongle should light up indicating that the tuner driver is loaded&lt;br /&gt;
and you should be able to watch the video on the pc screen (no audio yet).&lt;br /&gt;
Now close the console and remove the Usb tuner as it is time to configure the control_panel.xml file by editing the GCS command line.&lt;br /&gt;
Locate the line in the &amp;quot;control_panel.xml&amp;quot; file, usually located in &amp;quot;/Your Paparazzi directory/conf/&amp;quot; (mine is in &amp;quot;/paparazzi/conf/&amp;quot;),&lt;br /&gt;
that starts with &amp;quot;&amp;lt;program name=&amp;quot;GCS&amp;quot; command=&amp;quot;sw/ground_segment/cockpit/gcs......&amp;quot;.&lt;br /&gt;
For example let's say that the complete line looks like this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt; &amp;lt;program name=&amp;quot;GCS&amp;quot; command=&amp;quot;sw/ground_segment/cockpit/gcs -layout horizontal.xml&amp;quot;&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now add the below line at the end (before the quotes) of the original line:&lt;br /&gt;
&lt;br /&gt;
'''-mplayer 'tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=1:device=/dev/video1:alsa:adevice=hw.2,0:amode=1:audiorate=48000:forceaudio:volume=100:immediatemode=0''''&lt;br /&gt;
&lt;br /&gt;
The original line should look now like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;program name=&amp;quot;GCS&amp;quot; command=&amp;quot;sw/ground_segment/cockpit/gcs -layout horizontal.xml -mplayer &lt;br /&gt;
'tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=1:device=/dev/video1:alsa:adevice=hw.2,0:amode=1:audiorate=48000:forceaudio:volume=100:immediatemode=0'&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The above line is one complete and uninterrupted line but it is just too long to show it in one line here.&lt;br /&gt;
Please remember to change the &amp;quot;NTSC&amp;quot; with &amp;quot;PAL&amp;quot; if you do not use the NTSC video system (if your airborne camera is PAL for example). &lt;br /&gt;
This will load the mplayer, select the composite video input of the tuner and enable the sound input.&lt;br /&gt;
Read the mplayer documentation so you can tweak the resolution etc. later to suit your particular setup.&lt;br /&gt;
The resolution above is set to 320x240 here but you can set it to 640x480 by replacing the numbers in the command line above.&lt;br /&gt;
&lt;br /&gt;
Finally you have to add the plugin widget to your GCS layout configuration file.&lt;br /&gt;
If you noticed the GCS command line in the &amp;quot;control_panel.xml&amp;quot; file, it has a part that reads &amp;quot;-layout horizontal.xml&amp;quot; &lt;br /&gt;
so our layout configuration file is the &amp;quot;horizontal.xml&amp;quot; which is located always in &amp;quot;/Your Paparazzi directory/conf/gcs/&amp;quot; &lt;br /&gt;
(mine is in &amp;quot;/paparazzi/conf/gcs/&amp;quot;).&lt;br /&gt;
Open the file and add or uncomment the below line (in &amp;quot;horizontal.xml&amp;quot; the plugin widget is there but commented out):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;widget NAME=&amp;quot;plugin&amp;quot; SIZE=&amp;quot;300&amp;quot;/&amp;gt; &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the file should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;rows&amp;gt;&lt;br /&gt;
  &amp;lt;widget size=&amp;quot;500&amp;quot; name=&amp;quot;map2d&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;columns&amp;gt;&lt;br /&gt;
   &amp;lt;rows size=&amp;quot;375&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;widget size=&amp;quot;200&amp;quot; name=&amp;quot;strips&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;/rows&amp;gt;&lt;br /&gt;
   &amp;lt;widget size=&amp;quot;400&amp;quot; name=&amp;quot;aircraft&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;widget name=&amp;quot;alarms&amp;quot;/&amp;gt;  &lt;br /&gt;
   &amp;lt;widget NAME=&amp;quot;plugin&amp;quot; SIZE=&amp;quot;300&amp;quot;/&amp;gt; &lt;br /&gt;
  &amp;lt;/columns&amp;gt;&lt;br /&gt;
 &amp;lt;/rows&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's it, Enjoy!&lt;br /&gt;
&lt;br /&gt;
Tested in Ubuntu 10.04 LTS but probably the same method should work fine on different versions too.&lt;br /&gt;
&lt;br /&gt;
See this [http://www.youtube.com/watch?v=7OCcMA4vluM screen capture] as an example of the resulting GCS (Y-UAV).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;-plugin&amp;lt;/tt&amp;gt; option is another way to use the plugin widget: the X subwindow id is given to the provided command:&lt;br /&gt;
 &amp;lt;tt&amp;gt;(paparazzi folder path)/sw/ground_segment/cockpit/gcs -plugin &amp;quot;mplayer video_stream -wid &amp;quot; -layout appropriate_layout.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &amp;lt;tt&amp;gt;(paparazzi folder path)/sw/ground_segment/cockpit/gcs -plugin &amp;quot;cvlc video_stream --drawable-xid=&amp;quot; -layout appropriate_layout.xml&amp;lt;/tt&amp;gt;&lt;br /&gt;
The &amp;lt;tt&amp;gt;--vout-event=3&amp;lt;/tt&amp;gt; option can be used for vlc to disable mouse and keyboard events handling&lt;br /&gt;
&lt;br /&gt;
== Altitude graph widget ==&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:altgraph.png|400px|The GCS with the altitude graph]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An altitude graph can be displayed in the GCS by adding the widget ''altgraph'' in the layout configuration (See the [[GCS_Configuration|GCS configuration]] page). An example is provided in conf/gcs/alt.xml. To use this layout add -layout alt.xml to the /conf/control_panel.xml file. This type of layout is more suited to a multi UAV set up. The Papget ruler is a much less intrusive and better tool when you are only flying a single aircraft.&lt;br /&gt;
&lt;br /&gt;
==Papgets==&lt;br /&gt;
Graphical objects can be added to 2D maps: text, rule, gauge, buttons, .... These objects are named ''papgets''. The following snapshot&lt;br /&gt;
shows an example with buttons (left side), gauges (lower left corner), text (upper right corner) and ruler (right side). This example&lt;br /&gt;
has been produced with a layout file provided in the distribution:&lt;br /&gt;
&lt;br /&gt;
 .../gcs -layout papgets.xml &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:papgets.png|516px|A 2D map augmented with papgets]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Telemetry data report===&lt;br /&gt;
The easiest way to create a papget displaying telemetry data is to drag&amp;amp;drop a message field from the Messages window onto the 2D map of the GCS. The default rendering is then a string of text. Clicking on it allows the user to change its type (currently text, ruler or gauge) and some of its attributes (color, size, range for a gauge, format for a text ...). A papget can be moved by simply dragging it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:papget_editor.png|Main characteristics of a papget can be dynamically edited]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Papgets can be saved in the layout of the GCS (from the Nav menu). The description is saved in an XML file (in &amp;lt;tt&amp;gt;conf/gcs/&amp;lt;/tt&amp;gt; folder) which can be manually edited:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;papget type=&amp;quot;message_field&amp;quot; display=&amp;quot;gauge&amp;quot; x=&amp;quot;47&amp;quot; y=&amp;quot;414&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;field&amp;quot; value=&amp;quot;BAT:voltage&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;scale&amp;quot; value=&amp;quot;0.1&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;min&amp;quot; value=&amp;quot;0.&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;max&amp;quot; value=&amp;quot;15.&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;size&amp;quot; value=&amp;quot;50.&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;text&amp;quot; value=&amp;quot;Bat(V)&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/papget&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file is used later by giving it to the gcs process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 .../gcs -layout my_fancy_papgets.xml&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
In the same way, user buttons from the strip can be dragged&amp;amp;dropped on the 2D map. However, they currently cannot be directly edited, and&lt;br /&gt;
attributes changes have to be done in the XML file. Two types of button are provided to jump to a block or to set a value:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;papget type=&amp;quot;goto_block&amp;quot; display=&amp;quot;button&amp;quot; x=&amp;quot;10&amp;quot; y=&amp;quot;300&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;block_name&amp;quot; value=&amp;quot;Standby&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;icon&amp;quot; value=&amp;quot;home.png&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/papget&amp;gt;&lt;br /&gt;
 &amp;lt;papget type=&amp;quot;variable_setting&amp;quot; display=&amp;quot;button&amp;quot; x=&amp;quot;10&amp;quot; y=&amp;quot;250&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;variable&amp;quot; value=&amp;quot;launch&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;value&amp;quot; value=&amp;quot;1.&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;property name=&amp;quot;icon&amp;quot; value=&amp;quot;launch.png&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/papget&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Video on Papget===&lt;br /&gt;
A video stream can be rendered in a &amp;lt;tt&amp;gt;video_plugin&amp;lt;/tt&amp;gt; papget, using the ''mplayer'' player:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;papget type=&amp;quot;video_plugin&amp;quot; display=&amp;quot;mplayer&amp;quot; x=&amp;quot;300&amp;quot; y=&amp;quot;250&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;video_feed&amp;quot; value=&amp;quot;my video source&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;width&amp;quot; VALUE=&amp;quot;320&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;height&amp;quot; VALUE=&amp;quot;240&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/papget&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or any video player which takes in option the X window id, here for example ''VLC'':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;papget type=&amp;quot;video_plugin&amp;quot; display=&amp;quot;plugin&amp;quot; x=&amp;quot;300&amp;quot; y=&amp;quot;250&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;property name=&amp;quot;command&amp;quot; value=&amp;quot;cvlc video_source --drawable-xid=&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;property NAME=&amp;quot;width&amp;quot; VALUE=&amp;quot;320&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;property NAME=&amp;quot;height&amp;quot; VALUE=&amp;quot;240&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/papget&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Aircraft binding===&lt;br /&gt;
Upto Paparazzi '''v5.4''', Papgets could not not bound to a specific aircraft. This had the effect that it will work with any of them, and when multiple aircraft are flying the display of messages is mixed and the buttons will send command or settings to all active aircraft.&lt;br /&gt;
&lt;br /&gt;
Since Paparazzi '''v5.6''', Papgets are bound to a single aircraft, which means that they can safely be used with several active aircraft. It is also possible to add a property to the GCS layout file to specify the aircraft ID:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;property name=&amp;quot;ac_id&amp;quot; value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Valid IDs are from 1 to 255 (0 being reserved to GCS). '''When''' this property is '''not''' defined, the Papget will bind to '''any aircraft like before'''. This can be useful if you intent to build a generic layout. When saving a layout from the GCS, if their are some Papgets to save, a question box will prompt the user to ask if the &amp;lt;tt&amp;gt;ac_id&amp;lt;/tt&amp;gt; property should be saved or not.&lt;br /&gt;
&lt;br /&gt;
===Papget Development===&lt;br /&gt;
Graphical appearence of papgets is defined in &amp;lt;tt&amp;gt;sw/lib/ocaml/papget_renderer.ml&amp;lt;/tt&amp;gt;. A renderer must implement the Papget_renderer.t class type interface (&amp;lt;tt&amp;gt;canvas_text&amp;lt;/tt&amp;gt; is probably the simpler example) and listed in the &amp;lt;tt&amp;gt;renderers&amp;lt;/tt&amp;gt; list to be available&lt;br /&gt;
in the edit popup box.&lt;br /&gt;
&lt;br /&gt;
The XML configuration is parsed in &amp;lt;tt&amp;gt;sw/ground_segment/cockpit/papgets.ml&amp;lt;/tt&amp;gt;: a new created papget identifier must listed here.&lt;br /&gt;
&lt;br /&gt;
== Alarms ==&lt;br /&gt;
&lt;br /&gt;
The alarm window displays a list of recent errors such as:&lt;br /&gt;
* Low battery warning&lt;br /&gt;
* Low altitude warning&lt;br /&gt;
* Autopilot mode changes (i.e. Manual, Auto2)&lt;br /&gt;
* Flight plan block changes&lt;br /&gt;
&lt;br /&gt;
These alarms can be provided via the speaker using the [[speech]] function.&lt;br /&gt;
&lt;br /&gt;
== Airframe Specific GCS Customizations ==&lt;br /&gt;
&lt;br /&gt;
Items related to the ''aircraft icon'', ''altitude shift values'', ''speech id'', and the overall ''icon theme'' of the GCS can be customized in each aircraft's [[Airframe_Configuration#GCS|airframe configuration file GCS section]].&lt;br /&gt;
&lt;br /&gt;
=Related Links=&lt;br /&gt;
&lt;br /&gt;
* [[GettingTheGCSRunningonAGumstixBoard | Getting the GCS running on a Gumstix board]]&lt;br /&gt;
* [[RaspberryPi | Getting the GCS running on a Raspberry Pi board]]&lt;br /&gt;
* [[PPRZonDroid | PPRZonDroid: a Remote GCS Android application]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:GCS]] [[Category:User_Documentation]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25303</id>
		<title>MediaWiki:Rss-feed</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25303"/>
		<updated>2021-10-13T08:44:12Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- the following are two alternative templates. The first is the basic default template for feeds --&amp;gt;; '''&amp;lt;span class='plainlinks'&amp;gt;[{{{link}}} {{{title}}}]&amp;lt;/span&amp;gt;'''&lt;br /&gt;
: {{{description}}}&lt;br /&gt;
: {{{author}}} {{{date}}}&amp;lt;!-- don't use newline here --&amp;gt;&amp;lt;!-- The second is an improved version which requires Extension:ParserFunctions --&amp;gt;&amp;lt;!-- ; '''&amp;lt;span class='plainlinks'&amp;gt;[{{{link}}} {{{title}}}]&amp;lt;/span&amp;gt;'''{{#if: {{{description|}}}|: {{{description}}}}}{{#if: {{{author|}}} | {{#if: {{{date|}}} |: &amp;amp;mdash; {{{author}}} {{{date}}}}} | {{#if: {{{author|}}}|: &amp;amp;mdash; {{{author}}}}} {{#if: {{{date|}}}|:{{{date}}}}}|}} --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25302</id>
		<title>MediaWiki:Rss-feed</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25302"/>
		<updated>2021-10-13T08:43:50Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; '''&amp;lt;span class='plainlinks'&amp;gt;[{{{link}}} {{{title}}}]&amp;lt;/span&amp;gt;''' {{#if: {{{description|}}} |: {{{description}}}}}{{#if: {{{author|}}} | {{#if: {{{date|}}} |: — {{{author}}} {{{date}}}}} | {{#if: {{{author|}}}|: — {{{author}}}}} {{#if: {{{date|}}}|:{{{date}}}}}|}}&amp;lt;br/&amp;gt;&amp;lt;!-- don't use newline here --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25301</id>
		<title>MediaWiki:Rss-feed</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25301"/>
		<updated>2021-10-13T08:42:28Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; '''&amp;lt;span class='plainlinks'&amp;gt;[{{{link}}} {{{title}}}]&amp;lt;/span&amp;gt;''' {{#if: {{{description|}}} |: {{{description}}}}}{{#if: {{{author|}}} | {{#if: {{{date|}}} |: — {{{author}}} {{{date}}}}} | {{#if: {{{author|}}}|: — {{{author}}}}} {{#if: {{{date|}}}|:{{{date}}}}}|}}&amp;lt;!-- don't use newline here --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25300</id>
		<title>MediaWiki:Rss-feed</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25300"/>
		<updated>2021-10-13T08:41:59Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- The second is an improved version which requires Extension:ParserFunctions --&amp;gt; \&lt;br /&gt;
; '''&amp;lt;span class='plainlinks'&amp;gt;[{{{link}}} {{{title}}}]&amp;lt;/span&amp;gt;''' \&lt;br /&gt;
{{#if: {{{description|}}} |: {{{description}}}}}{{#if: {{{author|}}} | {{#if: {{{date|}}} |: — {{{author}}} {{{date}}}}} | {{#if: {{{author|}}}|: — {{{author}}}}} {{#if: {{{date|}}}|:{{{date}}}}}|}}&amp;lt;!-- don't use newline here --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25299</id>
		<title>MediaWiki:Rss-feed</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25299"/>
		<updated>2021-10-13T08:40:07Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- The second is an improved version which requires Extension:ParserFunctions --&amp;gt; \&lt;br /&gt;
; '''&amp;lt;span class='plainlinks'&amp;gt;[{{{link}}} {{{title}}}]&amp;lt;/span&amp;gt;''' \&lt;br /&gt;
{{#if: {{{description|}}} \&lt;br /&gt;
|: {{{description}}}}}{{#if: {{{author|}}} \&lt;br /&gt;
| {{#if: {{{date|}}} |: — {{{author}}} {{{date}}}}} \&lt;br /&gt;
| {{#if: {{{author|}}}|: — {{{author}}}}} {{#if: {{{date|}}}|:{{{date}}}}}|}}&amp;lt;!-- don't use newline here --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25298</id>
		<title>MediaWiki:Rss-feed</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25298"/>
		<updated>2021-10-13T08:39:38Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; '''&amp;lt;span class='plainlinks'&amp;gt;[{{{link}}} {{{title}}}]&amp;lt;/span&amp;gt;''' \&lt;br /&gt;
{{#if: {{{description|}}} \&lt;br /&gt;
|: {{{description}}}}}{{#if: {{{author|}}} \&lt;br /&gt;
| {{#if: {{{date|}}} |: — {{{author}}} {{{date}}}}} \&lt;br /&gt;
| {{#if: {{{author|}}}|: — {{{author}}}}} {{#if: {{{date|}}}|:{{{date}}}}}|}}&amp;lt;!-- don't use newline here --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25297</id>
		<title>MediaWiki:Rss-feed</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25297"/>
		<updated>2021-10-13T08:39:13Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; '''&amp;lt;span class='plainlinks'&amp;gt;[{{{link}}} {{{title}}}]&amp;lt;/span&amp;gt;'''&lt;br /&gt;
{{#if: {{{description|}}} \&lt;br /&gt;
|: {{{description}}}}}{{#if: {{{author|}}} \&lt;br /&gt;
| {{#if: {{{date|}}} |: — {{{author}}} {{{date}}}}} \&lt;br /&gt;
| {{#if: {{{author|}}}|: — {{{author}}}}} {{#if: {{{date|}}}|:{{{date}}}}}|}}&amp;lt;!-- don't use newline here --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25296</id>
		<title>MediaWiki:Rss-feed</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25296"/>
		<updated>2021-10-13T08:38:11Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- The second is an improved version which requires Extension:ParserFunctions --&amp;gt; \&lt;br /&gt;
; '''&amp;lt;span class='plainlinks'&amp;gt;[{{{link}}} {{{title}}}]&amp;lt;/span&amp;gt;''' \&lt;br /&gt;
{{#if: {{{description|}}} \&lt;br /&gt;
|: {{{description}}}}}{{#if: {{{author|}}} \&lt;br /&gt;
| {{#if: {{{date|}}} |: — {{{author}}} {{{date}}}}} \&lt;br /&gt;
| {{#if: {{{author|}}}|: — {{{author}}}}} {{#if: {{{date|}}}|:{{{date}}}}}|}}&amp;lt;!-- don't use newline here --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25295</id>
		<title>MediaWiki:Rss-feed</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=MediaWiki:Rss-feed&amp;diff=25295"/>
		<updated>2021-10-13T08:37:41Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; '''&amp;lt;span class='plainlinks'&amp;gt;[{{{link}}} {{{title}}}]&amp;lt;/span&amp;gt;'''&lt;br /&gt;
: {{{description}}}&lt;br /&gt;
: {{{author}}} {{{date}}}&amp;lt;!-- don't use newline here --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Flight_Plans&amp;diff=25291</id>
		<title>Flight Plans</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Flight_Plans&amp;diff=25291"/>
		<updated>2021-05-04T22:08:13Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: Update sectors&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;
Flat ''Sectors'' can be described as an area defined by a 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.&lt;br /&gt;
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.&lt;br /&gt;
Note that sector names are not allowed to contain spaces.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The edges of the polygon should not cross each other.&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;
&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 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;
'''Tip:''' 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;
=== Before version 6.0 ===&lt;br /&gt;
Before version 6.0, there was &amp;quot;static&amp;quot; and &amp;quot;dynamic&amp;quot; sectors. The default type of a sector was &amp;quot;static&amp;quot;, except if the extra attribute '''type=&amp;quot;dynamic&amp;quot;''' was added.&lt;br /&gt;
&lt;br /&gt;
Static sectors have these limitations:&lt;br /&gt;
* The polygon need to be &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.&lt;br /&gt;
* If the flight plan is dynamically relocated, such a sector will be relocated but the display is not updated on the GCS. &lt;br /&gt;
* editing of the waypoints of the sector during the flight do not dynamically update the inside function. It will always check if the position is inside the original sector.&lt;br /&gt;
&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;
== Modules ==&lt;br /&gt;
Additional modules can be added to the airframe using the ''modules'' element inside the flight plan. The same syntax is used as in the airframe file:&lt;br /&gt;
&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;module name=&amp;quot;demo_module&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;MY_DEFINE&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;configure name=&amp;quot;MY_CONF&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
      ...&lt;br /&gt;
    &amp;lt;/module&amp;gt;&lt;br /&gt;
  &amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&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;
* Since some operators are not very compliant with the XML specifications (especially '&amp;lt;'), you can use some alternate naming:&lt;br /&gt;
** @LT (less than, &amp;lt;)&lt;br /&gt;
** @GT (greater than, &amp;gt;)&lt;br /&gt;
** @LEQ (less or equal, &amp;lt;=)&lt;br /&gt;
** @GEQ (greater or equal, &amp;gt;=)&lt;br /&gt;
** @AND ( &amp;amp;&amp;amp; )&lt;br /&gt;
** @OR ( || )&lt;br /&gt;
** @DEREF ( -&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
Some examples of usable expressions are given in the next sections.&lt;br /&gt;
&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 an altitude above ground of 50m (1x50), 10 seconds at an altitude of 100m (2x50), ... until 250m (5x50).&lt;br /&gt;
&lt;br /&gt;
Note: Two bounded loops using the same control variable are not allowed in the same block. Further, I tested a specific implementation installation of PaparazziUAV v5.10 and I found the maximum range of the looping variable to be -128 to 126.&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 where XY moveable with the RC transmitter stick, Z with other stick or slider&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. If the UAV has no hover capabilities,&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;
=== Abide ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;abide&amp;lt;/tt&amp;gt; Here the UAS with try to abide at the waypoint as best as it can. For an aircraft capable only capable of hovering it will just hang above the waypoint. For a fixedwing or a Hybrid 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;abide wp=&amp;quot;SAMPLEME&amp;quot; alt=&amp;quot;95&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note that you current Paparazzi version might not have this option yet.'', use stay as an alternative&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;
== Extentending ==&lt;br /&gt;
&lt;br /&gt;
By adding navigaition type of modules to you airframe your flightplan options can be massively extended. &lt;br /&gt;
&lt;br /&gt;
[[Advanced_Navigation_Routines|Take a look on this page to see which modules are on offer]]&lt;br /&gt;
&lt;br /&gt;
In case all the basic options and modules still do not let you fly autonomous like you want to, nothing prevends you from creating andother nav module. Before you set out on that task, make sure that there really is no way or module that can make your wanted behaviour a reality.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Take a good look at other flight plans included with Paparazzi, you can learn a lot from them. Be sure to also visit the [[Flight_Plan_Examples|flight plan examples]] page to enhance your knowledge on flightplans.&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;
* 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>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Category:Autopilots/Index&amp;diff=25267</id>
		<title>Category:Autopilots/Index</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Category:Autopilots/Index&amp;diff=25267"/>
		<updated>2021-01-20T12:07:03Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: change link from Tawaki 1.00 to 1.10&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''STM32F7 based boards'''&lt;br /&gt;
&lt;br /&gt;
*[[Tawaki]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;STM32F7 (ARM Cortex™-M7) based autopilot:&amp;lt;/small&amp;gt;&lt;br /&gt;
**&amp;lt;small&amp;gt;[[Tawaki/v1.10|'''Tawaki v1.10'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''  New!'''&amp;lt;/span&amp;gt;]]&amp;lt;/small&amp;gt;&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Small, lightweight and versatile Autopilot, 9 DOF IMU, microSD, Baro, ready for Rotorcraft, Fixed Wing and Hybrid applications...&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[Chimera]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;STM32F7 (ARM Cortex™-M7) based autopilot for fixed wing:&amp;lt;/small&amp;gt;&lt;br /&gt;
**&amp;lt;small&amp;gt;[[Chimera/v1.00|'''Chimera v1.00''']]&amp;lt;/small&amp;gt;&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Versatile Autopilot, 9 DOF IMU, Baro, microSD, Pitot, Modem, ready for Companion Computer...&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''STM32F1 based boards'''&lt;br /&gt;
&lt;br /&gt;
*[[Lisa|Lisa]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;STM32F1 based autopilots:&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Lisa/S|&amp;lt;small&amp;gt;'''Lisa/S''']]&amp;lt;br&amp;gt;STM32 micro footprint autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Lisa/M_v10|&amp;lt;small&amp;gt;'''Lisa/M v1.0''']]&amp;lt;br&amp;gt;STM32 small footprint autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Lisa/M_v20|&amp;lt;small&amp;gt;'''Lisa/M v2.0''']]&amp;lt;br&amp;gt;Improved STM32 small footprint autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Lisa/L|&amp;lt;small&amp;gt;'''Lisa/L''']]&amp;lt;br&amp;gt;STM32/[[Gumstix|Overo]] high performance autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''STM32F4 based boards'''&lt;br /&gt;
&lt;br /&gt;
*[[Apogee]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;STM32F4 (ARM Cortex™-M4) based autopilot for fixed wing:&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Apogee/v1.00|&amp;lt;small&amp;gt;'''Apogee v1.00''']]&amp;lt;br&amp;gt;Super small and lightweight autopilot, 9 DOF IMU, microSD high speed,  Baro, ,...&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[Elle|Elle]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;STM32F4 autopilot system:&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Elle0|&amp;lt;small&amp;gt;'''Elle0'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt; New!&amp;lt;/span&amp;gt;]]&amp;lt;br/&amp;gt;STM32F4 small and affordable autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[Lisa|Lisa]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;STM32F4 based autopilots:&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Lisa/M_v20|&amp;lt;small&amp;gt;'''Lisa/MX''']]&amp;lt;br/&amp;gt;STM32F4 versatile autopilot with crypto support&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Lisa/MXS_v1.0|&amp;lt;small&amp;gt;'''Lisa/MX-Small''']]&amp;lt;br/&amp;gt;STM32F4 versatile autopilot with crypto support&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[Krooz|Krooz]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;STM32F4 Cortex™-M4 high integrated Rotorcraft autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Krooz|&amp;lt;small&amp;gt;'''Krooz''']]&amp;lt;br&amp;gt;STM32F4 Cortex™-M4 high integrated Rotorcraft autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[KroozSD|&amp;lt;small&amp;gt;'''KroozSD''']]&amp;lt;br&amp;gt;STM32F4 Cortex™-M4 high integrated autopilot, w. microSD slot, XBee conn.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[Pixhawk|Pixhawk]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Duo processor with Autopilot core on a STM32F4 Cortex™-M4 and Fly By Wire core on a STM32F1 Cortex™-M1&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''LPC2148 based boards'''&lt;br /&gt;
&lt;br /&gt;
*[[Booz|Booz]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Quadrotor autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[NavGo|NavGo]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Multirotor autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[NavGo_v3|&amp;lt;small&amp;gt;'''NavGo v3''']]&amp;lt;br&amp;gt;Small and lightweight multirotor autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[Umarim]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;LPC based embedded IMU autopilot designed for small fixed wing:&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Umarim_v10|&amp;lt;small&amp;gt;'''Umarim v1''']]&amp;lt;br&amp;gt;full sensor set for small fixed wing&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Umarim_Lite_v2|&amp;lt;small&amp;gt;'''Umarim Lite v2''']]&amp;lt;br&amp;gt;light sensor set version of Umarim&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[Tiny]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;GPS integrated lightweight autopilots:&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Tiny/v0.99|&amp;lt;small&amp;gt;'''Tiny v0.99''']]&amp;lt;br&amp;gt;Tiny autopilot&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Tiny/v1.1|&amp;lt;small&amp;gt;'''Tiny v1.1''']]&amp;lt;br&amp;gt;Integrated GPS and 5V/2A supply&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Tiny/v2.11|&amp;lt;small&amp;gt;'''Tiny v2.11''']]&amp;lt;br&amp;gt;Two layers PCB, 0603 components, big GPS groundplane, improved connectivity.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[TWOG/v1.0|TWOG v1.0]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;8 grams Tiny WithOut GPS autopilot, with external GPS option.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[YAPA]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Yet Another Paparazzi Autopilot:&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[YAPA/v1.0|&amp;lt;small&amp;gt;YAPA v1.0]]&amp;lt;br&amp;gt;Same as [[TWOG]], but bigger with XBee, 100mil headers, mounting holes, rs232&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[YAPA/v2.0|&amp;lt;small&amp;gt;YAPA v2.0]] Reduced component cost&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[Classix|Classix]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Dual [[MCU]]s, [[Gumstix]] connectivity&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[HB]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Autopilots built in Bremen:&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[HB/v1.0|&amp;lt;small&amp;gt;'''HB v1.0''']]&amp;lt;br&amp;gt;Four layers PCB, no GPS, JTAG with IMU&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[HB/mini|&amp;lt;small&amp;gt;'''HB mini''']]&amp;lt;br&amp;gt;Four layers planar PCB, JTAG, 10 sevos, 12g, no GPS, with IMU&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Aircraft With Embedded Autopilots'''&lt;br /&gt;
* Parrot&lt;br /&gt;
** [[AR Drone 2]]&lt;br /&gt;
** [[Bebop]]&lt;br /&gt;
** [[Disco]]&lt;br /&gt;
** [[Ap.parrot_minidrone|Minidrones]] (Swing, Rolling Spider, Mambo, ...)&lt;br /&gt;
&lt;br /&gt;
'''Archive'''&lt;br /&gt;
*[[Previous_Autopilots|Previous Versions]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Schematics and support for previous versions&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Tawaki/v1.10&amp;diff=25266</id>
		<title>Tawaki/v1.10</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Tawaki/v1.10&amp;diff=25266"/>
		<updated>2021-01-20T12:03:21Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: Change RC2 to RCaux&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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;Autopilots &amp;lt;/categorytree&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; width: 65%&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Tawaki_v100_top_hand.JPG|400px|Tawaki v1.00 top side]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Tawaki_v100_top_bottom_1E.JPG|400px|Tawaki v1.00 1€ size comparison]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Hardware Revision History ==&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;
!''Version #''!!''Release Date''!!''Release Notes''&lt;br /&gt;
|-&lt;br /&gt;
|v1.10||03/2020||AUXa4 = PA3&amp;lt;br&amp;gt;&lt;br /&gt;
AUXb1 = PA6&amp;lt;br&amp;gt;&lt;br /&gt;
USB Vbus resistor bridge added.&amp;lt;br&amp;gt;&lt;br /&gt;
C43 value increased.&lt;br /&gt;
|-&lt;br /&gt;
|v1.00||07/2019||Initial release of Tawaki&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Tawaki_v100_top_pers.JPG&lt;br /&gt;
Tawaki_v100_bottom_pers.JPG&lt;br /&gt;
Tawaki_v100_bottom_hand.JPG&lt;br /&gt;
Tawaki_v100_top_SD_beside.JPG&lt;br /&gt;
Tawaki_v100_top_x4.JPG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
*STMicro [https://www.st.com/en/microcontrollers-microprocessors/stm32f777vi.html STM32F777VI] Micro Controller Unit&lt;br /&gt;
**ARM Cortex-M7, 216 MHz CPU, FPU &amp;amp; DSP instructions, 2 Mbytes Flash, 512 Kbytes SRAM, General-purpose DMA, HW Crypto,etc.&lt;br /&gt;
*On-board Sensors&lt;br /&gt;
**6 DOF Accelerometers &amp;amp; Gyrometers TDK-Invensense [https://www.invensense.com/products/motion-tracking/6-axis/icm-20600/ ICM-20600]&lt;br /&gt;
**3 DOF Magnetometer STMicro [https://www.st.com/en/microcontrollers-microprocessors/stm32f777vi.html LIS3MDL]&lt;br /&gt;
**Baro-Altimeter Bosch [https://www.bosch-sensortec.com/bst/products/all_products/bmp388 BMP388]&lt;br /&gt;
*8x Servos or ESC outputs (PWM/OneShot/DShot) + D-Shot Telemetry serial input&lt;br /&gt;
*2x RC Receiver Inputs (S.BUS, PPM &amp;amp; Spektrum Satellite compatible, including receiver binding)&lt;br /&gt;
*Communication Buses&lt;br /&gt;
**3x UARTs (including one with hardware flow control signals)&lt;br /&gt;
**1x I2C bus (3.3V and 5V logic level)&lt;br /&gt;
**1x SPI bus (with Slave Select, Master or Slave)&lt;br /&gt;
**1x CAN bus&lt;br /&gt;
**1x USB (Micro-B &amp;amp; remote) : DFU mode (download) or USB storage (direct access to MicroSD card) or FullSpeed Mode&lt;br /&gt;
*8x Auxiliary Inputs/Outputs spread over 2 connectors (8x ADC, 8x Timers different from servos, x1 UART, etc.)&lt;br /&gt;
*MicroSD card (+ dedicated power supply for emergency files closing system)&lt;br /&gt;
*Debug Connector (Serial Wire Debug)&lt;br /&gt;
*Power&lt;br /&gt;
**source 2 to 4 Lipo cells (6 to 17v)&lt;br /&gt;
**5V/4A (max total for Tawaki + Servos + Payload)&lt;br /&gt;
**3.3V/3A Low Noise (max total for payload)&lt;br /&gt;
**Controlled PowerSwitch 5V/2A supply on AUX A connector&lt;br /&gt;
*x4 Status Leds&lt;br /&gt;
*Connectors fully compatible with Apogee autopilot&lt;br /&gt;
*Mechanical&lt;br /&gt;
** 53 x 25mm (2.1&amp;quot; x 0.98&amp;quot;), including 4x &amp;amp;Phi;2mm mounting holes (shares the same external dimensions and mounting points as Apogee)&lt;br /&gt;
** 4x &amp;amp;Phi;3mm extra mounting slotted holes, 30 to 31mm spacing (30.5mm standard from Racers ESC, GPS modules, etc. )&lt;br /&gt;
** 11g (0.4 oz) (including Micro-SD card)&lt;br /&gt;
&lt;br /&gt;
=== Pinout ===&lt;br /&gt;
&lt;br /&gt;
==== Simplified Pinout Diagram (Paparazzi use) ====&lt;br /&gt;
''Pins Name and Type are specified with respect to the Autopilot Board''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v110_simplified_pinout.png|1200px|Tawaki v1.10 simplified pinout (Paparazzi use)]]&lt;br /&gt;
&lt;br /&gt;
==== Simplified Pinout Tables (Paparazzi use) ====&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Servos a1 / a2 / a3 / a4'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!width=&amp;quot;15%&amp;quot;|''MCU Resource''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:orange; color:black&amp;quot;|+5V||PWR||-||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:cyan; color:black&amp;quot;|SRVa1&amp;lt;br&amp;gt;SRVa2&amp;lt;br&amp;gt;SRVa3&amp;lt;br&amp;gt;SRVa4||OUT||PE9&amp;lt;br&amp;gt;PE11&amp;lt;br&amp;gt;PE13&amp;lt;br&amp;gt;PE14||Tim1.Ch1&amp;lt;br&amp;gt;Tim1.Ch2&amp;lt;br&amp;gt;Tim1.Ch3&amp;lt;br&amp;gt;Tim1.Ch4||Servo signal (PWM)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Servos b'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!width=&amp;quot;15%&amp;quot;|''MCU Resource''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:orangered; color:black&amp;quot;|VBAT||PWR&amp;lt;sub&amp;gt;IN/OUT&amp;lt;/sub&amp;gt;||-||-||Battery Rail (if solder bridge JP1 ON)&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:cyan; color:black&amp;quot;|SRVb1||OUT||PB6||Tim4.Ch1||Servo signal (PWM)&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:cyan; color:black&amp;quot;|SRVb2||OUT||PB7||Tim4.Ch2||Servo signal (PWM)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:cyan; color:black&amp;quot;|SRVb3||OUT||PB8||Tim4.Ch3||Servo signal (PWM)&lt;br /&gt;
|-&lt;br /&gt;
|6||style=&amp;quot;background:cyan; color:black&amp;quot;|SRVb4||OUT||PB9||Tim4.Ch4||Servo signal (PWM)&lt;br /&gt;
|-&lt;br /&gt;
|7||style=&amp;quot;background:green; color:black&amp;quot;|DSHTin||IN||PB5||UART5.Rx|| DShot Telemetry serial input&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''R/C'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!width=&amp;quot;15%&amp;quot;|''MCU Resource''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:black&amp;quot;|+3.3V||PWR||-||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:LightYellow; color:black&amp;quot;|RC1||IN||PE0||UART8.Rx||(5V Tolerant) Serial (SBUS, Spektrum, etc.)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:LightYellow; color:black&amp;quot;|RCaux||I/O||PC6||UART6.Tx&amp;lt;br&amp;gt;Tim3.Ch1&amp;lt;br&amp;gt;Tim8.Ch1||(5V Tolerant) Serial (SBUS, Spektrum, etc.) or PPM Stream RC receiver signal&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UART2'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:green; color:white&amp;quot;|RX2||IN||PD6||UART2 Serial Input (3.3V level)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:blue; color:white&amp;quot;|TX2||OUT||PD5||UART2 Serial Output (3.3V level)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UART3'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:green; color:white&amp;quot;|RX2||IN||PD9||UART3 Serial Input (3.3V level)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:blue; color:white&amp;quot;|TX2||OUT||PD8||UART3 Serial Output (3.3V level)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UART7'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:green; color:white&amp;quot;|RX2||IN||PB3||UART7 Serial Input (3.3V level)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:blue; color:white&amp;quot;|TX2||OUT||PA15||UART7 Serial Output (3.3V level)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''I2C2 (3V3)'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:sienna; color:white&amp;quot;|SDA2&amp;lt;sub&amp;gt; 3.3V&amp;lt;/sub&amp;gt;||Open Drain I/O||PB11||I2C2 bus Serial DAta ('''3.3V level''', 2.2k&amp;amp;Omega; pull-up)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:blue; color:white&amp;quot;|SCL2&amp;lt;sub&amp;gt; 3.3V&amp;lt;/sub&amp;gt;||Open Drain I/O||PB10||I2C12 bus Serial CLock ('''3.3V level''', 2.2k&amp;amp;Omega; pull-up)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''I2C2 (5V)'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:sienna; color:white&amp;quot;|SDA2&amp;lt;sub&amp;gt; 5V&amp;lt;/sub&amp;gt;||Open Drain I/O||PB11||I2C2 bus Serial DAta ('''5V level''', 2.2k&amp;amp;Omega; pull-up)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:blue; color:white&amp;quot;|SCL2&amp;lt;sub&amp;gt; 5V&amp;lt;/sub&amp;gt;||Open Drain I/O||PB10||I2C12 bus Serial CLock ('''5V level''', 2.2k&amp;amp;Omega; pull-up)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''SPI2'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:sienna; color:white&amp;quot;|NSS2||OUT||PB12||Slave Select. Selects the SPI slave&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:Grey; color:white&amp;quot;|MOSI2||I/O||PB15||SPI2 Master Out Slave In. Data output from master / data input to slave&lt;br /&gt;
|-&lt;br /&gt;
|6||style=&amp;quot;background:Green; color:white&amp;quot;|MISO2||I/O||PB14||SPI2 Master In Slave Out. Data input to master / data output from slave&lt;br /&gt;
|-&lt;br /&gt;
|7||style=&amp;quot;background:Yellow; color:black&amp;quot;|SCK2||I/O||PD3||SPI2 Serial clock. Clock output from master or input to slave&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''CAN'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:Green; color:white&amp;quot;|CANL||I/O||-||CAN bidirectional - line&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Yellow; color:black&amp;quot;|CANH||I/O||-||CAN bidirectional + line&lt;br /&gt;
|}&lt;br /&gt;
''Note: Embedded 120&amp;amp;Omega; terminator resistor.''&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AUX a'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!width=&amp;quot;15%&amp;quot;|''MCU Resource''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V Aux||PWR||(Controlled by) PC13||-||5V from autopilot through Power Switch&amp;lt;br&amp;gt;(PC13 = Low =&amp;gt; OFF / PC13 = High =&amp;gt; ON)&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:white&amp;quot;|+3.3V||PWR||-||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXa1||I/O||PA0||ADC1+2+3.In0&amp;lt;br&amp;gt;Tim2.Ch1&amp;lt;br&amp;gt;Tim5.Ch1&amp;lt;br&amp;gt;UART4.Tx&amp;lt;br&amp;gt;UART2.CTS||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXa2||I/O||PA1||ADC1+2+3.In1&amp;lt;br&amp;gt;Tim2.Ch2&amp;lt;br&amp;gt;Tim5.Ch2&amp;lt;br&amp;gt;UART4.Rx&amp;lt;br&amp;gt;UART2.RTS||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|6||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXa3||I/O||PA2||ADC1+2+3.In2&amp;lt;br&amp;gt;Tim2.Ch3&amp;lt;br&amp;gt;Tim5.Ch3&amp;lt;br&amp;gt;Tim9.Ch1&amp;lt;br&amp;gt;||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|7||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXa4||I/O||PA3||ADC1+2+3.In3&amp;lt;br&amp;gt;Tim2.Ch4&amp;lt;br&amp;gt;Tim5.Ch4&amp;lt;br&amp;gt;Tim9.Ch2||General Purpose I/O&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AUX b'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!width=&amp;quot;15%&amp;quot;|''MCU Resource''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:white&amp;quot;|+3.3V||PWR||-||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXb1||I/O||PA6||ADC1+2.In6&amp;lt;br&amp;gt;Tim3.Ch1&amp;lt;br&amp;gt;Tim13.Ch1||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXb2||I/O||PA7||ADC1+2+3.In7&amp;lt;br&amp;gt;Tim3.Ch2&amp;lt;br&amp;gt;Tim14.Ch1||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|6||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXb3||I/O||PB0||ADC1+2.In8&amp;lt;br&amp;gt;Tim3.Ch3||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|7||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXb4||I/O||PB1||ADC1+2.In9&amp;lt;br&amp;gt;Tim3.Ch4||General Purpose I/O&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''USB'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:green; color:white&amp;quot;|USB+||I/O||PA12||USB bidirectional D+ line&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:white; color:black&amp;quot;|USB-||I/O||PA11||USB bidirectional D- line&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:orange; color:black&amp;quot;|VBUS||IN||PA9||USB bus power (5V)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:#E0FFFF; color:black&amp;quot;|BOOT||IN||BOOT0||DFU or USB Mode selection (BOOT0 MCU pin)&lt;br /&gt;
|}&lt;br /&gt;
''Note: USB Micro-B and Molex Picoblade connectors are in parallel, only one should be connected at a time.''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SWD'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:white; color:black&amp;quot;|nRST||IN||NRST||MCU Reset (active low)&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:blue; color:white&amp;quot;|SWCLK||IN||PA14||Serial Wire Clock&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:sienna; color:white&amp;quot;|SWDIO||I/O||PA13||Serial Wire Data Input/Output&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Detailed Features ==&lt;br /&gt;
&lt;br /&gt;
=== Power Supply ===&lt;br /&gt;
There are several ways to power the Tawaki board. '''CAUTION!''' use only one of these sources at a time:&lt;br /&gt;
*with a battery or any power source that delivers between 6 and 17V &lt;br /&gt;
*by connecting it to a USB port&lt;br /&gt;
*with a power source that delivers a regulated, stable 5V&lt;br /&gt;
Each of these methods is detailed below.&lt;br /&gt;
&lt;br /&gt;
==== Powering using battery/external source soldered onto battery pads ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v110_battery_pads_powering.png|600px|Tawaki v1.10 External source onto GND &amp;amp; VBAT pads]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This is the basic setup: the Tawaki then generates all the internal power sources needed by its components. Additionally, the board provides +5V and +3.3V power sources through dedicated ports for external payload.&amp;lt;br&amp;gt;&lt;br /&gt;
Limitations:&lt;br /&gt;
*input power source range: 6-17V (2-4 Lipo cells)&lt;br /&gt;
*maximum current usable by both Tawaki and payload on the +5V: I(5V)&amp;lt;4A&lt;br /&gt;
*maximum current usable for payload on the +3.3V: I(3.3V)&amp;lt;3A&lt;br /&gt;
*maximum total current usable: 4A&lt;br /&gt;
[[Image:Tawaki_v110_servo_b_vbat_source.png|500px|Tawaki v1.10 Servos b header Vbat source for payload]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With this setup, the external power source is available on the “VBAT” pin of the “Servos B” header - but only if solder bridge JP1 is jumped (turned ON) with a small blob of solder.&amp;lt;br&amp;gt;&lt;br /&gt;
Limitation:&lt;br /&gt;
*maximum current used on the “VBAT” pin must be less than 1A (because of the header’s specifications)&lt;br /&gt;
&lt;br /&gt;
==== Powering using battery/external source connected on &amp;quot;Servos B&amp;quot; header ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v110_servo_b_header_powering.png|500px|Tawaki v1.10 External source on Servo b header]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With this setup, the “GND”(-) and “VBAT”(+) pins of the “Servos B” header are used as the main entry ports for the external power source - but only if solder bridge JP1 is jumped (turned ON) with a small blob of solder. This can be interesting when the ESC already delivers the external power source voltage through its command and control signals (as is frequently the case on multi-rotors).&amp;lt;br&amp;gt;&lt;br /&gt;
Limitations: &amp;lt;br&amp;gt;&lt;br /&gt;
*input power source range: 6-17V (2-4 Lipo cells)&lt;br /&gt;
*maximum total current usable: 1A (because of the header’s specifications)&lt;br /&gt;
&lt;br /&gt;
==== Powering using USB Micro-B only ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v110_Micro-B_USB_powering.png|1000px|Tawaki v1.10 USB Micro-B powering]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to power the Tawaki with only a host computer, through the USB Micro-B port. This setup allows to power the board and all its components, while at the same time flashing it.&amp;lt;br&amp;gt;&lt;br /&gt;
In this case, the &amp;quot;VBUS&amp;quot; pin of the &amp;quot;USB&amp;quot; header must be connected to the &amp;quot;+5V&amp;quot; pin of any header that is equipped with one - with the exception of the &amp;quot;5Vaux&amp;quot; pin of the &amp;quot;AUX a&amp;quot; header.&amp;lt;br&amp;gt;&lt;br /&gt;
Limitation:&amp;lt;br&amp;gt;&lt;br /&gt;
*the host computer must be capable of providing the current needed for: powering the board, and any potential external payload. With a maximum limit of 1A (because of the header’s specifications)&amp;lt;br&amp;gt;&lt;br /&gt;
''Note: with this setup, the voltage of the external power source (VBAT) obviously cannot be measured by the micro-controller (MCU).''&lt;br /&gt;
&lt;br /&gt;
==== Powering using external 5V source ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v110_external_5V_powering.png|800px|Tawaki v1.10 External 5V Source]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In some cases the external power source is out of range and cannot be used, but an external 5V power source is available (for example provided by the ESC). In this case, the external 5V power source must be connected to the &amp;quot;+5V&amp;quot; and &amp;quot;GND&amp;quot; pins of any header that are equipped with them - with the exception of the &amp;quot;5Vaux&amp;quot; pin of the &amp;quot;AUX a&amp;quot; header.&amp;lt;br&amp;gt;&lt;br /&gt;
Limitations:&amp;lt;br&amp;gt;&lt;br /&gt;
*voltage range: 4-6V&lt;br /&gt;
*the external 5V power source must be capable of providing the current needed for: powering the board, and any potential external payload. With a maximum limit of 1A (because of the headers' specifications)&lt;br /&gt;
* the &amp;quot;VBUS&amp;quot; pin of the &amp;quot;USB&amp;quot; header must not be connected to the &amp;quot;+5V&amp;quot; pin of any header&lt;br /&gt;
''Note: with this setup, the voltage of the external power source (VBAT) obviously cannot be measured by the micro-controller (MCU).''&lt;br /&gt;
&lt;br /&gt;
=== USB Modes ===&lt;br /&gt;
&lt;br /&gt;
==== Flash (DFU) mode ====&lt;br /&gt;
&lt;br /&gt;
In this configuration, ''BOOT'' pin is connected to ''VBUS'' pin (#4 &amp;amp; #5 &amp;quot;USB&amp;quot; header).&amp;lt;br&amp;gt;&lt;br /&gt;
If USB cable is plugged and autopilot is not powered or USB cable plugged before autopilot is powered, board enter DFU mode and is ready to be flashed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v110_USB_mode_DFU.png|600px|Tawaki v1.10 USB DFU/Flash mode]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== USB Storage mode ====&lt;br /&gt;
&lt;br /&gt;
In this configuration, ''BOOT'' pin is connected to ''VBUS'' pin (#4 &amp;amp; #5 &amp;quot;USB&amp;quot; header).&amp;lt;br&amp;gt;&lt;br /&gt;
If USB cable is plugged after autopilot is powered, autopilot task is stopped and board enters in USB storage mode to make SDcard content easily available by host as for an USB Pendrive. When unmounted and unplugged, autopilot task restart.&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v110_USB_mode_storage.png|600px|Tawaki v1.10 USB Storage mode]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Full Speed USB mode ====&lt;br /&gt;
&lt;br /&gt;
=== General Pinout ===&lt;br /&gt;
&lt;br /&gt;
''Pins Name and Type are specified with respect to the Autopilot Board''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v110_general_pinout.png|1200px|Tawaki v1.10 general pinout (development board use)]]&lt;br /&gt;
&lt;br /&gt;
=== Schematic ===&lt;br /&gt;
&lt;br /&gt;
=== Mechanical ===&lt;br /&gt;
&lt;br /&gt;
==== Mechanical Dimensions ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v110_top_mechanical_dimensions.png|800px|Tawaki v1.10 top mechanical dimensions]]&lt;br /&gt;
&lt;br /&gt;
==== CAD Files / 3D Model ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_step_file_logo.PNG|150px|link=Tawaki_v100_CAD.zip]][[Media:Tawaki_v100_CAD.zip|''   Download Tawaki v1.00 CAD File (zipped STEP file)'']]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of Airborne Equipment Electrical Connections ==&lt;br /&gt;
&lt;br /&gt;
== Board production  ==&lt;br /&gt;
&lt;br /&gt;
=== Gerber &amp;amp; Drill for PCB ===&lt;br /&gt;
&lt;br /&gt;
=== Bill Of Material ===&lt;br /&gt;
&lt;br /&gt;
=== Components Layout ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_bottom_components_layout.png|200px|link=https://wiki.paparazziuav.org/w/images/3/31/Tawaki_v100_bottom_components_layout.png]][[Media:Tawaki_v100_bottom_components_layout.pdf|Bottom components layout (pdf)]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Tawaki_v100_top_components_layout.png|200px|link=https://wiki.paparazziuav.org/w/images/c/ca/Tawaki_v100_bottom_components_layout.png]][[Media:Tawaki_v100_top_components_layout.pdf|Top components layout (pdf)]]&lt;br /&gt;
&lt;br /&gt;
=== Pick-and-Place ===&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
=== Debugging with STM Discovery ST-LINK/V2 embedded debug tool ===&lt;br /&gt;
&lt;br /&gt;
=== Debugging with BlackMagic probe ===&lt;br /&gt;
&lt;br /&gt;
=== Debugging with [[CricketProbe/v1.00 | CricketProbe]] ===&lt;br /&gt;
&lt;br /&gt;
== Source code ==&lt;br /&gt;
Available in latest git master branch.&lt;br /&gt;
&lt;br /&gt;
== Where to Buy ==&lt;br /&gt;
Check availability on [[Get_Hardware|Get Hardware]] page&lt;br /&gt;
&lt;br /&gt;
[[Category:Autopilots]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Tawaki/v1.00&amp;diff=25265</id>
		<title>Tawaki/v1.00</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Tawaki/v1.00&amp;diff=25265"/>
		<updated>2021-01-19T14:28:25Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: Fix Tx/Rx role for RC2 pin.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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;Autopilots &amp;lt;/categorytree&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; width: 65%&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Tawaki_v100_top_hand.JPG|400px|Tawaki v1.00 top side]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Tawaki_v100_top_bottom_1E.JPG|400px|Tawaki v1.00 1€ size comparison]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Hardware Revision History ==&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;
!''Version #''!!''Release Date''!!''Release Notes''&lt;br /&gt;
|-&lt;br /&gt;
|v1.00||07/2019||Initial release of Tawaki&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Pictures ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Tawaki_v100_top_pers.JPG&lt;br /&gt;
Tawaki_v100_bottom_pers.JPG&lt;br /&gt;
Tawaki_v100_bottom_hand.JPG&lt;br /&gt;
Tawaki_v100_top_SD_beside.JPG&lt;br /&gt;
Tawaki_v100_top_x4.JPG&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
*STMicro [https://www.st.com/en/microcontrollers-microprocessors/stm32f777vi.html STM32F777VI] Micro Controller Unit&lt;br /&gt;
**ARM Cortex-M7, 216 MHz CPU, FPU &amp;amp; DSP instructions, 2 Mbytes Flash, 512 Kbytes SRAM, General-purpose DMA, HW Crypto,etc.&lt;br /&gt;
*On-board Sensors&lt;br /&gt;
**6 DOF Accelerometers &amp;amp; Gyrometers TDK-Invensense [https://www.invensense.com/products/motion-tracking/6-axis/icm-20600/ ICM-20600]&lt;br /&gt;
**3 DOF Magnetometer STMicro [https://www.st.com/en/microcontrollers-microprocessors/stm32f777vi.html LIS3MDL]&lt;br /&gt;
**Baro-Altimeter Bosch [https://www.bosch-sensortec.com/bst/products/all_products/bmp388 BMP388]&lt;br /&gt;
*8x Servos or ESC outputs (PWM/OneShot/DShot) + D-Shot Telemetry serial input&lt;br /&gt;
*2x RC Receiver Inputs (S.BUS, PPM &amp;amp; Spektrum Satellite compatible, including receiver binding)&lt;br /&gt;
*Communication Buses&lt;br /&gt;
**3x UARTs (including one with hardware flow control signals)&lt;br /&gt;
**1x I2C bus (3.3V and 5V logic level)&lt;br /&gt;
**1x SPI bus (with Slave Select, Master or Slave)&lt;br /&gt;
**1x CAN bus&lt;br /&gt;
**1x USB (Micro-B &amp;amp; remote) : DFU mode (download) or USB storage (direct access to MicroSD card) or FullSpeed Mode&lt;br /&gt;
*8x Auxiliary Inputs/Outputs spread over 2 connectors (8x ADC, 8x Timers different from servos, x1 UART, etc.)&lt;br /&gt;
*MicroSD card (+ dedicated power supply for emergency files closing system)&lt;br /&gt;
*Debug Connector (Serial Wire Debug)&lt;br /&gt;
*Power&lt;br /&gt;
**source 2 to 4 Lipo cells (6 to 17v)&lt;br /&gt;
**5V/4A (max total for Tawaki + Servos + Payload)&lt;br /&gt;
**3.3V/3A Low Noise (max total for payload)&lt;br /&gt;
**Controlled PowerSwitch 5V/2A supply on AUX A connector&lt;br /&gt;
*x4 Status Leds&lt;br /&gt;
*Connectors fully compatible with Apogee autopilot&lt;br /&gt;
*Mechanical&lt;br /&gt;
** 53 x 25mm (2.1&amp;quot; x 0.98&amp;quot;), including 4x &amp;amp;Phi;2mm mounting holes (shares the same external dimensions and mounting points as Apogee)&lt;br /&gt;
** 4x &amp;amp;Phi;3mm extra mounting slotted holes, 30 to 31mm spacing (30.5mm standard from Racers ESC, GPS modules, etc. )&lt;br /&gt;
** 11g (0.4 oz) (including Micro-SD card)&lt;br /&gt;
&lt;br /&gt;
=== Pinout ===&lt;br /&gt;
&lt;br /&gt;
==== Simplified Pinout Diagram (Paparazzi use) ====&lt;br /&gt;
''Pins Name and Type are specified with respect to the Autopilot Board''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_simplified_pinout.png|1200px|Tawaki v1.00 simplified pinout (Paparazzi use)]]&lt;br /&gt;
&lt;br /&gt;
==== Simplified Pinout Tables (Paparazzi use) ====&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Servos a1 / a2 / a3 / a4'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!width=&amp;quot;15%&amp;quot;|''MCU Resource''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:orange; color:black&amp;quot;|+5V||PWR||-||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:cyan; color:black&amp;quot;|SRVa1&amp;lt;br&amp;gt;SRVa2&amp;lt;br&amp;gt;SRVa3&amp;lt;br&amp;gt;SRVa4||OUT||PE9&amp;lt;br&amp;gt;PE11&amp;lt;br&amp;gt;PE13&amp;lt;br&amp;gt;PE14||Tim1.Ch1&amp;lt;br&amp;gt;Tim1.Ch2&amp;lt;br&amp;gt;Tim1.Ch3&amp;lt;br&amp;gt;Tim1.Ch4||Servo signal (PWM)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Servos b'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!width=&amp;quot;15%&amp;quot;|''MCU Resource''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:orangered; color:black&amp;quot;|VBAT||PWR&amp;lt;sub&amp;gt;IN/OUT&amp;lt;/sub&amp;gt;||-||-||Battery Rail (if solder bridge JP1 ON)&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:cyan; color:black&amp;quot;|SRVb1||OUT||PB6||Tim4.Ch1||Servo signal (PWM)&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:cyan; color:black&amp;quot;|SRVb2||OUT||PB7||Tim4.Ch2||Servo signal (PWM)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:cyan; color:black&amp;quot;|SRVb3||OUT||PB8||Tim4.Ch3||Servo signal (PWM)&lt;br /&gt;
|-&lt;br /&gt;
|6||style=&amp;quot;background:cyan; color:black&amp;quot;|SRVb4||OUT||PB9||Tim4.Ch4||Servo signal (PWM)&lt;br /&gt;
|-&lt;br /&gt;
|7||style=&amp;quot;background:green; color:black&amp;quot;|DSHTin||IN||PB5||UART5.Rx|| DShot Telemetry serial input&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''R/C'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!width=&amp;quot;15%&amp;quot;|''MCU Resource''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:black&amp;quot;|+3.3V||PWR||-||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:LightYellow; color:black&amp;quot;|RC1||IN||PE0||UART8.Rx||(5V Tolerant) Serial (SBUS, Spektrum, etc.)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:LightYellow; color:black&amp;quot;|RC2||IN||PC6||UART6.Tx (use software swap to use it as Rx)&amp;lt;br&amp;gt;Tim3.Ch1&amp;lt;br&amp;gt;Tim8.Ch1||(5V Tolerant) Serial (SBUS, Spektrum, etc.) or PPM Stream RC receiver signal&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UART2'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:green; color:white&amp;quot;|RX2||IN||PD6||UART2 Serial Input (3.3V level)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:blue; color:white&amp;quot;|TX2||OUT||PD5||UART2 Serial Output (3.3V level)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UART3'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:green; color:white&amp;quot;|RX2||IN||PD9||UART3 Serial Input (3.3V level)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:blue; color:white&amp;quot;|TX2||OUT||PD8||UART3 Serial Output (3.3V level)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UART7'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:green; color:white&amp;quot;|RX2||IN||PB3||UART7 Serial Input (3.3V level)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:blue; color:white&amp;quot;|TX2||OUT||PA15||UART7 Serial Output (3.3V level)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''I2C2 (3V3)'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:sienna; color:white&amp;quot;|SDA2&amp;lt;sub&amp;gt; 3.3V&amp;lt;/sub&amp;gt;||Open Drain I/O||PB11||I2C2 bus Serial DAta ('''3.3V level''', 2.2k&amp;amp;Omega; pull-up)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:blue; color:white&amp;quot;|SCL2&amp;lt;sub&amp;gt; 3.3V&amp;lt;/sub&amp;gt;||Open Drain I/O||PB10||I2C12 bus Serial CLock ('''3.3V level''', 2.2k&amp;amp;Omega; pull-up)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''I2C2 (5V)'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:sienna; color:white&amp;quot;|SDA2&amp;lt;sub&amp;gt; 5V&amp;lt;/sub&amp;gt;||Open Drain I/O||PB11||I2C2 bus Serial DAta ('''5V level''', 2.2k&amp;amp;Omega; pull-up)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:blue; color:white&amp;quot;|SCL2&amp;lt;sub&amp;gt; 5V&amp;lt;/sub&amp;gt;||Open Drain I/O||PB10||I2C12 bus Serial CLock ('''5V level''', 2.2k&amp;amp;Omega; pull-up)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''SPI2'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:sienna; color:white&amp;quot;|NSS2||OUT||PB12||Slave Select. Selects the SPI slave&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:Grey; color:white&amp;quot;|MOSI2||I/O||PB15||SPI2 Master Out Slave In. Data output from master / data input to slave&lt;br /&gt;
|-&lt;br /&gt;
|6||style=&amp;quot;background:Green; color:white&amp;quot;|MISO2||I/O||PB14||SPI2 Master In Slave Out. Data input to master / data output from slave&lt;br /&gt;
|-&lt;br /&gt;
|7||style=&amp;quot;background:Yellow; color:black&amp;quot;|SCK2||I/O||PD3||SPI2 Serial clock. Clock output from master or input to slave&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''CAN'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:Green; color:white&amp;quot;|CANL||I/O||-||CAN bidirectional - line&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Yellow; color:black&amp;quot;|CANH||I/O||-||CAN bidirectional + line&lt;br /&gt;
|}&lt;br /&gt;
''Note: Embedded 120&amp;amp;Omega; terminator resistor.''&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AUX a'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!width=&amp;quot;15%&amp;quot;|''MCU Resource''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V Aux||PWR||(Controlled by) PC13||-||5V from autopilot through Power Switch&amp;lt;br&amp;gt;(PC13 = Low =&amp;gt; OFF / PC13 = High =&amp;gt; ON)&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:white&amp;quot;|+3.3V||PWR||-||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXa1||I/O||PA0||ADC1+2+3.In0&amp;lt;br&amp;gt;Tim2.Ch1&amp;lt;br&amp;gt;Tim5.Ch1&amp;lt;br&amp;gt;UART4.Tx&amp;lt;br&amp;gt;UART2.CTS||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXa2||I/O||PA1||ADC1+2+3.In1&amp;lt;br&amp;gt;Tim2.Ch2&amp;lt;br&amp;gt;Tim5.Ch2&amp;lt;br&amp;gt;UART4.Rx&amp;lt;br&amp;gt;UART2.RTS||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|6||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXa3||I/O||PA2||ADC1+2+3.In2&amp;lt;br&amp;gt;Tim2.Ch3&amp;lt;br&amp;gt;Tim5.Ch3&amp;lt;br&amp;gt;Tim9.Ch1&amp;lt;br&amp;gt;||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|7||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXa4||I/O||PA6||ADC1+2.In6&amp;lt;br&amp;gt;Tim3.Ch1&amp;lt;br&amp;gt;Tim13.Ch1||General Purpose I/O&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AUX b'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!width=&amp;quot;15%&amp;quot;|''MCU Resource''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:Orange; color:black&amp;quot;|+5V||PWR||-||-||5V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:Red; color:white&amp;quot;|+3.3V||PWR||-||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXb1||I/O||PA3||ADC1+2+3.In3&amp;lt;br&amp;gt;Tim2.Ch4&amp;lt;br&amp;gt;Tim5.Ch4&amp;lt;br&amp;gt;Tim9.Ch2||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXb2||I/O||PA7||ADC1+2+3.In7&amp;lt;br&amp;gt;Tim3.Ch2&amp;lt;br&amp;gt;Tim14.Ch1||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|6||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXb3||I/O||PB0||ADC1+2.In8&amp;lt;br&amp;gt;Tim3.Ch3||General Purpose I/O&lt;br /&gt;
|-&lt;br /&gt;
|7||style=&amp;quot;background:#EFEFEF; color:black&amp;quot;|AUXb4||I/O||PB1||ADC1+2.In9&amp;lt;br&amp;gt;Tim3.Ch4||General Purpose I/O&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''USB'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:green; color:white&amp;quot;|USB+||I/O||PA12||USB bidirectional D+ line&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:white; color:black&amp;quot;|USB-||I/O||PA11||USB bidirectional D- line&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:orange; color:black&amp;quot;|VBUS||IN||PA9||USB bus power (5V)&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:#E0FFFF; color:black&amp;quot;|BOOT||IN||BOOT0||DFU or USB Mode selection (BOOT0 MCU pin)&lt;br /&gt;
|}&lt;br /&gt;
''Note: USB Micro-B and Molex Picoblade connectors are in parallel, only one should be connected at a time.''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SWD'''&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;2%&amp;quot; width=&amp;quot;50%&amp;quot;&lt;br /&gt;
!width=&amp;quot;3%&amp;quot;|''Pin #''!!width=&amp;quot;8%&amp;quot;|''Name''!!width=&amp;quot;10%&amp;quot;|''Type''!!width=&amp;quot;10%&amp;quot;|''MCU Port''!!''Description''&lt;br /&gt;
|-&lt;br /&gt;
|1||style=&amp;quot;background:black; color:white&amp;quot;|GND||PWR||-||common ground&lt;br /&gt;
|-&lt;br /&gt;
|2||style=&amp;quot;background:red; color:black&amp;quot;|+3.3V||PWR||-||3.3V Rail from autopilot&lt;br /&gt;
|-&lt;br /&gt;
|3||style=&amp;quot;background:white; color:black&amp;quot;|nRST||IN||NRST||MCU Reset (active low)&lt;br /&gt;
|-&lt;br /&gt;
|4||style=&amp;quot;background:blue; color:white&amp;quot;|SWCLK||IN||PA14||Serial Wire Clock&lt;br /&gt;
|-&lt;br /&gt;
|5||style=&amp;quot;background:sienna; color:white&amp;quot;|SWDIO||I/O||PA13||Serial Wire Data Input/Output&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Detailed Features ==&lt;br /&gt;
&lt;br /&gt;
=== Power Supply ===&lt;br /&gt;
There are several ways to power the Tawaki board. '''CAUTION!''' use only one of these sources at a time:&lt;br /&gt;
*with a battery or any power source that delivers between 6 and 17V &lt;br /&gt;
*by connecting it to a USB port&lt;br /&gt;
*with a power source that delivers a regulated, stable 5V&lt;br /&gt;
Each of these methods is detailed below.&lt;br /&gt;
&lt;br /&gt;
==== Powering using battery/external source soldered onto battery pads ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_battery_pads_powering.png|600px|Tawaki v1.00 External source onto GND &amp;amp; VBAT pads]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This is the basic setup: the Tawaki then generates all the internal power sources needed by its components. Additionally, the board provides +5V and +3.3V power sources through dedicated ports for external payload.&amp;lt;br&amp;gt;&lt;br /&gt;
Limitations:&lt;br /&gt;
*input power source range: 6-17V (2-4 Lipo cells)&lt;br /&gt;
*maximum current usable by both Tawaki and payload on the +5V: I(5V)&amp;lt;4A&lt;br /&gt;
*maximum current usable for payload on the +3.3V: I(3.3V)&amp;lt;3A&lt;br /&gt;
*maximum total current usable: 4A&lt;br /&gt;
[[Image:Tawaki_v100_servo_b_vbat_source.png|400px|Tawaki v1.00 Servos b header Vbat source for payload]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With this setup, the external power source is available on the “VBAT” pin of the “Servos B” header - but only if solder bridge JP1 is jumped (turned ON) with a small blob of solder.&amp;lt;br&amp;gt;&lt;br /&gt;
Limitation:&lt;br /&gt;
*maximum current used on the “VBAT” pin must be less than 1A (because of the header’s specifications)&lt;br /&gt;
&lt;br /&gt;
==== Powering using battery/external source connected on &amp;quot;Servos B&amp;quot; header ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_servo_b_header_powering.png|500px|Tawaki v1.00 External source on Servo b header]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With this setup, the “GND”(-) and “VBAT”(+) pins of the “Servos B” header are used as the main entry ports for the external power source - but only if solder bridge JP1 is jumped (turned ON) with a small blob of solder. This can be interesting when the ESC already delivers the external power source voltage through its command and control signals (as is frequently the case on multi-rotors).&amp;lt;br&amp;gt;&lt;br /&gt;
Limitations: &amp;lt;br&amp;gt;&lt;br /&gt;
*input power source range: 6-17V (2-4 Lipo cells)&lt;br /&gt;
*maximum total current usable: 1A (because of the header’s specifications)&lt;br /&gt;
&lt;br /&gt;
==== Powering using USB Micro-B only ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_Micro-B_USB_powering.png|1000px|Tawaki v1.00 USB Micro-B powering]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible to power the Tawaki with only a host computer, through the USB Micro-B port. This setup allows to power the board and all its components, while at the same time flashing it.&amp;lt;br&amp;gt;&lt;br /&gt;
In this case, the &amp;quot;VBUS&amp;quot; pin of the &amp;quot;USB&amp;quot; header must be connected to the &amp;quot;+5V&amp;quot; pin of any header that is equipped with one - with the exception of the &amp;quot;5Vaux&amp;quot; pin of the &amp;quot;AUX a&amp;quot; header.&amp;lt;br&amp;gt;&lt;br /&gt;
Limitation:&amp;lt;br&amp;gt;&lt;br /&gt;
*the host computer must be capable of providing the current needed for: powering the board, and any potential external payload. With a maximum limit of 1A (because of the header’s specifications)&amp;lt;br&amp;gt;&lt;br /&gt;
''Note: with this setup, the voltage of the external power source (VBAT) obviously cannot be measured by the micro-controller (MCU).''&lt;br /&gt;
&lt;br /&gt;
==== Powering using external 5V source ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_external_5V_powering.png|800px|Tawaki v1.00 External 5V Source]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In some cases the external power source is out of range and cannot be used, but an external 5V power source is available (for example provided by the ESC). In this case, the external 5V power source must be connected to the &amp;quot;+5V&amp;quot; and &amp;quot;GND&amp;quot; pins of any header that are equipped with them - with the exception of the &amp;quot;5Vaux&amp;quot; pin of the &amp;quot;AUX a&amp;quot; header.&amp;lt;br&amp;gt;&lt;br /&gt;
Limitations:&amp;lt;br&amp;gt;&lt;br /&gt;
*voltage range: 4-6V&lt;br /&gt;
*the external 5V power source must be capable of providing the current needed for: powering the board, and any potential external payload. With a maximum limit of 1A (because of the headers' specifications)&lt;br /&gt;
* the &amp;quot;VBUS&amp;quot; pin of the &amp;quot;USB&amp;quot; header must not be connected to the &amp;quot;+5V&amp;quot; pin of any header&lt;br /&gt;
''Note: with this setup, the voltage of the external power source (VBAT) obviously cannot be measured by the micro-controller (MCU).''&lt;br /&gt;
&lt;br /&gt;
=== USB Modes ===&lt;br /&gt;
&lt;br /&gt;
==== Flash (DFU) mode ====&lt;br /&gt;
&lt;br /&gt;
In this configuration, ''BOOT'' pin is connected to ''VBUS'' pin (#4 &amp;amp; #5 &amp;quot;USB&amp;quot; header).&amp;lt;br&amp;gt;&lt;br /&gt;
If USB cable is plugged and autopilot is not powered or USB cable plugged before autopilot is powered, board enter DFU mode and is ready to be flashed.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_USB_mode_DFU.png|600px|Tawaki v1.00 USB DFU/Flash mode]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== USB Storage mode ====&lt;br /&gt;
&lt;br /&gt;
In this configuration, ''BOOT'' pin is connected to ''VBUS'' pin (#4 &amp;amp; #5 &amp;quot;USB&amp;quot; header).&amp;lt;br&amp;gt;&lt;br /&gt;
If USB cable is plugged after autopilot is powered, autopilot task is stopped and board enters in USB storage mode to make SDcard content easily available by host as for an USB Pendrive. When unmounted and unplugged, autopilot task restart.&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_USB_mode_storage.png|600px|Tawaki v1.00 USB Storage mode]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Full Speed USB mode ====&lt;br /&gt;
&lt;br /&gt;
=== General Pinout ===&lt;br /&gt;
&lt;br /&gt;
''Pins Name and Type are specified with respect to the Autopilot Board''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_general_pinout.png|1200px|Tawaki v1.00 general pinout (development board use)]]&lt;br /&gt;
&lt;br /&gt;
=== Schematic ===&lt;br /&gt;
&lt;br /&gt;
=== Mechanical ===&lt;br /&gt;
&lt;br /&gt;
==== Mechanical Dimensions ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_top_mechanical_dimensions.png|800px|Tawaki v1.00 top mechanical dimensions]]&lt;br /&gt;
&lt;br /&gt;
==== CAD Files / 3D Model ====&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_step_file_logo.PNG|150px|link=Tawaki_v100_CAD.zip]][[Media:Tawaki_v100_CAD.zip|''   Download Tawaki v1.00 CAD File (zipped STEP file)'']]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of Airborne Equipment Electrical Connections ==&lt;br /&gt;
&lt;br /&gt;
== Board production  ==&lt;br /&gt;
&lt;br /&gt;
=== Gerber &amp;amp; Drill for PCB ===&lt;br /&gt;
&lt;br /&gt;
=== Bill Of Material ===&lt;br /&gt;
&lt;br /&gt;
=== Components Layout ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Tawaki_v100_bottom_components_layout.png|200px|link=https://wiki.paparazziuav.org/w/images/3/31/Tawaki_v100_bottom_components_layout.png]][[Media:Tawaki_v100_bottom_components_layout.pdf|Bottom components layout (pdf)]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Tawaki_v100_top_components_layout.png|200px|link=https://wiki.paparazziuav.org/w/images/c/ca/Tawaki_v100_bottom_components_layout.png]][[Media:Tawaki_v100_top_components_layout.pdf|Top components layout (pdf)]]&lt;br /&gt;
&lt;br /&gt;
=== Pick-and-Place ===&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
=== Debugging with STM Discovery ST-LINK/V2 embedded debug tool ===&lt;br /&gt;
&lt;br /&gt;
=== Debugging with BlackMagic probe ===&lt;br /&gt;
&lt;br /&gt;
=== Debugging with [[CricketProbe/v1.00 | CricketProbe]] ===&lt;br /&gt;
&lt;br /&gt;
== Source code ==&lt;br /&gt;
Available in latest git master branch.&lt;br /&gt;
&lt;br /&gt;
== Where to Buy ==&lt;br /&gt;
Check availability on [[Get_Hardware|Get Hardware]] page&lt;br /&gt;
&lt;br /&gt;
[[Category:Autopilots]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=25135</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=25135"/>
		<updated>2020-09-21T15:52:21Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: Update Ubuntu 20.04 one-liner, and adds dfu-util in both one-liners.&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]. After Microsoft introduced Ubuntu on Windows, now it is possible to run Paparazzi on [https://en.wikipedia.org/wiki/Windows_10 Windows 10]. There is also another work being done to port Paparazzi to Windows with a different approach to work on all versions of 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 16.04 or Ubuntu 18.04''', make sure you have a working internet connection and the '''universe''' packages activated in 'Software &amp;amp; Updates', then just copy and paste the text below into your terminal and press [enter] ... and wait a while...&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;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; sudo apt-get -f -y install paparazzi-dev paparazzi-jsbsim gcc-arm-embedded dfu-util &amp;amp;&amp;amp; cd ~ &amp;amp;&amp;amp; git clone --origin upstream https://github.com/paparazzi/paparazzi.git &amp;amp;&amp;amp; cd ~/paparazzi &amp;amp;&amp;amp; git remote update -p &amp;amp;&amp;amp; git checkout -b v5.16 upstream/v5.16 &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; make &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu 20.04:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo add-apt-repository -y ppa:paparazzi-uav/ppa &amp;amp;&amp;amp; sudo apt-get update &amp;amp;&amp;amp; sudo apt-get -f -y install paparazzi-dev paparazzi-jsbsim python-is-python3 gcc-arm-none-eabi gdb-multiarch dfu-util &amp;amp;&amp;amp; cd ~ &amp;amp;&amp;amp; git clone --origin upstream https://github.com/paparazzi/paparazzi.git &amp;amp;&amp;amp; cd ~/paparazzi &amp;amp;&amp;amp; git remote update -p &amp;amp;&amp;amp; git checkout -b v5.16 upstream/v5.16 &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; make &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&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.16&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;
In case you obtain an error indicating that your environmental variables are not set up correctly (for example 'ocamlfind: Package `pprz.xlib' not found') it should be noted that some shells or versions of make can not handle the '~/paparazzi' path. Try setting it to '/home/username/paparazzi' instead. &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>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=24463</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=24463"/>
		<updated>2020-05-16T13:50:18Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: Add warning about gcc-arm-embedded&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]. After Microsoft introduced Ubuntu on Windows, now it is possible to run Paparazzi on [https://en.wikipedia.org/wiki/Windows_10 Windows 10]. There is also another work being done to port Paparazzi to Windows with a different approach to work on all versions of 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 16.04 or higher OS''', make sure you have a working internet connection and the '''universe''' packages activated in 'Software &amp;amp; Updates', then just copy and paste the text below into your terminal and press [enter] ... and wait a while...&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;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; sudo apt-get -f -y install paparazzi-dev paparazzi-jsbsim gcc-arm-embedded &amp;amp;&amp;amp; cd ~ &amp;amp;&amp;amp; git clone --origin upstream https://github.com/paparazzi/paparazzi.git &amp;amp;&amp;amp; cd ~/paparazzi &amp;amp;&amp;amp; git remote update -p &amp;amp;&amp;amp; git checkout -b v5.16 upstream/v5.16 &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; make &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu 20.04 specifics:'''&lt;br /&gt;
&lt;br /&gt;
You also have to install either ''python-is-python2'' or ''python-is-python3''.&lt;br /&gt;
For example:&lt;br /&gt;
 sudo apt-get install python-is-python3&lt;br /&gt;
&lt;br /&gt;
The gcc-arm-embedded ppa does not yet provide support for ubuntu 20.04, so you should install it manually. Download it from this address : https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads.&lt;br /&gt;
You should '''absolutely not''' use the one provided in the ubuntu ppa, as its not working properly!&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.16&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;
In case you obtain an error indicating that your environmental variables are not set up correctly (for example 'ocamlfind: Package `pprz.xlib' not found') it should be noted that some shells or versions of make can not handle the '~/paparazzi' path. Try setting it to '/home/username/paparazzi' instead. &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>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=24462</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=24462"/>
		<updated>2020-05-16T13:41:55Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: &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]. After Microsoft introduced Ubuntu on Windows, now it is possible to run Paparazzi on [https://en.wikipedia.org/wiki/Windows_10 Windows 10]. There is also another work being done to port Paparazzi to Windows with a different approach to work on all versions of 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 16.04 or higher OS''', make sure you have a working internet connection and the '''universe''' packages activated in 'Software &amp;amp; Updates', then just copy and paste the text below into your terminal and press [enter] ... and wait a while...&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;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; sudo apt-get -f -y install paparazzi-dev paparazzi-jsbsim gcc-arm-embedded &amp;amp;&amp;amp; cd ~ &amp;amp;&amp;amp; git clone --origin upstream https://github.com/paparazzi/paparazzi.git &amp;amp;&amp;amp; cd ~/paparazzi &amp;amp;&amp;amp; git remote update -p &amp;amp;&amp;amp; git checkout -b v5.16 upstream/v5.16 &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; make &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For Ubuntu 20.04, you also have to install either ''python-is-python2'' or ''python-is-python3''.&lt;br /&gt;
For example:&lt;br /&gt;
 sudo apt-get install python-is-python3&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.16&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;
In case you obtain an error indicating that your environmental variables are not set up correctly (for example 'ocamlfind: Package `pprz.xlib' not found') it should be noted that some shells or versions of make can not handle the '~/paparazzi' path. Try setting it to '/home/username/paparazzi' instead. &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>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=24121</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=24121"/>
		<updated>2018-11-12T10:42:38Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: Remove bad one liner for ubuntu 18.04 : wrong arm gcc packages&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 a working internet connection, then just copy and paste the text below into your terminal and press [enter] ... and wait a while...&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;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; git clone --origin upstream https://github.com/paparazzi/paparazzi.git &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.12 upstream/v5.12 &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 &amp;amp;&amp;amp; ./paparazzi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&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.12&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>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24088</id>
		<title>Autopilot generation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24088"/>
		<updated>2018-05-15T12:18:38Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: correct typo&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;
This page presents the idea and configuration of a custom autopilot formal description, included to the [[Airframe_Configuration|airframe file]] and leading to code generation.&lt;br /&gt;
&lt;br /&gt;
== General Concepts ==&lt;br /&gt;
&lt;br /&gt;
The core part of an autopilot consists in a finite state machine, where each state corresponds to a '''mode''' and the transitions are the conditions to change between modes (based on user request or triggered by event).&lt;br /&gt;
The firmwares of Paparazzi (fixedwing, rotorcraft) have list of built-in modes (ex: [[Rotorcraft_Configuration#Mode]]) and it is not so easy to add or remove one to the list, usually restricted to core developers.&lt;br /&gt;
In addition, for each mode a certain control stack will be called, and even if it is possible to choose the actual control loops being used, possibilities are limited and it is not possible to run several one in parallel (especially useful when developing new control schemes).&lt;br /&gt;
&lt;br /&gt;
With this in mind, a formal description of the autopilot, for both the state machine (mode list, transitions between modes) and control stack have been developed in integrated to Paparazzi. The description is done in a XML file, and when adding the autopilot to the airframe file, C code will be automatically generated and integrated to the airborne code in place of the static autopilot used by default in your firmware.&lt;br /&gt;
&lt;br /&gt;
== State Machine example ==&lt;br /&gt;
&lt;br /&gt;
Here is an example of basic autopilot modes represented as a state machine:&lt;br /&gt;
&lt;br /&gt;
[[File:Full_mode_example.png|center]]&lt;br /&gt;
&lt;br /&gt;
This AP has 4 modes, 2 normal ones (MANUAL and NAV) and 2 safety modes (HOME, FAILSAFE). The modes are controlled from a switch on the remote control (RC1, RC2) and several events (NO_GPS, NO_RC, TOO_FAR) can lead to bring the aircraft back to HOME or start a FAILSAFE procedure. Even this simple example has a lot of transitions and it would have been difficult to describe all of them for complex autopilots.&lt;br /&gt;
&lt;br /&gt;
In order to make things a bit easier, for each mode, the selection conditions and exit (exception) conditions are described, which allows to group implicitly most of the transitions:&lt;br /&gt;
&lt;br /&gt;
[[File:Pprz_mode_example.png|center]]&lt;br /&gt;
&lt;br /&gt;
Now, the 11 transitions are replaced by 2 '''select''' conditions, 3 local and 1 global '''exception''' conditions.&lt;br /&gt;
&lt;br /&gt;
== XML file description ==&lt;br /&gt;
&lt;br /&gt;
Some autopilot description file are already available for the [https://github.com/paparazzi/paparazzi/blob/master/conf/autopilot/fixedwing_autopilot.xml fixed wing firmware] or (a part of the) [https://github.com/paparazzi/paparazzi/blob/master/conf/autopilot/rotorcraft_autopilot.xml rotorcraft firmware]. They must be located in the '''conf/autopilots''' folder of your Paparazzi project.&lt;br /&gt;
&lt;br /&gt;
* autopilot: main node containing several state machine&lt;br /&gt;
** name: the autopilot name&lt;br /&gt;
* state_machine: at least one is needed (the core of the autopilot, '''ap''' for fixedwing, '''main''' for rotorcraft, but other ones can be added to describe sub-modes for instance)&lt;br /&gt;
** name: the name of the state machine&lt;br /&gt;
** freq: calling frequency (flags, like CONTROL_FREQUENCY can be used to automatically adapt to the firmware configuration)&lt;br /&gt;
** gcs_mode: true or false if modes should be used in the GCS strip (only one can be set to true)&lt;br /&gt;
** settings_mode: true or false if modes should appear as settings in the GCS dedicated pane&lt;br /&gt;
** settings_handler: function handler for settings if needed&lt;br /&gt;
* modules: aircraft [[modules]] can be loaded directly from the autopilot when it requires specific configuration or control blocks&lt;br /&gt;
* includes: some header files can be included by hand, on the long term it should be replaced by modules import&lt;br /&gt;
* settings: GCS [[settings]] can be described directly from the autopilot&lt;br /&gt;
* control_block: when a control stack is called in several modes (for instance the attitude stabilization) a meta block can be described for a cleaner description&lt;br /&gt;
* exceptions: global exceptions that should be applied to all modes&lt;br /&gt;
* mode: describe each mode (transition and control stack)&lt;br /&gt;
** name: mode name&lt;br /&gt;
** shortname: short name&lt;br /&gt;
** gcs_name: name for GCS strip display&lt;br /&gt;
&lt;br /&gt;
=== Mode description ===&lt;br /&gt;
&lt;br /&gt;
Each mode should describe the transitions' conditions ('''select''' and '''exceptions''') and the control stack.&lt;br /&gt;
&lt;br /&gt;
* select&lt;br /&gt;
** cond: on which condition this mode should be selected&lt;br /&gt;
** exeption (optional): don't apply the condition if currently in a given mode&lt;br /&gt;
** the condition '''$DEFAULT_MODE''' can be used to select the startup mode (only one allowed) if not the first one&lt;br /&gt;
* on_enter: a list of functions to call when entering the mode&lt;br /&gt;
** call&lt;br /&gt;
*** fun: function (or a piece of C code to call)&lt;br /&gt;
*** cond (optional): a condition to call the function&lt;br /&gt;
* control: a list of '''call''' and '''call_block''' to be called at each control loop&lt;br /&gt;
** freq (optional): the frequency of this part of the control stack (max freq if not specified)&lt;br /&gt;
* exception: a list of exit conditions for this mode&lt;br /&gt;
** cond: the exit condition&lt;br /&gt;
** deroute: the mode to reach if exception is met ('''$LAST_MODE''' keyword can be used to go back to the previous mode)&lt;br /&gt;
* on_exit: a list of functions to call when exiting the mode&lt;br /&gt;
** call&lt;br /&gt;
*** fun: function (or a piece of C code to call)&lt;br /&gt;
*** cond (optional): a condition to call the function&lt;br /&gt;
&lt;br /&gt;
=== Control blocks ===&lt;br /&gt;
&lt;br /&gt;
Control blocks are a collection of functions to call that can be reused in several modes with the tag '''call_block'''.&lt;br /&gt;
&lt;br /&gt;
* control_blocks&lt;br /&gt;
** name: the name of the control block&lt;br /&gt;
** call&lt;br /&gt;
*** fun: function (or a piece of C code to call)&lt;br /&gt;
*** cond (optional): a condition to call the function&lt;br /&gt;
&lt;br /&gt;
=== Basic example ===&lt;br /&gt;
&lt;br /&gt;
This is an example of implementation of the above basic autopilot (not actually working with Paparazzi)&lt;br /&gt;
{{Box Code|conf/autopilots/my_ap.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;autopilot name=&amp;quot;My basic AP&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;state_machine name=&amp;quot;ap&amp;quot; freq=&amp;quot;CONTROL_FREQUENCY&amp;quot; gcs_mode=&amp;quot;true&amp;quot; settings_mode=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;includes&amp;gt;&lt;br /&gt;
       &amp;lt;include name=&amp;quot;some_header.h&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;include name=&amp;quot;nav.h&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;include name=&amp;quot;guidance/guidance.h&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;include name=&amp;quot;stabilization/stabilization_attitude.h&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;include name=&amp;quot;subsystems/gps.h&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;include name=&amp;quot;autopilot_rc_helpers.h&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/includes&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;control_block name=&amp;quot;attitude&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;call fun=&amp;quot;attitude_loop()&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;call fun=&amp;quot;set_actuators()&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/control&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;exceptions&amp;gt;&lt;br /&gt;
       &amp;lt;exception cond=&amp;quot;TOO_FAR()&amp;quot; deroute=&amp;quot;HOME&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/exceptions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;mode name=&amp;quot;MANUAL&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;select cond=&amp;quot;RC1()&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;control&amp;gt;&lt;br /&gt;
         &amp;lt;call fun=&amp;quot;set_actuators_from_RC()&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/control&amp;gt;&lt;br /&gt;
       &amp;lt;exception cond=&amp;quot;NO_RC()&amp;quot; deroute=&amp;quot;HOME&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/mode&amp;gt;&lt;br /&gt;
     &amp;lt;mode name=&amp;quot;NAV&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;select cond=&amp;quot;$DEFAULT_MODE&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;select cond=&amp;quot;RC2() &amp;amp;&amp;amp; GPS()&amp;quot; exception=&amp;quot;HOME&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;control freq=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;call fun=&amp;quot;navigation_loop()&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/control&amp;gt;&lt;br /&gt;
       &amp;lt;control&amp;gt;&lt;br /&gt;
         &amp;lt;call fun=&amp;quot;guidance_loop()&amp;quot;/&amp;gt;&lt;br /&gt;
         &amp;lt;call_block name=&amp;quot;attitude&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/control&amp;gt;&lt;br /&gt;
       &amp;lt;exception cond=&amp;quot;NO_GPS()&amp;quot; deroute=&amp;quot;FAILSAFE&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/mode&amp;gt;&lt;br /&gt;
     &amp;lt;mode name=&amp;quot;HOME&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;control freq=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;call fun=&amp;quot;nav_home()&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/control&amp;gt;&lt;br /&gt;
       &amp;lt;control&amp;gt;&lt;br /&gt;
         &amp;lt;call fun=&amp;quot;guidance_loop()&amp;quot;/&amp;gt;&lt;br /&gt;
         &amp;lt;call_block name=&amp;quot;attitude&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/control&amp;gt;&lt;br /&gt;
       &amp;lt;exception cond=&amp;quot;NO_GPS()&amp;quot; deroute=&amp;quot;FAILSAFE&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/mode&amp;gt;&lt;br /&gt;
     &amp;lt;mode name=&amp;quot;FAILSAFE&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;control&amp;gt;&lt;br /&gt;
         &amp;lt;call fun=&amp;quot;failsafe_landing()&amp;quot;/&amp;gt;&lt;br /&gt;
         &amp;lt;call_block name=&amp;quot;attitude&amp;quot;/&amp;gt;&lt;br /&gt;
       &amp;lt;/control&amp;gt;&lt;br /&gt;
       &amp;lt;exception cond=&amp;quot;GPS()&amp;quot; deroute=&amp;quot;$LAST_MODE&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/mode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;/state_machine&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/autopilot&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Airframe file configuration ==&lt;br /&gt;
&lt;br /&gt;
In order to use your generated autopilot, just add the following line to the firmware section of your airframe file:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;autopilot name=&amp;quot;your_ap_name.xml&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should be enough to generate the code and switch to the generated code handling in the airborne code.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
This new features is still in development. It means that it has some limitations and should be used with care.&lt;br /&gt;
&lt;br /&gt;
# The state machine graph is not tested to check for possible errors, loops, oscillation between modes, ... The user should test properly all the modes and transition on the ground and in simulation before a real flight with a newly designed autopilot&lt;br /&gt;
# Some mode names are explicitly called in the airborne code (especially for the fixedwing firmware). It is then recommended to keep the existing modes making problems (MANUAL, AUTO1, AUTO2, ...) and add new ones if needed.&lt;br /&gt;
# The current control loops are all implementing the same &amp;quot;API&amp;quot;, which makes it easy to replace one by an other in the initial design, but is problematic if they should be used in parallel (like a primary controller and a backup one) in the new design. Future improvements or new control loops design should take care to avoid reusing the same variables (each code should have its own &amp;quot;namespace&amp;quot;) and the autopilot description should make the like between each control stack appropriately.&lt;br /&gt;
# The selection of a mode follows this procedure (with only one pass, description order does matter):&lt;br /&gt;
## evaluate the &amp;quot;select&amp;quot; conditions for all modes (until one is valid, or stay in current mode)&lt;br /&gt;
## evaluate the &amp;quot;exception&amp;quot; conditions for the selected mode (until one is valid, or stay in current mode)&lt;br /&gt;
## evaluate the global &amp;quot;exceptions&amp;quot; for the selected mode (until one is valid, or stay in current mode)&lt;br /&gt;
# Probably a lot more... but so many new possibilities !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:User_Documentation]] [[Category:Airframe_Configuration]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Module/guidance_vector_field&amp;diff=23982</id>
		<title>Module/guidance vector field</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Module/guidance_vector_field&amp;diff=23982"/>
		<updated>2017-12-11T15:35:08Z</updated>

		<summary type="html">&lt;p&gt;Fabien-B: Adds PAPARAZZI_HOME environment variable setting at the beginning of the  &amp;quot;Using the GVF in the flight plan&amp;quot; paragrapher.&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;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
We have written an algorithm for solving the problem of tracking smooth curves by an unmanned aerial vehicle travelling with a constant airspeed and under a wind disturbance. The algorithm is based on the idea of following a guiding vector field which is constructed from the implicit function that describes the desired (possibly time-varying) trajectory. &lt;br /&gt;
&lt;br /&gt;
For fixed-wings the output of the algorithm can be directly expressed in terms of the bank angle of the UAV in order to achieve coordinated turns. Furthermore, the algorithm can be tuned offline such that physical constraints of the UAV, e.g., the maximum bank angle, will not be violated in a neighborhood of the desired trajectory.&lt;br /&gt;
&lt;br /&gt;
The implementation for rotorcraft is still in the TO DO list.&lt;br /&gt;
&lt;br /&gt;
This work is based on the paper [https://arxiv.org/abs/1610.02797 Guidance algorithm for smooth trajectory tracking of a fixed wing UAV flying in wind flows], presented at ICRA 2017. A more rigorous and detailed analysis can be found in the paper [https://www.researchgate.net/publication/309191959_A_guiding_vector_field_algorithm_for_path_following_control_of_nonholonomic_mobile_robots A guiding vector field algorithm for path following control of nonholonomic mobile robots].&lt;br /&gt;
&lt;br /&gt;
We can further exploit the convergence properties of the fixed-wing aircraft to the desired trajectory for controlling formations of several aircraft. Check the subsection python Apps. A detailed analysis can be found in the paper [https://www.researchgate.net/publication/315514301_Circular_formation_control_of_fixed-wing_UAVs_with_constant_speeds Circular formation control of fixed-wing UAVs with constant speeds] (submitted to IROS 2017). A video about how the circular formation algorithm works https://www.youtube.com/watch?v=q4b8JRU1Gbw .&lt;br /&gt;
&lt;br /&gt;
Here we show an animation of an airplane following an ellipse and a sinudoidal track.&lt;br /&gt;
[[File:gvfGif.gif|center]]&lt;br /&gt;
&lt;br /&gt;
== How does the algorithm work? ==&lt;br /&gt;
We start from the implicit equation of the trajectory, for example for a circumference we have that &amp;lt;math&amp;gt;\varphi(x,y) = x^2 + y^2 - R^2&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;x, y&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; are the x, y coordinates with respect to HOME (&amp;lt;math&amp;gt;O&amp;lt;/math&amp;gt; in the following figure) and R is the radius of the circumference. Note that when the vehicle is over the desired trajectory, then &amp;lt;math&amp;gt;\varphi(x,y) = 0&amp;lt;/math&amp;gt;, otherwise it will be different from zero. We will use this concept of &amp;quot;level set&amp;quot; to define the notion of distance to the trajectory, namely &amp;lt;math&amp;gt;e := \varphi(x,y)&amp;lt;/math&amp;gt;. It has to be noted that this is different from the Euclidean distance (see figure below).&lt;br /&gt;
&lt;br /&gt;
For the sake of clarity we will consider just 2D trajectories and parallel to the ground. Let us stack the x and y coordinates in &amp;lt;math&amp;gt;p := \begin{bmatrix}x &amp;amp; y\end{bmatrix}^T&amp;lt;/math&amp;gt; and consider the following kinematical model for our vehicle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{cases} \dot p &amp;amp;= sm(\psi) + w \\ \dot\psi &amp;amp;= u, \end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;s\in\mathbb{R}^+&amp;lt;/math&amp;gt; is a constant that can be considered as the airspeed, &amp;lt;math&amp;gt;m = \begin{bmatrix}\cos(\psi) &amp;amp; \sin(\psi)\end{bmatrix}^T&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\psi\in(-\pi, \pi]&amp;lt;/math&amp;gt; being the attitude yaw angle, &amp;lt;math&amp;gt;w\in\mathbb{R}^2&amp;lt;/math&amp;gt; is a constant with respect to &amp;lt;math&amp;gt;O&amp;lt;/math&amp;gt; representing the wind and &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; is the control action that will make the vehicle to turn. We also notice that the course heading &amp;lt;math&amp;gt;\chi\in(-\pi, \pi]&amp;lt;/math&amp;gt;, i.e. the direction the velocity vector &amp;lt;math&amp;gt;\dot p&amp;lt;/math&amp;gt; is pointing at, in general is different from the yaw angle &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; because of the wind.&lt;br /&gt;
&lt;br /&gt;
[[File:GVF.png|center]]&lt;br /&gt;
&lt;br /&gt;
Given a desired trajectory, we compute its normal &amp;lt;math&amp;gt;n(p) := \nabla \varphi(p)&amp;lt;/math&amp;gt; and its tangent &amp;lt;math&amp;gt;\tau(p) = En(p), \quad E=\begin{bmatrix}0 &amp;amp; 1 \\ -1 &amp;amp; 0\end{bmatrix}&amp;lt;/math&amp;gt;. The idea is to steer the vehicle such that it follows the direction given by the unit vector calculated from &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dot p_d(p) := \tau(p) - k_e e(p)n(p),&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;k_e&amp;lt;/math&amp;gt; is a positive gain. At each point &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; we can build a unit vector from &amp;lt;math&amp;gt;\dot p_d(p)&amp;lt;/math&amp;gt;. This collection of vectors is our Guidance Vector Field. Note that when the error is zero, then we are just tracking the tangent to the trajectory.&lt;br /&gt;
&lt;br /&gt;
We assume that the trajectory is twice differentiable (so its gradient and Hessian exists) and that it is regular in a neighborhood of &amp;lt;math&amp;gt;\mathcal{P}&amp;lt;/math&amp;gt;, i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\nabla\varphi(p) \neq 0, \quad p\in \mathcal{N}_{\mathcal{P}},\quad \mathcal{N}_{\mathcal{P}} := \{p \, : \, |\varphi(p)| \leq c^* &amp;gt; 0\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The algorithm needs for work the measurements of &amp;lt;math&amp;gt;\dot p&amp;lt;/math&amp;gt; (typically derived from GPS), position &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; w.r.t. HOME (typically derived from GPS) and yaw angle &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; or sideslip angle &amp;lt;math&amp;gt;\beta = (\psi - \chi)&amp;lt;/math&amp;gt;. The algorithm still works quite well in practice with only &amp;lt;math&amp;gt;\dot p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;, in other words, you will only need to have installed a GPS. The latter is the implemented version in pprz/master.&lt;br /&gt;
&lt;br /&gt;
== Using the GVF in the flight plan ==&lt;br /&gt;
&lt;br /&gt;
Before starting, make sure that the environment variable &amp;quot;PAPARAZZI_HOME&amp;quot; is set. It must point to your paparazzi directory.&lt;br /&gt;
To check if this variable is set, enter in a terminal the following command:&lt;br /&gt;
&amp;lt;source&amp;gt;echo $PAPARAZZI_HOME&amp;lt;/source&amp;gt;&lt;br /&gt;
This command must return the path to your paparazzi directory. If it returns nothing, edit your .bashrc:&lt;br /&gt;
&amp;lt;source&amp;gt;gedit ~/.bashrc&amp;lt;/source&amp;gt;&lt;br /&gt;
and add the following line by replacing &amp;quot;&amp;lt;path/to/your/paparazzi/directory&amp;gt;&amp;quot; by the corresponding path:&lt;br /&gt;
&amp;lt;source&amp;gt;export PAPARAZZI_HOME=&amp;quot;&amp;lt;path/to/your/paparazzi/directory&amp;gt;&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
Then, reload the .bashrc:&lt;br /&gt;
&amp;lt;source&amp;gt;source ~/.bashrc&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, lets start.&lt;br /&gt;
&lt;br /&gt;
First of all, do not forget to include the module in your flightplan file.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;module name=&amp;quot;gvf_module&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and in your telemetry file (already in default_fixedwing_gvf.xml)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;message name=&amp;quot;GVF&amp;quot; period=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Later, you can set individually the gains for your particular aircraft in the airframe file. For example&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;GVF&amp;quot; prefix=&amp;quot;GVF_&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;define name=&amp;quot;LINE_KE&amp;quot; value=&amp;quot;2.5&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;
===Disclaimer===&lt;br /&gt;
The Guidance Vector Field is not fully integrated (yet) with the flight plan. This means that you will need to call explicitly C functions and many variables are not set by default. For example,&lt;br /&gt;
the GVF does not control settings such as altitude or 'nav_pitch' (default pitch). You need to set manually the desired variables in the flight plan before a GVF function is called. In order words, the GVF '''ONLY''' controls (for fixed-wings) the bank-angle to be tracked such that the airplane converges to the desired trajectory.&lt;br /&gt;
&lt;br /&gt;
Particular example: Your airplane is going to land and the 'altitude' is set to be 0 AGL. Then you change your mind and choose (for example by clicking on the corresponding block in the flight plan at the GCS) to track an ellipse. The altitude to be tracked will continue being zero. Be careful with these kind of situations.&lt;br /&gt;
&lt;br /&gt;
List of available functions (updated June 2017) for the user to be called from the flight plan. There is a demo called ''demo_gvf.xml'' in the ''conf/flightplan'' folder.&lt;br /&gt;
&lt;br /&gt;
===Ellipses===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_ellipse_wp(WP_mywaypoint, gvf_ellipse_par.a, gvf_ellipse_par.b, gvf_ellipse_par.alpha)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_ellipse_XY(float x, float y, gvf_ellipse_par.a, gvf_ellipse_par.b, gvf_ellipse_par.alpha)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Straight lines===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_line_wp_heading(WP_mywaypoint, gvf_line_par.heading)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_line_XY_heading(float x, float y, gvf_line_par.heading)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_line_XY1_XY2(float x1, float y1, float x2, float y2)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_line_wp1_wp2(WP_mywaypoint1, WP_mywaypoint2)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_segment_XY1_XY2(float x1, float y1, float x2, float y2)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_segment_wp1_wp2(WP_mywaypoint1, WP_mywaypoint2)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_segment_loop_XY1_XY2(float x1, float y1, float x2, float y2, float gvf_segment_par.d1, gvf_segment_par.d2)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_segment_loop_wp1_wp2(WP_mywaypoint1, WP_mywaypoint2, float d1, float d2)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Watch out'''.&lt;br /&gt;
* `line' means that the aircraft tracks an infinite line.&lt;br /&gt;
* `segment' means that the aircraft tracks a segment defined by two (way)points. The first (way)point of the segment function ('''no''' for the segment_loop) defines the starting point and the second one the ending point. Once the aircraft crosses the imaginary line perpendicular to the segment at the ending point, the flight plan jumps to the next block.&lt;br /&gt;
* `segment_loop' means that the aircraft tracks the segment defined by two (way)points in an endless loop. The values 'd1' and 'd2' mean how far the aircraft will go beyond the end of the segment before turning back (useful when it is windy and you want to be sure that your aircraft tracks the segment by converging to it before been in the middle of the two points).&lt;br /&gt;
&lt;br /&gt;
=== Sinusoidal ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_sin_XY_alpha(float x, float y, gvf_sin_par.alpha, gvf_sin_par.w, gvf_sin_par.off, gvf_sin_par.A)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_sin_wp_alpha(WP_mywaypoint, gvf_sin_par.alpha, gvf_sin_par.w, gvf_sin_par.off, gvf_sin_par.A)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_sin_wp1_wp2(WP_maywaypoiny1, WP_mywaypoint2, gvf_sin_par.alpha, gvf_sin_par.w, gvf_sin_par.off, gvf_sin_par.A)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Watch out'''&lt;br /&gt;
&lt;br /&gt;
As with lines, to track a sinusoidal means that the aircraft follows an open and endless trajectory.&lt;br /&gt;
&lt;br /&gt;
=== Direction ===&lt;br /&gt;
For setting the tracking direction (the direction of the tangent vector &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; in the above figure)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_set_direction(s)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where s is an integer number 1 or -1.&lt;br /&gt;
&lt;br /&gt;
== Gain tuning ==&lt;br /&gt;
&lt;br /&gt;
An aircraft has its own set of two gains &amp;lt;math&amp;gt;k_n, k_e&amp;lt;/math&amp;gt; for each trajectory. &lt;br /&gt;
&lt;br /&gt;
* KN determines the convergence rate for aligning the vehicle to the vector field. A typical value for starting tuning &amp;lt;math&amp;gt;k_n&amp;lt;/math&amp;gt; should be between 0.2 and 1. &lt;br /&gt;
* KE determines how aggressive is the vector field. For example, in the following figure we have an ellipse with two different values of &amp;lt;math&amp;gt;k_e&amp;lt;/math&amp;gt;, at the left we have a value of 3 and at the right 0.4. Note how in left one the vectors are &amp;quot;more aggressive&amp;quot; towards the trajectory. While a big value can make the vehicle to converge quickly to the trajectory, it can make the tracking unstable once the vehicle is close it. This is because the vector field might change so quick that physically the vehicle cannot follow it. Check the Section IV in the original paper in the introduction.&lt;br /&gt;
&lt;br /&gt;
== Python Apps == &lt;br /&gt;
&lt;br /&gt;
=== Visualizing the desired trajectory and the aircraft within the vector field===&lt;br /&gt;
Until the &amp;quot;visual integration&amp;quot; of the GVF into the ground station is ready, one can track the vehicle and the trajectory by using the python script at &amp;quot;$PAPARAZZI_HOME/sw/ground_segment/python/gvf/gvfApp ac_id&amp;quot;, where ac_id is the ID of the fixedwing to be tracked by the App.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=packed heights=300px&amp;gt;&lt;br /&gt;
File:gvf_ellipse.png&lt;br /&gt;
File:gvf_Sin.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Circular formations (centralized from the GCS) ===&lt;br /&gt;
One can synchronize or arrange a group of fixed-wing aircraft (assuming they have equal ground speed) in a desired circle by using the python script at &amp;quot;$PAPARAZZI_HOME/sw/ground_segment/python/gvf/gvfFormation&amp;quot;. For running the script, all your aircraft '''MUST''' follow a circle employing the guidance vector field, i.e., &lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;call fun=&amp;quot;gvf_ellipse_wp(WP_CIRCLE, gvf_ellipse_par.a, gvf_ellipse_par.b, gvf_ellipse_par.alpha)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
the values of gvf_ellipse_a, gvf_ellipse_b will be modified by the formation control script, and the value of gvf_ellipse_alpha is irrelevant. Note that the aircraft do not need necessarily to orbit around the same waypoint. &lt;br /&gt;
&lt;br /&gt;
We need three text files in order to run the script:&lt;br /&gt;
* ids.txt , which labels the aircrafts. For example, if the file contains '14 56 34', then the aircraft with ids 14, 56 and 34 are labeled with the tags 1, 2 and 3 respectively.&lt;br /&gt;
* topology.txt , which defines the links between the aircraft. The file contains a matrix where the number of rows is the number of aircraft, and the number of columns is the number of desired links. A link is defined by setting 1 and -1 in a column. Following the example, the matrix &amp;lt;math&amp;gt;\begin{bmatrix}1 &amp;amp; 0 \\ -1 &amp;amp; 1 \\ 0 &amp;amp; -1\end{bmatrix}&amp;lt;/math&amp;gt; defines two links. The first one between the aircraft 1 and 2, and the second one between the aircraft 2 and 3.&lt;br /&gt;
* sigmas.txt , which defines the desired angles &amp;lt;math&amp;gt;\sigma_k&amp;lt;/math&amp;gt; between aircraft for each link &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. Following the example, if the file contains '0 90', then the desired angle for the first link is 0 degrees (e.g., the aircraft 1 and 2 will meet each other) and the second desired angle will be +90 degrees (positive is clock-wise).&lt;br /&gt;
&lt;br /&gt;
Some useful tips:&lt;br /&gt;
* How you place 1 and -1 in the topology matters in the following sense. In our example, for the second link, the +90 degrees is from the aircraft 2 to the aircraft 3. If the topology were &amp;lt;math&amp;gt;\begin{bmatrix}1 &amp;amp; 0 \\ -1 &amp;amp; -1 \\ 0 &amp;amp; 1\end{bmatrix}&amp;lt;/math&amp;gt;, then the +90 degrees will be from the aircraft 3 to the aircraft 2.&lt;br /&gt;
* Watch out for &amp;quot;impossible&amp;quot; configurations, e.g., do not set up loops in the topology such as 1 -&amp;gt; 2 -&amp;gt; 3 -&amp;gt; 1 &amp;lt;math&amp;gt;\begin{bmatrix}1 &amp;amp; 0 &amp;amp; -1\\ -1 &amp;amp; 1 &amp;amp; 0 \\ 0 &amp;amp; -1 &amp;amp; 1\end{bmatrix}&amp;lt;/math&amp;gt;, so the desired sigmas could be asking for an impossible configuration in the circle. Avoid loops! even if the desired configuration is ok, they can introduce undesired equilibria in the system, i.e., different configurations.&lt;br /&gt;
* The aircraft do not need to share the same center or waypoint. This script just control the sigmas.&lt;br /&gt;
&lt;br /&gt;
The script needs two additional scalar values:&lt;br /&gt;
* radius , sets the desired radius of the circular formation, i.e., once the aircraft are synchronized, they will be orbiting the waypoint with this desired radius.&lt;br /&gt;
* k, this is the gain of the control algorithm. As an example, for three aircraft with a desired circumference of 80 meters, a value of &amp;lt;math&amp;gt;k=10&amp;lt;/math&amp;gt; works ok.&lt;br /&gt;
&lt;br /&gt;
The algorithm works by setting different radii to the aircraft. If two aircraft orbit a waypoint with different radius (assuming equal ground speeds), then the one with bigger radius travels more distance in a completed lap. We exploit this fact in order to control the different &amp;lt;math&amp;gt;\sigma_k&amp;lt;/math&amp;gt;. We refer to [https://www.researchgate.net/publication/315514301_Circular_formation_control_of_fixed-wing_UAVs_with_constant_speeds Circular formation control of fixed-wing UAVs with constant speeds] for details about the control signal and how to calculate an appropriated gain k.&lt;br /&gt;
&lt;br /&gt;
In the following figure we show the rendezvous of three aircraft in the same circle by using this script.&lt;br /&gt;
&lt;br /&gt;
[[File:Circular.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Fully distributed circular formations ==&lt;br /&gt;
The air-to-air communication is possible since Paparazzi Link v2.0. You can compile Paparazzi with this new feature by typing &amp;quot;PPRZLINK_LIB_VERSION=2.0 make&amp;quot; in your terminal.&lt;br /&gt;
The algorithm for synchronizing aircraft in a circle has been explained in the previous section &amp;quot;Circular formations (centralized from the GCS)&amp;quot;. However, in that section it is explained how to run the algorithm in a centralized way, i.e., every aircraft transmit their positions to the GCS and a python script sends back the radii that the GVF must follow for each aircraft.&lt;br /&gt;
&lt;br /&gt;
Now it is possible to let each aircraft to calculate on board the radius that it has to follow by exchanging information with its neighbors without any intervention from ground.&lt;br /&gt;
An extra module together with gvf_module has to be called in the flight plan&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;modules&amp;gt;&lt;br /&gt;
  &amp;lt;module name=&amp;quot;gvf_module&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;module name=&amp;quot;distributed_circular_formation&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and the following settings can be set in the airframe file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;DCF&amp;quot; prefix=&amp;quot;DCF_&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;define name=&amp;quot;GAIN_K&amp;quot; value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;define name=&amp;quot;RADIUS&amp;quot; value=&amp;quot;80&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;define name=&amp;quot;MAX_NEIGHBORS&amp;quot; value=&amp;quot;4&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where GAIN_K is the control gain k explained in the centralized version (note that now each aircraft can have its own different gain), RADIUS is the target radius for the desired circumference once the synchronization is achieved, and MAX_NEIGHBORS defines the maximum number of neighbors that an aircraft can have. In particular, this last number defines how big is a table stored on board with the information about the neighbors of an aircraft. These three settings can be modified via the DCF tab from the GCS settings menu.&lt;br /&gt;
&lt;br /&gt;
Each row of the table contains information about a specific neighbor. In particular there are four fields about the neighbor, its ID, the desired angle w.r.t. it, its actual sigma ('''IT IS CALLED THETA in the source code dcf.{c,h} and messages! sorry about the notation ;)''' ) and how old is the actual sigma, i.e., when was the last time the aircraft received information from its neighbor. There is a telemetry message called DCF where one can check the status of the table, where the angles are in deci-degrees, i.e., 900 is 90 degrees and the age of the information is in milliseconds.&lt;br /&gt;
&lt;br /&gt;
The following messages must be included in your custom ./conf/messages.xml (if they are not present in your PaparazziLink version yet)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;message name=&amp;quot;DCF&amp;quot; id=&amp;quot;38&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;field name=&amp;quot;table&amp;quot; type=&amp;quot;int16[]&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;field name=&amp;quot;errors&amp;quot; type=&amp;quot;int16[]&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/message&amp;gt;&lt;br /&gt;
&amp;lt;message name=&amp;quot;DCF_THETA&amp;quot; id=&amp;quot;254&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;field name=&amp;quot;theta&amp;quot; type=&amp;quot;float&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;message name=&amp;quot;DCF_REG_TABLE&amp;quot; id=&amp;quot;158&amp;quot; link=&amp;quot;forwarded&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;field name=&amp;quot;ac_id&amp;quot; type=&amp;quot;uint8&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;field name=&amp;quot;nei_id&amp;quot; type=&amp;quot;uint8&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;field name=&amp;quot;desired_sigma&amp;quot; type=&amp;quot;int16&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/message&amp;gt;&lt;br /&gt;
&amp;lt;message name=&amp;quot;DCF_CLEAN_TABLE&amp;quot; id=&amp;quot;159&amp;quot; link=&amp;quot;forwarded&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;field name=&amp;quot;ac_id&amp;quot; type=&amp;quot;uint8&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/message&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where the first two messages are msg class telemetry and the last two are msg class datalink. The ids are irrelevant, just look for one free for the messages.&lt;br /&gt;
&lt;br /&gt;
The DCF message transmits the table (with low frequency) from the air to the ground. The DCF_THETA is the message that it is transmitted between aircraft. The DCF_REG_TABLE msg inits the table of the aircraft with a particular ID and DCF_CLEAN_TABLE just cleans the table. The python script dcfInitTables.py at ./sw/ground_segment/python/gvf will generate and send the messages based on the same text files for the centralized version of the algorithm (just check the subsection above to see how to define topology, IDs.. etc).&lt;br /&gt;
&lt;br /&gt;
'''DO NOT FORGET''' to init the tables of the aircraft! You can check that the tables have been well set by checking the corresponding DCF telemetry msg.&lt;br /&gt;
&lt;br /&gt;
The algorithm starts running once the aircraft is in the following block in the flight plan&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;block name=&amp;quot;Distributed_circular&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;call fun=&amp;quot;distributed_circular(WP_C)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/block&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
and if the aircraft is in AUTO2, then it starts to transmit its sigma to its neighbors. The aircraft will track (via the GVF) a circumference with center at the waypoint WP_C and the radius is determined by the algorithm. If there are not neighbors, it will just track a circumference with the default radius set in the DCF module (remember that the radius can be also changed in settings in the GCS).&lt;br /&gt;
&lt;br /&gt;
Right now, the frequency for the air-to-air communication for the DCF_THETA msg has been hardcoded to 4Hz (something to change in the TODO list). If an aircraft does not receive any information from a neighbor during the last TIMEOUT millisecs, then the aircraft assumes that such a neighbor has left the formation. For example, the neighbor went to AUTO1 and the rest of the team will not consider it anymore. The TIMEOUT has been set to 1500 by default, but it can be changed for each aircraft in the settings in the GCS in the DCF tab.&lt;br /&gt;
&lt;br /&gt;
== Defining your own trajectory ==&lt;br /&gt;
&lt;br /&gt;
The algorithm is placed in $PAPARAZZI_HOME/sw/airborne/modules/guidance/gvf .&lt;br /&gt;
The trajectories are placed in $PAPARAZZI_HOME/sw/airborne/modules/guidance/gvf/trajectories .&lt;br /&gt;
&lt;br /&gt;
Here there is an example (the straight line) about how to code your own trajectory.&lt;br /&gt;
&lt;br /&gt;
{{Box Code||sw/airborne/modules/guidance/gvf/gvf.h&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// Straigh line&lt;br /&gt;
extern bool gvf_line_XY_heading(float x, float y, float heading);&lt;br /&gt;
extern bool gvf_line_XY1_XY2(float x1, float y1, float x2, float y2);&lt;br /&gt;
extern bool gvf_line_wp1_wp2(uint8_t wp1, uint8_t wp2);&lt;br /&gt;
extern bool gvf_segment_loop_XY1_XY2(float x1, float y1, float x2, float y2, float d1, float d2);&lt;br /&gt;
extern bool gvf_segment_loop_wp1_wp2(uint8_t wp1, uint8_t wp2, float d1, float d2);&lt;br /&gt;
extern bool gvf_segment_XY1_XY2(float x1, float y1, float x2, float y2);&lt;br /&gt;
extern bool gvf_segment_wp1_wp2(uint8_t wp1, uint8_t wp2);&lt;br /&gt;
extern bool gvf_line_wp_heading(uint8_t wp, float heading);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Box Code||sw/airborne/modules/guidance/gvf/gvf.c&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool gvf_line_wp_heading(uint8_t wp, float heading)&lt;br /&gt;
{&lt;br /&gt;
  heading = heading * M_PI / 180;&lt;br /&gt;
&lt;br /&gt;
  float a = waypoints[wp].x;&lt;br /&gt;
  float b = waypoints[wp].y;&lt;br /&gt;
&lt;br /&gt;
  gvf_line_XY_heading(a, b, heading);&lt;br /&gt;
&lt;br /&gt;
  return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The idea is that while you can define a straight line in many different ways, you make all the transformations (for example, we take the X and Y coordinates from a waypoint and convert the heading from degrees to radians in this example)&lt;br /&gt;
in the function called by the user such that the algorithm is always evaluating the trajectory in the same way. It helps for maintaining the code and for tuning&lt;br /&gt;
the gains (you do not want to have different set of gains depending on how you call your trajectory). &lt;br /&gt;
&lt;br /&gt;
We finally call the function gvf_line_XY_heading that will invoke the algorithm.&lt;br /&gt;
&lt;br /&gt;
{{Box Code||sw/airborne/modules/guidance/gvf/gvf.c&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
bool gvf_line_XY_heading(float a, float b, float heading)&lt;br /&gt;
{&lt;br /&gt;
  float e;&lt;br /&gt;
  struct gvf_grad grad_line;&lt;br /&gt;
  struct gvf_Hess Hess_line;&lt;br /&gt;
&lt;br /&gt;
  gvf_trajectory.type = 0;&lt;br /&gt;
  gvf_trajectory.p[0] = a;&lt;br /&gt;
  gvf_trajectory.p[1] = b;&lt;br /&gt;
  gvf_trajectory.p[2] = heading;&lt;br /&gt;
&lt;br /&gt;
  gvf_line_info(&amp;amp;e, &amp;amp;grad_line, &amp;amp;Hess_line);&lt;br /&gt;
  gvf_control.ke = gvf_line_par.ke;&lt;br /&gt;
  gvf_control_2D(1e-2 * gvf_line_par.ke, gvf_line_par.kn, e, &amp;amp;grad_line, &amp;amp;Hess_line);&lt;br /&gt;
&lt;br /&gt;
  gvf_control.error = e;&lt;br /&gt;
&lt;br /&gt;
  horizontal_mode = HORIZONTAL_MODE_WAYPOINT;&lt;br /&gt;
  gvf_segment.seg = 0;&lt;br /&gt;
&lt;br /&gt;
  return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The three first lines are the &amp;lt;math&amp;gt;\varphi(p), \nabla\varphi(p)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H(\varphi(p))&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; stands for the Hessian. These three&lt;br /&gt;
guys will be populated by gvf_line_info (in a moment we will be see how to write it).&lt;br /&gt;
&lt;br /&gt;
Then gvf_traj_type stands for the kind of trajectory. Right now we have 0 for lines, 1 for ellipses and 2 for sinusoidals. Feel free to choose an index that has not been taken. The rest gvf_param[x]'s are the parameters of the trajectory. You have up to seven for describing a trajectory.&lt;br /&gt;
&lt;br /&gt;
The function gvf_control_2D executes the algorithm for calculating the desired turn for the vehicle. It is a good practice that all the trajectories (not only straight lines) have the same order of magnitude (for example between 0.00 and 5.00) for &amp;lt;math&amp;gt;k_e&amp;lt;/math&amp;gt;. So if you have to add a scaling factor, here is were you have to do it.&lt;br /&gt;
&lt;br /&gt;
The variables gvf_xx are sent to the ground station as telemetry, so you can draw the vector field, the trajectory, etc.&lt;br /&gt;
&lt;br /&gt;
Finally for defining &amp;lt;math&amp;gt;\varphi(p), \nabla\varphi(p)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;H(\varphi(p))&amp;lt;/math&amp;gt; you need to write the two files gvf_line.{c,h}&lt;br /&gt;
&lt;br /&gt;
{{Box Code||sw/airborne/modules/guidance/gvf/trajectories/gvf_line.h&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
extern void gvf_line_info(float *phi, struct gvf_grad *, struct gvf_Hess *);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
and in gvf_line.c you write the implicit math of your trajectory (quite explicit)&lt;br /&gt;
&lt;br /&gt;
{{Box Code||sw/airborne/modules/guidance/gvf/trajectories/gvf_line.c&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void gvf_line_info(float *phi, struct gvf_grad *grad,&lt;br /&gt;
        struct gvf_Hess *hess){&lt;br /&gt;
&lt;br /&gt;
    struct EnuCoor_f *p = stateGetPositionEnu_f();&lt;br /&gt;
    float px = p-&amp;gt;x;&lt;br /&gt;
    float py = p-&amp;gt;y;&lt;br /&gt;
    float a = gvf_param[0];&lt;br /&gt;
    float b = gvf_param[1];&lt;br /&gt;
    float alpha = gvf_param[2];&lt;br /&gt;
&lt;br /&gt;
    // Phi(x,y)&lt;br /&gt;
    *phi = -(px-a)*cosf(alpha) + (py-b)*sinf(alpha);&lt;br /&gt;
&lt;br /&gt;
    // grad Phi&lt;br /&gt;
    grad-&amp;gt;nx =  -cosf(alpha);&lt;br /&gt;
    grad-&amp;gt;ny =   sinf(alpha);&lt;br /&gt;
&lt;br /&gt;
    // Hessian Phi&lt;br /&gt;
    hess-&amp;gt;H11 = 0;&lt;br /&gt;
    hess-&amp;gt;H12 = 0;&lt;br /&gt;
    hess-&amp;gt;H21 = 0;&lt;br /&gt;
    hess-&amp;gt;H22 = 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Demo ==&lt;br /&gt;
There is a flightplan called 'demo_gvf.xml' in order to test the different settings in a simulation. Do not forget to choose default_telemetry_gvf.xml in your paparazzi center.&lt;br /&gt;
&lt;br /&gt;
== TO DO list ==&lt;br /&gt;
&lt;br /&gt;
* Better integration of the GVF with the ground station&lt;br /&gt;
* Support to rotorcrafts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:User_Documentation]] [[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Fabien-B</name></author>
	</entry>
</feed>