Standard instrument selection

From FlightGear wiki
Revision as of 12:24, 29 April 2017 by AndersM (talk | contribs) (added a note about separate fil)
Jump to navigation Jump to search

By default an aircraft gets access to a number of standard instruments via instrument properties. These instruments are C++ coded. Some of them depends on different aircraft systems.

It is possible to override the default selection by adding your own instrument property file listing the standard instruments that you want to use in the aircraft. Eg:

<?xml version="1.0"?>
 
<PropertyList>
 
   <airspeed-indicator>
     <name>airspeed-indicator</name>
     <number>0</number>
     <total-pressure>/systems/pitot/total-pressure-inhg</total-pressure>
     <static-pressure>/systems/static/pressure-inhg</static-pressure>
   </airspeed-indicator>
 
   <altimeter>
     <name>altimeter</name>
     <number>0</number>
     <static-pressure>/systems/static/pressure-inhg</static-pressure>
     <quantum>0</quantum>
     <tau>0</tau>
   </altimeter>

   <magnetic-compass>
    <name>magnetic-compass</name>
    <number>0</number>
  </magnetic-compass>

</PropertyList>

Then edit the -set.xml file and add a path to your own instrument file in the sim property-tree:

<sim>
   (...)
   <instrumentation>
    <path>Aircraft/MyAircraft/Instrumentation/my-instruments.xml</path>
   </instrumentation>
</sim>

Note: Due to how the instrumentation handling is coded you must create a separate file for your instrument list and use the sim/instrumentation/path node.

You can also change the properties that some of the instruments depend on to function. Eg. Changing the attitude indicator to use battery voltage property instead of vacuum suction to drive the gyro:

  <attitude-indicator>
    <name>attitude-indicator</name>
    <number>0</number>
    <suction>systems/electrical/outputs/battery_voltage</suction>
  </attitude-indicator>