Howto:Define limits

From FlightGear wiki
Jump to: navigation, search

FlightGear has an in-built warning system to warn if the pilot execute certain actions above the maximum speed. These speed limits are controlled by a piece of code in the -set.xml file of the aircrafts. When a pilot performs an action above the maximum speed a message will be shown on the screen.

Currently there are four different actions included in the warning system. Namely:

  • Flaps: extending flaps above maximum flap extension speed(s).
  • Gear: extending gear above maximum gear extension speed.
  • VNE: exceeding velocity not to exceed (VNE).
  • G-forces: exceeding structural G limits

Usage

To use, you have to include a Nasal file to your -set.xml file. Namely: Aircraft/Generic/limits.nas. And define one or more of the limits. All speeds are in kts. If you want to make your own limits, you could also place an edited copy of the Nasal file in your Aircraft/.../Nasal folder.

Here's an example of the limits.

 <limits>
  <max-flap-extension-speed>
   <flaps>0.167</flaps>
   <speed>260</speed>
  </max-flap-extension-speed>
  <max-flap-extension-speed>
   <flaps>0.333</flaps>
   <speed>240</speed>
  </max-flap-extension-speed>
  <max-flap-extension-speed>
   <flaps>0.667</flaps>
   <speed>230</speed>
  </max-flap-extension-speed>
  <max-flap-extension-speed>
   <flaps>0.833</flaps>
   <speed>205</speed>
  </max-flap-extension-speed>
  <max-flap-extension-speed>
   <flaps>1.000</flaps>
   <speed>180</speed>
  </max-flap-extension-speed>
  
  <vne>600</vne>
  
  <max-gear-extension-speed>270</max-gear-extension-speed>
  
  <max-positive-g>4.4</max-positive-g>
  <max-negative-g>-1.76</max-negative-g>
  
 </limits>

And the required limits.nas file (replace <MyAircraft> with a custom name, usually your aircraft's name, but without symbols or spaces, e.g. <Boeing744> instead of <Boeing 747-400>):

 <nasal>
  <MyAircraft>
   <file>Aircraft/Generic/limits.nas</file>
  </MyAircraft>
 </nasal>