Aircraft maintenance

From FlightGear wiki
Revision as of 12:19, 4 May 2012 by Gijs (talk | contribs) (Category)
Jump to navigation Jump to search

Some bugfixes and improvements require aircraft to be adapted/fixed to remain airworthy, to be working correctly, or to be taking full advantage of latest FlightGear version. The following Airworthiness Directives and Aviation Maintenance Alerts issued by the FlightGear Aviation Administration (FAA) should be considered for aircraft maintenance (A/B/C/D checks).

JSBSim

Deprecated engine properties "egt_degc" and "egt_degf"

Properties will be removed with a future JSBSim/FlightGear version. Replace "_" with "-", i.e. use:

 /engines/engine[..]/egt-degc
 /engines/engine[..]/egt-degf

Tanks

With >= FG2.4.0 the properties for mass, volume and density are interconnected and so are those representing the same property with just individual units. Aircraft should only set either mass or volume manually (i.e. on start-up), and NOT try to configure or compute both. The fuel density has to be defined at start up or it defaults to 755kg/m^3 (Avgas). Volume is derived from mass and vice versa. The last set property wins. The used formula is

mass = volume * density

or it's variation

volume = mass / density

Internally, content(mass), density(mass per volume), capacity(volume) and the unusable fuel(volume) are stored in metric units and the (US-)English units are derived by applying hard-coded conversion factors:

  • LBS_PER_KG = 2.20462262
  • KG_PER_LBS = 1.0/LBS_PER_KG
  • USGAL_PER_M3 = 1000.0/3.785411784
  • M3_PER_USGAL = 1.0/USGAL_PER_M3
  • IMPGAL_PER_M3 = 1000.0/4.54609
  • M3_PER_IMPGAL = 1.0/IMPGAL_PER_M3

No property-value can ever become less than zero. Division by zero errors (e.g. if density=0.0) are internally avoided.

The value of the property "unusable-xxx" is constantly compared against "content-xxx" and drives the value of the boolean property "empty". If content is less than usable, empty is true.

All the individual tanks are summed up to the properties /consumables/fuel/total-fuel-xxx

Aircraft developer's best practice

To create and initialize the tank properties for you aircraft, define your basic set of properties for each tank in your aircraft's -set.xml:

  <consumables>
    <fuel>
      <tank n="0">
        <name type="string">Left Wing</name>
        <capacity-gal_us type="double">64.0</capacity-gal_us>
        <unusable-gal_us type="double">2.5</unusable-gal_us>
        <level-gal_us type="double">50</level-gal_us>
      </tank>
      <tank n="1">
        <name type="string">Right Wing</name>
        <capacity-gal_us type="double">64.0</capacity-gal_us>
        <unusable-gal_us type="double">2.5</unusable-gal_us>
        <level-gal_us type="double">50</level-gal_us>
      </tank>
    </fuel>
  </consumables>

This will initialize and maintain /consumables/fuel/tank[0..1]/*

Alternatively, just define the number of tanks and fill in the values later (e.g. from Nasal):

  <consumables>
    <fuel>
      <numtanks>32</numtanks>
    </fuel>
  </consumables>

This will initialize and maintain /consumables/fuel/tank[0..31]/*

Note: if /consumables/fuel/numtanks exist and at least one /consumables/fuel/tank exist, the latter takes precedence over numtanks.

Instruments

Realistic NAV radio

With >= FG2.6.0 the NAV and DME radios are more realistic. Signals are "flickering" when at the edge of a station's range. The properties

   /instrumentation/dme/in-range
   /instrumentation/nav/in-range

may flicker on-off-on-... frequently. Some autopilots (mainly airliners) try to capture a localizer as soon as a NAV station is "in-range", which results in an issue when signal isn't stable yet. As a work-around, only use the properties above to enable/disable the NAV/DME cockpit display (to get the realistic display flickering effect), but use the property

   /instrumentation/nav/signal-quality-norm

to detect a valid signal for the autopilot's capture logic, e.g. add a condition that requires a high signal strength, say above 0.9, to avoid capturing too early while the signal is still unstable.

DME vs NAV radio

Aircraft with DME displays must include a DME instrument. With <=FG2.4.0 is was enough to add a "nav" instrument in order to also get some DME properties - this is deprecated. Add the DME instrument:

   <dme>
       <name>dme</name>
       <number>0</number>
   </dme>

The use of the NAV radio's DME properties is also deprecated. Instead of

   /instrumentation/nav/dme-in-range

use

   /instrumentation/dme/in-range

The deprecated DME properties are still supported with FG2.6.0, but will be removed with a later version.

Incorrect DME range displayed

Many aircraft (mainly airliners) do not display the correct DME distance. To obtain the correct DME distance, use DME instrument properties - not the nav instrument's properties. For DMEs, do not use:

/instrumentation/nav/nav-distance

which does not reflect the correct DME distance. Instead use

/instrumentation/dme/indicated-distance-nm

DME/NAV display beyond station range

Many aircraft (mainly airliners) display DME and/or NAV information, even though the DME/VOR/ILS is out of range - or even when the selected station doesn't even provide DME/NAV information - which is not realistic. NAV/DME displays should have a condition respecting

/instrumentation/dme/in-range

for DME displays and a condition on

/instrumentation/nav/in-range

for NAV/ILS displays, and otherwise blank/disable the distance/direction/display.

Attitude indicator

The FG attitude indicator supports caging, usually triggered by a push/pull switch next to the attitude indicator. The correct property name of FG's attitude indicator instrument is named

/instrumentation/attitude-indicator/caged-flag

Apparently a copy & paste issue has resulted in a large number of FlightGear aircraft incorrectly using the property

/instrumentation/attitude-indicator/caged

which has no effect. "caged" should be replaced by "caged-flag".

Sound

Stereo sound files unsupported

Stereo sound files can not (/no longer) be used for sound effects and must be converted to mono. Proper sound effects always required single channel wave sources. A 3D sound engine uses information on position, direction, speed of every source to render realistic 3D sound. This does not work with stereo files, since both channels would be rendered at the same position (no stereo effect anyway). Stereo files were usable with <=FG2.4.0, but resulted in many effects being broken (Doppler etc). To avoid such issues, >= FG2.6.0 produces a warning and rejects loading stereo files.

Avoiding sound file duplication

We have a large number of sound file duplicates in the FG repositories, which blow up the repository and download size. Generic sound files should be placed in the central /fgdata/Sound folder - and not be copied by individual aircraft. Check if a sound sample is available in the central "Sounds" folder, before copying it into an aircraft. New generic sounds may also be submitted to the central folder (use "git merge request" or mailing list) - which is better than producing loads of duplicates.

FlightRecorder

1rightarrow.png See Instant Replay for the main article about this subject.

The default FlightGear flight recorder matches propeller/piston aircraft only. For >= FG2.6.0 the correct flight recorder configuration file matching the aircraft type should be selected. It is also possible to add custom properties.

Rating System

1rightarrow.png See Formalizing Aircraft Status for the main article about this subject.

A new status rating system was introduced. Aircraft ratings should be encoded in the aircraft -set.xml file from where they are be picked up by launchers like FGRun, web pages etc.

Parking positions

The new --parkpos=AVAILABLE option selects a fitting parking position, based on the dimensions, class and operator of the aircraft. The following lines should be added to the <sim> part of the aircraft's -set.xml.

  <dimensions>
   <radius-m type="double">10.0</radius-m>
   <parkpos-offset-m type="double">0.0</parkpos-offset-m>
  </dimensions>
  <aircraft-class type="string">mil-fighter</aircraft-class>
  <aircraft-operator></aircraft-operator>
  <aircraft-data>
   <path>/sim/dimensions/radius-m</path>
   <path>/sim/dimensions/parkpos-offset-m</path>
   <path>/sim/aircraft-class</path>
   <path>/sim/aircraft-operator</path>
  </aircraft-data>