contact us
Air traffic simulation and visualization platform.

Aircraft Visualization

This module provides visualization of aircraft.

../_images/py_aircraft1s.png ../_images/py_aircraft2s.png

For example:

import _ossimPlanet
import _aircraft

globe = _ossimPlanet.ossimPlanet()
# ... globe initialization

plane = _aircraft.aircraft(globe)
plane.setLocation(0, -90, (1000, 'AMSL'))

while not globe.renderDone():

Class aircraft

The aircraft provides aircraft visualization based on the SimGear library and using the FlightGear compatible aircraft models.

Note: To use this class you need to install FlightGear data files.


The setModelPath() function configures path to the FlightGear data folder. This function must be called before any aircraft objects are created.

In Windows environments, the path value may be e.g. C:\Program Files\FlightGear\data.

class aircraft
The aircraft represents a single aircraft in the visualization environment.

aircraft instances have the following methods:

The setCallSign() method changes call sign displayed in the the aircraft label.

The setICAOType() method changes aircraft equipment type. This also changes the visual model of the aircraft.

The type parameter represents the ICAO-4444/ICAO-8643 identifier. The list of supported types and mapping to FlightGear models is described in the MP/aircraft_types.xml file located in the FlightGear data folder.

aircraft.setSISOType(ek, dom, cc, cat, scat, sp, ex)

The setICAOType() method changes aircraft equipment type. This also changes the visual model of the aircraft.

The parameters represent the SISO-REF-010 entity-type identifier. The list of supported types is described in the MP/aircraft_types.xml file.

aircraft.setLocation(latitude, longitude, altitude)

The setLocation() method changes the aircraft location. The latitude and longitude must be specified in geodetic coordinates.

The altitude is a 2-tuple (value, "AGL"), or (value, "AMSL") to specify the altitude Above Ground Level (AGL), or Above Medium Sea Level (AMSL). The altitude value is specified in meters.

aircraft.setOrientation(yaw, pitch, roll)
The setOrientation() method changes the aircraft attitude. The parameters represent the Tait-Bryan angles in degrees.
The setScale() method changes the aircraft model scale. The model will be proportionally magnified for scale > 1.0.
aircraft.setColor(red, green, blue, alpha)
The setColor() method changes color of the aircraft label, path and vertical guide line. The alpha value determines transparency of the path tube.
The setPathTubeRadius() method configures the tubus drawn along the aircraft track. The radius value defines the radius of the tube (in meters). The value 0 (zero) draws a line only and the value None disables track visualization.
The showVertical() method enables or disables the vertical guide line from the center (CoG) of the aircraft model towards the Earth center.
The setLandingGearPos() method configures position of all landing gears. The pos value may range from 0 (retracted up) to 100 (engaged down).
The setFlapsPos() method configures position of all flaps. The pos value may range from 0 (flaps closed) to 100 (flaps open).
The setNavigationLights() method enables or disables the navigation lights of the aircraft model.
The setEnginesRevolutionRate() method configures the revolutions per minute (RPM) rate for all engines. This method is useful for propeller aircraft only.

Configuration of Aircraft Types

The list of aircraft types and mapping between the ICAO, SISO and FlightGear identifiers for each aircraft type is described in the aircraft_types.xml file. This file is stored in the FlightGear/data/MP folder.

  <Type ICAO="A320" SISO="" FlightGear="Aircraft/A320/Models/a320-fb.xml"/>

The following attributes are used:

The ICAO-4444/ICAO-8643 identifier of the aircraft equipment type. This value is used by the setICAOType() method.
The SISO-REF-010 entity-type identifier of the aircraft. This value is used by the setSISOType() method.
Container title for the Microsoft Flight Simulator X (aircraft.cfg). This attribute is not used by any function of this visualization module.
Path to the FlightGear aircraft model configuration file (.xml). This file contains the 3D model displayed in visualization.