<?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=Rijesh</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=Rijesh"/>
	<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/wiki/Special:Contributions/Rijesh"/>
	<updated>2026-05-08T02:46:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Pan_Tilt_Camera&amp;diff=23895</id>
		<title>Pan Tilt Camera</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Pan_Tilt_Camera&amp;diff=23895"/>
		<updated>2017-10-18T22:25:08Z</updated>

		<summary type="html">&lt;p&gt;Rijesh: added Cam_Footprint link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Modules&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pan/Tilt Video Camera Mechanism ==&lt;br /&gt;
&lt;br /&gt;
Paparazzi currently allows to automatically move (follow a waypoint) a one axis pitch or roll camera as well as a two axis yaw-fixed-then-pitch camera. A [[Cam_Footprint|cam footprint]] can also be enabled on the GCS.&lt;br /&gt;
&lt;br /&gt;
[[Image:Glotzer_cam_xy.jpg|thumb|left|Two axis yaw-fixed, pitch-move mechanism]]&lt;br /&gt;
[[Image:Black_one_roll.jpg|thumb|left|One axis roll]]&lt;br /&gt;
[[Image:Red_one_pitch.jpg|thumb|left|One axis pitch]]&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The camera control is made of normal servos. Usually servos have a turn angle of about 90°. This is changed electrically so that they can do a 180°. It is achieved by adding two serial resistors at both sides of the potentiometer (P1), one for increasing the usable angle (R1) and the other for moving the middle position to a useful angle (R2). Therefore a servo with a 270° potentiometer is needed. Very small and light servos have 180° potentiometers, these do not allow a 180° degrees sweep. Cut the outer two connections between the potentiometer and the board to insert the resistors. The values for R1 and R2 should be found out by testing as there might be serial resistors on the servo board that affect the values. Start with about 1/2 the value of P1 for R1 and change R1 until you get a little more than 180° sweep. Then insert and modify R2 to set neutral back to the middle position of the potentiometer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;&lt;br /&gt;
                     ^&lt;br /&gt;
                    /&lt;br /&gt;
              ----------&lt;br /&gt;
      *-------I   /    I-------*&lt;br /&gt;
      I       ----------       I&lt;br /&gt;
      I         /     P1       I&lt;br /&gt;
      I         I              I&lt;br /&gt;
      I         I              I&lt;br /&gt;
     ---        I             ---&lt;br /&gt;
     I I        I             I I&lt;br /&gt;
     I I        I             I I&lt;br /&gt;
     I I        I             I I&lt;br /&gt;
     --- R1     I             --- R2&lt;br /&gt;
      I         I              I&lt;br /&gt;
      I         I              I&lt;br /&gt;
 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't want to bother modifying your servo to 180°, use a 180° servo strecher for your standard servo [[http://www.servocity.com/html/180o_servo_stretcher.html ServoCity]] or [[http://www.robotmarketplace.com/products/0-FRMRT180.html RobotMarketPlace]] or buy a 180° servo [[http://www.servocity.com/html/hs-645mg_ultra_torque.html ServoCity]] or [[http://www.modellbau-bichler.com/servobeckers100s180gradjr-p-8221.html?osCsid=b3f7a1d078e0fa1d0433e29ed16da866 Becker]]&lt;br /&gt;
&lt;br /&gt;
The Paparazzi software makes planes circle clockwise (use negative radius for counter-clockwise) so the default view is to the right side of the plane. The pan servo neutral makes the camera look to the right with 0° given, 90° is to the back and -90° is to the front. The tilt servo neutral makes the camera look down with 0° given, 90° is to the right and -90° is to the left (all values are used in radian in the software). If the camera looks to the right side of the plane, the picture is upright. It is upside down when looking to the left. That is corrected with the MPEG decoding software on the laptop by mirroring. The pan servo is fixed in the plane and the tilt servo is moved by the pan servo and moves the camera.&lt;br /&gt;
&lt;br /&gt;
pan servo, tilt set to 90°, looking from top:&lt;br /&gt;
     &lt;br /&gt;
   plane front&lt;br /&gt;
 &amp;lt;tt&amp;gt; &lt;br /&gt;
       ^&lt;br /&gt;
       I&lt;br /&gt;
       I  45°&lt;br /&gt;
       I /&lt;br /&gt;
       I/&lt;br /&gt;
       I------- 0°&lt;br /&gt;
       I\&lt;br /&gt;
       I \&lt;br /&gt;
       I  -45°&lt;br /&gt;
       I&lt;br /&gt;
 &amp;lt;/tt&amp;gt;&lt;br /&gt;
   plane rear&lt;br /&gt;
&lt;br /&gt;
tilt servo, pan set to 0°, looking from back:&lt;br /&gt;
 &amp;lt;tt&amp;gt;     &lt;br /&gt;
     plane left --------------- plane right&lt;br /&gt;
                     / I \&lt;br /&gt;
                    /  I  \&lt;br /&gt;
                 -45°  I   45°&lt;br /&gt;
                       0°&lt;br /&gt;
 &amp;lt;/tt&amp;gt;&lt;br /&gt;
tilt servo is moved by the pan servo and moves the camera.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add this to your Aircraft file to the right place:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;servo name=&amp;quot;CAM_PAN&amp;quot;  no=&amp;quot;3&amp;quot; min=&amp;quot;2000&amp;quot; neutral=&amp;quot;1550&amp;quot; max=&amp;quot;1000&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;servo name=&amp;quot;CAM_TILT&amp;quot; no=&amp;quot;6&amp;quot; min=&amp;quot;1000&amp;quot; neutral=&amp;quot;1550&amp;quot; max=&amp;quot;2000&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;axis name=&amp;quot;CAM_TILT&amp;quot; failsafe_value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;axis name=&amp;quot;CAM_PAN&amp;quot;  failsafe_value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;set command=&amp;quot;CAM_PAN&amp;quot;  value=&amp;quot;@YAW&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;set command=&amp;quot;CAM_TILT&amp;quot; value=&amp;quot;@GAIN1&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;set servo=&amp;quot;CAM_PAN&amp;quot;  value=&amp;quot;@CAM_PAN&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;set servo=&amp;quot;CAM_TILT&amp;quot; value=&amp;quot;@CAM_TILT&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;section name=&amp;quot;CAM&amp;quot; prefix=&amp;quot;CAM_&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;TILT_MAX&amp;quot;      value=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;TILT_NEUTRAL&amp;quot;  value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;TILT_MIN&amp;quot;      value=&amp;quot;-30&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;TILT0&amp;quot;         value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;define name=&amp;quot;PAN_MAX&amp;quot;     value=&amp;quot;45&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;PAN_NEUTRAL&amp;quot; value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;PAN_MIN&amp;quot;     value=&amp;quot;-45&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;define name=&amp;quot;PAN0&amp;quot;          value=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;modules main_freq=&amp;quot;60&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;load name=&amp;quot;cam_point.xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;POINT_CAM_PITCH_ROLL&amp;quot;  value=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;SHOW_CAM_COORDINATES&amp;quot; value=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/load&amp;gt;&lt;br /&gt;
  &amp;lt;/modules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It make use of cam.c and point.c in sw/airborne/modules/cam_control/&lt;br /&gt;
&lt;br /&gt;
When you load cam.xml in your settings of your aircraft session you can tune this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
THE MODE:&lt;br /&gt;
&lt;br /&gt;
OFF =0&lt;br /&gt;
&lt;br /&gt;
ANGLES=1 (look at angle that you chose in the angle tap)&lt;br /&gt;
&lt;br /&gt;
NADIR=2 (look down)&lt;br /&gt;
&lt;br /&gt;
XY_TARGET=3 (looks to the coordinates where you activate it, look here)&lt;br /&gt;
&lt;br /&gt;
WP_TARGET=4 (looks to the way point that you chose in the target tap, cam_target_wp)&lt;br /&gt;
&lt;br /&gt;
AC_TARGET=5 (looks at an aircraft, activate traffic_info.c)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ANGLES:&lt;br /&gt;
&lt;br /&gt;
set your pan tilt angle for the Angles mode=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TARGET:&lt;br /&gt;
&lt;br /&gt;
set the way point you want to look at&lt;br /&gt;
&lt;br /&gt;
1=home&lt;br /&gt;
&lt;br /&gt;
2=... (see your way point file)&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]] [[Category:User_Documentation]] [[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Rijesh</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=GCS&amp;diff=23894</id>
		<title>GCS</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=GCS&amp;diff=23894"/>
		<updated>2017-10-18T22:23:42Z</updated>

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

		<summary type="html">&lt;p&gt;Rijesh: Added cam footprint page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The paparazzi GCS has the ability to plot a camera footprint onto the map.&lt;br /&gt;
By default the footprint will be for a camera pointing straight down.&lt;br /&gt;
&lt;br /&gt;
The camera's horizontal field of view and vertical field of view can be set 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;section name=&amp;quot;CAM&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;CAM_HFV&amp;quot; value=&amp;quot;65.1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;define name=&amp;quot;CAM_VFV&amp;quot; value=&amp;quot;40.2&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;
A gimbaled camera will need to send a pan/tilt message to the server. A [[Pan_Tilt_Camera|cam point module]] is available that will point a pan/tilt camera using servos.&lt;br /&gt;
&lt;br /&gt;
If a custom gimbal and module is being used, then the custom module will need to send the CAM message to the server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;message name=&amp;quot;CAM&amp;quot; id=&amp;quot;20&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;field name=&amp;quot;pan&amp;quot; type=&amp;quot;int16&amp;quot; unit=&amp;quot;deg&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;field name=&amp;quot;tilt&amp;quot; type=&amp;quot;int16&amp;quot; unit=&amp;quot;deg&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;field name=&amp;quot;target_x&amp;quot; type=&amp;quot;int16&amp;quot; unit=&amp;quot;m&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;field name=&amp;quot;target_y&amp;quot; type=&amp;quot;int16&amp;quot; unit=&amp;quot;m&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/message&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The server code is capable of mixing a full 3 axis gimbal with modifications. The modifications required to do this involve sending the new rotation in the cam message and enabling the use of that field in server.ml. The Quaternion used in the mixing takes Tait-Bryan as input angles.&lt;/div&gt;</summary>
		<author><name>Rijesh</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Plotting_shapes_onto_GCS&amp;diff=23247</id>
		<title>Plotting shapes onto GCS</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Plotting_shapes_onto_GCS&amp;diff=23247"/>
		<updated>2016-08-15T18:22:19Z</updated>

		<summary type="html">&lt;p&gt;Rijesh: Adding information about shape message&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Messages can be sent over the IVY bus to plot shapes onto the GCS.&lt;br /&gt;
&lt;br /&gt;
These shapes include circles, polygons, lines and text. &lt;br /&gt;
Shapes such as circles and polygons may have a fill with varying opacity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Message Definition&amp;lt;/big&amp;gt;&lt;br /&gt;
  &amp;lt;message name=&amp;quot;SHAPE&amp;quot; id=&amp;quot;38&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;&lt;br /&gt;
      The SHAPE message used to draw shapes onto the Paparazzi GCS.&lt;br /&gt;
      Field name shape is used to define the type of shape i.e. Circle, Polygon, Line, or Text.&lt;br /&gt;
      This is indexed from 0-3 respectively.&lt;br /&gt;
      Each shape drawn must have an id number associated with it. &lt;br /&gt;
      This id number in conjunction with the shapetype will be needed to update or delete the shape. &lt;br /&gt;
      A circle can be defined with the same id as a polygon but since they have different shape types they are considered unique.&lt;br /&gt;
      linecolor and fillcolor take in a color string ie: &amp;quot;red&amp;quot;, &amp;quot;blue&amp;quot; &lt;br /&gt;
      opacity will change the level of transparency of the fill.&lt;br /&gt;
      0 - Transparent&lt;br /&gt;
      1 - Light Fill&lt;br /&gt;
      2 - Medium Fill&lt;br /&gt;
      3 - Opaque&lt;br /&gt;
      Passing a status of 0 will create or update the shape specified by id and type.&lt;br /&gt;
      Passing a status of 1 will delete the shape specified by id and type.&lt;br /&gt;
      latarr is an array of coordinates that contain the latitude coordinate for each point in the shape. &lt;br /&gt;
      The array is comma separated.&lt;br /&gt;
      lonarr is similar to latarr but contain the longitude coordinate for each point in the shape.&lt;br /&gt;
      Circle and Text type will take the first coordinates given to place the shape.&lt;br /&gt;
      Polygon will take all the coordinates given.&lt;br /&gt;
      Line will take the first two coordinates given.&lt;br /&gt;
      Radius is only used for the circle.&lt;br /&gt;
      Text will always be populated with each message using the first set of coordinates.&lt;br /&gt;
      The text field can not be blank or have spaces.&lt;br /&gt;
      If text is not desired for a shape then pass &amp;quot;NULL&amp;quot; into the text field.&lt;br /&gt;
    &amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;field name=&amp;quot;id&amp;quot;         type=&amp;quot;uint8&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;field name=&amp;quot;linecolor&amp;quot;  type=&amp;quot;string&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;field name=&amp;quot;fillcolor&amp;quot;  type=&amp;quot;string&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;field name=&amp;quot;opacity&amp;quot;    type=&amp;quot;uint8&amp;quot; values=&amp;quot;Transparent|Light|Medium|Opaque&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;field name=&amp;quot;shape&amp;quot;      type=&amp;quot;uint8&amp;quot; values=&amp;quot;Circle|Polygon|Line&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;field name=&amp;quot;status&amp;quot;     type=&amp;quot;uint8&amp;quot;  values=&amp;quot;create|delete&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;field name=&amp;quot;latarr&amp;quot;     type=&amp;quot;int32[]&amp;quot;  unit=&amp;quot;1e7deg&amp;quot; alt_unit=&amp;quot;deg&amp;quot; alt_unit_coef=&amp;quot;0.0000001&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;field name=&amp;quot;lonarr&amp;quot;     type=&amp;quot;int32[]&amp;quot;  unit=&amp;quot;1e7deg&amp;quot; alt_unit=&amp;quot;deg&amp;quot; alt_unit_coef=&amp;quot;0.0000001&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;field name=&amp;quot;radius&amp;quot;     type=&amp;quot;float&amp;quot; unit=&amp;quot;m&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;field name=&amp;quot;text&amp;quot;       type=&amp;quot;string&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Example Messages:&amp;lt;/big&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rijesh</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Module/Mag_HMC58xx&amp;diff=20203</id>
		<title>Module/Mag HMC58xx</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Module/Mag_HMC58xx&amp;diff=20203"/>
		<updated>2015-07-29T23:01:26Z</updated>

		<summary type="html">&lt;p&gt;Rijesh: added links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;categorytree style=&amp;quot;float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;&amp;quot; mode=pages&amp;gt;Modules&amp;lt;/categorytree&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Paparazzi allows the use of external Magnetometers. This module supports the use of the Honeywell HMC5843 and HMC5883 magnetometers.&lt;br /&gt;
These magnetometers can be connected to your autopilot board via i2c.&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;define name=&amp;quot;USE_I2C2&amp;quot; /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;float_cmpl_quat&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;AHRS_XXX_MAG_ID&amp;quot; value=&amp;quot;MAG_HMC58XX_SENDER_ID&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/subsystem&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
    &amp;lt;modules&amp;gt;&lt;br /&gt;
     &amp;lt;load name=&amp;quot;mag_hmc58xx.xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;MODULE_HMC58XX_UPDATE_AHRS&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;MAG_HMC58XX_I2C_DEV&amp;quot; value=&amp;quot;i2c2&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/load&amp;gt;&lt;br /&gt;
    &amp;lt;/modules&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You will need to specify the AHRS_XXX_MAG_ID value. See [http://wiki.paparazziuav.org/wiki/Subsystem/ahrs#Enabling_External_Sensors AHRS External Sensors]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:User_Documentation]] [[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Rijesh</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Module/Mag_HMC58xx&amp;diff=20202</id>
		<title>Module/Mag HMC58xx</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Module/Mag_HMC58xx&amp;diff=20202"/>
		<updated>2015-07-29T22:58:13Z</updated>

		<summary type="html">&lt;p&gt;Rijesh: Documented HMC58xx module&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Paparazzi allows the use of external Magnetometers. This module supports the use of the Honeywell HMC5843 and HMC5883 magnetometers.&lt;br /&gt;
These magnetometers can be connected to your autopilot board via i2c.&lt;br /&gt;
&lt;br /&gt;
{{Box Code|conf/airframes/myplane.xml|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;firmware&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;define name=&amp;quot;USE_I2C2&amp;quot; /&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;subsystem name=&amp;quot;ahrs&amp;quot; type=&amp;quot;float_cmpl_quat&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;AHRS_XXX_MAG_ID&amp;quot; value=&amp;quot;MAG_HMC58XX_SENDER_ID&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/subsystem&amp;gt;&lt;br /&gt;
  &amp;lt;/firmware&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
    &amp;lt;modules&amp;gt;&lt;br /&gt;
     &amp;lt;load name=&amp;quot;mag_hmc58xx.xml&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;MODULE_HMC58XX_UPDATE_AHRS&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;define name=&amp;quot;MAG_HMC58XX_I2C_DEV&amp;quot; value=&amp;quot;i2c2&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/load&amp;gt;&lt;br /&gt;
    &amp;lt;/modules&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You will need to specify the AHRS_XXX_MAG_ID value. See [http://wiki.paparazziuav.org/wiki/Subsystem/ahrs#Enabling_External_Sensors AHRS External Sensors]&lt;/div&gt;</summary>
		<author><name>Rijesh</name></author>
	</entry>
	<entry>
		<id>http://wiki.paparazziuav.org/w/index.php?title=Subsystem/ahrs&amp;diff=20201</id>
		<title>Subsystem/ahrs</title>
		<link rel="alternate" type="text/html" href="http://wiki.paparazziuav.org/w/index.php?title=Subsystem/ahrs&amp;diff=20201"/>
		<updated>2015-07-29T22:25:08Z</updated>

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