<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Joacim</id>
	<title>FlightGear wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.flightgear.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Joacim"/>
	<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/Special:Contributions/Joacim"/>
	<updated>2026-04-25T21:43:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Avionics_and_instruments&amp;diff=3280</id>
		<title>Avionics and instruments</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Avionics_and_instruments&amp;diff=3280"/>
		<updated>2007-01-27T12:53:45Z</updated>

		<summary type="html">&lt;p&gt;Joacim: /* Directional Gyro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Compass ===&lt;br /&gt;
&lt;br /&gt;
The compass aligns itself along the magnetic field that surrounds the earth.&lt;br /&gt;
&lt;br /&gt;
Note that The magnetic north pole and the geographic north pole are not located at the same spot. The difference between the magnetic field and true north is called &amp;quot;magnetic variation&amp;quot; or &amp;quot;magnetic declination&amp;quot;. The magnetic variation is expressed as an angle east or west of true north. Not only does the magnetic variation vary with position on the planet, it also slowly varies over time since the magnetic poles are not stationary.&lt;br /&gt;
&lt;br /&gt;
When planning a flight it is necessary to know the magnetic variation along the flight path. Air navigation is generally done using magnetic bearings, and the VOR beacons also use that. Runway numbering is based on magnetic bearings. Even GPS's designed for air navigation uses magnetic bearings. Almost everything in aeronautical navigation is based on magnetic bearings. Wind directions from METAR however, reports winds with ''true'' direction. And that's why you need to know the magnetic variation: for calculating the wind triangle; how much you must hold up against the wind (your heading) when flying to the destination (your course). The Kelpie flightplanner for FlightGear also uses true bearings.&lt;br /&gt;
&lt;br /&gt;
Magnetic variations are expressed in &amp;quot;degrees east&amp;quot; or &amp;quot;degrees west&amp;quot;. An ''easterly magnetic variation'' means that the magnetic north points a bit to the ''east'' of the true north. In FlightGear, easterly is a positive number, and westerly is negative. The magnetic variation at FlightGears default airport, KSFO, is about 15° east. (This is why the instrument settings of the directinal gyro in the menu is &amp;quot;-15&amp;quot; initially, when starting at KSFO. It shows ''magnetic'' heading.)&lt;br /&gt;
&lt;br /&gt;
The magnetic variation for a specific spot can be retreieved from the area charts or from other maps.&lt;br /&gt;
&lt;br /&gt;
Good area charts are not always easy to get (for free). So here is a quick and dirty shell script for retrieving the magnetic variation at a specific coordinate (at sea level and date of invocation) by shamelessly abusing the '''testmagvar''' utility from the SimGear source code:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 if [ $# -ne 2 ]; then&lt;br /&gt;
   echo &amp;quot;Usage: $(basename $0) lat long&amp;quot;;&lt;br /&gt;
   echo &amp;quot;East and north are positive.&amp;quot;;&lt;br /&gt;
 else&lt;br /&gt;
   testmagvar $1 $2 0 $(date +&amp;quot;%m %d %g&amp;quot;)|tail -1|tr -s [:space:] \\t|cut -f6;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
You ''can'' cheat and get the magnetic variation from the current coordinate when flying in FlightGear, from the property tree (/environment/magnetic-variation-deg). But being a good student you of course want to know the magnetic variation ''before'' rolling out from the hangar, already during the flight planning. You do plan your flights, right?&lt;br /&gt;
&lt;br /&gt;
=== Directional Gyro ===&lt;br /&gt;
The name of this instrument describes the 2 essential parts of its characteristics:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;directional&amp;quot;: the instrument serves to see the direction of the plane. In other words, it serves as a compass.&lt;br /&gt;
* &amp;quot;gyro&amp;quot;: the instrument functions by way of gyroscopes. These are objects that rotate (see the root of the word: &amp;quot;gyrations&amp;quot;). They tend to maintain their position in space. &lt;br /&gt;
&lt;br /&gt;
The advantages with respect to a magnetic compass are:&lt;br /&gt;
&lt;br /&gt;
* it can be set to point to the geographic north pole, not of the magnetic pole as the magnetic compass does.&lt;br /&gt;
* it does not have the tendency to lag behind or ahead while turning, as the magentic compass does. &lt;br /&gt;
* it is not subject to magnetic influences. The magnetic compass can point in a slightly off direction due to heavy metal objects on or near the aircraft. &lt;br /&gt;
&lt;br /&gt;
The disadvantage is of course that it is a more complex instrument than a magnetic compass. &lt;br /&gt;
&lt;br /&gt;
Other disadvantages:&lt;br /&gt;
&lt;br /&gt;
* It is heavier than a magnetic compass &lt;br /&gt;
* It requires a source of power, either electricity or vacuum.  If the power source fails, the DG will fail.  Because the gyro spins down slowly, it will slowy drift off heading.  If the pilot does not notice that the vacuum or elctrical system has failed, he may not realize that the DG has failed.  This can lead a pilot off course.&lt;br /&gt;
* Gyros precess over time, and must be periodically realigned with the magnetic compass, usually every fifteen minutes.&lt;br /&gt;
* Turbulence or maneuvering can &amp;quot;tumble&amp;quot; the gyro, resulting in wildly erratic readings.&lt;br /&gt;
&lt;br /&gt;
=== Attitude Indicator ===&lt;br /&gt;
&lt;br /&gt;
The artificial horizon, also known as the attitude indicator, simulates the position of the horizon relative to the plane. The top half of the background of the artificial horizon is blue and represents the sky. The bottom half is brown, and represents the ground. This background moves as the plane pitches forward and backward, and rolls left and right. In the center of the attitude indicator is a small dot, representing the position of the nose of the plane. To the side of this dot are lines representing the position of the wings. These parts of the attitude indicator do not move, so, when the plane pitches backward 10 degrees, the blue background shifts down 10 degrees. Most attitude indicators have major lines for every ten degrees of pitch, drawn across the center of the background. At the top or bottom of the attitude indicator is an arrow pointing out. This arrow points to corresponding markings on a ring on the attitude indicator. This ring does not move with the pitch of the plane, it only moves as the plane rolls left to right. On this ring are generally markings for 10 degrees of roll, 20 degrees, 30 degrees and 60 degrees. It is important to note that the artificial horizon indicates the orientation of the plane, and not the direction of travel. During slow flight, most planes have a high angle of attack, meaning that for straight and level flight, the nose is raised above the horizon. In this case, the attitude indicator would show the nose above the horizon (in the blue) but the airplane would be going straight and level. The artificial horizon is normally controlled by a gyro which is driven by a vacuum generated by the engine. It is possible that this vacuum can fail, especially if there is an engine failure. For this reason, the turn and bank coordinator is generally powered by an electrical generator and can be used as a backup instrument.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Vertical Situation Indicator ===&lt;br /&gt;
* http://www.boeing.com/commercial/aeromagazine/aero_20/vsd_story.html&lt;br /&gt;
* http://www.aviationtoday.com/sia/20000101.htm&lt;br /&gt;
* http://www.boeing.com/commercial/news/feature/737tech.html&lt;br /&gt;
&lt;br /&gt;
=== Turn Coordinator ===&lt;br /&gt;
&lt;br /&gt;
The turn and bank coordinator provides two pieces of information -- the bank of the wings, and the degree of coordination between the ailerons and rudder in a turn. As the plane is rolled left and right, the wings on the turn and bank coordinator rotate as well. To make a proper turn, the ball in the middle of the turn and bank coordinator should stay centered. If the wings are rolled without enough rudder applied, the ball will move to the side. There are markings on the side of the turn and bank coordinator that indicate the amount of bank to apply to make a standard rate turn. At this rate, the plane will make one complete turn in two minutes. The gyroscope powering the turn and bank coordinator is normally electrically powered, unlike the attitude indicator, which is normally powered by a vacuum generated by the engine. If one of the two instruments fails, the other one is likely to continue to work. In FlightGear, it is possible to enable automatic turn coordination, in the event you don't have rudder pedals. To do so, start FlightGear with the commandline argument --enable-auto-coordination. * todo: describe how to properly use a rudder to make a coordinated turn&lt;br /&gt;
&lt;br /&gt;
=== [[Bendix/King KAP140 Autopilot]] ===&lt;/div&gt;</summary>
		<author><name>Joacim</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Avionics_and_instruments&amp;diff=3279</id>
		<title>Avionics and instruments</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Avionics_and_instruments&amp;diff=3279"/>
		<updated>2007-01-27T12:52:06Z</updated>

		<summary type="html">&lt;p&gt;Joacim: /* Compass */  Elaborated on magnetic variation and added an example magvar shell script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Compass ===&lt;br /&gt;
&lt;br /&gt;
The compass aligns itself along the magnetic field that surrounds the earth.&lt;br /&gt;
&lt;br /&gt;
Note that The magnetic north pole and the geographic north pole are not located at the same spot. The difference between the magnetic field and true north is called &amp;quot;magnetic variation&amp;quot; or &amp;quot;magnetic declination&amp;quot;. The magnetic variation is expressed as an angle east or west of true north. Not only does the magnetic variation vary with position on the planet, it also slowly varies over time since the magnetic poles are not stationary.&lt;br /&gt;
&lt;br /&gt;
When planning a flight it is necessary to know the magnetic variation along the flight path. Air navigation is generally done using magnetic bearings, and the VOR beacons also use that. Runway numbering is based on magnetic bearings. Even GPS's designed for air navigation uses magnetic bearings. Almost everything in aeronautical navigation is based on magnetic bearings. Wind directions from METAR however, reports winds with ''true'' direction. And that's why you need to know the magnetic variation: for calculating the wind triangle; how much you must hold up against the wind (your heading) when flying to the destination (your course). The Kelpie flightplanner for FlightGear also uses true bearings.&lt;br /&gt;
&lt;br /&gt;
Magnetic variations are expressed in &amp;quot;degrees east&amp;quot; or &amp;quot;degrees west&amp;quot;. An ''easterly magnetic variation'' means that the magnetic north points a bit to the ''east'' of the true north. In FlightGear, easterly is a positive number, and westerly is negative. The magnetic variation at FlightGears default airport, KSFO, is about 15° east. (This is why the instrument settings of the directinal gyro in the menu is &amp;quot;-15&amp;quot; initially, when starting at KSFO. It shows ''magnetic'' heading.)&lt;br /&gt;
&lt;br /&gt;
The magnetic variation for a specific spot can be retreieved from the area charts or from other maps.&lt;br /&gt;
&lt;br /&gt;
Good area charts are not always easy to get (for free). So here is a quick and dirty shell script for retrieving the magnetic variation at a specific coordinate (at sea level and date of invocation) by shamelessly abusing the '''testmagvar''' utility from the SimGear source code:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 if [ $# -ne 2 ]; then&lt;br /&gt;
   echo &amp;quot;Usage: $(basename $0) lat long&amp;quot;;&lt;br /&gt;
   echo &amp;quot;East and north are positive.&amp;quot;;&lt;br /&gt;
 else&lt;br /&gt;
   testmagvar $1 $2 0 $(date +&amp;quot;%m %d %g&amp;quot;)|tail -1|tr -s [:space:] \\t|cut -f6;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
You ''can'' cheat and get the magnetic variation from the current coordinate when flying in FlightGear, from the property tree (/environment/magnetic-variation-deg). But being a good student you of course want to know the magnetic variation ''before'' rolling out from the hangar, already during the flight planning. You do plan your flights, right?&lt;br /&gt;
&lt;br /&gt;
=== Directional Gyro ===&lt;br /&gt;
The name of this instrument describes the 2 essential parts of its characteristics:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;directional&amp;quot;: the instrument serves to see the direction of the plane. In other words, it serves as a compass.&lt;br /&gt;
* &amp;quot;gyro&amp;quot;: the instrument functions by way of gyroscopes. These are objects that rotate (see the root of the word: &amp;quot;gyrations&amp;quot;). They tend to maintain their position in space. &lt;br /&gt;
&lt;br /&gt;
The advantages with respect to a magnetic compass are:&lt;br /&gt;
&lt;br /&gt;
* it can be set to point to the geographic north pole, not of the magnetic pole as the magnetic compass does.&lt;br /&gt;
* it does not have the tendency to lag behind or ahead while turning, as the magentic compass does. &lt;br /&gt;
* it is not subject to magnetic influences. The magnetic compass can point in a slightly off direction due to heavy metal objects on or near the aircraft. &lt;br /&gt;
&lt;br /&gt;
The disadvantage is of course that it is a more complex instrument than a magnetic compass. &lt;br /&gt;
&lt;br /&gt;
Other disadvantages:&lt;br /&gt;
&lt;br /&gt;
* It is heavier than a magnetic compass &lt;br /&gt;
* It requires a source of power, either electricity or vacuum.  If the power source fails, the DG will fail.  Because the gyro spins down slowly, it will slowy drift off heading.  If the pilot does not notice that the vacuum or elctrical system has failed, he may not realize that the DG has failed.  This can lead a pilot off course.&lt;br /&gt;
* Gyros precess over time, and must be periodically realigned with the magnetic compass&lt;br /&gt;
* Turbulence or maneuvering can &amp;quot;tumble&amp;quot; the gyro, resulting in wildly erratic readings.&lt;br /&gt;
&lt;br /&gt;
=== Attitude Indicator ===&lt;br /&gt;
&lt;br /&gt;
The artificial horizon, also known as the attitude indicator, simulates the position of the horizon relative to the plane. The top half of the background of the artificial horizon is blue and represents the sky. The bottom half is brown, and represents the ground. This background moves as the plane pitches forward and backward, and rolls left and right. In the center of the attitude indicator is a small dot, representing the position of the nose of the plane. To the side of this dot are lines representing the position of the wings. These parts of the attitude indicator do not move, so, when the plane pitches backward 10 degrees, the blue background shifts down 10 degrees. Most attitude indicators have major lines for every ten degrees of pitch, drawn across the center of the background. At the top or bottom of the attitude indicator is an arrow pointing out. This arrow points to corresponding markings on a ring on the attitude indicator. This ring does not move with the pitch of the plane, it only moves as the plane rolls left to right. On this ring are generally markings for 10 degrees of roll, 20 degrees, 30 degrees and 60 degrees. It is important to note that the artificial horizon indicates the orientation of the plane, and not the direction of travel. During slow flight, most planes have a high angle of attack, meaning that for straight and level flight, the nose is raised above the horizon. In this case, the attitude indicator would show the nose above the horizon (in the blue) but the airplane would be going straight and level. The artificial horizon is normally controlled by a gyro which is driven by a vacuum generated by the engine. It is possible that this vacuum can fail, especially if there is an engine failure. For this reason, the turn and bank coordinator is generally powered by an electrical generator and can be used as a backup instrument.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Vertical Situation Indicator ===&lt;br /&gt;
* http://www.boeing.com/commercial/aeromagazine/aero_20/vsd_story.html&lt;br /&gt;
* http://www.aviationtoday.com/sia/20000101.htm&lt;br /&gt;
* http://www.boeing.com/commercial/news/feature/737tech.html&lt;br /&gt;
&lt;br /&gt;
=== Turn Coordinator ===&lt;br /&gt;
&lt;br /&gt;
The turn and bank coordinator provides two pieces of information -- the bank of the wings, and the degree of coordination between the ailerons and rudder in a turn. As the plane is rolled left and right, the wings on the turn and bank coordinator rotate as well. To make a proper turn, the ball in the middle of the turn and bank coordinator should stay centered. If the wings are rolled without enough rudder applied, the ball will move to the side. There are markings on the side of the turn and bank coordinator that indicate the amount of bank to apply to make a standard rate turn. At this rate, the plane will make one complete turn in two minutes. The gyroscope powering the turn and bank coordinator is normally electrically powered, unlike the attitude indicator, which is normally powered by a vacuum generated by the engine. If one of the two instruments fails, the other one is likely to continue to work. In FlightGear, it is possible to enable automatic turn coordination, in the event you don't have rudder pedals. To do so, start FlightGear with the commandline argument --enable-auto-coordination. * todo: describe how to properly use a rudder to make a coordinated turn&lt;br /&gt;
&lt;br /&gt;
=== [[Bendix/King KAP140 Autopilot]] ===&lt;/div&gt;</summary>
		<author><name>Joacim</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Autopilot_PID_controller_tuning_resources&amp;diff=3236</id>
		<title>Autopilot PID controller tuning resources</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Autopilot_PID_controller_tuning_resources&amp;diff=3236"/>
		<updated>2007-01-08T17:11:00Z</updated>

		<summary type="html">&lt;p&gt;Joacim: Corrected some spelling errors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flightgear Autopilot is a modular system based on PID controllers. Here are some tips to help in the tuning of such a controller. There is lot of documentation all over Internet about how to tune the parameters, having this you will have to figure out how works the Flightgear PID controler implementation.&lt;br /&gt;
&lt;br /&gt;
First of all, have a look at the code where you will see the algorithm wich is used for our autopilot. The reading of the existing autopilots in Flightgear aircraft datas will do the rest.&lt;br /&gt;
&lt;br /&gt;
There is actually a doc about filters in Flightgear documentation. Filters can be applied on input or ouput values, in other words, before and after the PID controller.&lt;br /&gt;
&lt;br /&gt;
=== FlightGear PID Controler ===&lt;br /&gt;
&lt;br /&gt;
Knowing the algorithm is mandatory, certain values are forbidden, for example they can lead to a division by zero. Then you will have to understand where the parameters apply to act on the choosen correction module. See the schema wich is a good reminder while doing the tests.&lt;br /&gt;
&lt;br /&gt;
[[Image:pid_controler.png|thumb|PID parameter's application]]&lt;br /&gt;
&lt;br /&gt;
You can find good explanations on how to practically tune the controller. [http://en.wikipedia.org/wiki/PID_controller Wikipedia's article on the PID Controler]&lt;br /&gt;
&lt;br /&gt;
=== Getting graphs of Controler action ===&lt;br /&gt;
&lt;br /&gt;
While it's possible to tune a PID controller by testing directly the aircraft behaviour under the autopilot control, it can be really usefull to get everything in graphical view.&lt;br /&gt;
&lt;br /&gt;
[[Image:pid_cotroler_data_graph.png|thumb|Datas of an Auto-trim PID Controler displayed as graphs]]&lt;br /&gt;
&lt;br /&gt;
First of all you'll have to turn the PID Controler's debug mode on. That is in the autopilot.xml you are working on. (I didn't try to turn more than one PID controller's debug at the same time).&lt;br /&gt;
&lt;br /&gt;
Then you will get 6 new values displayed on the console at each FG loop. You will need to catch them and format the values in one line. Here is an exemple of a parser script written in Perl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/perl -w&lt;br /&gt;
# prints: &amp;quot;input reference P I D output&amp;quot;&lt;br /&gt;
&lt;br /&gt;
while (&amp;lt;STDIN&amp;gt;) {&lt;br /&gt;
        if ($_ =~ /input\s=\s(-*\d+.*)\sref\s=\s(-*\d+.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot;$1 $2 &amp;quot;;&lt;br /&gt;
        } elsif ($_ =~ /P:(-*\d+.*)\sI:(-*\d+.*)\sD:(-*\d+.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot;$1 $2 $3&amp;quot;;&lt;br /&gt;
        } elsif ($_ =~ /output\s=\s(.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot; $1\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can write them in a file...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alexis@linear:~/fgfs$ /usr/local/bin/fgfs 2&amp;amp;gt;&amp;amp;1 | ./PIDcontroler_parser.pl &amp;amp;gt; my_file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use Linux, You can run Kst simultaneously to read the datas on the fly and watch them displayed together in real time while testing the aircraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://kst.kde.org/ Kst, real-time large-dataset viewing and plotting tool]&lt;/div&gt;</summary>
		<author><name>Joacim</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Autopilot_PID_controller_tuning_resources&amp;diff=3235</id>
		<title>Autopilot PID controller tuning resources</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Autopilot_PID_controller_tuning_resources&amp;diff=3235"/>
		<updated>2007-01-08T17:08:20Z</updated>

		<summary type="html">&lt;p&gt;Joacim: /* Flightgear PID Controler */ and some more spelling errors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flightgear Autopilot is a modular system based on PID controlers. Here are some tips to help in the tuning of such a controler. There is lot of documentation all over Internet about how to tune the parameters, having this you will have to figure out how works the Flightgear PID controler implementation.&lt;br /&gt;
&lt;br /&gt;
First of all, have a look at the code where you will see the algorythm wich is used for our autopilot. The reading of the existing autopilots in Flightgear aircraft datas will do the rest.&lt;br /&gt;
&lt;br /&gt;
There is actually a doc about filters in Flightgear documentation. Filters can be applied on input or ouput values, in other words, before and after the PID controler.&lt;br /&gt;
&lt;br /&gt;
=== Flightgear PID Controler ===&lt;br /&gt;
&lt;br /&gt;
Knowing the algorithm is mandatory, certain values are forbidden, for example they can lead to a division by zero. Then you will have to understand where the parameters apply to act on the choosen correction module. See the schema wich is a good reminder while doing the tests.&lt;br /&gt;
&lt;br /&gt;
[[Image:pid_controler.png|thumb|PID parameter's application]]&lt;br /&gt;
&lt;br /&gt;
You can find good explanations on how to practically tune the controller. [http://en.wikipedia.org/wiki/PID_controller Wikipedia's article on the PID Controler]&lt;br /&gt;
&lt;br /&gt;
=== Getting graphs of Controler action ===&lt;br /&gt;
&lt;br /&gt;
While it's possible to tune a PID Controler by testing directly the aircraft behaviour under the autopilot control, it can be really usefull to get everything in graphical view.&lt;br /&gt;
&lt;br /&gt;
[[Image:pid_cotroler_data_graph.png|thumb|Datas of an Auto-trim PID Controler displayed as graphs]]&lt;br /&gt;
&lt;br /&gt;
First of all you'll have to turn the PID Controler's debug mode on. That is in the autopilot.xml you are working on. (I didn't try to turn more than one PID controler's debug at the same time).&lt;br /&gt;
&lt;br /&gt;
Then you will get 6 new values displayed on the console at each FG loop. You will need to catch them and format the values in one line. Here is an exemple of a parser script written in Perl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/perl -w&lt;br /&gt;
# prints: &amp;quot;input reference P I D output&amp;quot;&lt;br /&gt;
&lt;br /&gt;
while (&amp;lt;STDIN&amp;gt;) {&lt;br /&gt;
        if ($_ =~ /input\s=\s(-*\d+.*)\sref\s=\s(-*\d+.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot;$1 $2 &amp;quot;;&lt;br /&gt;
        } elsif ($_ =~ /P:(-*\d+.*)\sI:(-*\d+.*)\sD:(-*\d+.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot;$1 $2 $3&amp;quot;;&lt;br /&gt;
        } elsif ($_ =~ /output\s=\s(.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot; $1\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can write them in a file...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alexis@linear:~/fgfs$ /usr/local/bin/fgfs 2&amp;amp;gt;&amp;amp;1 | ./PIDcontroler_parser.pl &amp;amp;gt; my_file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use Linux, You can run Kst simultaneously to read the datas on the fly and watch them displayed together in real time while testing the aircraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://kst.kde.org/ Kst, real-time large-dataset viewing and plotting tool]&lt;/div&gt;</summary>
		<author><name>Joacim</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Autopilot_PID_controller_tuning_resources&amp;diff=3234</id>
		<title>Autopilot PID controller tuning resources</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Autopilot_PID_controller_tuning_resources&amp;diff=3234"/>
		<updated>2007-01-08T17:06:44Z</updated>

		<summary type="html">&lt;p&gt;Joacim: /* Flightgear PID Controler */ spelling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flightgear Autopilot is a modular system based on PID controlers. Here are some tips to help in the tuning of such a controler. There is lot of documentation all over Internet about how to tune the parameters, having this you will have to figure out how works the Flightgear PID controler implementation.&lt;br /&gt;
&lt;br /&gt;
First of all, have a look at the code where you will see the algorythm wich is used for our autopilot. The reading of the existing autopilots in Flightgear aircraft datas will do the rest.&lt;br /&gt;
&lt;br /&gt;
There is actually a doc about filters in Flightgear documentation. Filters can be applied on input or ouput values, in other words, before and after the PID controler.&lt;br /&gt;
&lt;br /&gt;
=== Flightgear PID Controler ===&lt;br /&gt;
&lt;br /&gt;
Knowing the algorithm is mandatory, certain values are forbiden, for exemple they can lead to a division by zero. Then you will have to understand where the parameters apply to act on the choosen correction module. See the schema wich is a good reminder while doing the tests.&lt;br /&gt;
&lt;br /&gt;
[[Image:pid_controler.png|thumb|PID parameter's application]]&lt;br /&gt;
&lt;br /&gt;
You can find good explanations on how to practically tune the controller. [http://en.wikipedia.org/wiki/PID_controller Wikipedia's article on the PID Controler]&lt;br /&gt;
&lt;br /&gt;
=== Getting graphs of Controler action ===&lt;br /&gt;
&lt;br /&gt;
While it's possible to tune a PID Controler by testing directly the aircraft behaviour under the autopilot control, it can be really usefull to get everything in graphical view.&lt;br /&gt;
&lt;br /&gt;
[[Image:pid_cotroler_data_graph.png|thumb|Datas of an Auto-trim PID Controler displayed as graphs]]&lt;br /&gt;
&lt;br /&gt;
First of all you'll have to turn the PID Controler's debug mode on. That is in the autopilot.xml you are working on. (I didn't try to turn more than one PID controler's debug at the same time).&lt;br /&gt;
&lt;br /&gt;
Then you will get 6 new values displayed on the console at each FG loop. You will need to catch them and format the values in one line. Here is an exemple of a parser script written in Perl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/perl -w&lt;br /&gt;
# prints: &amp;quot;input reference P I D output&amp;quot;&lt;br /&gt;
&lt;br /&gt;
while (&amp;lt;STDIN&amp;gt;) {&lt;br /&gt;
        if ($_ =~ /input\s=\s(-*\d+.*)\sref\s=\s(-*\d+.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot;$1 $2 &amp;quot;;&lt;br /&gt;
        } elsif ($_ =~ /P:(-*\d+.*)\sI:(-*\d+.*)\sD:(-*\d+.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot;$1 $2 $3&amp;quot;;&lt;br /&gt;
        } elsif ($_ =~ /output\s=\s(.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot; $1\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can write them in a file...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alexis@linear:~/fgfs$ /usr/local/bin/fgfs 2&amp;amp;gt;&amp;amp;1 | ./PIDcontroler_parser.pl &amp;amp;gt; my_file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use Linux, You can run Kst simultaneously to read the datas on the fly and watch them displayed together in real time while testing the aircraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://kst.kde.org/ Kst, real-time large-dataset viewing and plotting tool]&lt;/div&gt;</summary>
		<author><name>Joacim</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Main_Page&amp;diff=3233</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Main_Page&amp;diff=3233"/>
		<updated>2007-01-08T17:04:53Z</updated>

		<summary type="html">&lt;p&gt;Joacim: corrected a spelling error in &amp;quot;Autopilot Tunning Resources&amp;quot; (to &amp;quot;Tuning).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
'''FlightGear''' Flight Simulator project is an open-source, multi-platform, cooperative flight simulator development project. Source code for the entire project is available ([http://cvs.flightgear.org/cgi-bin/viewcvs/viewcvs.cgi/?cvsroot=FlightGear-0.9#dirlist CVS repository]) and licensed under the [http://www.gnu.org/copyleft/gpl.html GNU General Public License]. &lt;br /&gt;
&lt;br /&gt;
The goal of the '''FlightGear''' project is to create a sophisticated flight simulator framework for use in research or academic environments, for the development and pursuit of other interesting flight simulation ideas, and as an end-user application. We are developing a sophisticated, open simulation framework that can be expanded and improved upon by anyone interested in [[Volunteer|contributing]]. &lt;br /&gt;
&lt;br /&gt;
There are many exciting possibilities for an open, free flight sim. We hope that this project will be interesting and useful to many people in many areas.&lt;br /&gt;
&lt;br /&gt;
'''FlightGear''' comes with a set of illustrated documentation, notably&lt;br /&gt;
&amp;quot;The Manual&amp;quot;, which is available as&lt;br /&gt;
[http://www.flightgear.org/Docs/getstart/getstart.pdf PDF] and&lt;br /&gt;
[http://www.flightgear.org/Docs/getstart/getstart.html HTML]. If you&lt;br /&gt;
prefer to follow the 'bleeding edge' set of FlightGear instructions,&lt;br /&gt;
then the following articles are likely to make you happy. You will&lt;br /&gt;
notice that parts of this Wiki duplicate information that's already&lt;br /&gt;
present in &amp;quot;The Manual&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{|cellspacing=&amp;quot;10&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot;|&lt;br /&gt;
== User Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== Getting Started ===&lt;br /&gt;
* [[ New to FlightGear ]]&lt;br /&gt;
* [[ Why FlightGear ]]&lt;br /&gt;
* [[ Features ]]&lt;br /&gt;
* [[ FAQ ]]&lt;br /&gt;
* [[ Hardware Recommendations ]]&lt;br /&gt;
* [[ Recommended Software ]]&lt;br /&gt;
* [[ Troubleshooting Problems ]]&lt;br /&gt;
* [[ Volunteer ]]&lt;br /&gt;
* [[ Real Life Experience ]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring Flightgear ===&lt;br /&gt;
* [[ Command Line Parameters ]]&lt;br /&gt;
* [[ Installing Scenery ]]&lt;br /&gt;
* [[ Improving Framerates ]]&lt;br /&gt;
* [[ Multiplayer Howto ]]&lt;br /&gt;
* [[ Linux software audio mixing with FlightGear ]]&lt;br /&gt;
&lt;br /&gt;
=== Using Flightgear ===&lt;br /&gt;
* [[Aircraft]]&lt;br /&gt;
* [[ Suggested Flights ]]&lt;br /&gt;
* [[ Starting in the Air ]]&lt;br /&gt;
* [[ Instant Replay ]]&lt;br /&gt;
* [[ Preset Properties ]]&lt;br /&gt;
* [[ Realism ]]&lt;br /&gt;
* [[ Flying the Helicopter ]]&lt;br /&gt;
&lt;br /&gt;
=== Interactive Scenarios ===&lt;br /&gt;
* [[ Carrier Howto ]]&lt;br /&gt;
* [[ Air-Air Refueling Howto ]]&lt;br /&gt;
* [[ AI Systems ]]&lt;br /&gt;
* [[ Interactive Traffic ]]&lt;br /&gt;
* [[ Soaring ]]&lt;br /&gt;
&lt;br /&gt;
=== Flying Resources ===&lt;br /&gt;
* [[ Definitions Acronyms ]]&lt;br /&gt;
* [[ Getting IFR Charts ]]&lt;br /&gt;
* [[ Understanding Altitude ]]&lt;br /&gt;
* [[ Understanding Navigation ]]&lt;br /&gt;
* [[ Understanding Propeller Torque and P-Factor ]]&lt;br /&gt;
* [[ Understanding Aerodynamics ]]&lt;br /&gt;
* [[ Communications ]]&lt;br /&gt;
* [[ Weather ]]&lt;br /&gt;
* [[ Avionics and Instruments ]] &lt;br /&gt;
* [http://www.wingfiles.com/ Everything you need ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
== Developer Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== Compiling  ===&lt;br /&gt;
* [[ Building Flightgear ]]&lt;br /&gt;
* [[ Building Terragear ]]&lt;br /&gt;
* [[ OpenSceneGraph ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Contributing ===&lt;br /&gt;
* [[ Submitting Patches ]] &lt;br /&gt;
* [[ Code Cleanup ]] &lt;br /&gt;
* [[ Development Resources ]]&lt;br /&gt;
* [[ Extension Support ]]&lt;br /&gt;
* [[ Technical Reports ]]&lt;br /&gt;
&lt;br /&gt;
=== Code Internals ===&lt;br /&gt;
* [[ Property Tree ]]&lt;br /&gt;
* [[ Subsystems ]] &lt;br /&gt;
* [[ Commands ]] &lt;br /&gt;
* [[ FDM API ]]&lt;br /&gt;
* [[ Nasal scripting language ]]&lt;br /&gt;
* [[ File Formats ]]&lt;br /&gt;
&lt;br /&gt;
=== Modeling ===&lt;br /&gt;
* [[ Modeling - Getting Started ]]&lt;br /&gt;
* [[ Model Import and Export ]]&lt;br /&gt;
* [[ Modeling Resources ]]&lt;br /&gt;
* [[ Autopilot Tuning Resources ]]&lt;br /&gt;
* [[ Aircraft Information Resources ]]&lt;br /&gt;
* [[ Blender Ground Signs Tutorial]]&lt;br /&gt;
* [[ Normals and Transparency Tutorial ]]&lt;br /&gt;
&lt;br /&gt;
=== Todo ===&lt;br /&gt;
* [[ Long Term Goals ]]&lt;br /&gt;
* [[ Bugs ]]&lt;br /&gt;
* [[ FGFS Todo ]]&lt;br /&gt;
* [[:Category:Aircraft TODO]]&lt;br /&gt;
* [[ Feature Requests / Proposals / Ideas ]]&lt;br /&gt;
* [[ FlightGear Expo Checklist ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
* [[ Glass Cockpit Projects ]]&lt;br /&gt;
* [[ Tutorial Resources ]]&lt;br /&gt;
* [[ Copyright Inquiry ]]&lt;br /&gt;
* [http://www.cafepress.com/fgfs_gear FlightGear - Gear] &lt;br /&gt;
* [[Resources]]&lt;br /&gt;
* [[ Sign Specification Proposal ]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Joacim</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Autopilot_Tunning_Resources&amp;diff=3232</id>
		<title>Autopilot Tunning Resources</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Autopilot_Tunning_Resources&amp;diff=3232"/>
		<updated>2007-01-08T17:03:34Z</updated>

		<summary type="html">&lt;p&gt;Joacim: Autopilot Tunning Resources moved to Autopilot Tuning Resources: spelling error: &amp;quot;tunning&amp;quot;-&amp;gt;&amp;quot;tuning&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Autopilot Tuning Resources]]&lt;/div&gt;</summary>
		<author><name>Joacim</name></author>
	</entry>
	<entry>
		<id>https://wiki.flightgear.org/w/index.php?title=Autopilot_PID_controller_tuning_resources&amp;diff=3231</id>
		<title>Autopilot PID controller tuning resources</title>
		<link rel="alternate" type="text/html" href="https://wiki.flightgear.org/w/index.php?title=Autopilot_PID_controller_tuning_resources&amp;diff=3231"/>
		<updated>2007-01-08T17:03:34Z</updated>

		<summary type="html">&lt;p&gt;Joacim: Autopilot Tunning Resources moved to Autopilot Tuning Resources: spelling error: &amp;quot;tunning&amp;quot;-&amp;gt;&amp;quot;tuning&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Flightgear Autopilot is a modular system based on PID controlers. Here are some tips to help in the tuning of such a controler. There is lot of documentation all over Internet about how to tune the parameters, having this you will have to figure out how works the Flightgear PID controler implementation.&lt;br /&gt;
&lt;br /&gt;
First of all, have a look at the code where you will see the algorythm wich is used for our autopilot. The reading of the existing autopilots in Flightgear aircraft datas will do the rest.&lt;br /&gt;
&lt;br /&gt;
There is actually a doc about filters in Flightgear documentation. Filters can be applied on input or ouput values, in other words, before and after the PID controler.&lt;br /&gt;
&lt;br /&gt;
=== Flightgear PID Controler ===&lt;br /&gt;
&lt;br /&gt;
Knowing the algorythm is mandatory, certain values are forbiden, for exemple they can lead to a division by zero. Then you will have to understand where the parameters apply to act on the choosen correction module. See the schema wich is a good reminder while doing the tests.&lt;br /&gt;
&lt;br /&gt;
[[Image:pid_controler.png|thumb|PID parameter's application]]&lt;br /&gt;
&lt;br /&gt;
You can find good explanations on how to practicaly tune the controler. [http://en.wikipedia.org/wiki/PID_controller Wikipedia's article on the PID Controler]&lt;br /&gt;
&lt;br /&gt;
=== Getting graphs of Controler action ===&lt;br /&gt;
&lt;br /&gt;
While it's possible to tune a PID Controler by testing directly the aircraft behaviour under the autopilot control, it can be really usefull to get everything in graphical view.&lt;br /&gt;
&lt;br /&gt;
[[Image:pid_cotroler_data_graph.png|thumb|Datas of an Auto-trim PID Controler displayed as graphs]]&lt;br /&gt;
&lt;br /&gt;
First of all you'll have to turn the PID Controler's debug mode on. That is in the autopilot.xml you are working on. (I didn't try to turn more than one PID controler's debug at the same time).&lt;br /&gt;
&lt;br /&gt;
Then you will get 6 new values displayed on the console at each FG loop. You will need to catch them and format the values in one line. Here is an exemple of a parser script written in Perl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/perl -w&lt;br /&gt;
# prints: &amp;quot;input reference P I D output&amp;quot;&lt;br /&gt;
&lt;br /&gt;
while (&amp;lt;STDIN&amp;gt;) {&lt;br /&gt;
        if ($_ =~ /input\s=\s(-*\d+.*)\sref\s=\s(-*\d+.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot;$1 $2 &amp;quot;;&lt;br /&gt;
        } elsif ($_ =~ /P:(-*\d+.*)\sI:(-*\d+.*)\sD:(-*\d+.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot;$1 $2 $3&amp;quot;;&lt;br /&gt;
        } elsif ($_ =~ /output\s=\s(.*)/) {&lt;br /&gt;
                print STDOUT &amp;quot; $1\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can write them in a file...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alexis@linear:~/fgfs$ /usr/local/bin/fgfs 2&amp;amp;gt;&amp;amp;1 | ./PIDcontroler_parser.pl &amp;amp;gt; my_file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use Linux, You can run Kst simultaneously to read the datas on the fly and watch them displayed together in real time while testing the aircraft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://kst.kde.org/ Kst, real-time large-dataset viewing and plotting tool]&lt;/div&gt;</summary>
		<author><name>Joacim</name></author>
	</entry>
</feed>