<?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=Ghattenb</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=Ghattenb"/>
	<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/wiki/Special:Contributions/Ghattenb"/>
	<updated>2026-05-19T21:02:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Tawaki/v1.10&amp;diff=26154</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=26154"/>
		<updated>2024-06-04T07:55:31Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Hardware Source Files */&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;
=== Hardware Source Files ===&lt;br /&gt;
''Tawaki v1.10 hardware design (zipped Kicad 8 project) '': &lt;br /&gt;
[http://data.recherche.enac.fr/drones/Paparazzi/hardware/Tawaki_v110.zip Tawaki_v110.zip]&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;
== 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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=26152</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=26152"/>
		<updated>2024-05-21T14:11:43Z</updated>

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

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

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|cellpadding=&amp;quot;10px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
||  [[Image:blog.png|50px|link=http://blog.paparazziuav.org/|Blog]]&amp;lt;div style=&amp;quot;text-align:center;font-size: 80%&amp;quot;&amp;gt;Blog&amp;lt;/div&amp;gt;&lt;br /&gt;
||  [[Image:mainlinglist.png|50px|link=http://lists.paparazziuav.org|Mailinglist]]&amp;lt;div style=&amp;quot;text-align:center;font-size: 80%&amp;quot;&amp;gt;Mailinglist&amp;lt;/div&amp;gt;&lt;br /&gt;
||  [[Image:chat.png|50px|link=https://gitter.im/paparazzi/discuss|Chat]]&amp;lt;div style=&amp;quot;text-align:center;font-size: 80%&amp;quot;&amp;gt;Chat&amp;lt;/div&amp;gt;&lt;br /&gt;
||  [[Image:download.png|50px|link=http://github.com/paparazzi/paparazzi/releases|Download]]&amp;lt;div style=&amp;quot;text-align:center;font-size: 80%&amp;quot;&amp;gt;Download&amp;lt;/div&amp;gt;&lt;br /&gt;
||  [[Image:githubicon.png|50px|link=http://github.com/paparazzi/|GitHub]]&amp;lt;div style=&amp;quot;text-align:center;font-size: 80%&amp;quot;&amp;gt;GitHub&amp;lt;/div&amp;gt;&lt;br /&gt;
||  [[Image:youtubeicon.png|50px|link=https://www.youtube.com/c/PaparazziuavOrgProject|YouTube]]&amp;lt;div style=&amp;quot;text-align:center;font-size: 80%&amp;quot;&amp;gt;YouTube&amp;lt;/div&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Ivy&amp;diff=26147</id>
		<title>Ivy</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Ivy&amp;diff=26147"/>
		<updated>2023-08-24T09:11:15Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ivy is a [https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern Publish-Subscribe (or pub/sub)] bus used in Paparazzi to link the different components of the ground network together.  See [[Overview#System_Architecture|System Architecture]] and [[DevGuide/Server_GCS_com]] for a general overview of its role in the Paparazzi UAS.&lt;br /&gt;
&lt;br /&gt;
Ivy is text-based (ASCII) and features [https://en.wikipedia.org/wiki/Regular_expression regular expression] based message subscription.  Software applications employing Ivy announce their presence on the local network by UDP broadcast and share subscriptions.  All messages are communicated thereafter via direct TCP connections.  While the traffic is TCP, the use of UDP protocol for broadcast announcements requires that peers reside within the same network subnet.&lt;br /&gt;
&lt;br /&gt;
Paparazzi software applications default to binding to locahost and thus unable to communicate with peers residing elsewhere on the local area network.  Ivy and subsequently the paparazzi software applications can be directed to bind to a local network interface instead, thereby permitting LAN communication with peers by simply supplying a bus designation command-line argument shown below.  These can be saved in a Paparazzi Center session for persistence.&lt;br /&gt;
&lt;br /&gt;
Including the libivy headers and library and using a predefined set of messages, it is possible for any software component to take part in communication in a Paparazzi biotope.  Ivy, the protocol itself is developed independently of the Paparazzi project and can be obtained along with examples and documentation from https://ivybus.gitlab.io/ .&lt;br /&gt;
&lt;br /&gt;
== Ivy Networks ==&lt;br /&gt;
&lt;br /&gt;
=== Binding Ivy Networks ===&lt;br /&gt;
&lt;br /&gt;
Ivy defaults to UDP port 2010 if a port is not specified.  Port is specified by '':PORTNUMBER'' suffix on network.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
192.168.0.0/24 (192.168.0.x network) UDP/2010; The following are all valid:&lt;br /&gt;
&lt;br /&gt;
 program -b 192.168.0.255&lt;br /&gt;
 program -b 192.168.0.255:2010&lt;br /&gt;
 program -b 192.168.0&lt;br /&gt;
 program -b 192.168.0:2010&lt;br /&gt;
&lt;br /&gt;
10.0.0.0/8 (10.x.x.x or 10.255.255.255); The following are all valid:&lt;br /&gt;
&lt;br /&gt;
 program -b 10&lt;br /&gt;
 program -b 10:2010&lt;br /&gt;
 program -b 10.255.255.255&lt;br /&gt;
 program -b 10.255.255.255:2010&lt;br /&gt;
&lt;br /&gt;
=== Extending Ivy Networks ===&lt;br /&gt;
&lt;br /&gt;
Ivy requires that all peers in the network reside within the same local area network (it does not support routing).  This can be solved by two different approaches.&lt;br /&gt;
&lt;br /&gt;
==== 1 - Virtual Private Network (VPN) ====&lt;br /&gt;
&lt;br /&gt;
By employing a standard IP VPN, remote hosts may communicate within the Ivy network permitting the VPN configuration is BRIDGED and not ROUTED.  Many (routed) VPN configurations provide a network subnet for VPN clients and then route the traffic to the remote network.  While this is approach is inline with best practices for IT systems, it does not permit Ivy to operate.&lt;br /&gt;
&lt;br /&gt;
==== 2 - Ivy Network Bridging ====&lt;br /&gt;
&lt;br /&gt;
[[TCP_Aircraft_Server|TCP Aircraft Server]]&lt;br /&gt;
&lt;br /&gt;
-- looking for more information&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
=== Ivyprobe ===&lt;br /&gt;
&lt;br /&gt;
Ivyprobe is a command-line tool for sending and receiving messages on the Ivy bus.  This tool is useful for monitoring and troubleshooting an Ivy bus in the same way an Ivy client would behave, with custom regexp match filters.&lt;br /&gt;
&lt;br /&gt;
Run it with the '''-h''' option to display the help:&lt;br /&gt;
 $ ivyprobe -h&lt;br /&gt;
&lt;br /&gt;
E.g. to simply display all messages:&lt;br /&gt;
 $ ivyprobe '(.*)'&lt;br /&gt;
&lt;br /&gt;
[[Category:Communication]]&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation/FromScratch&amp;diff=26146</id>
		<title>Installation/FromScratch</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation/FromScratch&amp;diff=26146"/>
		<updated>2023-08-24T09:09:40Z</updated>

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

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

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Navigation&lt;br /&gt;
** mainpage|Home&lt;br /&gt;
** Hardware|Hardware&lt;br /&gt;
** Software|Software&lt;br /&gt;
** FAQ|FAQ&lt;br /&gt;
** Downloads|Downloads&lt;br /&gt;
** Hecto|Remembering Hecto&lt;br /&gt;
* Communication&lt;br /&gt;
** http://lists.paparazziuav.org|Mailing list&lt;br /&gt;
** https://gitter.im/paparazzi/discuss|Gitter chat&lt;br /&gt;
** Contact|Contact&lt;br /&gt;
** Account|Wiki account&lt;br /&gt;
* Development&lt;br /&gt;
** Contributing|How to contribute&lt;br /&gt;
** Developer_Guide|Developer Guide&lt;br /&gt;
** http://docs.paparazziuav.org| Doxygen docs&lt;br /&gt;
** https://paparazzi-uav.readthedocs.io/en/latest/| Readthedocs pages&lt;br /&gt;
** http://github.com/paparazzi/paparazzi|Git repository&lt;br /&gt;
** Builds|Build tests&lt;br /&gt;
* Wiki tools&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** Help:Editing|Editing Help&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=26100</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=26100"/>
		<updated>2022-01-27T21:29:16Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Getting the Source Code */&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;
'''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 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 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 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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=26099</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=26099"/>
		<updated>2022-01-27T21:28:39Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Quickstart for Ubuntu users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Installation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux] or Apple Macintosh running [http://en.wikipedia.org/wiki/OS_X Mac OS X]. 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;
'''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 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 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.18&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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=26098</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=26098"/>
		<updated>2022-01-27T21:27:18Z</updated>

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

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages hideprefix=always&amp;gt;Subsystems&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Since '''v6.0''' all subsystems have been moved to modules and no longer exist in Paparazzi.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mostly a subsystem is a part offering a specific functionality with a&lt;br /&gt;
defined interface and can have multiple different implementations. (See &amp;lt;tt&amp;gt;sw/airborne/subsystems/...&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
They are selected and configured with a &amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;&amp;lt;subsystem name=&amp;quot;foo&amp;quot; type=&amp;quot;bar&amp;quot;&amp;gt;&amp;lt;/source&amp;gt; in the [[Airframe_Configuration#Firmware_and_Hardware_definitions|firmware section of the airframe file]].&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Since '''v5.8''' it is possible to safely replace ''subsystem'' by ''module'' in your airframe file. The roadmap of Paparazzi is to convert existing subsystems to [[modules]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All this does is basically include a makefile &amp;lt;tt&amp;gt;foo_bar.makefile&amp;lt;/tt&amp;gt; that adds the respective sources and adds a few configuration options. (See &amp;lt;tt&amp;gt;conf/firmwares/subsystems/...&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
This makes it easier to put an airframe file together (they replace the old raw makefile section) and also allows us to change the code and move/rename files behind the scenes without breaking everyones airframe files.&lt;br /&gt;
&lt;br /&gt;
See [[FirmwareArchitecture]] for the differences to [[Modules]], as well as how to write a new subsystem.&lt;br /&gt;
&lt;br /&gt;
== Available Subsystems ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Name !! Types !! Firmwares !! Architecture !! Description&lt;br /&gt;
|-&lt;br /&gt;
|[[Subsystem/gps|gps]]&lt;br /&gt;
||&lt;br /&gt;
* ublox&lt;br /&gt;
* ublox_utm&lt;br /&gt;
* nmea&lt;br /&gt;
* mediatek_diy&lt;br /&gt;
* skytraq&lt;br /&gt;
* sirf&lt;br /&gt;
|&lt;br /&gt;
* all&lt;br /&gt;
* fixedwing&lt;br /&gt;
* all&lt;br /&gt;
* fixedwing&lt;br /&gt;
* rotorcraft&lt;br /&gt;
* rotorcraft&lt;br /&gt;
|&lt;br /&gt;
* all&lt;br /&gt;
| GPS drivers&lt;br /&gt;
|-&lt;br /&gt;
|[[Subsystem/imu|imu]]&lt;br /&gt;
||&lt;br /&gt;
* analog&lt;br /&gt;
* apogee&lt;br /&gt;
* aspirin_v1.0&lt;br /&gt;
* aspirin_v1.5&lt;br /&gt;
* aspirin_v2.1&lt;br /&gt;
* aspirin_v2.2&lt;br /&gt;
* aspirin_i2c_v1.0&lt;br /&gt;
* aspirin_i2c_v1.5&lt;br /&gt;
* aspirin2_i2c&lt;br /&gt;
* b2_v1.0&lt;br /&gt;
* b2_v1.1&lt;br /&gt;
* b2_v1.2&lt;br /&gt;
* drotek_10dof_v2&lt;br /&gt;
* gl1&lt;br /&gt;
* yai&lt;br /&gt;
* krooz_sd&lt;br /&gt;
* navgo&lt;br /&gt;
* umarin&lt;br /&gt;
* crista&lt;br /&gt;
* crista_hmc5843&lt;br /&gt;
* ppzuav&lt;br /&gt;
|&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* rotorcraft&lt;br /&gt;
* rotorcraft&lt;br /&gt;
* fixedwing&lt;br /&gt;
|&lt;br /&gt;
* all&lt;br /&gt;
* stm32f4&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* stm32f4&lt;br /&gt;
* lpc21&lt;br /&gt;
* lpc21&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
|| IMU drivers&lt;br /&gt;
Traditional IR sensors can be used for fixedwing&lt;br /&gt;
&lt;br /&gt;
but an IMU subsystem is not required&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|[[Subsystem/ahrs|ahrs]]&lt;br /&gt;
||&lt;br /&gt;
* int_cmpl_quat&lt;br /&gt;
* float_cmpl&lt;br /&gt;
* float_dcm &lt;br /&gt;
* int_cmpl_euler&lt;br /&gt;
* float_mlkf&lt;br /&gt;
* infrared&lt;br /&gt;
|&lt;br /&gt;
* all&lt;br /&gt;
|&lt;br /&gt;
* all&lt;br /&gt;
|| AHRS algorithms&lt;br /&gt;
|-&lt;br /&gt;
|[[Subsystem/ins|ins]]&lt;br /&gt;
||&lt;br /&gt;
* alt_float&lt;br /&gt;
* gps_passthrough&lt;br /&gt;
* xsens&lt;br /&gt;
* xsens700&lt;br /&gt;
* ''no_type''&lt;br /&gt;
* hff&lt;br /&gt;
* extended&lt;br /&gt;
* ardrone2&lt;br /&gt;
* float_invariant&lt;br /&gt;
* ekf2&lt;br /&gt;
|&lt;br /&gt;
* fixedwing&lt;br /&gt;
* fixedwing&lt;br /&gt;
* fixedwing&lt;br /&gt;
* fixedwing&lt;br /&gt;
* rotorcraft&lt;br /&gt;
* rotorcraft&lt;br /&gt;
* rotorcraft&lt;br /&gt;
* rotorcraft&lt;br /&gt;
* all (experimental, only tested on fw)&lt;br /&gt;
* all&lt;br /&gt;
|&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* mcu with fpu (e.g. stm32f4)&lt;br /&gt;
* all&lt;br /&gt;
|| INS algorithms&lt;br /&gt;
Most of the INS filters are only providing position and speed, and they need to be used together with an AHRS filter for attitude&lt;br /&gt;
&lt;br /&gt;
Currently, only the experimental invariant filter is a full INS&lt;br /&gt;
|-&lt;br /&gt;
|[[Subsystem/radio_control|radio_control]]&lt;br /&gt;
||&lt;br /&gt;
* ppm&lt;br /&gt;
* spektrum&lt;br /&gt;
* datalink&lt;br /&gt;
* superbitrf_rc&lt;br /&gt;
* sbus&lt;br /&gt;
* sbus_dual&lt;br /&gt;
| &lt;br /&gt;
* all&lt;br /&gt;
| &lt;br /&gt;
* all&lt;br /&gt;
* STM32&lt;br /&gt;
* all&lt;br /&gt;
* STM32&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
| Radio Control implementations&lt;br /&gt;
|-&lt;br /&gt;
|[[Subsystem/telemetry|telemetry]]&lt;br /&gt;
||&lt;br /&gt;
* transparent&lt;br /&gt;
* transparent_usb&lt;br /&gt;
* xbee_api&lt;br /&gt;
* superbitrf&lt;br /&gt;
| &lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* all&lt;br /&gt;
* rotorcraft&lt;br /&gt;
|&lt;br /&gt;
* all&lt;br /&gt;
* LPC21xx&lt;br /&gt;
* all&lt;br /&gt;
* STM32&lt;br /&gt;
| Telemetry implementations&lt;br /&gt;
|-&lt;br /&gt;
|[[Subsystem/actuators|actuators]]&lt;br /&gt;
||&lt;br /&gt;
* mkk&lt;br /&gt;
* mkk_v2&lt;br /&gt;
* asctec&lt;br /&gt;
* asctec_v2&lt;br /&gt;
* pwm&lt;br /&gt;
* dualpwm&lt;br /&gt;
* skiron&lt;br /&gt;
| &lt;br /&gt;
* all&lt;br /&gt;
| &lt;br /&gt;
* all&lt;br /&gt;
| Drivers for different ESCs and servos&lt;br /&gt;
|-&lt;br /&gt;
|[[Subsystem/stabilization|stabilization]]&lt;br /&gt;
||&lt;br /&gt;
* int_quat&lt;br /&gt;
* float_quat&lt;br /&gt;
* int_euler&lt;br /&gt;
* float_euler&lt;br /&gt;
* indi&lt;br /&gt;
| &lt;br /&gt;
* rotorcraft&lt;br /&gt;
| &lt;br /&gt;
* all&lt;br /&gt;
| Attitude control system for rotorcraft&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:Developer_Documentation]] [[Category:Subsystems]]&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=File:Airborne_software_functional.png&amp;diff=26055</id>
		<title>File:Airborne software functional.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=File:Airborne_software_functional.png&amp;diff=26055"/>
		<updated>2021-10-27T11:44:49Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: Ghattenb uploaded a new version of File:Airborne software functional.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=25290</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=25290"/>
		<updated>2021-04-13T11:18:11Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &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.18 upstream/v5.18 &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 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 v5.18 upstream/v5.18 &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.18&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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Template:P_Release&amp;diff=25289</id>
		<title>Template:P Release</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Template:P_Release&amp;diff=25289"/>
		<updated>2021-04-13T11:12:45Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Template}}&lt;br /&gt;
&lt;br /&gt;
This Template generates a Paparazzi Release block.&lt;br /&gt;
&lt;br /&gt;
This template takes the following parameter:&lt;br /&gt;
* &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; Version ie. v5.8.0_stable&lt;br /&gt;
* &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; Branch name ie. v5.8&lt;br /&gt;
&lt;br /&gt;
So if you include the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{P Release|v5.8.0_stable|v5.8}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you will get:&lt;br /&gt;
&lt;br /&gt;
{{P Release|v5.8.0_stable|v5.8}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
{|style=&amp;quot;width: 100%;padding:4px;border:1px solid #000;background-color:#f8f8f8;text-align:center;&amp;quot;&lt;br /&gt;
| &amp;lt;span style=&amp;quot;margin:0;font-size:150%;font-weight:bold;&amp;quot;&amp;gt;Latest Stable Release: {{{1|noversion}}}&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;plainlinks&amp;quot; style=&amp;quot;font-size:120%;&amp;quot;&amp;gt;Semaphore CI [https://semaphoreci.com/paparazziuav/paparazzi &amp;lt;img src='https://semaphoreci.com/api/v1/paparazziuav/paparazzi/branches/v5-18/shields_badge.svg' alt='Build Status'&amp;gt;]&amp;lt;/span&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:120%;&amp;quot;&amp;gt;Download as [https://github.com/paparazzi/paparazzi/releases/download/{{{1|noversion}}}/paparazzi_{{{1|noversion}}}.tar.gz tarball] or checkout the '''{{{2|nobranch}}}''' branch from [[git]].&amp;lt;br/&amp;gt;Releases can be found at https://github.com/paparazzi/paparazzi/releases&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=25288</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=25288"/>
		<updated>2021-04-13T11:04:51Z</updated>

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

		<summary type="html">&lt;p&gt;Ghattenb: /* How to use it */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''PPRZLINK''' is the communication library used by the Paparazzi UAV project and other related projects.&lt;br /&gt;
&lt;br /&gt;
It provides:&lt;br /&gt;
* Bulleted list item&lt;br /&gt;
* a set of messages definitions&lt;br /&gt;
* various encapsulation protocols&lt;br /&gt;
* several high-level access to physical layers (serial, udp, [[Ivy]])&lt;br /&gt;
* several language support (Ocaml, C, Python)&lt;br /&gt;
&lt;br /&gt;
Source code can be download from Github: https://github.com/paparazzi/pprzlink&lt;br /&gt;
&lt;br /&gt;
The creation of PPRZLINK as a separated project from the main Paparazzi source code is the result of the [[Roadmap#Communication_Roadmap|communication roadmap]]. At the moment it is released under GPL v2, but it may be changed to LGPL in order to ease integration into third-party projects.&lt;br /&gt;
&lt;br /&gt;
A (not very complete) documentation is also available on the [https://pprzlink.readthedocs.io/en/latest/ readthedocs] platform.&lt;br /&gt;
&lt;br /&gt;
Some useful related project:&lt;br /&gt;
* [https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander]: HMI to control several synchronized UAVs&lt;br /&gt;
* [https://github.com/enacuavlab/pprzros PPRZROS]: bridge for the ROS middleware&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Messages' definition =&lt;br /&gt;
&lt;br /&gt;
The messages are organized three main classes:&lt;br /&gt;
* ''telemetry'': messages sent by the aircraft, usually to the ground, a.k.a. downlink stream&lt;br /&gt;
* ''datalink'': messages sent by the ground to the aircraft, a.k.a. uplink&lt;br /&gt;
* ''ground'': messages exchanged between ground agents over the [[Ivy]] software bus&lt;br /&gt;
[[File:Pprz communication agents.gif]]&lt;br /&gt;
&lt;br /&gt;
The generated documentation is available here: http://docs.paparazziuav.org/latest/paparazzi_messages.html&lt;br /&gt;
&lt;br /&gt;
New messages can be integrated mainstream in the [https://github.com/paparazzi/pprzlink/blob/master/message_definitions/v1.0/messages.xml messages xml file] from PPRZLINK. When using with Paparazzi, it is also possible to use an temporary file placed in the ''conf'' folder. If not present, the default set is used.&lt;br /&gt;
&lt;br /&gt;
= Protocols =&lt;br /&gt;
&lt;br /&gt;
== Principles ==&lt;br /&gt;
PPRZLINK is based on encapsulation. The first layer is the message level, mostly containing the data and the required information to decode them. The structure of this part is always the same. The second layer called ''transport'' can be changed according to the actual physical layer being used. The basic type (''pprz'') is just providing synchronization byte and checksum, but other transports offer more possibility of routing like the ''XBee' transport (especially the possibility to use point-to-point or broadcast).&lt;br /&gt;
&lt;br /&gt;
The message formats are described [[Messages_Format|here]]. A ''secured'' version is currently under development.&lt;br /&gt;
&lt;br /&gt;
== Differences between version 1 and 2 ==&lt;br /&gt;
&lt;br /&gt;
A new version (v2) have been developed to overcome several limitations. With version 1, only the message ID (1 byte) and the sender ID (1 byte) are provided in the message layer before the data part. It means that:&lt;br /&gt;
* messages can't be addressed to a particular receiver unless the transport layer can provide the service&lt;br /&gt;
* it is not possible to determine the class of messages, so it is assumed that telemetry messages are strictly downlink and datalink messages strictly uplink, thus preventing direct air-to-air communications&lt;br /&gt;
&lt;br /&gt;
With the version two of the protocol, two extra bytes have been added to the message header:&lt;br /&gt;
* the receiver ID (1 byte)&lt;br /&gt;
* a class ID (4 bits)&lt;br /&gt;
* a component ID (4 bits)&lt;br /&gt;
The class and component are part of the same byte. Even if the component ID is not really used at the moment (provision for future use), the class ID avoid ambiguities on messages. With the receiver ID, it is now possible to perform air-to-air communications and to broadcast messages from an aircraft (previously only possible from the ground).&lt;br /&gt;
&lt;br /&gt;
See [[Messages_Format|messages format]] page for more details.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
&lt;br /&gt;
Currently, the available interfaces are:&lt;br /&gt;
* serial stream&lt;br /&gt;
* udp packet&lt;br /&gt;
* [[Ivy]] based messages (publisher/subscriber middelware over TCP/IP, should only be used on the ground side)&lt;br /&gt;
&lt;br /&gt;
In addition a bridge to the [http://www.ros.org ROS] middleware is available at https://github.com/enacuavlab/pprzros&lt;br /&gt;
&lt;br /&gt;
== Language supports ==&lt;br /&gt;
&lt;br /&gt;
The supported languages are:&lt;br /&gt;
* [https://github.com/paparazzi/pprzlink/tree/master/lib/v1.0/C C language]&lt;br /&gt;
** generation of code (header files) for sending and decoding messages&lt;br /&gt;
** mostly used for the airborne code of Paparazzi&lt;br /&gt;
* [https://github.com/paparazzi/pprzlink/tree/master/lib/v1.0/ocaml Ocaml]&lt;br /&gt;
** library based high-level functions for binding, subscribing and parsing messages&lt;br /&gt;
** mostly used by the ground station agents: links, GCS, server, ...&lt;br /&gt;
* [https://github.com/paparazzi/pprzlink/tree/master/lib/v1.0/python Python]&lt;br /&gt;
** Provide similar functionality than the Ocaml implemetation&lt;br /&gt;
** used in a large variety of smaller tools and ground agents&lt;br /&gt;
* [https://github.com/paparazzi/pprzlink-rust Rust]&lt;br /&gt;
** similar to Python implementation, plus added memory safety&lt;br /&gt;
** used mainly for secure pprzlink (see below)&lt;br /&gt;
&lt;br /&gt;
= Secure Ppprzlink =&lt;br /&gt;
Secure Paparazzi link uses [https://en.wikipedia.org/wiki/Symmetric-key_algorithm symmetric key encryption] with [https://en.wikipedia.org/wiki/Salsa20#ChaCha_variant Chacha20] cipher.&lt;br /&gt;
&lt;br /&gt;
'''s-pprzlink''' uses a formally verified cryptographic library [https://github.com/mitls/hacl-star HACL*] developed by the [http://prosecco.inria.fr/ Prosecco] team at [https://www.inria.fr/en/centre/paris INRIA Paris] in collaboration with Microsoft Research, as part of [https://github.com/project-everest Project Everest].&lt;br /&gt;
&lt;br /&gt;
Because certain data have to be sent in plaintext (such as the message counter), '''s-pprzlink''' uses ''Authenticated Encryption with Associated Data'' (AEAD) algorithm to authenticate such data before use. Authentication means that any unauthorized change in data is detected upon decryption. Authentication is important because if we decide to send SENDER_ID or DESTINATION_ID in plaintext - so the receiver can decide whether to decrypt the message - we don't want it to be tampered with. '''s-pprzlink''' uses a modified [https://github.com/GaloisInc/gec Galois Embedded Crypto] algorithm for the symmetric key exchange.&lt;br /&gt;
&lt;br /&gt;
The overhead for encrypted communication is 21 bytes (1 byte signaling crypto/plaintext message, 4 bytes of the counter, 16 bytes of the authentication tag), for plaintext messages (such as key-exchange and some info messages) is only one byte. '''s-pprzlink''' works with any STM32-F4 and higher autopilot (it requires a random number generator on chip), and doesn't have any other hardware dependecies (such as FPU etc.).&lt;br /&gt;
&lt;br /&gt;
Encrypted communication should be used anytime there is a potential risk of an adversary listening and modyfing telemetry/datalink messages. While this risk is probably small for short hobby flights with very cheap drones, it might be non-negligible for a large remote sensing mission with expensive (tens of thousands of $) equipment. For sensitive missions, the RC commands should be run over datalink too (choose [[Airframe_Configuration#Radio_Control|RC_datalink]] as your RC module), to close the security gap for RC controlled drones.&lt;br /&gt;
&lt;br /&gt;
We hope that Paparazzi users will find '''s-pprzlink''' useful and convenient, and if you have any comments, suggestions or bug reports, please file [https://github.com/paparazzi/paparazzi/issues an issue on github].&lt;br /&gt;
[https://github.com/podhrmic podhrmic] would like to acknowledge [https://galois.com/ Galois] for contributed time and experize, [https://senman.cz Senman] for help with implementation and [http://aggieair.usu.edu/ AggieAir] for flight testing.&lt;br /&gt;
&lt;br /&gt;
== Encryption and Key exchange ==&lt;br /&gt;
Large parts of this text are from [https://github.com/GaloisInc/gec Galois Embedded Crypto], please consult there for more details.&lt;br /&gt;
&lt;br /&gt;
GEC key exchange is accomplished by combining the Station-To-Station (STS) protocol with curve25519 for key exchange, ed25519 for authentication, SHA512 with a counter for key derivation, and finally Chacha20Poly1305 for the key confirmation. Assume parties A and B with ed25519 asymmetric key pairs (Pa,Qa) and (Pb,Qb). The protocol proceeds as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#    A generates an ephemeral (random) curve25519 key pair (Pae, Qae) and sends Pae.&lt;br /&gt;
#    B generates ephemeral curve25519 key pair (Pbe, Qbe).&lt;br /&gt;
#    B computes the shared secret: z = scalar_multiplication(Qbe, Pae)&lt;br /&gt;
#    B uses the key derivation function kdf(z,1) to compute Kb || Sb, kdf(z,0) to compute Ka || Sa, and kdf(z,2) to compute Kclient || Sclient.&lt;br /&gt;
#    B computes the ed25519 signature: sig = signQb(Pbe || Pae)&lt;br /&gt;
#    B computes and sends the message Pbe || Ekey=Kb,IV=Sb||zero(sig)&lt;br /&gt;
#    A computes the shared secret: z = scalar_multiplication(Qae, Pbe)&lt;br /&gt;
#    A uses the key derivation function kdf(z,1) to compute Kb || Sb, kdf(z,0) to compute Ka || Sa, and kdf(z,2) to compute Kclient || Sclient.&lt;br /&gt;
#    A decrypts the remainder of the message, verifies the signature.&lt;br /&gt;
#    A computes the ed25519 signature: sig = signQa(Pae || Pbe)&lt;br /&gt;
#    A computes and sends the message Ekey=Ka,IV=Sa||zero(sig)&lt;br /&gt;
#    A returns the values (Kclient,Sclient) to the callee as the resulting key material.&lt;br /&gt;
#    B decrypts the message and verifies the signature. B then returns the tuple (Kclient,Sclient) to the callee as the resulting key material.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The wire-format is unsurprisingly a reproduction of the messages in the above computations:&lt;br /&gt;
&lt;br /&gt;
    message1 = [ Pae (32 bytes) ]&lt;br /&gt;
    message2 = [ Pbe (32 bytes) | Encrypted Signature (64 bytes) ]&lt;br /&gt;
    message3 = [ Encrypted Signature (64 bytes) ]&lt;br /&gt;
&lt;br /&gt;
The key derivation function is a SHA512 hash of the concatenation of a 16 bit big endian counter, the shared secret 'z', and a one byte party-specific identifier (0 for A, 1 for B and 2 for key material returned to the callee). The requested sizes are all under the output size of SHA512 so the counter is always zero and the return values are the first N bytes of the hash depending on the amount requested.&lt;br /&gt;
&lt;br /&gt;
    kdf(z,partyIdent) = SHA512( 0 || z || partyIdent)&lt;br /&gt;
&lt;br /&gt;
N.B. This key derivation technique is a common one, appearing in NIST SP 800-56A and other standards.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Secure link requires [https://www.rust-lang.org/en-US/ Rust]. The recommended way to install Rust on your computer is via [https://www.rustup.rs/ rustup.rs]. The rest is handled by the paparazzi build system.&lt;br /&gt;
&lt;br /&gt;
== How to use it == &lt;br /&gt;
&lt;br /&gt;
For start, we recommend using one of the existing configurations. You can then modify your own airfame as needed. Us ''aggieair_control_panel.xml'' as your control panel and ''aggieair_conf.xml'' as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Aggieair conf.png|500px|frame|center|Aggieair conf]]&lt;br /&gt;
&lt;br /&gt;
Choose ''Atomic'' airframe. If you are using your own airframe, simply change your telemetry module to ''telemetry_gec'' with optional ''GEC_STATUS_LED'' indicator (if your autopilot has an extra LED):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt; &lt;br /&gt;
      &amp;lt;module name=&amp;quot;telemetry&amp;quot;   type=&amp;quot;transparent_gec&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;configure name=&amp;quot;MODEM_PORT&amp;quot;        value=&amp;quot;UART3&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;configure name=&amp;quot;MODEM_BAUD&amp;quot;        value=&amp;quot;B57600&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;define name=&amp;quot;GEC_STATUS_LED&amp;quot; value=&amp;quot;5&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/module&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HACL-C library requires at least 2 kBytes of memory for all the stacks sending messages. If you don't use an RTOS (e.g. ChibiOS), You don't have anything to do. If yes, you need to increase the stack size of the FBW thread by adding to the firmware section (only '''fixedwing''' firmware):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;FBW_THREAD_STACK_SIZE&amp;quot; value=&amp;quot;1024*4&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should have enough space already with the threads AP (fixedwing) and MAIN (rotorcraft).&lt;br /&gt;
&lt;br /&gt;
Build and upload your code. Secure link works for [[NPS|NP]] targets, as well as for regular AP targets. Currently STM32-F4 autopilots are supported (you need a random number generator on chip), in bare metal version (ChibiOS will come later).&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you are planning to use [[HITL]] and secure link for telemetry at the same time, '''do not''' clean before building the target, because then you would remove the generated keys, needed for the key exchange (as described below).&lt;br /&gt;
&lt;br /&gt;
Choose either '''Secure Simulation''' (for NPS target) or '''Secure USB-serial@57600''' for regular flight, or '''Secure HITL USB-serial@57600''' for HITL target. If it is your first time running secure datalink, [https://doc.rust-lang.org/cargo/guide/ cargo] will download and compile [https://github.com/paparazzi/rustlink rustlink] which takes care of the ground part of secure communication. Once it is built, the keys are exchanged and you should see something like this:&lt;br /&gt;
&lt;br /&gt;
[[File:CryptoMsg3.png|500px|frame|center|Rustlink initiating secure communication]]&lt;br /&gt;
&lt;br /&gt;
''Going OK'' means the secure connection was established. You should see your regular telemetry, and you can check the connection status in ''SECURE_LINK_STATUS'' message:&lt;br /&gt;
&lt;br /&gt;
[[File:CryptoMsg2.png|700px|frame|center|HITL mission with secure link]]&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If either the UAV or rustlink resets, the secure connection is lost and has to be renegotiated. There is currently no mechanism for such, as allowing key renegotiation could introduce a security vulnerability.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
The 21 byte overhead at each message is the cost of secure communication. The exact effect on the message bandwidth depends on the length of messages being transmitted. The biggest difference is for short messages (such as ''PING'' or ''SETTING'') sent often. On the other hand, larger messages (such as ''ATTITUDE'' or ''GPS'') are proportionally less affected.&lt;br /&gt;
&lt;br /&gt;
For example, the following measurements were taken for nominal rotorcraft and fixedwing airframes:&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;70%&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!width=&amp;quot;7%&amp;quot;|'''Type'''!!width=&amp;quot;10%&amp;quot;|'''Standard downlink'''!!width=&amp;quot;10%&amp;quot;|'''Secure downlink'''!!width=&amp;quot;10%&amp;quot;|'''Difference'''&lt;br /&gt;
|-&lt;br /&gt;
|nominal rotocraft||911 bytes/s||1450 bytes/s||1.59x&lt;br /&gt;
|-&lt;br /&gt;
|nominal fixedwing||678 bytes/s||1250 bytes/s||1.84x&lt;br /&gt;
|-&lt;br /&gt;
|fixedwing with sonar||1865 bytes/s||4500 bytes/s||2.4x&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For typical configuration the increase in transmitted data is from '''1.6''' to '''1.9''', so depending on the channel bandwith the frequency of some messages might have to be adjusted. In the extreme case (such as sending a short ''SONAR'' message at high frequency), secure link can increase the amount of transferred data more than 2.5 times.&lt;br /&gt;
&lt;br /&gt;
Chacha20 is a cipher that is fast in software, and is faster than software implementation of AES, but slower than a hardware implementation of AES. Nonetheless, the additional CPU from secure link is negligible (tested on [[Lisa/M v20|Lisa MX]]).&lt;br /&gt;
&lt;br /&gt;
== Message Format == &lt;br /&gt;
&lt;br /&gt;
Secure link is simply a wrapper around pprzlink message. The main difference is an additional ''CRYPTO BYTE'' which determines whether the message is encrypted (''CRYPTO BYTE=0xaa'') or not (''CRYPTO BYTE=0x55''). If the message is not encrypted, the rest of the message is identical to a standard pprzlink message (SOURCE_ID .. optional MSG Payload) as shown below.&lt;br /&gt;
&lt;br /&gt;
If the message is encrypted, we add 4 bytes of message counter (which is also used as IV for encryption/decryption), and 16 bytes of authentication tag (to authenticate the message before decryption).&lt;br /&gt;
The counter is transmitted in plaintext and is not authenticated, because if it is tampered with, the decryption will fail. Message routing information (SENDER ID and DESTINATION ID) are transmitted in plaintext so the message can be properly routed in multi-node network, but the data are authenticated - so any change is detected before decryption occurs (thus discarding the whole message). The message structure is shown below (note that Pprzlink 2.0 is the default version for Paparazzi).&lt;br /&gt;
&lt;br /&gt;
=== S-Pprzlink 1.0 ===&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;70%&amp;quot;&lt;br /&gt;
|+'''S-Pprzlink v1.0'''&lt;br /&gt;
!width=&amp;quot;7%&amp;quot;|''byte''!!width=&amp;quot;10%&amp;quot;|''Value''!!width=&amp;quot;10%&amp;quot;|''Type''&lt;br /&gt;
|-&lt;br /&gt;
|0||PPRZ_STX (0x99)||style=&amp;quot;background:orange; color:black&amp;quot;|Header&lt;br /&gt;
|-&lt;br /&gt;
|1||length N (PPRZ_STX-&amp;gt;checksum B)||style=&amp;quot;background:orange; color:black&amp;quot;|Header&lt;br /&gt;
|-&lt;br /&gt;
|2|| crypto byte ||style=&amp;quot;background:red; color:white&amp;quot;|Crypto byte&lt;br /&gt;
|-&lt;br /&gt;
|3||counter LSB 1 ||style=&amp;quot;background:purple; color:white&amp;quot;|Counter&lt;br /&gt;
|-&lt;br /&gt;
|4||counter LSB 2 ||style=&amp;quot;background:purple; color:white&amp;quot;|Counter&lt;br /&gt;
|-&lt;br /&gt;
|5||counter LSB 3 ||style=&amp;quot;background:purple; color:white&amp;quot;|Counter&lt;br /&gt;
|-&lt;br /&gt;
|6||counter LSB 4 ||style=&amp;quot;background:purple; color:white&amp;quot;|Counter&lt;br /&gt;
|-&lt;br /&gt;
|7|| source ID ||style=&amp;quot;background:green; color:white&amp;quot;|Authenticated data&lt;br /&gt;
|-&lt;br /&gt;
|8|| message ID ||style=&amp;quot;background:yellow; color:black&amp;quot;|Encrypted payload&lt;br /&gt;
|-&lt;br /&gt;
|9..(N-16)|| (optional) message payload (0-234 bytes) ||style=&amp;quot;background:yellow; color:black&amp;quot;|Encrypted payload&lt;br /&gt;
|-&lt;br /&gt;
|(N-15)..(N-2)|| tag (16 bytes) ||style=&amp;quot;background:blue; color:white&amp;quot;|Authentication tag&lt;br /&gt;
|-&lt;br /&gt;
|N-1||checksum A||style=&amp;quot;background:orange; color:black&amp;quot;|Header&lt;br /&gt;
|-&lt;br /&gt;
|N||checksum B||style=&amp;quot;background:orange; color:black&amp;quot;|Header&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:V1 plain.png|500px|frame|center|Pprzlink 1.0 plaintext message]]&lt;br /&gt;
&lt;br /&gt;
[[File:V1 crypto.png|500px|frame|center|Pprzlink 1.0 encrypted message]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== S-Pprzlink 2.0 ===&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;  cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;text-align:center&amp;quot; cellpadding=&amp;quot;2%&amp;quot; width=&amp;quot;70%&amp;quot;&lt;br /&gt;
|+'''S-Pprzlink v2.0'''&lt;br /&gt;
!width=&amp;quot;7%&amp;quot;|''byte''!!width=&amp;quot;10%&amp;quot;|''Value''!!width=&amp;quot;10%&amp;quot;|''Type''&lt;br /&gt;
|-&lt;br /&gt;
|0||PPRZ_STX (0x99)||style=&amp;quot;background:orange; color:black&amp;quot;|Header&lt;br /&gt;
|-&lt;br /&gt;
|1||length N (PPRZ_STX-&amp;gt;checksum B)||style=&amp;quot;background:orange; color:black&amp;quot;|Header&lt;br /&gt;
|-&lt;br /&gt;
|2|| crypto byte ||style=&amp;quot;background:red; color:white&amp;quot;|Crypto byte&lt;br /&gt;
|-&lt;br /&gt;
|3||counter LSB 1 ||style=&amp;quot;background:purple; color:white&amp;quot;|Counter&lt;br /&gt;
|-&lt;br /&gt;
|4||counter LSB 2 ||style=&amp;quot;background:purple; color:white&amp;quot;|Counter&lt;br /&gt;
|-&lt;br /&gt;
|5||counter LSB 3 ||style=&amp;quot;background:purple; color:white&amp;quot;|Counter&lt;br /&gt;
|-&lt;br /&gt;
|6||counter LSB 4 ||style=&amp;quot;background:purple; color:white&amp;quot;|Counter&lt;br /&gt;
|-&lt;br /&gt;
|7|| source ID ||style=&amp;quot;background:green; color:white&amp;quot;|Authenticated data&lt;br /&gt;
|-&lt;br /&gt;
|8|| destination ID ||style=&amp;quot;background:green; color:white&amp;quot;|Authenticated data&lt;br /&gt;
|-&lt;br /&gt;
|9|| class component ||style=&amp;quot;background:yellow; color:black&amp;quot;|Encrypted payload&lt;br /&gt;
|-&lt;br /&gt;
|10|| message ID ||style=&amp;quot;background:yellow; color:black&amp;quot;|Encrypted payload&lt;br /&gt;
|-&lt;br /&gt;
|11..(N-16)|| (optional) message payload (0-234 bytes) ||style=&amp;quot;background:yellow; color:black&amp;quot;|Encrypted payload&lt;br /&gt;
|-&lt;br /&gt;
|(N-15)..(N-2)|| tag (16 bytes) ||style=&amp;quot;background:blue; color:white&amp;quot;|Authentication tag&lt;br /&gt;
|-&lt;br /&gt;
|N-1||checksum A||style=&amp;quot;background:orange; color:black&amp;quot;|Header&lt;br /&gt;
|-&lt;br /&gt;
|N||checksum B||style=&amp;quot;background:orange; color:black&amp;quot;|Header&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:V2 plain.png|500px|frame|center|Pprzlink 2.0 plaintext message]]&lt;br /&gt;
&lt;br /&gt;
[[File:V2 crypto.png|500px|frame|center|Pprzlink 2.0 encrypted message]]&lt;br /&gt;
&lt;br /&gt;
== Whitelisting messages == &lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
= Pprzlink proxy =&lt;br /&gt;
&lt;br /&gt;
When using several UAVs using UDP communication (or [[NPS]] simulations), the functionalities provided by the ''server'' agent is enough as long as there is no direct (air-to-air) communications (using v2 protocol). Otherwise, each UAV have to be accessed based on it's IP address or a specific port when simulating several aircraft on the same computer.&lt;br /&gt;
The connections between the ground and airborne agents then have to be done through the ''Pprzlink_proxy'' tool by associating the aircraft IDs with output and input ports (and eventually an IP address if different from the default value).&lt;br /&gt;
&lt;br /&gt;
Here is a list of usage examples:&lt;br /&gt;
 ./pprzlink_proxy.py --ac=101:4244:4245 --ac=102:4256:4247&lt;br /&gt;
 ./pprzlink_proxy.py --ac=101:4244:4245 --ac=102:4256:4247 --addr=192.168.1.1&lt;br /&gt;
 ./pprzlink_proxy.py --ac=101:4244:4245 --ac=102:192.168.1.2:4256:4247 --gcs=192.168.1.2&lt;br /&gt;
 ./pprzlink_proxy.py --script=proxy.txt&lt;br /&gt;
where 'proxy.txt' contains a list of parameters with the same format than the command line options (possibly one per line) and&lt;br /&gt;
 ./pprzlink_proxy.py -h&lt;br /&gt;
will show the complete list of options.&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=STLink&amp;diff=25221</id>
		<title>STLink</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=STLink&amp;diff=25221"/>
		<updated>2020-12-16T20:34:33Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Install Software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float: right; width: 20%&amp;quot;&amp;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;Firmware Flashing&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; width: 60%&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:St-link.jpg|right|450px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every STM discovery / eval board comes with a [http://www.st.com/web/catalog/tools/FM146/CL1984/SC724/SS1677/PF251168 ST-Link V2] on board, with one exception; the STM32VL version comes with a ST-Link V1.&lt;br /&gt;
&lt;br /&gt;
==SWD Header==&lt;br /&gt;
&lt;br /&gt;
[[Image:swd_header_discovery_board.png|250px|Pinout with Apogee connector]]&lt;br /&gt;
&lt;br /&gt;
==Install Software==&lt;br /&gt;
&lt;br /&gt;
'''INFO''' Latest version is now available on github in this repository: https://github.com/stlink-org/stlink, with all install instructions (from packages or from sources with CMake). Instruction below are for legacy code and should be removed soon.&lt;br /&gt;
&lt;br /&gt;
The ''st-flash'' and ''st-util'' tools are needed, provided by [https://github.com/texane/stlink texane]&lt;br /&gt;
&lt;br /&gt;
Download and compile&lt;br /&gt;
 $ cd /opt&lt;br /&gt;
 $ git clone git://github.com/texane/stlink.git stlink&lt;br /&gt;
 $ cd stlink&lt;br /&gt;
 $ ./autogen.sh&lt;br /&gt;
 $ ./configure&lt;br /&gt;
 $ make&lt;br /&gt;
&lt;br /&gt;
Set environment variable&lt;br /&gt;
 $ exportline=&amp;quot;PATH=$PATH:/opt/stlink&amp;quot;&lt;br /&gt;
 $ if grep -Fxq &amp;quot;$exportline&amp;quot; ~/.profile; then echo nothing to do ; else echo $exportline &amp;gt;&amp;gt; ~/.profile; fi&lt;br /&gt;
 $ source ~/.profile&lt;br /&gt;
&lt;br /&gt;
Add udev rules &lt;br /&gt;
 $ sudo cp /opt/stlink/49-stlinkv*.rules /etc/udev/rules.d&lt;br /&gt;
 $ sudo udevadm control --reload-rules&lt;br /&gt;
&lt;br /&gt;
ST-LinkV1 requires a bit different treatment, read the [https://github.com/texane/stlink/blob/master/README Readme.txt]&lt;br /&gt;
&lt;br /&gt;
==Airframe.xml setup==&lt;br /&gt;
&lt;br /&gt;
Connect the ST-Link to the MCU.&lt;br /&gt;
If a complete STM32Fx-Discovery board is used, CN3 jumpers need to be set. To program a external MCU, remove CN3 jumpers and connect the external MCU with the SWD header.&lt;br /&gt;
&lt;br /&gt;
To use SWD via STLink as default:&amp;lt;br/&amp;gt;&lt;br /&gt;
Set '''FLASH_MODE=STLINK'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Update the ST-Link to blackmagic probe==&lt;br /&gt;
&lt;br /&gt;
The STM32F103 (STLink MCU) can be flashed with the blackmagic's firmware.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Two STLinkV2 Method===&lt;br /&gt;
&lt;br /&gt;
Use one STLink to flash another&lt;br /&gt;
&lt;br /&gt;
Hardware Setup:&lt;br /&gt;
One STLinkV2 (connected via USB) is programming the other one. Change the 4 Solder jumpers on the bottom of the target STLinkV2 from &amp;quot;DEFAULT&amp;quot; to &amp;quot;REVERSED&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connections between the two STLinks&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;
|+'''Connections [Header-Pin]'''&lt;br /&gt;
!''Use''!!''From Programmer''!!''To Target''&lt;br /&gt;
|-&lt;br /&gt;
|5V||P2-5V||P2-5V&lt;br /&gt;
|-&lt;br /&gt;
|SWDIO||CN2-4||CN3-2&lt;br /&gt;
|-&lt;br /&gt;
|SWDCLK||CN2-2||CN3-3&lt;br /&gt;
|-&lt;br /&gt;
|GND||CN2-3||CN3-4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Download and build the Firmware&lt;br /&gt;
 git clone https://github.com/blacksphere/blackmagic&lt;br /&gt;
 cd blackmagic&lt;br /&gt;
 git submodule init&lt;br /&gt;
 git submodule update&lt;br /&gt;
 make&lt;br /&gt;
 cd src&lt;br /&gt;
 make clean&lt;br /&gt;
 make PROBE_HOST=stlink&lt;br /&gt;
&lt;br /&gt;
Remove the readout protection, erase and flash&lt;br /&gt;
 openocd -f interface/stlink-v2.cfg -f target/stm32f1x_stlink.cfg -c &amp;quot;init&amp;quot; -c &amp;quot;halt&amp;quot; -c &amp;quot;stm32f1x unlock 0&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
 st-flash erase&lt;br /&gt;
 st-flash --reset write blackmagic.bin 0x8002000&lt;br /&gt;
 st-flash write blackmagic_dfu.bin 0x8000000&lt;br /&gt;
&lt;br /&gt;
====Documentation====&lt;br /&gt;
&lt;br /&gt;
[http://esden.net/2014/12/29/black-magic-discovery Black Magic Discovery from Esden] &amp;lt;-- This also describes how to remove the read out protection. &amp;lt;br/&amp;gt;&lt;br /&gt;
[http://embdev.net/articles/STM_Discovery_as_Black_Magic_Probe embdev.net page]&lt;br /&gt;
&lt;br /&gt;
===BMP Method===&lt;br /&gt;
&lt;br /&gt;
Use a BMP to flash a STLink&lt;br /&gt;
&lt;br /&gt;
Transfer the solder jumpers from &amp;quot;Default&amp;quot; to &amp;quot;Reversed&amp;quot; and build the firmware as described above.&amp;lt;br/&amp;gt;&lt;br /&gt;
Connect the BMP to the CN2 header (see Pinout above).&lt;br /&gt;
&lt;br /&gt;
Start gdb, erase the option bytes and flash BMP&lt;br /&gt;
 (gdb) target extended-remote /dev/ttyACM0&lt;br /&gt;
 (gdb) mon swdp_scan&lt;br /&gt;
 (gdb) att 1 &lt;br /&gt;
 (gdb) mon option erase&lt;br /&gt;
 (gdb) load /dir/to/blackmagic&lt;br /&gt;
 (gdb) load /dir/to/blackmagic_dfu&lt;br /&gt;
 (gdb) detach&lt;br /&gt;
&lt;br /&gt;
The option bytes do not cover the Readout Protection (RDP), but the RDP is disabled anyhow...&lt;br /&gt;
&lt;br /&gt;
'''Error at loading a new image after removing RDP'''&lt;br /&gt;
&lt;br /&gt;
 Error erasing flash with vFlashErase packet&lt;br /&gt;
If this occurs powercycle the target (disconnect and reconnect the 3V3 connection), swd scan, attach and try loading the image again. Usually the reset of the RDP requires a flash erase (done by mon option erase) and reset.&lt;br /&gt;
&lt;br /&gt;
Probably this can also be done via gdb.&lt;br /&gt;
&lt;br /&gt;
==Clones==&lt;br /&gt;
&lt;br /&gt;
There are also a lot of different Chinese clones out there. Most with an identical MCU as the original STLinkV2, some with an STM32F101.&lt;br /&gt;
&lt;br /&gt;
It seems that each clone has its own programming pinout, so better double check (continuity tester) than to release the magic smoke...&lt;br /&gt;
&lt;br /&gt;
Most (all?) should work with the &amp;quot;stlink&amp;quot; target from Blackmagic Probe, since they probably use the same firmware from the original STLinkV2.&lt;br /&gt;
&lt;br /&gt;
===Red PCB===&lt;br /&gt;
&lt;br /&gt;
Seems to work with the standard stlink BMP image.&lt;br /&gt;
&lt;br /&gt;
[[Image:stlinkv2_clone_red_front.jpg|250px]]&lt;br /&gt;
[[Image:stlinkv2_clone_red_back.jpg|250px]]&lt;br /&gt;
&lt;br /&gt;
* STM32F103C8T6&lt;br /&gt;
&lt;br /&gt;
Programming header (1.27mm, populated on the images) from the Mini USB to the Pin header (right to left on the image), used for programming the onboard MCU.&lt;br /&gt;
&lt;br /&gt;
# SWDIO&lt;br /&gt;
# GND&lt;br /&gt;
# SWDCLK&lt;br /&gt;
# 3V3 &lt;br /&gt;
&lt;br /&gt;
Some Images and details about this hardware can be found at[https://www.mikrocontroller.net/articles/IRMP_auf_STM32_-_Bauanleitung]&lt;br /&gt;
&lt;br /&gt;
===Blue PCB===&lt;br /&gt;
NOT TESTED YET&lt;br /&gt;
[[Image:stlinkv2_clone_blue_front.jpg|250px]]&lt;br /&gt;
[[Image:stlinkv2_clone_blue_back.jpg|250px]]&lt;br /&gt;
&lt;br /&gt;
* STM32F103C8T6&lt;br /&gt;
&lt;br /&gt;
Programming header (2.54mm, unpopulated on the images) from the USB to the Pin header (left to the right on the images), used for programming the onboard MCU.&lt;br /&gt;
&lt;br /&gt;
# GND&lt;br /&gt;
# 5V&lt;br /&gt;
# USART1 RX (PA10)&lt;br /&gt;
# USART1 TX (PA9)&lt;br /&gt;
&lt;br /&gt;
Bootloader header (2.54mm, unpopulated on the images), from the USB to the Pin header (left to the right on the images), used for USART bootloader activation&lt;br /&gt;
&lt;br /&gt;
# 3V3&lt;br /&gt;
# BOOT0 (pin 44)&lt;br /&gt;
&lt;br /&gt;
The 3V3/5V switch selects the input voltage for the onboard MCU.&lt;br /&gt;
&lt;br /&gt;
===Aluminium housing===&lt;br /&gt;
NOT TESTED YET&lt;br /&gt;
[[Image:stlinkv2_clone_aluminium.jpg|250px]]&lt;br /&gt;
[[Image:stlinkv2_clone_aluminium_front.jpg|250px]]&lt;br /&gt;
[[Image:stlinkv2_clone_aluminium_back.jpg|250px]]&lt;br /&gt;
&lt;br /&gt;
* STM32F101C8T6&lt;br /&gt;
&lt;br /&gt;
Programming header (1.27mm, unpopulated on the images) from the USB to the Pin header (left to the right on the images), used for programming the onboard MCU.&lt;br /&gt;
&lt;br /&gt;
# SWDIO (PA13)&lt;br /&gt;
# GND&lt;br /&gt;
# SWDCLK(PA14)&lt;br /&gt;
# VDD, VBAT&lt;br /&gt;
&lt;br /&gt;
To disassemble pull the aluminium housing towards the USB connector.&lt;br /&gt;
&lt;br /&gt;
This has not the same hardware as https://github.com/blacksphere/blackmagic/issues/62 , but the same MCU, seems that this has just an other PCB.&lt;br /&gt;
&lt;br /&gt;
[[Category:Firmware Flashing]] [[Category:Developer_Documentation]]&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Flight_Plans&amp;diff=25219</id>
		<title>Flight Plans</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Flight_Plans&amp;diff=25219"/>
		<updated>2020-11-14T21:34:15Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Expressions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A '''flight plan''' is a XML document which one can create and store aboard an autopilot. The flight plan will describe how you want your aircraft to travel if released into into the wild blue yonder.&lt;br /&gt;
&lt;br /&gt;
== DTD and Structure ==&lt;br /&gt;
&lt;br /&gt;
The formal description of the flight plan file is given in the [http://en.wikipedia.org/wiki/Document_Type_Definition '''DTD'''] (located in &amp;lt;tt&amp;gt;conf/flight_plans/flight_plan.dtd&amp;lt;/tt&amp;gt;). This&lt;br /&gt;
DTD must be referenced in the header of your flight plan XML document using the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;!DOCTYPE flight_plan SYSTEM &amp;quot;flight_plan.dtd&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The flight plans are stored in the &amp;lt;tt&amp;gt;conf/flight_plans&amp;lt;/tt&amp;gt; directory. The [[Flight_Plan_Editor|flight plan editor]] can be used to create basic flight plans via the GUI.&lt;br /&gt;
&lt;br /&gt;
Extract from the [http://en.wikipedia.org/wiki/Document_Type_Definition DTD]:&lt;br /&gt;
 &amp;lt;tt&amp;gt;&amp;lt;!ELEMENT flight_plan (header?,waypoints,sectors?,variables?,includes?,exceptions?,blocks)&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''A flight plan is composed of two mandatory elements: [[#waypoints|waypoints]] and [[#blocks|blocks]]'''&lt;br /&gt;
&lt;br /&gt;
The root &amp;lt;tt&amp;gt;flight_plan&amp;lt;/tt&amp;gt; element is specified with several attributes:&lt;br /&gt;
 &amp;lt;tt&amp;gt;'''&amp;lt;flight_plan name lat0 lon0 ground_alt security_height home_mode_height qfu alt max_dist_from_home&amp;gt;'''&amp;lt;/tt&amp;gt;&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''name'''&amp;lt;/tt&amp;gt;: The name of the mission (a text string)&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''lat0, lon0'''&amp;lt;/tt&amp;gt;: Defines the latitude and longitude coordinates of the reference point {0,0} in WGS84 degree coordinates&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''ground_alt'''&amp;lt;/tt&amp;gt;: The ground altitude (in meters), Above Sea Level where you are flying. It defines the &amp;lt;tt&amp;gt;GROUND_ALT&amp;lt;/tt&amp;gt; constant value which can be used in combination with a waypoint &amp;lt;height&amp;gt; parameter to define a waypoint height&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt;:  The height (over &amp;lt;tt&amp;gt;'''ground_alt'''&amp;lt;/tt&amp;gt;) used by the circle-home failsafe procedure and in other flight procedures such as formation flight and anti-collision avoidance. Warnings are produced if you place a waypoint lower than &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt; (usually the case for the landing point)&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''home_mode_height'''&amp;lt;/tt&amp;gt; (optional): This optional attribute available since v4.2 allows to override &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt; as failsafe height in home mode. If &amp;lt;tt&amp;gt;'''home_mode_height'''&amp;lt;/tt&amp;gt; Is set lower than &amp;lt;tt&amp;gt;'''security_height'''&amp;lt;/tt&amp;gt;, the later is used. This attribute is useful if you need to return home at a high altitude rather than a low altitude.&lt;br /&gt;
; &amp;lt;tt&amp;gt;'''qfu'''&amp;lt;/tt&amp;gt; (optional): defines the global constant &amp;lt;tt&amp;gt;QFU&amp;lt;/tt&amp;gt;. It usually is the magnetic heading in degrees (north=0, east=90) of the runway, the opposite of wind direction. This constant may be used in the mission description. It is also used by the simulator as the original course of the aircraft. So if you want to take off and climb to the West you would use qfu=270. &lt;br /&gt;
; &amp;lt;tt&amp;gt;'''alt'''&amp;lt;/tt&amp;gt;: The default altitude of waypoints ([[Altitude_definitions|Above Sea Level]]). So if your ground altitude is 400 then alt needs to be a value greater than ground altitude and above any obstructions in the flight plan. &lt;br /&gt;
; &amp;lt;tt&amp;gt;'''max_dist_from_home'''&amp;lt;/tt&amp;gt;: A radius representing the maximum allowed distance (in meters) from the HOME waypoint. Exceeding this value (ie flying outside the circle with this radius) will trigger an exception. It is up to you to define the block to be executed (ie what to do) for the exception.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Here is an '''example''' of such a line in the top of a flight plan:''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;flight_plan alt=&amp;quot;250&amp;quot; ground_alt=&amp;quot;185&amp;quot; lat0=&amp;quot;43.46223&amp;quot; lon0=&amp;quot;1.27289&amp;quot; name=&amp;quot;Example Muret&amp;quot; max_dist_from_home=&amp;quot;300&amp;quot; qfu=&amp;quot;270&amp;quot; security_height=&amp;quot;25&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that a flight plan could also contain optional &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;'s and &amp;lt;tt&amp;gt;exceptions&amp;lt;/tt&amp;gt; cases.&lt;br /&gt;
&lt;br /&gt;
In English the above flight plan says the name is Example Muret. The reference coordinates for the 0,0 point is: 43.46223 (lat) and 1.27289 (long). The flying site 0,0 location is 185m above sea level. The security height is 25m above 0,0 point or 210m above sea level. The default (ie if not defined in a waypoint this alt is used) altitude is 250m (above sea level). The home mode block altitude is defined to be 150m above sea level. Also, for security, a circle is defined with a radius that's 300m from 0,0 position. This is the max_dist_from_home value. Fly 301m from 0,0 and an exception is triggered. A useful block is to trigger/go to the home mode block and return to home when the aircraft flies outside the safety circle. Example flight plans are helpful for study before you build your own from scratch.&lt;br /&gt;
&lt;br /&gt;
== Waypoints ==&lt;br /&gt;
&lt;br /&gt;
The waypoints are the geographic locations used to specify the trajectories. A waypoint is specified by it's name and coordinates:&lt;br /&gt;
 &amp;lt;tt&amp;gt;''' &amp;lt;waypoint name wpx wpy [alt] [height]/&amp;gt; '''&amp;lt;/tt&amp;gt;&lt;br /&gt;
where wpx and wpy are real positional coordinates ( &amp;lt;tt&amp;gt;'''lat/lon'''&amp;lt;/tt&amp;gt; )  '''or''' UTM coordinates ( &amp;lt;tt&amp;gt;'''utm_x0/utm_y0'''&amp;lt;/tt&amp;gt; ) '''or''' relative coordinates ( &amp;lt;tt&amp;gt;'''x/y'''&amp;lt;/tt&amp;gt; ) in meters from your reference point {0,0} .  &amp;lt;tt&amp;gt;alt&amp;lt;/tt&amp;gt; is an optional parameter and can be used to assign an altitude to a particular waypoint that is different from the globally defined &amp;lt;tt&amp;gt;alt&amp;lt;/tt&amp;gt; parameter of the flightplan. The &amp;lt;tt&amp;gt;height&amp;lt;/tt&amp;gt; attribute can be used to set the waypoint height relative to the [[Altitude_definitions|ground altitude]] (&amp;lt;tt&amp;gt;ground_alt&amp;lt;/tt&amp;gt;) of the flight plan for this waypoint.&lt;br /&gt;
&lt;br /&gt;
An example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;waypoints&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;HOME&amp;quot; x=&amp;quot;0.0&amp;quot; y=&amp;quot;30.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;BRIDGEOVERRIVER&amp;quot; x=&amp;quot;-100.0&amp;quot; y=&amp;quot;60.0&amp;quot; alt=&amp;quot;270.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;MyBarn&amp;quot; x=&amp;quot;-130.0&amp;quot; y=&amp;quot;217.5&amp;quot; alt=&amp;quot;3000.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;3&amp;quot; x=&amp;quot;-30.0&amp;quot; y=&amp;quot;50&amp;quot; height=&amp;quot;50.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;4&amp;quot; x=&amp;quot;-30.0&amp;quot; y=&amp;quot;50.&amp;quot; alt=&amp;quot;ground_alt + 50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;_MYHELPERSPOT&amp;quot; x=&amp;quot;-30.0&amp;quot; y=&amp;quot;60&amp;quot; height=&amp;quot;50.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;_MYOTHERHELPERSPOT&amp;quot; x=&amp;quot;-70.0&amp;quot; y=&amp;quot;90&amp;quot; height=&amp;quot;70.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;TOWER&amp;quot; lat=&amp;quot;48.858249&amp;quot; lon=&amp;quot;2.294494&amp;quot; height=&amp;quot;324.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;MountainCAFE&amp;quot; utm_x0=&amp;quot;360284.8&amp;quot; utm_y0=&amp;quot;4813595.5&amp;quot; alt=&amp;quot;1965.&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/waypoints&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Tips'''&lt;br /&gt;
* Waypoints are easily adjusted with the [[Flight_Plan_Editor|flight plan editor]].&lt;br /&gt;
* If a waypoint name starts with an underscore ( _ ), the waypoint is '''not displayed''' in the GCS, except in editor mode.&lt;br /&gt;
* The maximum number of waypoints is 254.&lt;br /&gt;
* A waypoint named &amp;lt;tt&amp;gt;HOME&amp;lt;/tt&amp;gt; is required if the failsafe HOME mode procedure is used.&lt;br /&gt;
* A waypoints index/reference pointer is derived by prefixing the waypoint name with &amp;quot;WP_&amp;quot;. Useful when a [[#Call |call function]] uses the waypoints reference index vs. it's name.&lt;br /&gt;
&lt;br /&gt;
== Sectors ==&lt;br /&gt;
&lt;br /&gt;
=== Static sectors (default) ===&lt;br /&gt;
&lt;br /&gt;
Flat ''Sectors'' can be described as an area defined by list of waypoint corners. Such an area will be displayed in the Ground Control Station (GCS) by colored lines connecting the cornerpoints.&lt;br /&gt;
A function is generated to check if a point, usually the aircraft itself, is ''inside'' this sector. Currently, this feature requires that the polygon is &amp;lt;b&amp;gt;convex&amp;lt;/b&amp;gt; and described in a &amp;lt;b&amp;gt;clockwise&amp;lt;/b&amp;gt; order. For a sector named &amp;lt;tt&amp;gt;MyBigGarden&amp;lt;/tt&amp;gt; the generated function for the example here would be &amp;lt;tt&amp;gt;bool_t InsideMyBigGarden(float x, float y);&amp;lt;/tt&amp;gt; where &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y&amp;lt;/tt&amp;gt; are east and north coordinated, in meters, relative to the geographic reference of the flight plan. If the flight plan is dynamically relocated, such a sector will be relocated but the display is currently not updated on the GCS. It would be great if one would help improving that part of the source code. Note that sector names are not allowed to contain spaces.&lt;br /&gt;
&lt;br /&gt;
For example, with the following element in a flight plan.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;sectors&amp;gt;&lt;br /&gt;
    &amp;lt;sector name=&amp;quot;MyBigGarden&amp;quot; color=&amp;quot;red&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;_4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/sector&amp;gt;&lt;br /&gt;
  &amp;lt;/sectors&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is then possible to add an exception clause to your flightplan. For example if the aircraft for some reason flies outside this, defined by us, sector the airframe will fly to a standby waypoint. The exclamation mark (!) means the boolean operator &amp;lt;tt&amp;gt;NOT&amp;lt;/tt&amp;gt; in this example. In regular language one would describe &amp;quot;If my airframe is NOT inside the MyBigGarden sector anymore then deroute it to the standby waypoint. In Flightplan &amp;quot;Speak&amp;quot; this is written like: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;exception cond=&amp;quot;! InsideMyBigGarden(GetPosX(), GetPosY())&amp;quot; deroute=&amp;quot;standby&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: editing of the waypoints of the sector during the flight will not dynamically update the inside function. It will always check if the position is inside the original sector.&lt;br /&gt;
&lt;br /&gt;
'''Tips'''&lt;br /&gt;
* A nice option in the corner notation is that one can add an underscore ( _ ) in front of the name; a corner or waypoint name that starts with an underscore is not displayed in the GCS. Only in editor mode it is visible. It is visible in editor mode, because if you the could not see it, it also would be not possible to edit or drag the corner or waypoint to another position.&lt;br /&gt;
* The color indicating the sector borders is not fixed but can be defined by oneself if wished for via the color attribute.&lt;br /&gt;
&lt;br /&gt;
=== Dynamic sectors ===&lt;br /&gt;
&lt;br /&gt;
With the latest version (v5.5-devel-628), it is possible to create dynamic sectors. The procedure to create the sector is the same than for the static version with an extra attribute '''type=&amp;quot;dynamic&amp;quot;''':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;sectors&amp;gt;&lt;br /&gt;
    &amp;lt;sector name=&amp;quot;MyBigGarden&amp;quot; color=&amp;quot;red&amp;quot; type=&amp;quot;dynamic&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;C4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/sector&amp;gt;&lt;br /&gt;
  &amp;lt;/sectors&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also recommended to avoid using hidden waypoints (no _ prefix), so you can move the corner of your sector from the GCS. The polygon is updated on the 2D map to reflect the new waypoints positions.&lt;br /&gt;
Beside the possibility to change the shape of the area in flight, one of the main benefit is that the algorithm behind allows concave hulls. The only restriction is that the edges of the polygon should not cross each other.&lt;br /&gt;
&lt;br /&gt;
The generated function is the same than the static version and can be used the same way.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
'''Available since v5.9'''&lt;br /&gt;
&lt;br /&gt;
It is possible to declare a list of variables that will be automatically created during the flight plan generation and available for the rest of the system from the generated flight plan header and of course inside the flight plan itself. With appropriate attributes, it is also possible to make the variables accessible from the telemetry as a [[Settings|setting]].&lt;br /&gt;
&lt;br /&gt;
The following code will produce a '''float''' variable initialized to 0:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variables&amp;gt;&lt;br /&gt;
    &amp;lt;variable var=&amp;quot;my_var&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/variables&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The type and the initial value can be changed with the '''type''' and '''init''' attributes:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variables&amp;gt;&lt;br /&gt;
    &amp;lt;variable var=&amp;quot;my_var&amp;quot; init=&amp;quot;10&amp;quot; type=&amp;quot;int&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/variables&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To produce an automatic setting for a variable, at least '''min''', '''max''' and '''step''' attributes need to be specified:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;variables&amp;gt;&lt;br /&gt;
    &amp;lt;variable var=&amp;quot;my_var&amp;quot; min=&amp;quot;0.&amp;quot; max=&amp;quot;10.&amp;quot; step=&amp;quot;0.1&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/variables&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
They will appear under the '''Flight Plan''' settings tab in the GCS. So more attributes can be specified: '''shortname''', '''unit''', '''alt_unit''', '''alt_unit_coef''', '''values'''. See [[Settings]] page for more information about these options.&lt;br /&gt;
&lt;br /&gt;
== 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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=25126</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=25126"/>
		<updated>2020-09-13T21:54:21Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Quickstart for Ubuntu users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Installation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux] or Apple Macintosh running [http://en.wikipedia.org/wiki/OS_X Mac OS X]. 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 &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;
For Ubuntu 20.04, the ''arm-none-eabi'' cross-compiler is directly available, so it is not needed to add the gcc-arm lauchpad repository.&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;
So, using ''python3'' as default:&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 gcc-arm-none-eabi &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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Bebop&amp;diff=25099</id>
		<title>Bebop</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Bebop&amp;diff=25099"/>
		<updated>2020-08-21T15:04:41Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float: right; width: 15%&amp;quot;&amp;gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Autopilots&amp;lt;/categorytree&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; width: 45%; overflow: hidden&amp;quot;&amp;gt;[[Image:Parrot-bebop-drone-new-03.jpeg|right|500px|Parrot Bebop]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; width: 40%&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
By default the [http://www.parrot.com/usa/products/bebop-drone/ Bebop] from [http://www.parrot.com/ Parrot] is a Wifi controlled flying quadrotor, designed to be controlled with an Android or iOS device. &lt;br /&gt;
&lt;br /&gt;
'''No more restrictions''' as from now; with a few simple clicks you can '''run Paparazzi on the Bebop''' and have full autonomous flight and much more!&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== What you need==&lt;br /&gt;
# A Bebop or Bebop 2 updated to at least firmware v3.3.0&lt;br /&gt;
# A joystick, for example [http://www.hobbyking.com/hobbyking/store/__20951__Hobbyking_6CH_RC_Flight_Simulator_System_Mode_2_.html this one]&lt;br /&gt;
# A laptop with Ubuntu installed&lt;br /&gt;
&lt;br /&gt;
Steps to follow: &lt;br /&gt;
# Install Paparazzi via [http://wiki.paparazziuav.org/wiki/Installation the one liner to be found here]. Just Cut 'n Paste (CTRL+C from webbrowser then CTRL+SHIFT+V in your Linux terminal) and press ENTER&lt;br /&gt;
# Start Paparazzi Center with the default configuration&lt;br /&gt;
# Power up your Bebop&lt;br /&gt;
# Press the '''on/off button four times''' short fast half a second clicks '''after''' the bebop is fully powerd up, notice the solid green light on Bebop and solid Red on Bebop 2&lt;br /&gt;
# Make a Wifi connection with your PC and the Bebop &lt;br /&gt;
# In the Paparazzi center choose &amp;quot;Bebop&amp;quot; Or &amp;quot;Bebop2&amp;quot; in the airframe dropdown menu&lt;br /&gt;
# Press the &amp;quot;Upload&amp;quot; button in the Paparazzi Center, wait...&lt;br /&gt;
# Select Flight UDP/Wifi in the session menu&lt;br /&gt;
# Press execute&lt;br /&gt;
&lt;br /&gt;
Voila, you will get telemetry from your Bebop. Now it is up to you how and where to fly.&lt;br /&gt;
&lt;br /&gt;
==Instruction Video==&lt;br /&gt;
TIP: Good [https://www.youtube.com/watch?v=eojAPZvT1Ck video series to watch]. Although it is made for the ARDrone 2, the steps are very similar for the Bebop drone. &lt;br /&gt;
&lt;br /&gt;
= Features =&lt;br /&gt;
== Connectivity ==&lt;br /&gt;
* Wi-Fi antennas: MIMO dual-band with 2 double-set of dipole antennas for 2.4 and 5 GHz&lt;br /&gt;
* Sending power: Up to 26 dBm&lt;br /&gt;
* Signal range: N/A&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
* 4 Brushless Outrunner motors&lt;br /&gt;
* Glass fiber reinforced (15%) ABS structure&lt;br /&gt;
* High-resistance EPP outdoor hull: Clip and unclip easily to adapt to indoor and outdoor flight, protects the propellers against potential bumps, can be removed to reduce wind factor&lt;br /&gt;
* Three-blade auto-block propellers in Polycarbonate with fast disassembly system&lt;br /&gt;
* Anti-vibration bumpers&lt;br /&gt;
&lt;br /&gt;
=== Full Motor details ===&lt;br /&gt;
&lt;br /&gt;
Handy in case for a simulator motor model&lt;br /&gt;
&lt;br /&gt;
====Bebop====&lt;br /&gt;
* Magnets: 12&lt;br /&gt;
* Stators: 9&lt;br /&gt;
* Layers of stator metal: 15&lt;br /&gt;
&lt;br /&gt;
* Copper windings: 34&lt;br /&gt;
* Copper diameter: 0.29mm&lt;br /&gt;
* Copper resistance: over 50 cm wire ~0.3 ohm&lt;br /&gt;
&lt;br /&gt;
Dimentions:&lt;br /&gt;
* Flange height 7.67mm&lt;br /&gt;
* Flange dia22.7mm&lt;br /&gt;
* Axis length 19.4mm&lt;br /&gt;
* Axis dia 1.9 mm&lt;br /&gt;
* Statorheight 5.55mm&lt;br /&gt;
* Stator diam 18.33mm&lt;br /&gt;
&lt;br /&gt;
Weight:&lt;br /&gt;
* Flange weight 3.05g&lt;br /&gt;
* Flange and magnets 5.15g (Magnet ~ 1.5mm thick on a Flange dia22.7mm)&lt;br /&gt;
* Magnet only (and the glue) 2.1g&lt;br /&gt;
&lt;br /&gt;
====Bebop 2====&lt;br /&gt;
* No dat (yet) It ould be nice if you could demolish on of your Bebop 2 motors or a spare one and add your data here.&lt;br /&gt;
&lt;br /&gt;
== Camera ==&lt;br /&gt;
* Camera with &amp;quot;Fisheye&amp;quot; lens 180° 1/2,3&amp;quot;: 6 optical elements and 14 Mega pixels sensor&lt;br /&gt;
* Video stabilization: Digital on 3-axes&lt;br /&gt;
* Video definition: 1920x1080p (30fps)&lt;br /&gt;
* Photo definition: 3800x3188 pixels&lt;br /&gt;
* Video encoding: H264&lt;br /&gt;
* Photo file format: RAW, DNG&lt;br /&gt;
* Internal memory: Flash 8 GB&lt;br /&gt;
* Extended memory: Micro USB&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
&lt;br /&gt;
Bebop 1&lt;br /&gt;
* Lithium Polymer 1200 mAh&lt;br /&gt;
* Flight time: Around 12 minutes&lt;br /&gt;
&lt;br /&gt;
Bebop 2&lt;br /&gt;
* Lithium Ion Polymer 2700 mAh&lt;br /&gt;
* Flight time: Around 22 minutes&lt;br /&gt;
* Max discharge rate 21.5A &lt;br /&gt;
* Max charge rate 3.5A&lt;br /&gt;
&lt;br /&gt;
== Processor ==&lt;br /&gt;
* Motherboard:&lt;br /&gt;
** Parrot P7 dual-core CPU Cortex A9&lt;br /&gt;
** Quad core GPU&lt;br /&gt;
** 8Gb flash memory&lt;br /&gt;
* All fixed on a magnesium shelf that acts as electromagnetic shielding and in the same run as a heat sink for heat dissipation and cooling of the all the onboard processors&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
* 3-axes magnetometer (AKM 8963)&lt;br /&gt;
* 3-axes gyroscope (MPU 6050)&lt;br /&gt;
* 3-axes accelerometer (MPU 6050)&lt;br /&gt;
* Optical-flow sensor (Fig.8): Vertical stabilization camera (Every 16 milliseconds, an image of the ground is taken and compared to the previous one to determine the speed of the Bebop Drone)&lt;br /&gt;
* Ultrasound sensor (Analyzes the flight altitude up to 8 meters)&lt;br /&gt;
* Pressure sensor (MS 5607)&lt;br /&gt;
&lt;br /&gt;
== Geo-location ==&lt;br /&gt;
* Bebop 1: GNSS (GPS + GLONASS + Galileo, [http://www.furuno.com/en/products/gnss-module/GN-87 Furuno GN-87F])&lt;br /&gt;
* Bebop 2: GNSS (GPS + GLONASS + Galileo, Baidu, [https://www.u-blox.com/en/product/neo-m8-series])&lt;br /&gt;
&lt;br /&gt;
== Dimensions ==&lt;br /&gt;
* 28x32x3.6cm without the hull&lt;br /&gt;
* 33x38x3.6cm with the hull&lt;br /&gt;
&lt;br /&gt;
== Weight ==&lt;br /&gt;
&lt;br /&gt;
=== Bebop 1 ===&lt;br /&gt;
* 380g without the hull&lt;br /&gt;
* 400g with the hull&lt;br /&gt;
&lt;br /&gt;
=== Bebop 2 ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! component&lt;br /&gt;
! weight&lt;br /&gt;
! quantity&lt;br /&gt;
! &lt;br /&gt;
! notes&lt;br /&gt;
|-&lt;br /&gt;
| motor&lt;br /&gt;
| 16.5&lt;br /&gt;
| 4&lt;br /&gt;
| 66&lt;br /&gt;
| with screws mounting motors&lt;br /&gt;
|-&lt;br /&gt;
| landing gear&lt;br /&gt;
| 2.4&lt;br /&gt;
| 4&lt;br /&gt;
| 9.6&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| frame&lt;br /&gt;
| 49.5&lt;br /&gt;
| 1&lt;br /&gt;
| 49.5&lt;br /&gt;
| with legs&lt;br /&gt;
|-&lt;br /&gt;
| rotor&lt;br /&gt;
| 5.0&lt;br /&gt;
| 4&lt;br /&gt;
| 20&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| battery&lt;br /&gt;
| 196.0&lt;br /&gt;
| 1&lt;br /&gt;
| 196&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| camera magnesium frame&lt;br /&gt;
| 7.3&lt;br /&gt;
| 1&lt;br /&gt;
| 7.3&lt;br /&gt;
| with all screws on it&lt;br /&gt;
|-&lt;br /&gt;
| camera&lt;br /&gt;
| 14.7&lt;br /&gt;
| 1&lt;br /&gt;
| 14.7&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| camera protector&lt;br /&gt;
| 9.0&lt;br /&gt;
| 1&lt;br /&gt;
| 9&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| GPS sensor module&lt;br /&gt;
| 16.0&lt;br /&gt;
| 1&lt;br /&gt;
| 16&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| foam cover&lt;br /&gt;
| 7.2&lt;br /&gt;
| 1&lt;br /&gt;
| 7.2&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| main board&lt;br /&gt;
| 107.0&lt;br /&gt;
| 1&lt;br /&gt;
| 107&lt;br /&gt;
| measured with all wires on it&lt;br /&gt;
|-&lt;br /&gt;
| Dampers&lt;br /&gt;
| 2.1&lt;br /&gt;
| 4&lt;br /&gt;
| 8.4&lt;br /&gt;
| dampers plus screws&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Total&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 510.7&lt;br /&gt;
| (511,91 measured for another BB2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OS/Software ==&lt;br /&gt;
* Operating system: Linux (kernel 3.4.11 #3 SMP PREEMPT)&lt;br /&gt;
* glibc: (Sourcery CodeBench Lite 2012.03-57) 2.15&lt;br /&gt;
* libstdc++: GLIBCXX_3.4 - GLIBCXX_3.4.16&lt;br /&gt;
&lt;br /&gt;
= Pinout =&lt;br /&gt;
== GPIO ==&lt;br /&gt;
* 6			Fans Enable&lt;br /&gt;
* 9			WiFi Reset&lt;br /&gt;
* 73			P7MU IRQ&lt;br /&gt;
* 81			GPS Power Enable&lt;br /&gt;
* 85			Fan Enable&lt;br /&gt;
* 89			VCAM FSYNC gyro&lt;br /&gt;
* 90			HCAM FSYNC gyro&lt;br /&gt;
* 91			DRDY MPU6050&lt;br /&gt;
* 124			Magneto interrupt&lt;br /&gt;
* 128			(video) Slew rate??&lt;br /&gt;
* 129		VCAM enable&lt;br /&gt;
* 130			(video) Slew rate??&lt;br /&gt;
* 132		HCAM enable&lt;br /&gt;
* 199		BLDC micro-controller reset (forces it into bootloader) ON/OFF&lt;br /&gt;
* 200		US Pulse level&lt;br /&gt;
* 201		On/Off button (default monitor to files running: /bin/onoffbutton)&lt;br /&gt;
* 202		USB Host mode pin 3V3 (HOST_MODE_3V3)&lt;br /&gt;
* 203		USB Host mode on&lt;br /&gt;
* 204		USB0 OC&lt;br /&gt;
&lt;br /&gt;
== PWM ==&lt;br /&gt;
* 6			Heating resistor for warming IMU sensors (125000ns period, 0ns duty)&lt;br /&gt;
* 8			MPU6050 clock (31510ns period, 15258ns duty) Desired frequency is 32768kHz with 50% duty cycle (period=30517us). Period was set empirically to 31517 to get a 5ms data ready period. Desired frequency is slightly modified to synchronize camera and IMU&lt;br /&gt;
* 9			Vertical camera clock (23ns period = 43MHz)&lt;br /&gt;
* 11			Horizontal camera lock (77ns period = 13MHz)&lt;br /&gt;
&lt;br /&gt;
== I2C ==&lt;br /&gt;
* I2C-0&lt;br /&gt;
** FPGA&lt;br /&gt;
** P7MU          &lt;br /&gt;
** EEPROM     Unknown EEPROM for Front camera calibration (addr 0x55)&lt;br /&gt;
** MT9f002      CMOS Digital Image Sensor (1/2.3 inch 14Mp, front camera) [http://www.onsemi.com/PowerSolutions/product.do?id=MT9F002 MT9f002] (addr 0x10)&lt;br /&gt;
** MT9v117     CMOS Digital Image Sensor (1/6 inch VGA, bottom camera) [http://www.aptina.com/assets/downloadDocument.do?id=553 MT9v117] (addr 0x5d)&lt;br /&gt;
* I2C-1&lt;br /&gt;
** Cypress       Motor Controller (Parrot BLDC) [[Bebop/BLDC]] (addr 0x08)&lt;br /&gt;
** AKM8963    Magnetometer [http://www.akm.com/akm/en/file/datasheet/AK8963.pdf AK8963]&lt;br /&gt;
** MS5607      Barometer [http://meas-spec.com/product/pressure/MS5607-02BA03.aspx MS5607]&lt;br /&gt;
* I2C-2&lt;br /&gt;
** MPU6050    Gyro + Accel [http://invensense.com/mems/gyro/documents/RM-MPU-6000A.pdf MPU6050] (rotation changed in version 2)&lt;br /&gt;
&lt;br /&gt;
== SPI ==&lt;br /&gt;
* spidev1.0 Sonar (Only data pin connected for generating pulses)&lt;br /&gt;
&lt;br /&gt;
== UART ==&lt;br /&gt;
* ttyPA1          GPS (Furuno GN-87F on v1 and Ublox Neo M8N on v2)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* /dev/hx280 Hantro (On2) Video encoder. Hantro chip video encoder used for the HCAM.&lt;br /&gt;
* /sys/bus/iio/devices/iio:device0 (p7mu-adc_2) Sonar ADC&lt;br /&gt;
&lt;br /&gt;
== Serial console ==&lt;br /&gt;
A physical serial port is accessible under the front cover. You can remove it properly by removing the 2 screws holding it and then cutting the glue between the foam and the main body with a thin blade.&lt;br /&gt;
See [https://ardupilot.org/dev/docs/building-for-bebop-on-linux.html] for pictures.&lt;br /&gt;
&lt;br /&gt;
The serial port on Bebop side is &amp;lt;code&amp;gt;/dev/ttyPA0&amp;lt;/code&amp;gt; at 115200 bauds.&lt;br /&gt;
If you can see the console output from an external terminal but don't get the prompt to type command, log with telnet and add the following line to the &amp;lt;code&amp;gt;/etc/init.d/rcS&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
  sh --login &amp;lt; /dev/ttyPA0 &amp;gt; /dev/ttyPA0 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
=  Actuators =&lt;br /&gt;
The Bebop has 4 Brushless motors, which are controlled by the cypress chip on I2C-1. This Cypress chip contains custom made firmware(BLDC) by Parrot, which can be automatically updated using a bootloader in the ESC part of the mainboard.&lt;br /&gt;
The firmware from Parrot contains a nice closed loop RPM control, which is automatically tuned inside the factory. &lt;br /&gt;
Since version 2 Parrot changed the order and rotation direction of the motors.&lt;br /&gt;
&lt;br /&gt;
For more information about how to communicate with the BLDC look at [[Bebop/BLDC]]. Or take a look at the &amp;quot;bebop&amp;quot; actuator inside the &amp;lt;code&amp;gt;airborne/boards/bebop/&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
= Onboard applications =&lt;br /&gt;
&lt;br /&gt;
The original programs on the Bebop&lt;br /&gt;
&lt;br /&gt;
* /usr/bin/dragon-prog		Main program that controls the drone&lt;br /&gt;
* /bin/watchdog.sh			Checks if Dragon is still running and reboots dragon-prog if it somehow would not be running anymore &lt;br /&gt;
&lt;br /&gt;
* BLDC_Test_Bench				Controls the Brushless Motor Controllers for testing and playing sounds etc.&lt;br /&gt;
* bcmwl						Everything with wifi&lt;br /&gt;
* diagnostic					Outputs sensor diagnostic&lt;br /&gt;
* mk3_camera_eeprom                     Reads the front camera EEPROM&lt;br /&gt;
* config_mt9v117                              Configure the bottom camera&lt;br /&gt;
&lt;br /&gt;
= Cross compiler =&lt;br /&gt;
For the Bebop you need to use a recent version GNU gcc-arm-linux-gnueabi (Ubuntu/Linaro 4.7.4-2ubuntu1) 4.7.4 provided with Ubuntu since 14.04 LTS.&lt;br /&gt;
&lt;br /&gt;
[http://electronics.stackexchange.com/questions/21594/is-code-sourcery-g-lite-still-a-viable-projectIn the past you could also crosscompile with Sourcery CodeBench Lite 2012.03-57 for ARM GNU/Linux from &amp;lt;s&amp;gt;Greedy&amp;lt;/s&amp;gt; Mentor Graphics, previously called codesourcery. However the open'ness there is nowhere to be found anymore, so we'll say &amp;quot;No thanks&amp;quot; to Codesourcery ,now &amp;lt;s&amp;gt;Greedy&amp;lt;/s&amp;gt; Mentor&amp;quot;]&lt;br /&gt;
but if you [https://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2012.03-57-arm-none-linux-gnueabi.bin insist] , feel &amp;lt;s&amp;gt;free&amp;lt;/s&amp;gt; restricted.&lt;br /&gt;
&lt;br /&gt;
If you somehow need to compile kernel driver files to run on your Parrot Bebop, well, yes, you must use [https://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2012.03-57-arm-none-linux-gnueabi.bin that exact compiler...]&lt;br /&gt;
&lt;br /&gt;
= Tips &amp;amp; Tricks =&lt;br /&gt;
&lt;br /&gt;
== Video ==&lt;br /&gt;
Make sure the [http://docs.paparazziuav.org/latest/module__video_rtp_stream.html video_rtp_stream.xml] module enabled in the airframe. &lt;br /&gt;
Receive a video stream with e.g. avplay, vlc or a python app:	&lt;br /&gt;
 $ avplay -loglevel quiet -max_delay 50 -fflags nobuffer rtp://192.168.42.1:5000&lt;br /&gt;
or&lt;br /&gt;
 $ vlc ~/paparazzi/var/sdp_tmp/192.168.42.1/stream.sdp&lt;br /&gt;
or&lt;br /&gt;
 $ ~/paparazzi/sw/tools/rtp_viewer/rtp_viewer.py&lt;br /&gt;
&lt;br /&gt;
== Factory Reset ==&lt;br /&gt;
You can reset the Parrot Bebop Drone to factory settings. You '''will''' loose all your photos and movies recorded on your Bebop.&lt;br /&gt;
To do this you need to press and hold the power button for 10 seconds. The LED will blink green and orange for a while, then green and the drone will shutdown. For BEbop2 the Red LED will blink.&lt;br /&gt;
&lt;br /&gt;
== Getting rid of 4x buttonpress ==&lt;br /&gt;
&lt;br /&gt;
Per default with latest frimware telnet access over Wifi is blocked. To reanable this there is a PPRZ configuration script work together with pprz.conf on your drone&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
With the latest firmware one gets better Video imagery. So if you can.. use the latest firmware  from parrot&lt;br /&gt;
&lt;br /&gt;
The Paparazzi volunteers test flew the Bebop with Firmware v1.98.11 and v2.0.57, v3.0, v3.2, v3.3, v3.9, v4.0.6, v4.7.1&lt;br /&gt;
&lt;br /&gt;
Note that under v4.0.x the hardware accelerated extra nifty  features for the front cam don't work (yet..) nOne could use the original encoder from the v3.9 firmware if wanted. So if you need hardware assisted compressed video imagery and have a Bebop 2 do not update to v4.x just yet. Or better fix the camera not working issue...&lt;br /&gt;
&lt;br /&gt;
The v4.0.6 is the latest firmware for Bebop 1. For bebop 2 Latest  is v4.7.1. &lt;br /&gt;
&lt;br /&gt;
Parrot stopped producing those Drones so this will be the ultimate final firmwares to exist.&lt;br /&gt;
&lt;br /&gt;
== Damper ==&lt;br /&gt;
The original Bebop2 damper are very soft and can cause oscillations around roll. You can print harder dampers from [http://www.thingiverse.com/thing:2135529 Thingiverse] yourself that will degrade the video quality but remove these oscillations. Use the _nodamp airframe files in that case.&lt;br /&gt;
&lt;br /&gt;
Or just add a 3mm thick plastic washer inbetween top nut and the body, don't forget put some 243 locktite on the nut again, else it '''will''' vibrate off&lt;br /&gt;
&lt;br /&gt;
== Serial bidirectional teminal access ==&lt;br /&gt;
&lt;br /&gt;
This is handy if one e.g want to dump and set the build in GPS with software like uCenter on a PC. uCenter also run under Wine.&lt;br /&gt;
&lt;br /&gt;
To do so you first have to set up a connection between U-center and the drone. This done by forwarding the GPS data from the drone to your laptop using a TCP connection. From your laptop this TCP connection is then forwarded to a wine COM port in order to make it readable for U-center. &lt;br /&gt;
&lt;br /&gt;
First open a terminal and listen on your laptop for incoming TCP connections on port 12345. &lt;br /&gt;
&lt;br /&gt;
    $ socat -d -dd pty,raw,echo=0 tcp-listen:12345&lt;br /&gt;
&lt;br /&gt;
Then open a telnet session (while connected to the wifi of the drone) using: &lt;br /&gt;
&lt;br /&gt;
    $ telnet 192.168.42.1&lt;br /&gt;
&lt;br /&gt;
and forward the GPS data to the server you just created (in the telnet session): &lt;br /&gt;
    $ nc &amp;lt;your_ip_address&amp;gt; 12345 &amp;lt;/dev/ttyPA1 &amp;gt;/dev/ttyPA1&lt;br /&gt;
&lt;br /&gt;
Switch back to the terminal in which you started listening to the tcp port. You should see that an incoming connection has been accepted. The port to which the connection is transferred to is also shown (see Figure). &lt;br /&gt;
&lt;br /&gt;
[[File:Socat accepted the connection.png|500px|Socat accepted the connection]]&lt;br /&gt;
&lt;br /&gt;
The next step is to link this port to a wine COM port. In the following example port /dev/pts/4 is linked to ./com32. &lt;br /&gt;
&lt;br /&gt;
    $ cd ~/.wine/dosdevices&lt;br /&gt;
    $ ln -sf /dev/pts/4 ./com32&lt;br /&gt;
&lt;br /&gt;
You should now be able to read the GPS data from u-center under the specified com port.&lt;br /&gt;
&lt;br /&gt;
= Using the MicroUSB for serial data =&lt;br /&gt;
&lt;br /&gt;
The Parrot Bebop, as well as the Parrot Disco have a micro USB connector on the main control board. This USB connector can be used to connect 3rd party equipment. For example with help of a USB to Serial conversion board, bidirectional serial communication to another serial device.&lt;br /&gt;
To use the driver in current firmware OTG serving should be off. [[use_the_USB_port_on_Parrot_Drones|Take a look here for more information, photos, connection examples, sourecode and real life examples]] of how to use this port.&lt;br /&gt;
&lt;br /&gt;
[[Category:Autopilots]]&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=DevGuide/Releasing&amp;diff=24461</id>
		<title>DevGuide/Releasing</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=DevGuide/Releasing&amp;diff=24461"/>
		<updated>2020-05-15T14:04:41Z</updated>

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

		<summary type="html">&lt;p&gt;Ghattenb: &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;
                [[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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=24459</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=24459"/>
		<updated>2020-05-15T13:49:00Z</updated>

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

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

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

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''Mission''' interface is based on datalink messages that dynamically add tasks (basic navigation patterns) to a queue, rather than using a static sequence like the [[Flight_Plans| flight plans]].&lt;br /&gt;
&lt;br /&gt;
'''Available since v5.2'''&lt;br /&gt;
&lt;br /&gt;
== Loading the mission controller ==&lt;br /&gt;
&lt;br /&gt;
The mission controller is based on a [[Modules|module]], that holds a common part for the message parsing and a specific part for the navigation (which depend on the firmware). Currently the available modules are:&lt;br /&gt;
&lt;br /&gt;
* [http://docs.paparazziuav.org/latest/module__mission_fw.html conf/modules/mission_fw.xml]&lt;br /&gt;
* [http://docs.paparazziuav.org/latest/module__mission_rotorcraft.html conf/modules/mission_rotorcraft.xml]&lt;br /&gt;
&lt;br /&gt;
The interface provides a ''mission_run()'' function that must be called from the classic flight plan. The mission controller will gives the control back to the flight plan when their is no more tasks to do. Some sample flight plans are provided with takeoff, mission control and landing procedures:&lt;br /&gt;
&lt;br /&gt;
* conf/flight_plans/mission_fw.xml&lt;br /&gt;
&lt;br /&gt;
== Mission elements ==&lt;br /&gt;
&lt;br /&gt;
The elements (or tasks) are basic navigation patterns that are sent to the aircraft and stored in a circular buffer. For each element, an insertion mode is required and a duration can be defined as well.&lt;br /&gt;
&lt;br /&gt;
=== Insertion modes ===&lt;br /&gt;
&lt;br /&gt;
The '''insertion modes''' are:&lt;br /&gt;
* '''Append''': add the task at the last position of the tasks' list&lt;br /&gt;
* '''Prepend''': add the task before the current element (the current one remains in the list)&lt;br /&gt;
* '''ReplaceCurrent''': replace the current mission element&lt;br /&gt;
* '''ReplaceAll''': remove all elements in the tasks' list and add a new one&lt;br /&gt;
&lt;br /&gt;
=== Duration ===&lt;br /&gt;
&lt;br /&gt;
A '''duration''' for each element can be specified. The time is a floating point value in seconds. When setting a '''zero''' (or even better a '''negative''') value, the duration parameter is not taken into account.&lt;br /&gt;
Be aware that some navigation pattern (like ''segment'') will end when reaching the end of the pattern or at the end of the duration time, but some (like ''circle'') will not if a positive duration is not set. It is always possible the go to the next mission element with a specific message.&lt;br /&gt;
&lt;br /&gt;
=== Navigation patterns ===&lt;br /&gt;
&lt;br /&gt;
The navigation patterns are more or less the same than the one available from the flight plan (except user specific function). The vertical control is currently limited to '''altitude control'''.&lt;br /&gt;
&lt;br /&gt;
* '''GOTO_WP''': go to a specific waypoint&lt;br /&gt;
** east: local east position of the waypoint&lt;br /&gt;
** north: local north position of the waypoint&lt;br /&gt;
* '''GOTO_LLA''': go to a specific global waypoint&lt;br /&gt;
** lat: latitude the waypoint&lt;br /&gt;
** lon: longitude of the waypoint&lt;br /&gt;
* '''CIRCLE''': fly a circle around a waypoint&lt;br /&gt;
** east: local east position of the center&lt;br /&gt;
** north: local north position of the center&lt;br /&gt;
** radius: radius of the circle (positive to turn clockwise, negative to turn counter-clockwise)&lt;br /&gt;
* '''CIRCLE_LLA''': fly a circle around a global waypoint&lt;br /&gt;
** lat: latitude of the center&lt;br /&gt;
** lon: longitude of the center&lt;br /&gt;
** radius: radius of the circle (positive to turn clockwise, negative to turn counter-clockwise)&lt;br /&gt;
* '''SEGMENT''': fly a segment between two waypoints&lt;br /&gt;
** east_1: local east position of the start waypoint&lt;br /&gt;
** north_1: local north position of the start waypoint&lt;br /&gt;
** east_2: local east position of the end waypoint&lt;br /&gt;
** north_2: local north position of the end waypoint&lt;br /&gt;
* '''SEGMENT_LLA''': fly a segment between two global waypoints&lt;br /&gt;
** lat_1: latitude of the start waypoint&lt;br /&gt;
** lon_1: longitude of the start waypoint&lt;br /&gt;
** lat_2: latitude of the end waypoint&lt;br /&gt;
** lon_2: longitude of the end waypoint&lt;br /&gt;
* '''PATH''': fly a sequence of segments (max 5 waypoints)&lt;br /&gt;
** east_'x': local east position of waypoint 'x'&lt;br /&gt;
** north_'x': local north position of waypoint 'x'&lt;br /&gt;
** nb: number of waypoints in the path (max 5)&lt;br /&gt;
** ''note: the 5 points are always sent, but only the first '''nb''' are used''&lt;br /&gt;
* '''PATH_LLA''': fly a sequence of segments (max 5 global waypoints)&lt;br /&gt;
** lat_'x': latitude of waypoint 'x'&lt;br /&gt;
** lon_'x': longitude of waypoint 'x'&lt;br /&gt;
** nb: number of waypoints in the path (max 5)&lt;br /&gt;
** ''note: the 5 points are always sent, but only the first '''nb''' are used''&lt;br /&gt;
* '''CUSTOM''': fly a custom pattern that have been registered by a navigation module (see dedicated section below)&lt;br /&gt;
** type: string identifier of the custom (5 char max)&lt;br /&gt;
** params: array of float (12 max) to pass pattern parameters&lt;br /&gt;
&lt;br /&gt;
=== Pattern index ===&lt;br /&gt;
&lt;br /&gt;
Each pattern is sent with an index (1 byte) which is left to the user. The report message will send back the array of index. The most common usage is to send an unique value for each pattern in order to identify the elements in the task list.&lt;br /&gt;
&lt;br /&gt;
== Sending tasks to the mission controller ==&lt;br /&gt;
&lt;br /&gt;
The mission elements are sent as '''datalink''' messages using [[Ivy]] from the ground or directly with the binary format by an onboard CPU.&lt;br /&gt;
&lt;br /&gt;
See ''conf/messages.xml'' for the exact message structure.&lt;br /&gt;
&lt;br /&gt;
== Mission status report ==&lt;br /&gt;
&lt;br /&gt;
The mission controller is periodically sending a report message '''MISSION_STATUS''' with the following fields:&lt;br /&gt;
&lt;br /&gt;
* remaining_time : time remaining for the current element in seconds (-1. if unlimited time)&lt;br /&gt;
* index_list: list of the elements pending in the mission controller&lt;br /&gt;
** each value in this list correspond to the index of each element (see pattern index section)&lt;br /&gt;
** the first element in the list is the current one&lt;br /&gt;
** if the list is empty, a single element with the value zero ('''0''') is sent&lt;br /&gt;
&lt;br /&gt;
== Custom patterns ==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Advanced_Navigation_Routines&amp;diff=24216</id>
		<title>Advanced Navigation Routines</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Advanced_Navigation_Routines&amp;diff=24216"/>
		<updated>2019-06-18T11:10:19Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Bungee Takeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The flight plan standard navigation functions are very flexible. However sometimes one needs to perform a very specific task, and the basic functions are not enough to accomplish a special mission. In that case you can use additional modules functions in the flight plan. By adding a navigation capability to your airframe. The flight plan now has extra functionality that can be used.&lt;br /&gt;
&lt;br /&gt;
= Available navigation modules =&lt;br /&gt;
&lt;br /&gt;
==  Navigation Routines ==&lt;br /&gt;
&lt;br /&gt;
Thanks to Team OSAM's contribution these navigation capabilities have been added.&lt;br /&gt;
&lt;br /&gt;
To use these navigation routines, you need to change the navigation subsystem type to extra in your airframe file. The navigation extra subsystem includes extra navigation routines like OSAMnav, spiral, poly_survey_advanced, nav_cube, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;subsystem name=&amp;quot;navigation&amp;quot; type=&amp;quot;extra&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also include OSAMNav.h in your flight plan:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 #include &amp;quot;subsystems/navigation/OSAMNav.h&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' The latest version of PaparazziUAV (v5.10 is the one I am using at the moment) does not have the OSAM navigation contributions as a subsystem but a module. It can be found in the link mentioned below. Not sure from which version the changes apply, but if you cannot find the header file in the subsystems folder, it is most probably in the modules folder.&lt;br /&gt;
&lt;br /&gt;
  sw/airborne/modules/nav&lt;br /&gt;
&lt;br /&gt;
== Flower ==&lt;br /&gt;
[[Image:FlowerScreenShot.png|thumb|Screen shot of flower routine]]&lt;br /&gt;
The flower navigation routine flies the aircraft in a flower pattern defined by two waypoints. The center waypoint defines the center of the flower and the altitude the plane flies at. The edge waypoint defines the radius of the flower.&lt;br /&gt;
&lt;br /&gt;
In our example the waypoints are called &amp;quot;Center&amp;quot; and &amp;quot;Edge&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;waypoint name=&amp;quot;Center&amp;quot; x=&amp;quot;-20.0&amp;quot; y=&amp;quot;-160.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;waypoint name=&amp;quot;Edge&amp;quot; x=&amp;quot;-10.0&amp;quot; y=&amp;quot;-60.0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Then you can add flower to your flight plan:&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block name=&amp;quot;Flower&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;call fun=&amp;quot;InitializeFlower(WP_Center,WP_Edge)&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;call fun=&amp;quot;FlowerNav()&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;
&lt;br /&gt;
Note that in the function InitializeFlower the waypoints need the prefix &amp;quot;WP_&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Bungee Takeoff ==&lt;br /&gt;
&lt;br /&gt;
The bungee takeoff routine helps to automate takeoff by turning the throttle on after the bungee has been release from the hook. The only waypoint you need for this routine is the position of where the bungee is pegged to the ground. Using this waypoint, a line is drawn from the position of the aircraft to the bungee waypoint. This line is called the launch line and will stop updating once the speed of the plane exceeds the MIN_SPEED. This allows the user to initialize the routine, move the plane and launch it without having to reinitialize. Once the plane is launched, it will follow the launch line until it crosses the throttle line. The throttle line is a line perpendicular to the launch line at a distance d from the bungee waypoint (see the diagram below). When the plane crosses the throttle line and the speed of the aircraft is greater than MIN_SPEED, the throttle comes on. After the throttle comes on, the plane keeps going straight until it reaches a specified speed and altitude above the bungee waypoint altitude. When it reaches the takeoff speed and takeoff altitude, the next block in the flight plan is executed. The takeoff speed, takeoff altitude, MIN_SPEED and the distance d from the bungee waypoint are specified in the airframe file. You will need to add those values to your airframe file like this...&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myAircraft.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;section name=&amp;quot;BUNGEE&amp;quot; prefix=&amp;quot;BUNGEE_TAKEOFF_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;HEIGHT&amp;quot; value=&amp;quot;30.&amp;quot; unit=&amp;quot;m&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;AIRSPEED&amp;quot; value=&amp;quot;15.&amp;quot; unit=&amp;quot;m/s&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DISTANCE&amp;quot; value=&amp;quot;10.&amp;quot; unit=&amp;quot;m&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;MIN_SPEED&amp;quot; value=&amp;quot;5.&amp;quot; unit=&amp;quot;m/s&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;PITCH&amp;quot; value=&amp;quot;15.&amp;quot; unit=&amp;quot;deg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;THROTTLE&amp;quot; value=&amp;quot;1.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You can add the bungee takeoff routine to your flight plan like so, assuming you have a BUNGEE waypoint correctly defined:&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;block name=&amp;quot;Takeoff&amp;quot; strip_button=&amp;quot;Bungee Takeoff&amp;quot; strip_icon=&amp;quot;takeoff.png&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;call_once fun=&amp;quot;nav_bungee_takeoff_setup(WP_BUNGEE)&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;call fun=&amp;quot;nav_bungee_takeoff_run()&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;
&lt;br /&gt;
To get this routine to work consistently, you will need to tune the values in the airframe config file. If the prop doesn't automatically turn on when it crosses the throttle line, it could be because the Distance and/or the MIN_SPEED are too big. If it turns on too early, it could be because the Distance and/or MIN_SPEED are too small. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt; ***Precaution should be taken while tuning the auto takeoff with electrical plane. If the MIN_SPEED is too low, the prop could turn on while holding the aircraft!***&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:BungeeTakeoffDiagram.png|Bungee takeoff diagram&lt;br /&gt;
Image:BungeeTakeoffInit.png|After bungee takeoff initialization&lt;br /&gt;
Image:BungeeTakeoffThrottleOn.png|After crossing the throttle line&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Polygon Survey ==&lt;br /&gt;
=== Explanation ===&lt;br /&gt;
With this navigation routine, an aircraft can survey the area of any [http://en.wikipedia.org/wiki/Convex_polygon convex polygon] given an entry point, the number of waypoints which define the polygon, the sweep width and the desired orientation of the sweeps.&lt;br /&gt;
&lt;br /&gt;
The entry point is the first corner of the polygon and the point at which the aircraft will begin surveying the area. When in the entry state, the aircraft will circle around the entry point in order to smoothly transition into the first sweep. The aircraft will also keep circling around the entry point until it gets to the waypoint altitude. After the first sweep is made, the direction of the next sweep is determined by the distance of the entry point to the edges of the polygon. If there is more area above the first sweep, the aircraft will sweep up. If there is more area below the first sweep, the aircraft will sweep down.&lt;br /&gt;
&lt;br /&gt;
The aircraft will keep sweeping back and forth until it reaches the end of the polygon. At this point, the aircraft will sweep back up/down the polygon halfway in between the sweeps previously made by the aircraft (just like the rectangle survey function). The aircraft will keep sweeping up and down the polygon unless the user manually exits the block or unless an exception is used ([[#Exceptions|see below]]).&lt;br /&gt;
&lt;br /&gt;
The orientation of the sweeps can ranges from north south to east west and any where in between (-90 &amp;lt;-&amp;gt; 90 degrees respectively). The side of the polygon the aircraft starts on (ex. north or south)  is determined by the side of the polygon the entry point is located.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:PolySurveySweepDef.png|Sweep Definition&lt;br /&gt;
Image:PolySurveyEntryPic.png|Entry Point&lt;br /&gt;
Image:PolySurveySweepBack.png|Sweeping Back&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Implementation ====&lt;br /&gt;
&lt;br /&gt;
You can add this navigation routine in your flight plan like so... &lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Poly Survey&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;call_once fun=&amp;quot;nav_survey_polygon_setup(WP_S1, NumberOfCorners, AngelOfSweep, WidthOfSweep, DistanceOfASensorTrigger, MinimumTrunRadius, AltitudeOfSurvey)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;nav_survey_polygon_run()&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;
&lt;br /&gt;
The parameters are the entry waypoint, the number of waypoints in the polygon, the sweep width (meters), and the desired orientation of the sweeps (degrees). The maximum number of waypoints a polygon can have is currently ten (can be changed in the code). If the number of waypoints in the polygon exceeds the maximum number, the routine will exit and move to the next block in the flight plan. The routine will also exit if the orientation is not between -90 and 90 degrees.&lt;br /&gt;
&lt;br /&gt;
Here is an example of how you should declare each of the corners of the polygon.&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;waypoint alt=&amp;quot;1453.0&amp;quot; name=&amp;quot;S1&amp;quot; x=&amp;quot;-546.2&amp;quot; y=&amp;quot;297.4&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;waypoint alt=&amp;quot;1453.0&amp;quot; name=&amp;quot;S2&amp;quot; x=&amp;quot;-129.8&amp;quot; y=&amp;quot;744.1&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;waypoint alt=&amp;quot;1553.0&amp;quot; name=&amp;quot;S3&amp;quot; x=&amp;quot;1030.5&amp;quot; y=&amp;quot;535.5&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;waypoint alt=&amp;quot;1453.0&amp;quot; name=&amp;quot;S4&amp;quot; x=&amp;quot;523.0&amp;quot; y=&amp;quot;-236.7&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;waypoint alt=&amp;quot;1453.0&amp;quot; name=&amp;quot;S5&amp;quot; x=&amp;quot;-285.9&amp;quot; y=&amp;quot;-255.7&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
S1 is the entry waypoint and the first corner. The other corners should be in order clockwise or counter clockwise around the polygon. Even though this group of waypoints must be declared together, where the group appears in the list of waypoints doesn't matter.&lt;br /&gt;
&lt;br /&gt;
If you want the edges of the polygon to show up on the GCS, you can also declare the polygon as a sector. This is not required to run the routine.&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&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;PolySector&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;S1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;S2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;S3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;S4&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;corner name=&amp;quot;S5&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;
&amp;lt;gallery caption=&amp;quot;A Range of Different Sweep Orientations&amp;quot;&amp;gt;&lt;br /&gt;
Image:PolySurvey0DegreeEx.png|0 Degrees&lt;br /&gt;
Image:PolySurvey30DegreeEx.png|30 Degrees&lt;br /&gt;
Image:PolySurvey65DegreeEx.png|65 Degrees&lt;br /&gt;
Image:PolySurvey90DegreeEx.png|90 Degrees&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Alternative configurations ====&lt;br /&gt;
&lt;br /&gt;
If you are wanting to start and stop the Poly Survey this is possible by splitting the Poly Survey code above into the initialization routine and the execution routine. You might want to do this if you are searching for something inside the Poly Survey, think you have found it and then realized you haven't, so you want to continue the survey (not restart it). Using the example above, but with the initialisation and execution code separate:&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Init Poly Survey&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;InitializePolygonSurvey(WP_S1, NumOfCorners, SweepWidth, Orientation)&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/block&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Execute Poly Survey&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;PolygonSurvey()&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;
&lt;br /&gt;
==== Exceptions ====&lt;br /&gt;
There are a couple of built in variables which can be used to exit the routine with an exception. PolySurveySweepNum gives the number of sweeps the aircraft has made and PolySurveySweepBackNum gives the number of times the aircraft has gotten to the bottom of the polygon and swept back. The first example would deroute the aircraft to standby after the aircraft made it's second sweep. The second example would deroute the aircraft to standby before it starts to sweep back up the polygon for the first time.&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Poly Survey&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;exception cond=&amp;quot;PolySurveySweepNum &amp;gt;= 2&amp;quot; deroute=&amp;quot;Standby&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;InitializePolygonSurvey(WP_S1, 5, 200, 45)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;PolygonSurvey()&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/block&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Poly Survey&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;exception cond=&amp;quot;PolySurveySweepBackNum &amp;gt;= 1&amp;quot; deroute=&amp;quot;Standby&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;InitializePolygonSurvey(WP_S1, 5, 200, 45)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;PolygonSurvey()&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;
&lt;br /&gt;
=== Flight Line ===&lt;br /&gt;
The Flight Line Routine allows the user to map/follow one dimensional areas of interest like roads and rivers. Given two waypoints, the routine will automatically transition into the flight line to ensure full coverage between the waypoints. In addition, distances before and after the flight line can be used to add extra security to the coverage.&lt;br /&gt;
&lt;br /&gt;
[[Image:OSAMFlightLineDiagram.png|Flight Line Diagram]]&lt;br /&gt;
&lt;br /&gt;
To use this navigation routine, you need to include OSAMNav.h in your flight plan and OSAMNav.c to your airframe file. Then add this navigation routine in your flight plan like so... &lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Map River&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;FlightLine(WP_R1,WP_R2,nav_radius,distance_before,distance_after)&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;
&lt;br /&gt;
Multiple flight lines can be daisy chained by reusing waypoints as shown below...&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;block name=&amp;quot;Map River&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;FlightLine(WP_R1,WP_R2,nav_radius,100,100)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;FlightLine(WP_R2,WP_R3,nav_radius,100,100)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;FlightLine(WP_R3,WP_R4,nav_radius,100,100)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;FlightLine(WP_R5,WP_R6,nav_radius,100,100)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;deroute block=&amp;quot;Standby&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;
&lt;br /&gt;
However, the previous block can also be implemented using the FlightLineBlock function. The FlightLineBlock function works the same as the FlightLine function except it automatically steps through the waypoints between the given waypoints. Make sure the waypoints are declared in order or else it won't work!&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;block name=&amp;quot;Map River&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;FlightLineBlock(WP_R1,WP_R6,nav_radius,100,100)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;deroute block=&amp;quot;Standby&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;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:OSAMFlightLineExample.jpg |Multiple Flight Line Example&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== misc ==&lt;br /&gt;
&lt;br /&gt;
=== Border line ===&lt;br /&gt;
&lt;br /&gt;
border_line is a nav-routine pretty similar to the nav-line-routine. You can use this nav-routine whenever you want to take care your plane stays on a defined site of a border.&lt;br /&gt;
For example you can use this routine to fly along a mountain and always turn away from the mountain ridge wall. Or use it fly along a border road without penetrating the other side of the border.&lt;br /&gt;
&lt;br /&gt;
Use &amp;quot;extra&amp;quot; navigation subsystem with:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;subsystem name=&amp;quot;navigation&amp;quot; type=&amp;quot;extra&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to use waypoint 1 and 2 you can add border_line in your flight plan like this:&lt;br /&gt;
* Include header in &amp;quot;header&amp;quot; section at the beginning&lt;br /&gt;
 #include &amp;quot;subsystems/navigation/border_line.h&amp;quot;&lt;br /&gt;
* Add function in a flight plan block:&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;block group=&amp;quot;extra_pattern&amp;quot; name=&amp;quot;border line&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;border_line_init()&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;border_line(WP_1, WP_2, -nav_radius)&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;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;example&amp;quot;&amp;gt;&lt;br /&gt;
Image:border_line.png|Screen shot of border_line&lt;br /&gt;
Image:border_line2.png|Screen shot of border_line2&lt;br /&gt;
Image:border_line3.png|Screen shot of border_line3&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GLS ===&lt;br /&gt;
&lt;br /&gt;
GLS or  '''G'''lobal Navigation Satellite System (GNSS) '''L'''anding '''S'''ystem adds advanced landing functions to your flightplan&lt;br /&gt;
&lt;br /&gt;
It add the following capabilities:&lt;br /&gt;
&lt;br /&gt;
# Fly via defined glide path angle&lt;br /&gt;
# In flight changeable landing direction without loosing the glide path angle!&lt;br /&gt;
# Smooth intercept, independent of approach angle or wind&lt;br /&gt;
# Separation of '''a'''pproach '''f'''ix, '''s'''tart '''d'''ecent and '''t'''op '''o'''f '''d'''ecent&lt;br /&gt;
# With fixed target speed (in airspeed mode only)&lt;br /&gt;
&lt;br /&gt;
====GLS related abbreviations====&lt;br /&gt;
&lt;br /&gt;
* GLS = '''G'''lobal Navigation Satellite System (GNSS) '''L'''anding '''S'''ystem&lt;br /&gt;
* TOD = '''t'''op '''o'''f '''d'''ecent&lt;br /&gt;
* AF  = '''A'''pproach '''Fix'''&lt;br /&gt;
* SD  = '''S'''tart '''D'''ecend&lt;br /&gt;
* TD  = '''T'''ouch '''D'''own point, The spot where the plane should touch the ground for landing&lt;br /&gt;
&lt;br /&gt;
====Configure====&lt;br /&gt;
&lt;br /&gt;
What to add to your airframe.&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/flight_plans/myflightplan.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;section name=&amp;quot;GLS_APPROACH&amp;quot; prefix=&amp;quot;APP_&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;ANGLE&amp;quot; value=&amp;quot;5&amp;quot; unit=&amp;quot;deg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;INTERCEPT_RATE&amp;quot; value=&amp;quot;0.624&amp;quot; unit=&amp;quot;m/s/s&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;DISTANCE_AF_SD&amp;quot; value=&amp;quot;20&amp;quot; unit=&amp;quot;m&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;TARGET_SPEED&amp;quot; value=&amp;quot;14&amp;quot; unit=&amp;quot;m/s&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ANGLE                   - angle from TOD to TD&lt;br /&gt;
&lt;br /&gt;
DISTANCE_AF_SD  - minimum distance (meter) between AF and SD to allow the plane to self stabilize before the intercept starts (e.g. for speed reduction)&lt;br /&gt;
&lt;br /&gt;
You can set the landing direction by moving the approach fix (AF) in relation to the touch down point (TD).&lt;br /&gt;
If you try to set the AF close to the TD  you will see how the top of decent (TOD) and start decent (SD) is calculated and if necessary the AF is moved backwards.&lt;br /&gt;
(please try in simulation)&lt;br /&gt;
&lt;br /&gt;
TARGET_SPEED      - desired airspeed from AF to TD &lt;br /&gt;
&lt;br /&gt;
INTERCEPT_RATE   -&lt;br /&gt;
&lt;br /&gt;
e.g. no wind: TARGET_SPEED = 14m/s and ANGLE = 10 --&amp;gt; desired decent rate 2.5 m/s    (speed * tan(ANGLE))&lt;br /&gt;
&lt;br /&gt;
with an INTERCEPT_RATE of 0.624 m/s/s it will take 4s to intercept the final approach path (desired decent rate / intercept_rate)&lt;br /&gt;
&lt;br /&gt;
the idea is that the INTERCEPT_RATE is unique to each plane and will not change with different approach angles&lt;br /&gt;
&lt;br /&gt;
to find an appropriate value you can start with a lower (to match 8s for example) and increase it until the intercept will be made from above&lt;br /&gt;
&lt;br /&gt;
in general: bigger plane - smaller value!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
how to setup your flightplan.xml:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;waypoints&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint height=&amp;quot;150&amp;quot; name=&amp;quot;AF&amp;quot; x=&amp;quot;-260.6&amp;quot; y=&amp;quot;-344.6&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;SD&amp;quot; x=&amp;quot;-1600.&amp;quot; y=&amp;quot;-36.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint name=&amp;quot;TOD&amp;quot; x=&amp;quot;-1600.&amp;quot; y=&amp;quot;-36.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint height=&amp;quot;0.0&amp;quot; name=&amp;quot;TD&amp;quot; x=&amp;quot;-27.2&amp;quot; y=&amp;quot;-243.5&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;waypoint height=&amp;quot;266.0&amp;quot; name=&amp;quot;_BASELEG&amp;quot; x=&amp;quot;-1652.1&amp;quot; y=&amp;quot;-113.5&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/waypoints&amp;gt;&lt;br /&gt;
&lt;br /&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;gls_init(WP_AF,WP_SD, WP_TOD, WP_TD)&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)-(nav_radius/fabs(nav_radius))*10),&lt;br /&gt;
                               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;block name=&amp;quot;final&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;exception cond=&amp;quot;ground_alt + 10 &amp;gt; estimator_z&amp;quot; deroute=&amp;quot;flare&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;call fun=&amp;quot;gls(WP_AF,WP_SD, WP_TOD, WP_TD)&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;
&lt;br /&gt;
those pictures match the old gls routine! anyway - the new one is not much different... (POS I = SD)&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;theory&amp;quot;&amp;gt;&lt;br /&gt;
Image:gls1.png|side view&lt;br /&gt;
Image:gls2.png|from above&lt;br /&gt;
Image:gls3.png|screen shot of flight test&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Multi-UAV ==&lt;br /&gt;
For TCAS (Traffic Collision Avoidance System) see the [[MultiUAV]] page.&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]] [[Category:Navigation]] [[Category:User_Documentation]]&lt;br /&gt;
&lt;br /&gt;
= Create a navigation module =&lt;br /&gt;
&lt;br /&gt;
Creating a navigation module is not to complex. Have said that, it is not very likely to need to create one module oneself. The already available functions are very flexible and powerful. Before you set of to create and additional navigation module, make sure you understand all current modules and their capabilities. After you investigated current modules and came to the conclusion, there is no way to solve you flightplan mission by creating a new module, go ahead and plz share your work with the community. The more people test the new module, the faster it will reach a stable state.&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=24145</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=24145"/>
		<updated>2018-12-19T22:09:27Z</updated>

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

		<summary type="html">&lt;p&gt;Ghattenb: /* Basic example */&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 two 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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24084</id>
		<title>Autopilot generation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24084"/>
		<updated>2018-05-04T14:08:04Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Basic example */&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 two 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;
   &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;
     &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;
 &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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24083</id>
		<title>Autopilot generation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24083"/>
		<updated>2018-05-04T14:02:55Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Basic example */&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 two 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;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;/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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24082</id>
		<title>Autopilot generation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24082"/>
		<updated>2018-05-04T14:02:21Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* XML file description */&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 two 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/autopilot/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;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;/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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24081</id>
		<title>Autopilot generation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24081"/>
		<updated>2018-05-04T13:37:21Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Limitations */&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 two 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;
* 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;
== 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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24080</id>
		<title>Autopilot generation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24080"/>
		<updated>2018-05-04T13:29:53Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Call blocks */&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 two 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;
* 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;
== 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;
# 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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Software/Index&amp;diff=24079</id>
		<title>Software/Index</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Software/Index&amp;diff=24079"/>
		<updated>2018-05-04T13:12:50Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[Installation|Installation]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Installing and configuring Paparazzi&amp;lt;/small&amp;gt;&lt;br /&gt;
*[[Paparazzi_Center|Paparazzi Center]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Configuring and running Paparazzi&amp;lt;/small&amp;gt;&lt;br /&gt;
*[[Airframe_Configuration|Airframe Configuration]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;General firmware setup&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Fixedwing_Configuration|Fixed-wing Configuration]]&lt;br /&gt;
**[[Rotorcraft_Configuration|Rotorcraft Configuration]]&lt;br /&gt;
**[[Subsystems|Subsystems]]&lt;br /&gt;
**[[Modules|Modules]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Add new airborne code in a flexible way&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Autopilot_generation|Autopilot Generation]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Design your own autopilot modes&amp;lt;/small&amp;gt;&lt;br /&gt;
*[[GCS|Ground Station]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Ground station use and configuration&amp;lt;/small&amp;gt;&lt;br /&gt;
*[[Simulation|Simulation]]&lt;br /&gt;
**[[NPS|Rotorcraft simulator]]&lt;br /&gt;
*Autonomous Navigation&lt;br /&gt;
**[[Flight_Plans|Flight Plans]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Creating and editing a flight plan&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Advanced Navigation Routines|Advanced Navigation Routines]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Descriptions of advanced user created navigation routines&amp;lt;/small&amp;gt;&lt;br /&gt;
**[[Mission|Mission]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Control your aircraft with a mission-oriented interface&amp;lt;/small&amp;gt;&lt;br /&gt;
*[[FirmwareFlashing|Flashing]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Update the autopilot firmware&amp;lt;/small&amp;gt;&lt;br /&gt;
*[[Tuning|Tuning]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Flight testing and tuning procedures&amp;lt;/small&amp;gt;&lt;br /&gt;
*[[Logs|Logs]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Log analysis and replay&amp;lt;/small&amp;gt;&lt;br /&gt;
*[[SoftwareTools|Software Tools]]&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Various software tools and additions to Paparazzi&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;!-- This is a reusable index for the menu tree on the home page any and all text on this page will be displayed in the menu tree --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24078</id>
		<title>Autopilot generation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Autopilot_generation&amp;diff=24078"/>
		<updated>2018-05-04T13:08:43Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: Created page with &amp;quot;&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; This page presents th...&amp;quot;&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 two 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;
* 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;
=== Call 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;
== 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;
# 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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=File:Pprz_mode_example.png&amp;diff=24077</id>
		<title>File:Pprz mode example.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=File:Pprz_mode_example.png&amp;diff=24077"/>
		<updated>2018-05-04T12:05:21Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=File:Full_mode_example.png&amp;diff=24076</id>
		<title>File:Full mode example.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=File:Full_mode_example.png&amp;diff=24076"/>
		<updated>2018-05-04T11:58:13Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Pprzlink&amp;diff=23984</id>
		<title>Pprzlink</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Pprzlink&amp;diff=23984"/>
		<updated>2017-12-14T22:00:36Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''PPRZLINK''' is the communication library used by the Paparazzi UAV project and other related projects.&lt;br /&gt;
&lt;br /&gt;
It provides:&lt;br /&gt;
* Bulleted list item&lt;br /&gt;
* a set of messages definitions&lt;br /&gt;
* various encapsulation protocols&lt;br /&gt;
* several high-level access to physical layers (serial, udp, [[Ivy]])&lt;br /&gt;
* several language support (Ocaml, C, Python)&lt;br /&gt;
&lt;br /&gt;
Source code can be download from Github: https://github.com/paparazzi/pprzlink&lt;br /&gt;
&lt;br /&gt;
The creation of PPRZLINK as a separated project from the main Paparazzi source code is the result of the [[Roadmap#Communication_Roadmap|communication roadmap]]. At the moment it is released under GPL v2, but it may be changed to LGPL in order to ease integration into third-party projects.&lt;br /&gt;
&lt;br /&gt;
A (not very complete) documentation is also available on the [https://pprzlink.readthedocs.io/en/latest/ readthedocs] platform.&lt;br /&gt;
&lt;br /&gt;
Some useful related project:&lt;br /&gt;
* [https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander]: HMI to control several synchronized UAVs&lt;br /&gt;
* [https://github.com/enacuavlab/pprzros PPRZROS]: bridge for the ROS middleware&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Messages' definition =&lt;br /&gt;
&lt;br /&gt;
The messages are organized three main classes:&lt;br /&gt;
* ''telemetry'': messages sent by the aircraft, usually to the ground, a.k.a. downlink stream&lt;br /&gt;
* ''datalink'': messages sent by the ground to the aircraft, a.k.a. uplink&lt;br /&gt;
* ''ground'': messages exchanged between ground agents over the [[Ivy]] software bus&lt;br /&gt;
[[File:Pprz communication agents.gif]]&lt;br /&gt;
&lt;br /&gt;
The generated documentation is available here: http://docs.paparazziuav.org/latest/paparazzi_messages.html&lt;br /&gt;
&lt;br /&gt;
New messages can be integrated mainstream in the [https://github.com/paparazzi/pprzlink/blob/master/message_definitions/v1.0/messages.xml messages xml file] from PPRZLINK. When using with Paparazzi, it is also possible to use an temporary file placed in the ''conf'' folder. If not present, the default set is used.&lt;br /&gt;
&lt;br /&gt;
= Protocols =&lt;br /&gt;
&lt;br /&gt;
== Principles ==&lt;br /&gt;
PPRZLINK is based on encapsulation. The first layer is the message level, mostly containing the data and the required information to decode them. The structure of this part is always the same. The second layer called ''transport'' can be changed according to the actual physical layer being used. The basic type (''pprz'') is just providing synchronization byte and checksum, but other transports offer more possibility of routing like the ''XBee' transport (especially the possibility to use point-to-point or broadcast).&lt;br /&gt;
&lt;br /&gt;
The message formats are described [[Messages_Format|here]]. A ''secured'' version is currently under development.&lt;br /&gt;
&lt;br /&gt;
== Differences between version 1 and 2 ==&lt;br /&gt;
&lt;br /&gt;
A new version (v2) have been developed to overcome several limitations. With version 1, only the message ID (1 byte) and the sender ID (1 byte) are provided in the message layer before the data part. It means that:&lt;br /&gt;
* messages can't be addressed to a particular receiver unless the transport layer can provide the service&lt;br /&gt;
* it is not possible to determine the class of messages, so it is assumed that telemetry messages are strictly downlink and datalink messages strictly uplink, thus preventing direct air-to-air communications&lt;br /&gt;
&lt;br /&gt;
With the version two of the protocol, two extra bytes have been added to the message header:&lt;br /&gt;
* the receiver ID (1 byte)&lt;br /&gt;
* a class ID (4 bits)&lt;br /&gt;
* a component ID (4 bits)&lt;br /&gt;
The class and component are part of the same byte. Even if the component ID is not really used at the moment (provision for future use), the class ID avoid ambiguities on messages. With the receiver ID, it is now possible to perform air-to-air communications and to broadcast messages from an aircraft (previously only possible from the ground).&lt;br /&gt;
&lt;br /&gt;
See [[Messages_Format|messages format]] page for more details.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
&lt;br /&gt;
Currently, the available interfaces are:&lt;br /&gt;
* serial stream&lt;br /&gt;
* udp packet&lt;br /&gt;
* [[Ivy]] based messages (publisher/subscriber middelware over TCP/IP, should only be used on the ground side)&lt;br /&gt;
&lt;br /&gt;
In addition a bridge to the [http://www.ros.org ROS] middleware is available at https://github.com/enacuavlab/pprzros&lt;br /&gt;
&lt;br /&gt;
== Language supports ==&lt;br /&gt;
&lt;br /&gt;
The supported languages are:&lt;br /&gt;
* C language&lt;br /&gt;
** generation of code (header files) for sending and decoding messages&lt;br /&gt;
** mostly used for the airborne code of Paparazzi&lt;br /&gt;
* Ocaml&lt;br /&gt;
** library based high-level functions for binding, subscribing and parsing messages&lt;br /&gt;
** mostly used by the ground station agents: links, GCS, server, ...&lt;br /&gt;
* Python&lt;br /&gt;
** Provide similar functionality than the Ocaml implemetation&lt;br /&gt;
** used in a large variety of smaller tools and ground agents&lt;br /&gt;
&lt;br /&gt;
= Secure Ppprzink =&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Secure link requires [https://www.rust-lang.org/en-US/ Rust]. The recommended way to install Rust on your computer is via [https://www.rustup.rs/ rustup.rs].&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mitls/hacl-star HACL*] also has to be installed. Paparazzi provides a convenient [https://github.com/paparazzi/hacl-c snapshot] of the generated C code. To install HACL*, go to ''sw/ext/hacl-c'' and type:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
make&lt;br /&gt;
sudo cp libhacl.* /usr/local/lib/.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Pprzlink proxy =&lt;br /&gt;
&lt;br /&gt;
When using several UAVs using UDP communication (or [[NPS]] simulations), the functionalities provided by the ''server'' agent is enough as long as there is no direct (air-to-air) communications (using v2 protocol). Otherwise, each UAV have to be accessed based on it's IP address or a specific port when simulating several aircraft on the same computer.&lt;br /&gt;
The connections between the ground and airborne agents then have to be done through the ''Pprzlink_proxy'' tool by associating the aircraft IDs with output and input ports (and eventually an IP address if different from the default value).&lt;br /&gt;
&lt;br /&gt;
Here is a list of usage examples:&lt;br /&gt;
 ./pprzlink_proxy.py --ac=101:4244:4245 --ac=102:4256:4247&lt;br /&gt;
 ./pprzlink_proxy.py --ac=101:4244:4245 --ac=102:4256:4247 --addr=192.168.1.1&lt;br /&gt;
 ./pprzlink_proxy.py --ac=101:4244:4245 --ac=102:192.168.1.2:4256:4247 --gcs=192.168.1.2&lt;br /&gt;
 ./pprzlink_proxy.py --script=proxy.txt&lt;br /&gt;
where 'proxy.txt' contains a list of parameters with the same format than the command line options (possibly one per line) and&lt;br /&gt;
 ./pprzlink_proxy.py -h&lt;br /&gt;
will show the complete list of options.&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Pprzlink&amp;diff=23923</id>
		<title>Pprzlink</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Pprzlink&amp;diff=23923"/>
		<updated>2017-11-24T00:02:35Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''PPRZLINK''' is the communication library used by the Paparazzi UAV project and other related projects.&lt;br /&gt;
&lt;br /&gt;
It provides:&lt;br /&gt;
* Bulleted list item&lt;br /&gt;
* a set of messages definitions&lt;br /&gt;
* various encapsulation protocols&lt;br /&gt;
* several high-level access to physical layers (serial, udp, [[Ivy]])&lt;br /&gt;
* several language support (Ocaml, C, Python)&lt;br /&gt;
&lt;br /&gt;
Source code can be download from Github: https://github.com/paparazzi/pprzlink&lt;br /&gt;
&lt;br /&gt;
The creation of PPRZLINK as a separated project from the main Paparazzi source code is the result of the [[Roadmap#Communication_Roadmap|communication roadmap]]. At the moment it is released under GPL v2, but it may be changed to LGPL in order to ease integration into third-party projects.&lt;br /&gt;
&lt;br /&gt;
A (not very complete) documentation is also available on the [https://pprzlink.readthedocs.io/en/latest/ readthedocs] platform.&lt;br /&gt;
&lt;br /&gt;
Some useful related project:&lt;br /&gt;
* [https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander]: HMI to control several synchronized UAVs&lt;br /&gt;
* [https://github.com/enacuavlab/pprzros PPRZROS]: bridge for the ROS middleware&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Messages' definition =&lt;br /&gt;
&lt;br /&gt;
The messages are organized three main classes:&lt;br /&gt;
* ''telemetry'': messages sent by the aircraft, usually to the ground, a.k.a. downlink stream&lt;br /&gt;
* ''datalink'': messages sent by the ground to the aircraft, a.k.a. uplink&lt;br /&gt;
* ''ground'': messages exchanged between ground agents over the [[Ivy]] software bus&lt;br /&gt;
[[File:Pprz communication agents.gif]]&lt;br /&gt;
&lt;br /&gt;
The generated documentation is available here: http://docs.paparazziuav.org/latest/paparazzi_messages.html&lt;br /&gt;
&lt;br /&gt;
New messages can be integrated mainstream in the [https://github.com/paparazzi/pprzlink/blob/master/message_definitions/v1.0/messages.xml messages xml file] from PPRZLINK. When using with Paparazzi, it is also possible to use an temporary file placed in the ''conf'' folder. If not present, the default set is used.&lt;br /&gt;
&lt;br /&gt;
= Protocols =&lt;br /&gt;
&lt;br /&gt;
== Principles ==&lt;br /&gt;
PPRZLINK is based on encapsulation. The first layer is the message level, mostly containing the data and the required information to decode them. The structure of this part is always the same. The second layer called ''transport'' can be changed according to the actual physical layer being used. The basic type (''pprz'') is just providing synchronization byte and checksum, but other transports offer more possibility of routing like the ''XBee' transport (especially the possibility to use point-to-point or broadcast).&lt;br /&gt;
&lt;br /&gt;
The message formats are described [[Messages_Format|here]]. A ''secured'' version is currently under development.&lt;br /&gt;
&lt;br /&gt;
== Differences between version 1 and 2 ==&lt;br /&gt;
&lt;br /&gt;
A new version (v2) have been developed to overcome several limitations. With version 1, only the message ID (1 byte) and the sender ID (1 byte) are provided in the message layer before the data part. It means that:&lt;br /&gt;
* messages can't be addressed to a particular receiver unless the transport layer can provide the service&lt;br /&gt;
* it is not possible to determine the class of messages, so it is assumed that telemetry messages are strictly downlink and datalink messages strictly uplink, thus preventing direct air-to-air communications&lt;br /&gt;
&lt;br /&gt;
With the version two of the protocol, two extra bytes have been added to the message header:&lt;br /&gt;
* the receiver ID (1 byte)&lt;br /&gt;
* a class ID (4 bits)&lt;br /&gt;
* a component ID (4 bits)&lt;br /&gt;
The class and component are part of the same byte. Even if the component ID is not really used at the moment (provision for future use), the class ID avoid ambiguities on messages. With the receiver ID, it is now possible to perform air-to-air communications and to broadcast messages from an aircraft (previously only possible from the ground).&lt;br /&gt;
&lt;br /&gt;
See [[Messages_Format|messages format]] page for more details.&lt;br /&gt;
&lt;br /&gt;
= Interfaces =&lt;br /&gt;
&lt;br /&gt;
Currently, the available interfaces are:&lt;br /&gt;
* serial stream&lt;br /&gt;
* udp packet&lt;br /&gt;
* [[Ivy]] based messages (publisher/subscriber middelware over TCP/IP, should only be used on the ground side)&lt;br /&gt;
&lt;br /&gt;
In addition a bridge to the [http://www.ros.org ROS] middleware is available at https://github.com/enacuavlab/pprzros&lt;br /&gt;
&lt;br /&gt;
== Language supports ==&lt;br /&gt;
&lt;br /&gt;
The supported languages are:&lt;br /&gt;
* C language&lt;br /&gt;
** generation of code (header files) for sending and decoding messages&lt;br /&gt;
** mostly used for the airborne code of Paparazzi&lt;br /&gt;
* Ocaml&lt;br /&gt;
** library based high-level functions for binding, subscribing and parsing messages&lt;br /&gt;
** mostly used by the ground station agents: links, GCS, server, ...&lt;br /&gt;
* Python&lt;br /&gt;
** Provide similar functionality than the Ocaml implemetation&lt;br /&gt;
** used in a large variety of smaller tools and ground agents&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Pprzlink&amp;diff=23921</id>
		<title>Pprzlink</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Pprzlink&amp;diff=23921"/>
		<updated>2017-11-23T13:19:31Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: Created page with &amp;quot;'''PPRZLINK''' is the communication library used by the Paparazzi UAV project and other related projects.  It provides: * Bulleted list item * a set of messages definitions *...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''PPRZLINK''' is the communication library used by the Paparazzi UAV project and other related projects.&lt;br /&gt;
&lt;br /&gt;
It provides:&lt;br /&gt;
* Bulleted list item&lt;br /&gt;
* a set of messages definitions&lt;br /&gt;
* various encapsulation protocols&lt;br /&gt;
* several high-level access to physical layers (serial, udp, [[Ivy]])&lt;br /&gt;
* several language support (Ocaml, C, Python)&lt;br /&gt;
&lt;br /&gt;
Source code can be download from Bithub: https://github.com/paparazzi/pprzlink&lt;br /&gt;
&lt;br /&gt;
The creation of PPRZLINK as a separated project from the main Paparazzi source code is the result of the [[Roadmap#Communication_Roadmap|communication roadmap]]. At the moment it is released under GPL v2, but it may be changed to LGPL in order to ease integration into third-party projects.&lt;br /&gt;
&lt;br /&gt;
A (not very complete) documentation is also available on the [https://pprzlink.readthedocs.io/en/latest/ readthedocs] platform.&lt;br /&gt;
&lt;br /&gt;
Some useful related project:&lt;br /&gt;
* [https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander]: HMI to control several synchronized UAVs&lt;br /&gt;
* [https://github.com/enacuavlab/pprzros PPRZROS]: bridge for the ROS middleware&lt;br /&gt;
&lt;br /&gt;
== Messages' definition ==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Protocols ==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Interfaces ==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Language supports ==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=23833</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=23833"/>
		<updated>2017-09-05T09:23:26Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=23832</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Installation&amp;diff=23832"/>
		<updated>2017-09-05T09:22:44Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Quickstart for Ubuntu users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Installation&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi is very easily installed on any laptop or workstation running the [http://www.ubuntu.com/ Ubuntu Linux OS] or virtually any [http://www.debian.org/ Debian] based [http://en.wikipedia.org/wiki/Linux Linux] or Apple Macintosh running [http://en.wikipedia.org/wiki/OS_X Mac OS X]. There is also work being done to port Paparazzi to Windows.&lt;br /&gt;
&lt;br /&gt;
The steps required to install the software needed to be able to let your UAS fly are:&lt;br /&gt;
&lt;br /&gt;
# Install tools and prerequisites needed by Paparazzi.&lt;br /&gt;
# Download the source code from the source repository.&lt;br /&gt;
# Compile the Paparazzi software from sourcecode&lt;br /&gt;
# Complete any final configuration&lt;br /&gt;
&lt;br /&gt;
== Quickstart for Ubuntu users ==&lt;br /&gt;
Love one-liners? To get the latest Paparazzi up and running on your '''Ubuntu 12.04 or higher OS''', make sure you have 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.10&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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=23831</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Main_Page&amp;diff=23831"/>
		<updated>2017-09-05T09:21:43Z</updated>

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

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''STM32F7 based boards'''&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, microSD,  Baro, 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;
&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>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Ap.parrot_minidrone&amp;diff=23756</id>
		<title>Ap.parrot minidrone</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Ap.parrot_minidrone&amp;diff=23756"/>
		<updated>2017-07-25T08:43:20Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Airframe */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
&lt;br /&gt;
Without Paparazzi the Parrot Minidrones are nice small flying quadrotor that can be flown over a Bluetooth connection with an Android or iOS device. &lt;br /&gt;
Not any more: With a few simple clicks you can run Paparazzi on you Minidrone and let it perfrom whater you wan it to.&lt;br /&gt;
&lt;br /&gt;
Although there are various different Parrot minidrones, the base of all the drones is the same. that is whay you see all thi info on just one page.&lt;br /&gt;
&lt;br /&gt;
NOTE: THis page is a work in progress (WIP) and partly will not reflect the current state of Paparazzi and will contain major errors. in the imeframe of 20170719  till 20170820 this page will have massively improved. &lt;br /&gt;
If you can help, help out, if not... hope that other are willing to spend their time on improving support.&lt;br /&gt;
&lt;br /&gt;
= Supported Minidrones =&lt;br /&gt;
&lt;br /&gt;
Paparazzi have been tested with modified version of v2.6.8 firmware. The original firmware doesn't allow network connections required to upload and run Paparazzi. Discussion are opened with Parrot to distribute the alternate firmware or integrate the modification to the standard one. The supported models are (20170725, master):&lt;br /&gt;
&lt;br /&gt;
* Swing [[File:SWING.png|300px|thumb|right|Parrot Swing]]&lt;br /&gt;
&lt;br /&gt;
Soon:&lt;br /&gt;
&lt;br /&gt;
* Spider&lt;br /&gt;
** Parrot Rolling Spider&lt;br /&gt;
* Mambo&lt;br /&gt;
** Parrot MAMBO&lt;br /&gt;
* Airborne Night&lt;br /&gt;
** Parrot Airborne Night Maclane&lt;br /&gt;
** Parrot Airborne Night Blaze&lt;br /&gt;
** Parrot Airborne Night Swat&lt;br /&gt;
* Airborne Cargo&lt;br /&gt;
** Parrot Airborne Cargo Travis&lt;br /&gt;
&lt;br /&gt;
The Jumping Sumo and Hydrofoil extension, while Paparazzi likely can run on those, since they cannot fly there are no plans for testing or support. If you have on and teste it, make a pull request with any improvments you made, welcomed&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
This article assumes that you have already installed Paprazzi software on you local development PC. Used is Ubuntu 16.04. older version have different Bluetooth support, instructions there maydiffer.&lt;br /&gt;
 &lt;br /&gt;
= Features =&lt;br /&gt;
&lt;br /&gt;
== Connectivity ==&lt;br /&gt;
&lt;br /&gt;
The minidrones have a Bluetooth Smart technology, Bluetooth V4.0 BLE device. Communication over older 2.0 bluetooth also possible after making some configuration changes on the Minidrone. Paparazzi can do this for you automatically&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
&lt;br /&gt;
* 3-axis gyroscope and 3-axis accelerometer (MPU 6050)&lt;br /&gt;
* Pressure sensor&lt;br /&gt;
* Ultrasonic sensor (not supported yet)&lt;br /&gt;
* Vertical camera (not supported yet)&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
&lt;br /&gt;
Sawappable lithium-polymer battery of 550mAh&lt;br /&gt;
Charging time: about 25 minutes&lt;br /&gt;
Compatibility: Parrot Jumping Night, Jumping Race, Airborne Night, Airborne Cargo and Hydrofoil&lt;br /&gt;
&lt;br /&gt;
= How to connect =&lt;br /&gt;
&lt;br /&gt;
There are two ways to connect to the Rolling Spider with Paparazzi. The first one is an USB cable and the second one is via a Bluetooth connection. Both have the possibility to transfer files through FTP and execute programs over telnet. &lt;br /&gt;
Note that connecting over USB '''disables''' the vertical camera, as it uses the same USB bus.&lt;br /&gt;
&lt;br /&gt;
== Pre steps ==&lt;br /&gt;
&lt;br /&gt;
Latest Parrot firmware needs some buttonpressing before we can start usng the connection in combination with Paparzzzi&lt;br /&gt;
&lt;br /&gt;
Press ButtonPress of the on/off small button. It will take a while before the Connection is ready.&lt;br /&gt;
&lt;br /&gt;
== Connect with USB ==&lt;br /&gt;
&lt;br /&gt;
* Switch on your Minidrone&lt;br /&gt;
* Plug in a micro-usb cable from your Drone to the computer&lt;br /&gt;
* A new network device will show up&lt;br /&gt;
* Connect with '''192.168.2.1''' through ftp or telnet&lt;br /&gt;
&lt;br /&gt;
== Connect via Bluetooth ==&lt;br /&gt;
&lt;br /&gt;
=== Using '''blueman''' tool (tested with Ubuntu 16.04) ===&lt;br /&gt;
&lt;br /&gt;
* Install '''blueman'''&lt;br /&gt;
  sudo apt install blueman&lt;br /&gt;
&lt;br /&gt;
* Turn on your minidrone&lt;br /&gt;
* Enable bluetooth on your computer (can be done from blueman applet if present)&lt;br /&gt;
* Scan or select your minidrone from the list of the peripheral&lt;br /&gt;
[[File:Blueman_swing_1.png|400px|thumb|right|Blueman: peripherals list]]&lt;br /&gt;
* Configure this peripheral and select the &amp;quot;network access point&amp;quot; connection type&lt;br /&gt;
[[File:Blueman_swing_2.png|400px|thumb|right|Blueman: type of connection]]&lt;br /&gt;
* A new network connection should appear&lt;br /&gt;
  % ifconfig bnep0&lt;br /&gt;
  bnep0     Link encap:Ethernet  HWaddr 5c:e0:c5:63:8e:5d  &lt;br /&gt;
            inet adr:192.168.4.2  Bcast:192.168.4.255  Masque:255.255.255.0&lt;br /&gt;
            ...&lt;br /&gt;
* The minidrone has the IP '''192.168.4.1''', connect with telnet via:&lt;br /&gt;
 telnet 192.168.4.1&lt;br /&gt;
&lt;br /&gt;
=== Older Ubuntu versions using the '''pand''' tool ===&lt;br /&gt;
* Execute &amp;quot;hcitool scan&amp;quot; and look for the mac address of the &amp;quot;RS_....&amp;quot; device. (If you cannot find it look at [[#Setup normal Bluetooth]])&lt;br /&gt;
* Install the bluez-utils package (if not installed) with &amp;quot;sudo apt-get install bluez-utils&amp;quot;&lt;br /&gt;
* Execute &amp;quot;sudo pand --connect &amp;lt;MAC address&amp;gt; -dGN -n&amp;quot;, to connect to the bluetooth of the drone. *&lt;br /&gt;
* Execute &amp;quot;sudo ifconfig bnep0 192.168.2.3 up&amp;quot;, to setup the ethernet device over bluetooth. *&lt;br /&gt;
* Connect with the drone with telnet via:&lt;br /&gt;
 telnet 192.168.2.1&lt;br /&gt;
&lt;br /&gt;
=== Setup normal Bluetooth ===&lt;br /&gt;
'''This part doesn't seem to be needed anymore!!!'''&lt;br /&gt;
* First connect over Bluetooth 4.0 or USB to the drone as described above&lt;br /&gt;
* Connect with telnet to the drone. (telnet 192.168.*.1)&lt;br /&gt;
* Open the &amp;quot;/etc/init.d/rcS&amp;quot; file and search for the line with &amp;quot;BLEproxy&amp;quot;. (vi /etc/init.d/rcS)&lt;br /&gt;
* Now change the &amp;quot;BLEproxy&amp;quot; to &amp;quot;BLEproxy --normalbt&amp;quot;&lt;br /&gt;
* Reboot your drone by executing: &amp;quot;reboot&amp;quot;. (This makes sure the filesystem is saved)&lt;br /&gt;
&lt;br /&gt;
== Upload Paprazzi ==&lt;br /&gt;
&lt;br /&gt;
If you do have a connection, press the upload button in the Paparazzi center&lt;br /&gt;
&lt;br /&gt;
=Airframe=&lt;br /&gt;
&lt;br /&gt;
At the moment, only the Swing airframe is supported and an example file is available:&lt;br /&gt;
https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/examples/swing.xml&lt;br /&gt;
&lt;br /&gt;
== Power button ==&lt;br /&gt;
&lt;br /&gt;
Once the Paparazzi autopilot is running, the original Parrot software is stopped, keeping the network connection over Wifi opened. A side effect is that the power button needs to be managed by Paparazzi as well. When pressing it, the board will reboot, restarting immediately with the original software. Pressing again the button will stop the minidrone.&lt;br /&gt;
&lt;br /&gt;
== Bottom camera ==&lt;br /&gt;
&lt;br /&gt;
All minidrones have a camera which can be used for various purposes. 160x120 pixels.&lt;br /&gt;
&lt;br /&gt;
=== Optic Flow ===&lt;br /&gt;
&lt;br /&gt;
Using the Optic flow module the Drone should be able to hover still.&lt;br /&gt;
&lt;br /&gt;
== Extend Hardware ==&lt;br /&gt;
&lt;br /&gt;
=== GPS ===&lt;br /&gt;
&lt;br /&gt;
An GPS connected to the USB port, while possible, never done yet.&lt;br /&gt;
&lt;br /&gt;
=== Serial ===&lt;br /&gt;
&lt;br /&gt;
XBee and Si10xx based modems&lt;br /&gt;
&lt;br /&gt;
By using external modems it is possible to exten the range of the drones.&lt;br /&gt;
&lt;br /&gt;
=== Micro laser range ring ===&lt;br /&gt;
&lt;br /&gt;
A TU Delft project makes it possible to fly autonomous inside a building using micro laser rangers. See {TODO}&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
Some links that might be helpful for developers or otherwhise&lt;br /&gt;
&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[Category:Autopilots]]&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Ap.parrot_minidrone&amp;diff=23755</id>
		<title>Ap.parrot minidrone</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Ap.parrot_minidrone&amp;diff=23755"/>
		<updated>2017-07-25T08:37:33Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: /* Sensors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
&lt;br /&gt;
Without Paparazzi the Parrot Minidrones are nice small flying quadrotor that can be flown over a Bluetooth connection with an Android or iOS device. &lt;br /&gt;
Not any more: With a few simple clicks you can run Paparazzi on you Minidrone and let it perfrom whater you wan it to.&lt;br /&gt;
&lt;br /&gt;
Although there are various different Parrot minidrones, the base of all the drones is the same. that is whay you see all thi info on just one page.&lt;br /&gt;
&lt;br /&gt;
NOTE: THis page is a work in progress (WIP) and partly will not reflect the current state of Paparazzi and will contain major errors. in the imeframe of 20170719  till 20170820 this page will have massively improved. &lt;br /&gt;
If you can help, help out, if not... hope that other are willing to spend their time on improving support.&lt;br /&gt;
&lt;br /&gt;
= Supported Minidrones =&lt;br /&gt;
&lt;br /&gt;
Paparazzi have been tested with modified version of v2.6.8 firmware. The original firmware doesn't allow network connections required to upload and run Paparazzi. Discussion are opened with Parrot to distribute the alternate firmware or integrate the modification to the standard one. The supported models are (20170725, master):&lt;br /&gt;
&lt;br /&gt;
* Swing [[File:SWING.png|300px|thumb|right|Parrot Swing]]&lt;br /&gt;
&lt;br /&gt;
Soon:&lt;br /&gt;
&lt;br /&gt;
* Spider&lt;br /&gt;
** Parrot Rolling Spider&lt;br /&gt;
* Mambo&lt;br /&gt;
** Parrot MAMBO&lt;br /&gt;
* Airborne Night&lt;br /&gt;
** Parrot Airborne Night Maclane&lt;br /&gt;
** Parrot Airborne Night Blaze&lt;br /&gt;
** Parrot Airborne Night Swat&lt;br /&gt;
* Airborne Cargo&lt;br /&gt;
** Parrot Airborne Cargo Travis&lt;br /&gt;
&lt;br /&gt;
The Jumping Sumo and Hydrofoil extension, while Paparazzi likely can run on those, since they cannot fly there are no plans for testing or support. If you have on and teste it, make a pull request with any improvments you made, welcomed&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
This article assumes that you have already installed Paprazzi software on you local development PC. Used is Ubuntu 16.04. older version have different Bluetooth support, instructions there maydiffer.&lt;br /&gt;
 &lt;br /&gt;
= Features =&lt;br /&gt;
&lt;br /&gt;
== Connectivity ==&lt;br /&gt;
&lt;br /&gt;
The minidrones have a Bluetooth Smart technology, Bluetooth V4.0 BLE device. Communication over older 2.0 bluetooth also possible after making some configuration changes on the Minidrone. Paparazzi can do this for you automatically&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
&lt;br /&gt;
* 3-axis gyroscope and 3-axis accelerometer (MPU 6050)&lt;br /&gt;
* Pressure sensor&lt;br /&gt;
* Ultrasonic sensor (not supported yet)&lt;br /&gt;
* Vertical camera (not supported yet)&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
&lt;br /&gt;
Sawappable lithium-polymer battery of 550mAh&lt;br /&gt;
Charging time: about 25 minutes&lt;br /&gt;
Compatibility: Parrot Jumping Night, Jumping Race, Airborne Night, Airborne Cargo and Hydrofoil&lt;br /&gt;
&lt;br /&gt;
= How to connect =&lt;br /&gt;
&lt;br /&gt;
There are two ways to connect to the Rolling Spider with Paparazzi. The first one is an USB cable and the second one is via a Bluetooth connection. Both have the possibility to transfer files through FTP and execute programs over telnet. &lt;br /&gt;
Note that connecting over USB '''disables''' the vertical camera, as it uses the same USB bus.&lt;br /&gt;
&lt;br /&gt;
== Pre steps ==&lt;br /&gt;
&lt;br /&gt;
Latest Parrot firmware needs some buttonpressing before we can start usng the connection in combination with Paparzzzi&lt;br /&gt;
&lt;br /&gt;
Press ButtonPress of the on/off small button. It will take a while before the Connection is ready.&lt;br /&gt;
&lt;br /&gt;
== Connect with USB ==&lt;br /&gt;
&lt;br /&gt;
* Switch on your Minidrone&lt;br /&gt;
* Plug in a micro-usb cable from your Drone to the computer&lt;br /&gt;
* A new network device will show up&lt;br /&gt;
* Connect with '''192.168.2.1''' through ftp or telnet&lt;br /&gt;
&lt;br /&gt;
== Connect via Bluetooth ==&lt;br /&gt;
&lt;br /&gt;
=== Using '''blueman''' tool (tested with Ubuntu 16.04) ===&lt;br /&gt;
&lt;br /&gt;
* Install '''blueman'''&lt;br /&gt;
  sudo apt install blueman&lt;br /&gt;
&lt;br /&gt;
* Turn on your minidrone&lt;br /&gt;
* Enable bluetooth on your computer (can be done from blueman applet if present)&lt;br /&gt;
* Scan or select your minidrone from the list of the peripheral&lt;br /&gt;
[[File:Blueman_swing_1.png|400px|thumb|right|Blueman: peripherals list]]&lt;br /&gt;
* Configure this peripheral and select the &amp;quot;network access point&amp;quot; connection type&lt;br /&gt;
[[File:Blueman_swing_2.png|400px|thumb|right|Blueman: type of connection]]&lt;br /&gt;
* A new network connection should appear&lt;br /&gt;
  % ifconfig bnep0&lt;br /&gt;
  bnep0     Link encap:Ethernet  HWaddr 5c:e0:c5:63:8e:5d  &lt;br /&gt;
            inet adr:192.168.4.2  Bcast:192.168.4.255  Masque:255.255.255.0&lt;br /&gt;
            ...&lt;br /&gt;
* The minidrone has the IP '''192.168.4.1''', connect with telnet via:&lt;br /&gt;
 telnet 192.168.4.1&lt;br /&gt;
&lt;br /&gt;
=== Older Ubuntu versions using the '''pand''' tool ===&lt;br /&gt;
* Execute &amp;quot;hcitool scan&amp;quot; and look for the mac address of the &amp;quot;RS_....&amp;quot; device. (If you cannot find it look at [[#Setup normal Bluetooth]])&lt;br /&gt;
* Install the bluez-utils package (if not installed) with &amp;quot;sudo apt-get install bluez-utils&amp;quot;&lt;br /&gt;
* Execute &amp;quot;sudo pand --connect &amp;lt;MAC address&amp;gt; -dGN -n&amp;quot;, to connect to the bluetooth of the drone. *&lt;br /&gt;
* Execute &amp;quot;sudo ifconfig bnep0 192.168.2.3 up&amp;quot;, to setup the ethernet device over bluetooth. *&lt;br /&gt;
* Connect with the drone with telnet via:&lt;br /&gt;
 telnet 192.168.2.1&lt;br /&gt;
&lt;br /&gt;
=== Setup normal Bluetooth ===&lt;br /&gt;
'''This part doesn't seem to be needed anymore!!!'''&lt;br /&gt;
* First connect over Bluetooth 4.0 or USB to the drone as described above&lt;br /&gt;
* Connect with telnet to the drone. (telnet 192.168.*.1)&lt;br /&gt;
* Open the &amp;quot;/etc/init.d/rcS&amp;quot; file and search for the line with &amp;quot;BLEproxy&amp;quot;. (vi /etc/init.d/rcS)&lt;br /&gt;
* Now change the &amp;quot;BLEproxy&amp;quot; to &amp;quot;BLEproxy --normalbt&amp;quot;&lt;br /&gt;
* Reboot your drone by executing: &amp;quot;reboot&amp;quot;. (This makes sure the filesystem is saved)&lt;br /&gt;
&lt;br /&gt;
== Upload Paprazzi ==&lt;br /&gt;
&lt;br /&gt;
If you do have a connection, press the upload button in the Paparazzi center&lt;br /&gt;
&lt;br /&gt;
=Airframe=&lt;br /&gt;
&lt;br /&gt;
A Parrot minidrone example  airframe is in the works... The code is not yet available in Paparazzi Mater. For the Time being, progress here. As soon as testflights are performed a pull request will be made and example in the Main Paparazzi repository&lt;br /&gt;
&lt;br /&gt;
== Bottom camera ==&lt;br /&gt;
&lt;br /&gt;
All minidrones have a camera which can be used for various purposes. 160x120 pixels.&lt;br /&gt;
&lt;br /&gt;
=== Optic Flow ===&lt;br /&gt;
&lt;br /&gt;
Using the Optic flow module the Drone should be able to hover still.&lt;br /&gt;
&lt;br /&gt;
== Extend Hardware ==&lt;br /&gt;
&lt;br /&gt;
=== GPS ===&lt;br /&gt;
&lt;br /&gt;
An GPS connected to the USB port, while possible, never done yet.&lt;br /&gt;
&lt;br /&gt;
=== Serial ===&lt;br /&gt;
&lt;br /&gt;
XBee and Si10xx based modems&lt;br /&gt;
&lt;br /&gt;
By using external modems it is possible to exten the range of the drones.&lt;br /&gt;
&lt;br /&gt;
=== Micro laser range ring ===&lt;br /&gt;
&lt;br /&gt;
A TU Delft project makes it possible to fly autonomous inside a building using micro laser rangers. See {TODO}&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
Some links that might be helpful for developers or otherwhise&lt;br /&gt;
&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[Category:Autopilots]]&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Ap.parrot_minidrone&amp;diff=23754</id>
		<title>Ap.parrot minidrone</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Ap.parrot_minidrone&amp;diff=23754"/>
		<updated>2017-07-25T08:36:37Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Intro =&lt;br /&gt;
&lt;br /&gt;
Without Paparazzi the Parrot Minidrones are nice small flying quadrotor that can be flown over a Bluetooth connection with an Android or iOS device. &lt;br /&gt;
Not any more: With a few simple clicks you can run Paparazzi on you Minidrone and let it perfrom whater you wan it to.&lt;br /&gt;
&lt;br /&gt;
Although there are various different Parrot minidrones, the base of all the drones is the same. that is whay you see all thi info on just one page.&lt;br /&gt;
&lt;br /&gt;
NOTE: THis page is a work in progress (WIP) and partly will not reflect the current state of Paparazzi and will contain major errors. in the imeframe of 20170719  till 20170820 this page will have massively improved. &lt;br /&gt;
If you can help, help out, if not... hope that other are willing to spend their time on improving support.&lt;br /&gt;
&lt;br /&gt;
= Supported Minidrones =&lt;br /&gt;
&lt;br /&gt;
Paparazzi have been tested with modified version of v2.6.8 firmware. The original firmware doesn't allow network connections required to upload and run Paparazzi. Discussion are opened with Parrot to distribute the alternate firmware or integrate the modification to the standard one. The supported models are (20170725, master):&lt;br /&gt;
&lt;br /&gt;
* Swing [[File:SWING.png|300px|thumb|right|Parrot Swing]]&lt;br /&gt;
&lt;br /&gt;
Soon:&lt;br /&gt;
&lt;br /&gt;
* Spider&lt;br /&gt;
** Parrot Rolling Spider&lt;br /&gt;
* Mambo&lt;br /&gt;
** Parrot MAMBO&lt;br /&gt;
* Airborne Night&lt;br /&gt;
** Parrot Airborne Night Maclane&lt;br /&gt;
** Parrot Airborne Night Blaze&lt;br /&gt;
** Parrot Airborne Night Swat&lt;br /&gt;
* Airborne Cargo&lt;br /&gt;
** Parrot Airborne Cargo Travis&lt;br /&gt;
&lt;br /&gt;
The Jumping Sumo and Hydrofoil extension, while Paparazzi likely can run on those, since they cannot fly there are no plans for testing or support. If you have on and teste it, make a pull request with any improvments you made, welcomed&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&lt;br /&gt;
This article assumes that you have already installed Paprazzi software on you local development PC. Used is Ubuntu 16.04. older version have different Bluetooth support, instructions there maydiffer.&lt;br /&gt;
 &lt;br /&gt;
= Features =&lt;br /&gt;
&lt;br /&gt;
== Connectivity ==&lt;br /&gt;
&lt;br /&gt;
The minidrones have a Bluetooth Smart technology, Bluetooth V4.0 BLE device. Communication over older 2.0 bluetooth also possible after making some configuration changes on the Minidrone. Paparazzi can do this for you automatically&lt;br /&gt;
&lt;br /&gt;
== Sensors ==&lt;br /&gt;
&lt;br /&gt;
* Ultrasonic sensor&lt;br /&gt;
* 3-axis gyroscope and 3-axis accelerometer (MPU 6050)&lt;br /&gt;
* Vertical camera &lt;br /&gt;
* Pressure sensor&lt;br /&gt;
&lt;br /&gt;
== Battery ==&lt;br /&gt;
&lt;br /&gt;
Sawappable lithium-polymer battery of 550mAh&lt;br /&gt;
Charging time: about 25 minutes&lt;br /&gt;
Compatibility: Parrot Jumping Night, Jumping Race, Airborne Night, Airborne Cargo and Hydrofoil&lt;br /&gt;
&lt;br /&gt;
= How to connect =&lt;br /&gt;
&lt;br /&gt;
There are two ways to connect to the Rolling Spider with Paparazzi. The first one is an USB cable and the second one is via a Bluetooth connection. Both have the possibility to transfer files through FTP and execute programs over telnet. &lt;br /&gt;
Note that connecting over USB '''disables''' the vertical camera, as it uses the same USB bus.&lt;br /&gt;
&lt;br /&gt;
== Pre steps ==&lt;br /&gt;
&lt;br /&gt;
Latest Parrot firmware needs some buttonpressing before we can start usng the connection in combination with Paparzzzi&lt;br /&gt;
&lt;br /&gt;
Press ButtonPress of the on/off small button. It will take a while before the Connection is ready.&lt;br /&gt;
&lt;br /&gt;
== Connect with USB ==&lt;br /&gt;
&lt;br /&gt;
* Switch on your Minidrone&lt;br /&gt;
* Plug in a micro-usb cable from your Drone to the computer&lt;br /&gt;
* A new network device will show up&lt;br /&gt;
* Connect with '''192.168.2.1''' through ftp or telnet&lt;br /&gt;
&lt;br /&gt;
== Connect via Bluetooth ==&lt;br /&gt;
&lt;br /&gt;
=== Using '''blueman''' tool (tested with Ubuntu 16.04) ===&lt;br /&gt;
&lt;br /&gt;
* Install '''blueman'''&lt;br /&gt;
  sudo apt install blueman&lt;br /&gt;
&lt;br /&gt;
* Turn on your minidrone&lt;br /&gt;
* Enable bluetooth on your computer (can be done from blueman applet if present)&lt;br /&gt;
* Scan or select your minidrone from the list of the peripheral&lt;br /&gt;
[[File:Blueman_swing_1.png|400px|thumb|right|Blueman: peripherals list]]&lt;br /&gt;
* Configure this peripheral and select the &amp;quot;network access point&amp;quot; connection type&lt;br /&gt;
[[File:Blueman_swing_2.png|400px|thumb|right|Blueman: type of connection]]&lt;br /&gt;
* A new network connection should appear&lt;br /&gt;
  % ifconfig bnep0&lt;br /&gt;
  bnep0     Link encap:Ethernet  HWaddr 5c:e0:c5:63:8e:5d  &lt;br /&gt;
            inet adr:192.168.4.2  Bcast:192.168.4.255  Masque:255.255.255.0&lt;br /&gt;
            ...&lt;br /&gt;
* The minidrone has the IP '''192.168.4.1''', connect with telnet via:&lt;br /&gt;
 telnet 192.168.4.1&lt;br /&gt;
&lt;br /&gt;
=== Older Ubuntu versions using the '''pand''' tool ===&lt;br /&gt;
* Execute &amp;quot;hcitool scan&amp;quot; and look for the mac address of the &amp;quot;RS_....&amp;quot; device. (If you cannot find it look at [[#Setup normal Bluetooth]])&lt;br /&gt;
* Install the bluez-utils package (if not installed) with &amp;quot;sudo apt-get install bluez-utils&amp;quot;&lt;br /&gt;
* Execute &amp;quot;sudo pand --connect &amp;lt;MAC address&amp;gt; -dGN -n&amp;quot;, to connect to the bluetooth of the drone. *&lt;br /&gt;
* Execute &amp;quot;sudo ifconfig bnep0 192.168.2.3 up&amp;quot;, to setup the ethernet device over bluetooth. *&lt;br /&gt;
* Connect with the drone with telnet via:&lt;br /&gt;
 telnet 192.168.2.1&lt;br /&gt;
&lt;br /&gt;
=== Setup normal Bluetooth ===&lt;br /&gt;
'''This part doesn't seem to be needed anymore!!!'''&lt;br /&gt;
* First connect over Bluetooth 4.0 or USB to the drone as described above&lt;br /&gt;
* Connect with telnet to the drone. (telnet 192.168.*.1)&lt;br /&gt;
* Open the &amp;quot;/etc/init.d/rcS&amp;quot; file and search for the line with &amp;quot;BLEproxy&amp;quot;. (vi /etc/init.d/rcS)&lt;br /&gt;
* Now change the &amp;quot;BLEproxy&amp;quot; to &amp;quot;BLEproxy --normalbt&amp;quot;&lt;br /&gt;
* Reboot your drone by executing: &amp;quot;reboot&amp;quot;. (This makes sure the filesystem is saved)&lt;br /&gt;
&lt;br /&gt;
== Upload Paprazzi ==&lt;br /&gt;
&lt;br /&gt;
If you do have a connection, press the upload button in the Paparazzi center&lt;br /&gt;
&lt;br /&gt;
=Airframe=&lt;br /&gt;
&lt;br /&gt;
A Parrot minidrone example  airframe is in the works... The code is not yet available in Paparazzi Mater. For the Time being, progress here. As soon as testflights are performed a pull request will be made and example in the Main Paparazzi repository&lt;br /&gt;
&lt;br /&gt;
== Bottom camera ==&lt;br /&gt;
&lt;br /&gt;
All minidrones have a camera which can be used for various purposes. 160x120 pixels.&lt;br /&gt;
&lt;br /&gt;
=== Optic Flow ===&lt;br /&gt;
&lt;br /&gt;
Using the Optic flow module the Drone should be able to hover still.&lt;br /&gt;
&lt;br /&gt;
== Extend Hardware ==&lt;br /&gt;
&lt;br /&gt;
=== GPS ===&lt;br /&gt;
&lt;br /&gt;
An GPS connected to the USB port, while possible, never done yet.&lt;br /&gt;
&lt;br /&gt;
=== Serial ===&lt;br /&gt;
&lt;br /&gt;
XBee and Si10xx based modems&lt;br /&gt;
&lt;br /&gt;
By using external modems it is possible to exten the range of the drones.&lt;br /&gt;
&lt;br /&gt;
=== Micro laser range ring ===&lt;br /&gt;
&lt;br /&gt;
A TU Delft project makes it possible to fly autonomous inside a building using micro laser rangers. See {TODO}&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
Some links that might be helpful for developers or otherwhise&lt;br /&gt;
&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
[[Category:Autopilots]]&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=File:SWING.png&amp;diff=23753</id>
		<title>File:SWING.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=File:SWING.png&amp;diff=23753"/>
		<updated>2017-07-25T08:34:16Z</updated>

		<summary type="html">&lt;p&gt;Ghattenb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ghattenb</name></author>
	</entry>
</feed>