Howto:Animated jetways

From FlightGear wiki
Revision as of 09:19, 13 May 2016 by Elgaton (Talk | contribs) (First set of restyling modifications)

Jump to: navigation, search

Animated jetways are dynamic jetway This is a link to a Wikipedia article models that connect to your aircraft when you are pulled up at a gate. FlightGear boasts the most advanced animated jetways in the flight simulator market, beating those of Microsoft Flight Simulator and X-Plane in features — a testament to the flexibility of FlightGear. This article describes how to obtain and use the jetways and interface them with aircraft and scenery.

Current state

As of September 2015, only the following airports have animated jetways.

* indicates the jetways for this airport were auto-converted and do not have gate numbers.

The generic jetway model in FGData is broken, but there is a repaired version in the TerraSync scenery repository.

Obtaining and installing

FlightGear 2.4.0 and later include the animated jetway system. Nothing extra has to be installed.

Using the jetways

  1. Start FlightGear in any animated jetway-compatible aircraft. As of May 2016, these include the following:
  2. Fly (or spawn) to any airport equipped with animated jetways. You can tell if a jetway is animated by pressing Ctrl+C; if the polygons are highlighted in yellow, then it is animated.
Note  Ensure you have the latest scenery from TerraSync so you do not get conflicts between animated and static jetways.
  1. Taxi up to an animated jetway and park near it, then click it. If your aircraft is supported and parked well enough, the jetway will extend, rotate, and connect.

Adding support in aircraft

  1. Open up the main model of your aircraft in your favorite 3D modeling software (such as Blender).
  2. Move the model around to account for any offsets you have in the main model file, then get the coordinates of the door.


  1. Add the following code in your aircraft's -set.xml (remember to merge the tags properly):
   <position-x-m type="float">X-M</position-x-m>
   <position-y-m type="float">Y-M</position-y-m>
   <position-z-m type="float">Z-M</position-z-m>
   <jetway-hood-deg type="float">HOOD-DEG</jetway-hood-deg>
where X-M, Y-M, and Z-M are the X/Y/Z coordinates of the door in meters and HOOD-DEG is the jetway hood rotation amount. To specify more doors, just add more door elements.
  1. Add the following code into your XML model file to enable the jetways to connect to your aircraft over the multiplayer network:
   var model = cmdarg();
   model.getNode("door[0]/position-x-m", 1).setValue(X-M);
   model.getNode("door[0]/position-y-m", 1).setValue(Y-M);
   model.getNode("door[0]/position-z-m", 1).setValue(Z-M);
   model.getNode("door[0]/jetway-hood-deg", 1).setValue(HOOD-DEG);
Again, replace X-M, Y-M, Z-M and HOOD-DEG with their respective values. To add more doors, duplicate the last four lines of Nasal code and replace [0] with [1] or [2].

Adding support in AI aircraft

Follow the steps for regular aircraft above, but only add in the Nasal code.

jetway-enabled AI Aircraft (9/2015)


Adding support in scenery

Placing jetways

Launch FlightGear in your favorite aircraft. The author uses the Bluebird. You cannot use the UFO because its scenery-editing function will interfere with the jetway editor. Go to AI > Jetway Settings and tick the "Enable jetway editor" checkbox. Then click the "Open Editor" button.


With the editor enabled, click anywhere on the ground to place an animated jetway, which will flash to indicate it is selected. The jetway editor is similar to the UFO's scenery model editor. You can Alt-click on the terrain to move the current selected jetway. Ctrl-click selects the jetway closest to the click position (the new jetway will flash to indicate it's selected). Shift-click deselects the current jetway.

The dialog is used to adjust the selected jetway. The top sliders adjust position and orientation, and the bottom ones adjust the jetway itself. The offsets that the bottom sliders control can be used to model jetways that are in obscure configurations. The drop-down menus at the very bottom of the dialog control various properties of the jetway, such as the model, gate number, airline sign, and door number. At the moment, the following models are available:

When you are finished editing your airport jetway layout, click the "Export" button. A jetway definition file will be created and written to $FG_HOME/Export/ICAO.xml, where ICAO is the ICAO code of the nearest airport. (The exact location of this file is printed to the console window.) This file should be submitted to Terrasync (see FlightGear Scenery Database#Contribute).

Auto-converting static/obsolete jetways

WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.

Future Development

Cquote1.png I don't know if anyone remembers the Nasal-based animated jetway code I wrote a few years ago, but I'd like to rewrite it as a clean-sheet C++ subsystem. I want to eliminate the truly atrocious Nasal hacks I used in the initial implementation and make the whole thing faster and more reliable. My objectives as of now are, 1) Implement a new FGJetwayManager subsystem to replace the existing code in jetways.nas. (I have not yet decided what to do with jetways_edit.nas - it might be fixed up instead of outright replaced.) 2) Streamline the jetway model files in fgdata. I want to do away with the generic.airline.<XYZ>.xml files because they're unnecessary clutter. The C++ code can deal with these cases. 3) As for the jetway definition files themselves (<airport>.jetways.xml), the only change I'd like to make is deprecating the "elevation-m" property for each jetway, which is currently relative to the surrounding scenery, including buildings and AI craft (due to the Nasal API). Instead, I propose fixing all jetways to the ground. Rationale: The current method is unreliable (see sunken jetways at KSFO) and I can't imagine a situation when you would need a floating jetway. 4) Performance optimiations - much of this would come from plain superior code, but I also plan to introduce a user preference for "jetway density." That is, you can choose to spawn between 0 to 100% of all jetways defined for an airport. This allows the user to reduce the overhead from rendering and animating all those jetway objects (which is probably the biggest bottleneck besides the current Nasal implementation). This is what FSX does. 5) Potential idea - integration with AI traffic. So that when AI airliners park at their gates, jetways will extend to meet them. The current Nasal code makes an attempt at this, but it's very hacky and unreliable. While I think this is a cool idea, I don't want to interfere with anyone's work on the AI subsystem. I would greatly appreciate any ideas and comments on my proposal, as well as some pointers and tips on getting started with core development. :-)
— Ryan A Young (Dec 29th, 2015). [Flightgear-devel] Animated jet bridges redux.
(powered by Instant-Cquotes)

Related content

FlightGear wiki

Forum topics