Howto:Add instruments to a cockpit: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
m (Johan G moved page Howto:Adding instruments to an aircraft to Howto:Add instruments to a cockpit: More to the point; Grammar)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{WIP}}
This is one way '''how to add instruments to a cockpit'''.  While many of the aircraft for FlightGear have both rather detailed and completely instrumented cockpits, many aircraft either only have the most basic instruments or even none at all.


== Adding Instruments to existing models ==
Fortunately, adding already existing instruments to a cockpit is a relatively easy task.  The biggest difficulty is actually placing them accurately.


Many of the aircraft offerred for download on the Flight Gear Aircraft Download page are detailled and complete. Some models, however lack instrumentation, and in many cases only the basic instruments are available.
For aircraft that are licensed under the [[GNU GPL]] (all aircraft on the official download page are), instruments can be re-used in other aircraft when released under the same license.
 
Fortunately, adding new instruments is a relatively easy task. I have done this a few times myself, and the biggest difficulty is actually placing the instrument accurately, not to get it working. I have added a DME unit to the Beech 1900D and also an ASI to the DHC-8-300Q.
 
For aircraft that are already released under the GPL licence, instruments can be re-used in other aircraft. (Check this )


== Workflow ==
Adding instruments consists of a few major steps:
Adding instruments consists of a few major steps:


1. Identify the instrument needed to be added. Search the web for images and descriptions.  
# Locate an FG aircraft with a similar instrument.
# Copy XML tags relevant to the instrument files into XML file of the aircraft you want to update.
# Edit the updated aircraft file to place the instrument.


2. Locate an aircraft with a similar instrument
== Example ==
Let's update the instruments of the [[Bombardier Dash 8|Dash 8-300Q]] for a start.  


3. Copy the instrument files into the folder of the aircraft you want to update
The existing aircraft, version v20101217 from the version 2.6 aircraft download page has the following set of basic flight instruments.
* Air Speed Indicator (ASI)
* Altimeter
* Artificial Horizon


4. Edit the file that specifies the instrument and its location.
[[File:dhc8300q.jpg|thumb|270px|Cockpit of the Dash 8 with some instruments missing.]]


== An  example ==
We can see that our aircraft is lacking the following:
* Vertical Speed Indicator (VSI)
* Electronic Flight Systems Information (EFSI)
* Electronic Horizontal Situation Indicator (EHSI)
* Radio Magnetic Indicator (RMI)
* VOR instrument


Let's update the instruments of the Dash8-300Q for a start.  
First let's add the VSI (Vertical Speed Indicator) . Locate the tags for the ASI in a similar aircraft config file, the Beech 1900D (B1900D). These appear in the B1900D.xml file as follows:


The existing aircraft, version v20101217 from the version 2.6 aircraft download page has the following set of basic instruments ( Radios will be covered later)
<syntaxhighlight lang="xml">
    <model>
        <name>VSI 1 gauge</name>
        <path>Aircraft/b1900d/Models/Instruments/vsi.xml</path>
        <offsets>
            <x-m>-4.860</x-m>
            <y-m>-0.280</y-m>
            <z-m>-0.082</z-m>
            <pitch-deg>-10</pitch-deg>
        </offsets>
    </model>
</syntaxhighlight>


* Air Speed Indicator (ASI)
Copy this set of tags as shown above into the Dash8 300Q xml file in the models folder.  The file is named dhc8-300Q.xml
* Altimeter
* Artificial Horizon


[[File:dhc8300q.jpg|thumb|270px]]
The instrument now has to be placed in position.
We will use an existing instrument, the Air Speed Indicator of the DHC8 as a reference. The DHC 8 pilot ASI has the following settings.


We can see that our aircraft is lacking the following
<syntaxhighlight lang="xml">
 
    <model>
* Vertical Speed Indicator (VSI)
    <name>Pilot asi</name>
* (certain other instruments that will be covered later)
        <path>Aircraft/dhc8/Models/Instruments/asi300-3d.xml</path>
        <offsets>
            '''<x-m>-8.927</x-m>
            <y-m>-0.702</y-m>
            <z-m>2.382</z-m>'''
            <pitch-deg>0</pitch-deg>
        </offsets>
    </model>
</syntaxhighlight>


Let's add the VSI. Open the Beech 1900D aircraft folder and locate the VSI instrument under the models folder. There should be an RGB or PNG image file with the dial of the VSI and other files starting with VSI. Copy these files to the instruments folder of the Dash 8.
Copy the <code>&lt;offsets&gt; ... &lt;/offsets&gt;</code> section and paste it into the offsets section of the VSI instrument, replacing the existing settings.


Next we have to edit the file specifying the location of the instrument. This is in the dash300Q.xml file or similar under the Models folder. Locate the section listed as instruments.
<syntaxhighlight lang="xml">
    <model>
        <name>VSI 1 gauge</name>
        <path>Aircraft/b1900d/Models/Instruments/vsi.xml</path>
        <offsets>
            '''<x-m>-8.927</x-m>
            <y-m>-0.702</y-m>
            <z-m>2.382</z-m>'''
            <pitch-deg>0</pitch-deg>
        </offsets>
    </model>
</syntaxhighlight>


Now for the interesting part. Locating the instrument is the most difficult part, and is often confusing. There is a shortcut, however, as FG allows you to create several copies of the same instrument at different locations in the cockpit or on the panel.  
You will find that the VSI, the new instrument, will appear on top of the existing one. This confirms that the instrument appears in the cockpit.  


We will use the ASI as the reference point. Add the VSI on top of the ASI for the moment.
To place the instrument in a correct location, use the following adjustments:


ASI location points will be listed as follows:
* <code>&lt;x-m&gt;</code>  Distance of the instrument from the pilot (depth)
* <code>&lt;y-m&gt;</code>  Sideways location of the instrument
* <code>&lt;z-m&gt;</code>  Vertical location of the instrument


<x>
Using the offsets for an existing instrument, the altimeter, ALT, the VSI can be placed directly on top of the altimeter. The Y value for the altimeter is  <code>&lt;y-m&gt;-0.44&lt;/y-m&gt;</code>. To move the VSI down, experiment with different values of the z value, 2.182, 2.282, 2.382 etc.
<y>
<z>


Copy the ASI section with the tags, that is including the <model> upto the </model> tags
Finally, adjust the depth of the instrument (x - value)
Next edit the section that refers to the ASI as follows:


== A shortcut: multiple copies of an instrument==
FlightGear allows the creation of the same instrument copies in different locations in the cockpit. We can use this to our advantage: placing copies of the same instrument in different locations in the cockpit and selecting the right one.


[[File:MultipleVSI.jpg|thumb|VSI in multiple locations. Choose the best. ]]


Leave the VSI in the position it is in the B1900d folder as it is, and do no edit the location yet. this is to avoid mistakes
== Instrument path ==
The path can be left as follows, or the instrument related files (.ac, xml and image files) can be copied to the DHC8 folder and the reference can be changed to that folder:


You will find that the VSI, the new instrument will appear on top of the existing one. This shows that the instrument at least appears in the cockpit. It has to be located, next.
<syntaxhighlight lang="xml">
<path>Aircraft/b1900d/Models/Instruments/vsi.xml</path>
</syntaxhighlight>


In Flight Gear, the x- direction specifies the depth, and in this case is a negative value. The increase in the value, say from -2.330 to -2.430 means the instrument will move away from you into the panel, towards the nose of the aircraft.
can be changed to  


The Y- value is the simplest, here, and simply specifies left- right values. The Pilot ASI is listed with a Y value of - xxx . The value of zero means it is centre in the panel. You will notice the the co-piots ASI has a positive value of xxx.  
<syntaxhighlight lang="xml">
  <path>Aircraft/dhc8/Models/Instruments/vsi.xml</path>
</syntaxhighlight>


The Z value gives the position of the instrument from the floor, for example 2.223 will place the instrument higher that 2.123 in the panel.  
[[File:dhc8addedinstruments.jpg|thumb|270px|Several instruments added. Fine adjustment needed.]]


FG allows the creation of the same instrument copies in different locations in the cockpit . We can use this to our advantage: placing copies of the same instrument in different locations in the cockpit and selecting the right one.
== Related content ==
=== Wiki articles ===
* [[Avionics and instruments]]


== External links ==
* {{wikipedia|Flight instruments}}


==External Links==
* [http://www.faa.gov/library/manuals/aviation/instrument_flying_handbook/media/FAA-H-8083-15A%20-%20Chapter%2003.pdf FAA Instrument Flying Handbook] (Free e-book)
http://en.wikipedia.org/wiki/Flight_instruments


[[Category:Aircraft enhancement]]
[[Category:Howto]]
[[Category:Howto]]

Latest revision as of 09:45, 13 June 2015

This is one way how to add instruments to a cockpit. While many of the aircraft for FlightGear have both rather detailed and completely instrumented cockpits, many aircraft either only have the most basic instruments or even none at all.

Fortunately, adding already existing instruments to a cockpit is a relatively easy task. The biggest difficulty is actually placing them accurately.

For aircraft that are licensed under the GNU GPL (all aircraft on the official download page are), instruments can be re-used in other aircraft when released under the same license.

Workflow

Adding instruments consists of a few major steps:

  1. Locate an FG aircraft with a similar instrument.
  2. Copy XML tags relevant to the instrument files into XML file of the aircraft you want to update.
  3. Edit the updated aircraft file to place the instrument.

Example

Let's update the instruments of the Dash 8-300Q for a start.

The existing aircraft, version v20101217 from the version 2.6 aircraft download page has the following set of basic flight instruments.

  • Air Speed Indicator (ASI)
  • Altimeter
  • Artificial Horizon
Cockpit of the Dash 8 with some instruments missing.

We can see that our aircraft is lacking the following:

  • Vertical Speed Indicator (VSI)
  • Electronic Flight Systems Information (EFSI)
  • Electronic Horizontal Situation Indicator (EHSI)
  • Radio Magnetic Indicator (RMI)
  • VOR instrument

First let's add the VSI (Vertical Speed Indicator) . Locate the tags for the ASI in a similar aircraft config file, the Beech 1900D (B1900D). These appear in the B1900D.xml file as follows:

    <model>
        <name>VSI 1 gauge</name>
        <path>Aircraft/b1900d/Models/Instruments/vsi.xml</path>
        <offsets>
            <x-m>-4.860</x-m>
            <y-m>-0.280</y-m>
            <z-m>-0.082</z-m>
            <pitch-deg>-10</pitch-deg>
        </offsets>
    </model>

Copy this set of tags as shown above into the Dash8 300Q xml file in the models folder. The file is named dhc8-300Q.xml

The instrument now has to be placed in position.

We will use an existing instrument, the Air Speed Indicator of the DHC8 as a reference. The DHC 8 pilot ASI has the following settings.

    <model>
     	<name>Pilot asi</name>
        <path>Aircraft/dhc8/Models/Instruments/asi300-3d.xml</path>
        <offsets>
            '''<x-m>-8.927</x-m>
            <y-m>-0.702</y-m>
            <z-m>2.382</z-m>'''
            <pitch-deg>0</pitch-deg>
        </offsets>
    </model>

Copy the <offsets> ... </offsets> section and paste it into the offsets section of the VSI instrument, replacing the existing settings.

    <model>
        <name>VSI 1 gauge</name>
        <path>Aircraft/b1900d/Models/Instruments/vsi.xml</path>
        <offsets>
            '''<x-m>-8.927</x-m>
            <y-m>-0.702</y-m>
            <z-m>2.382</z-m>'''
            <pitch-deg>0</pitch-deg>
        </offsets>
    </model>

You will find that the VSI, the new instrument, will appear on top of the existing one. This confirms that the instrument appears in the cockpit.

To place the instrument in a correct location, use the following adjustments:

  • <x-m> Distance of the instrument from the pilot (depth)
  • <y-m> Sideways location of the instrument
  • <z-m> Vertical location of the instrument

Using the offsets for an existing instrument, the altimeter, ALT, the VSI can be placed directly on top of the altimeter. The Y value for the altimeter is <y-m>-0.44</y-m>. To move the VSI down, experiment with different values of the z value, 2.182, 2.282, 2.382 etc.

Finally, adjust the depth of the instrument (x - value)

A shortcut: multiple copies of an instrument

FlightGear allows the creation of the same instrument copies in different locations in the cockpit. We can use this to our advantage: placing copies of the same instrument in different locations in the cockpit and selecting the right one.

VSI in multiple locations. Choose the best.

Instrument path

The path can be left as follows, or the instrument related files (.ac, xml and image files) can be copied to the DHC8 folder and the reference can be changed to that folder:

 <path>Aircraft/b1900d/Models/Instruments/vsi.xml</path>

can be changed to

 <path>Aircraft/dhc8/Models/Instruments/vsi.xml</path>
Several instruments added. Fine adjustment needed.

Related content

Wiki articles

External links