Traffic Toolbox

Overview

The Traffic Toolbox is a set of tools and utilities that allow you to view and customize the AI (“artificial intelligence” or computer-controlled) aircraft and boat traffic. For traffic that is not controlled by the AI component - such as recreational boats, freeway traffic and airport ground vehicles, refer to the Configuring Surface Vehicle Traffic document.

See Also

Table of Contents


Traffic Toolbox Setup

Four tools (Traffic Settings, Traffic Explorer, Traffic Map, and Dump Airport List) are coded in the TrafficToolbox.dll -- available in the same folder as this document, Environment Kit\Traffic Toolbox SDK. To install a new library first locate the dll.xml file. On Windows XP this should be in the C:\Documents and Settings\<user name>\Application Data\Lockheed Martin\Prepar3D folder. For Windows Vista the file should be in the C:\Users\<user name>\AppData\Roaming\Lockheed Martin\Prepar3D folder. The dll.xml file defines all the libraries that are to be loaded along with the simulation.


If the dll.xml file already exists in this folder, check it contains the following lines that are in bold -- and ensure that the Disabled parameter is set to False. If the file exists, but no reference is made to the TrafficToolbox.dll, then add the bold lines to the file. If the dll.xml file does not already exist in the right folder, then copy the dll.xml from the Traffic Toolbox SDK folder over to the folder mentioned above.

<?xml version="1.0" encoding="Windows-1252" ?>
- <SimBase.Document Type="Launch" version="1,0">
<Descr>Launch</Descr>
<Filename>dll.xml</Filename>
<Disabled>False</Disabled>
<Launch.ManualLoad>False</Launch.ManualLoad>

- <Launch.Addon>
<Name>Traffic Toolbox</Name>
<Disabled>False</Disabled>
<Path>SDK\Environment Kit\Traffic Toolbox SDK\traffictoolbox.dll</Path>
</Launch.Addon>


</SimBase.Document>

Note that the Path parameter is either absolute, or relative to the installation Lockheed Martin/Prepar3D/ folder. The path given above might change if the SDK or Prepar3D® were not installed to their default folders. If there are other add-ons that need to be loaded in addition to Traffic Toolbox, such as the Object Placement Tool, or Special Effect Tool, then they will also need Launch.Addon entries. This is all the setup that is necessary.


Traffic Settings

The Traffic Settings dialog duplicates many of the settings in the Settings->Traffic dialog in Prepar3D®, but also exposes some additional functionality. 


Traffic Explorer

The Traffic Explorer dialog shows a list of all of the active aircraft, including the user aircraft. It also shows all the active AI controlled boat traffic, though the UI refers to all objects as "aircraft".

Each column in the dialog represents a particular property of an aircraft.  To add or remove columns, right click on the column header and select from the list of available columns to display.  To change the order of the columns, click on a column and drag it to the desired position.  To sort the list of aircraft by the values in a specific column, click the column header.

Each row in the dialog corresponds to a single aircraft.  By right clicking on a row in the dialog, you can select from a list of actions available for that aircraft.  Available actions include:

Create… Allows you to create AI aircraft that can be assigned an existing flight plan, and can be positioned in-flight along the flight planned route. You can elect to create aircraft that bypass Air Traffic Control interaction.  User created aircraft that bypass ATC and that do not use a flight plan will more reliably  respond to actions initiated via many of the options below, like Takeoff, Set Waypoint, Stick and Rudder, and Land. The following example creates an Airbus A321 at Sea-Tac airport:

View - Centers the view on the selected AI aircraft.

Set Flight Plan… Allows you to assign an existing flight plan to the selected aircraft.

Touch and Go – You can force the selected aircraft to perform touch and goes upon arrival at the destination airport.

Set Position… Set selected aircraft to user aircraft location, camera location, manually entered lat/lon/alt coordinates, selected airport, etc.

Takeoff… Used in combination with Enable Simulation and Set Position, allows you to place selected aircraft at a desired airport and on a desired runway for immediate liftoff and climb.

Set Waypoint… Send or divert aircraft to a waypoint or lat/lon/alt position.  Aircraft orientation, throttle position, and initial speed can also be applied.

Warp to Next Waypoint – Quickly re-position selected aircraft over the next waypoint on its flight plan.

Stick and Rudder…  Best when used with newly created aircraft that bypass ATC and utilize a flight plan.  Allows you to provide precise, basic flight control inputs (heading, altitude, airspeed, etc.) without need of hands-on keyboard and/or device inputs.

Land… Used with Enable Simulation, and allows you to divert an enroute aircraft to a desired airport and runway for landing.

Send Key Event… Send applicable key events to the selected aircraft to affect systems or functionality normally accessible when flying user aircraft (lights, gear, flaps, spoilers, engine, smoke, start/stop, etc.).

Enable Simulation – When unchecked, disables simulation and places the aircraft in a sleep-like (frozen) state. Enable Simulation must be checked in order for many of the right-click options to take effect.

Enable Slew – When checked (in combination with Enable Simulation and Enable UserInput), allows you to slew the selected aircraft.

Enable UserInput – When checked (in combination with Enable Simulation) allows you to control (fly) selected aircraft via keyboard or joystick inputs.

Delete - Removes the aircraft.


Traffic Map

The Traffic Map displays a top-down display of the positions of the active aircraft. By default, the map is centered on the aircraft currently in view in the main 3D window.  To center the map on another aircraft click on its entry. This tool also shows the active boat traffic.


Dump Airport List

The Dump Airport List menu option opens a dialog box which may be used to create a list of airports suitable for use with the /Airports parameter of the Traffic Database Builder utility. Filenames must be entered for both the Airport list file and Log file, and unless another location is specified, these files will be placed by default in the root Lockheed Martin/Prepar3D/ folder. If filenames are not entered for both files, the tool will crash if Begin is clicked. This tool is not used at all for boat traffic.

1

The airport list file will contain information on every airport (over 24,000 of them), for example:

Airport entry
Description
KSEA,47.448999994,-122.309305519,132.0,B,10,1.00,United States
{
RUNWAY,11894,150,HARD
RUNWAY,9421,150,HARD
PARKING,18.0,GATE
PARKING,36.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,36.0,GATE
PARKING,10.0,RAMP
PARKING,18.0,RAMP
PARKING,14.0,RAMP
PARKING,50.0,CARGO
PARKING,50.0,CARGO
PARKING,10.0,RAMP
PARKING,18.0,RAMP
PARKING,50.0,CARGO
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,36.0,GATE
PARKING,36.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,36.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,36.0,GATE
PARKING,36.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,RAMP
PARKING,18.0,RAMP
PARKING,14.0,RAMP
PARKING,18.0,RAMP
PARKING,14.0,RAMP
PARKING,10.0,RAMP
PARKING,10.0,RAMP
PARKING,18.0,RAMP
PARKING,18.0,RAMP
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
}

The ICAO code identifies SeaTac airport, followed by:

Latitude = airport latitude in decimal degrees

Longitude = airport longitude in decimal degrees

Altitude = airport altitude in meters above mean sea level

AirspaceClass = airport's ICAO airspace class: B, C, D, or G

NumApproachFreqs = number of ATC approach control frequencies
 
Traffic scalar factor = number in range from 0.01 to 1.00 that determines busyness of airport.
 
Country = country or region name used to determine the style of tail numbers used on the aircraft.

 
For each RUNWAY entry:
 
Length = runway length in feet

Width = runway width in feet

SurfaceType = runway surface type, one of:
HARD = paved runways
SOFT = unpaved runways such as turf, dirt, or gravel
WATER = water runway for seaplanes
SNOW = snow runway for ski-equipped aircraft

 
For each PARKING entry:
 
Radius = parking space radius in meters (this determines the maximum size of aircraft that can park in this slot).

ParkingType = parking space type, one of:
RAMP = general aviation ramp
CARGO = cargo loading area
GATE = airline gate
 
The following parking types are not used by any aircraft models supplied with Prepar3D®, but can be used by third-party developed aircraft and airports (refer also to the BGL Compiler documentation):
DOCK = seaplane dock
MIL_CARGO = military cargo loading area
MIL_COMBAT = military combat aircraft parking area

The log file will contain information on airports where the data might not be complete. For example:

ABCD has no hold short points

ABCD has no runways

where ABCD is the ICAO code for the airport. The log is also output to the Log text box of the tool. The Status line will show the number of airports processed out of the total.


The Traffic Database Builder

The Traffic Database Builder is a standalone utility that must be run from the command prompt. You can use the TrafficDatabaseBuilder utility to customize the types of aircraft and routes flown by the AI (“artificial intelligence” or computer-controlled) pilots and ship's captains. For example, you can adjust the traffic that flies into and out of an airport or a set of airports to match actual airline schedules. To use this tool, you should understand how to edit text files and use commands and parameters in a command-line interface.

The easiest way to use the TrafficDatabaseBuilder is to let it automatically schedule the aircraft and routes for you, which will quickly fill the skies and airports with traffic.  However, if you want to have aircraft fly specific routes and schedules, you will need to manually create schedules, which is a bit more difficult and time consuming. 

If you choose the automatic option, the maximum amount of traffic is determined by the number of airports and parking spaces.  Each parking space has a radius and classification that determine what types of aircraft can use it.  Airports with gate parking spaces serve airliners, and airports with mostly ramp parking spaces primarily serve general aviation traffic.  When scheduling parking spaces, the TrafficDatabaseBuilder assumes that a parking space will be occupied for a minimum of 45 minutes.

The schedules and routes processed by the TrafficDatabaseBuilder are written into a file called a traffic database.  The default traffic database files are named trafficAircraftnnnnnn.bgl for aircraft traffic, and trafficBoatsnnnnnn.bgl for sea traffic, and both are located in the \scenery\World\scenery folder.  You can give your own traffic databases any name you desire as long as they have the .bgl extension and are located in one of the active scenery directories. 

You can replace the default traffic database or just augment it with your own databases.  You can create and use as many traffic database files as you want. Be aware that the result of using multiple simultaneous traffic databases is cumulative, and can result in a lot of traffic.

TrafficDatabaseBuilder.exe displays the following command line help if you run it with no command line arguments:


/Output parameter

The required /Output parameter tells the TrafficDatabaseBuilder the name of the file into which to write the traffic database, for example Traffic.bgl.  It must have a .bgl file extension.

/Airports parameter

The /Airports parameter provides the TrafficDatabaseBuilder with the list of airports that are usable by AI aircraft. The FS10.Airports.dat file contains the default list of AI-capable airports. Multiple airport lists may be combined by repeating the /Airports parameter once for each list. If an airport is present in more than one list, the last occurrence of the airport is preserved and all prior duplicates are discarded. The format of an airports file is shown for the Dump Airport List tool, and for an example see To Customize the Airport List.

/AircraftTypes parameter

Use the /AircraftTypes parameter to provide the TrafficDatabaseBuilder with one or more lists of aircraft types that may appear as AI aircraft. For the file format and an example, see To Customize the Aircraft List.

/Countries

This countries_regions.csv file provides the tail number format descriptions for each country or region. The file is a comma delimited text file.

Format
Description
United States N####*
Nauru C2-@@*
Micronesia V6-@@@
Papua New Guinea P2-@@@
Any fixed digit or letter or hyphen will appear in the tail number.
 
@ = randomly chosen letter other than "O" or "I"
 
# = randomly chosen digit: 0-9
 
* = random letter or digit, other than letters "O" or "I"

/BoatTerminals

This file provides the list of boat terminals. The file is a comma delimited text file (see the example terminals.csv).

Boat traffic schedules cannot currently be customized. New boat types, routes and terminals can be added, but it is up to the auto-scheduler within the simulation to actually schedule boat traffic. The terminal IDs can be any unique number within the terminals.csv file, and then those numbers are used in the routes.csv file. There is no table of IDs corresponding to actual ports, it is the list of lat/lon waypoints that determines the route taken by the ships.

Format
Description
3370 5 CARGO|OIL
5520 5 CARGO|OIL
7640 5 CARGO|OIL
8595 5 CARGO|CRUISE|OIL
8640 5 CARGO|CRUISE|OIL
8860 5 CARGO|CRUISE|OIL
The first number is a unique ID for the terminal.
 
The single digit, 5 in these examples, is the capacity of the terminal (in ships).
 
The third entry is one or more of:
 
CARGO, OIL, CRUISE, FERRY

/BoatRoutes

This file provides a list of boat routes, defined by the terminal IDs and a list of lat/lon waypoints. The file is a comma delimited text file (see the example routes.csv).

Format
Description
# ID of route, Terminal from ID, Terminal to ID
# route
2167 501149 501150
{
49.56965958 -54.40669057
49.55174963 -54.48902969
49.57014958 -54.30605962
49.57087965 -54.30308958
49.57229971 -54.30131965
}
The first number is the route ID, the second two the terminals (departing from, and destination).
 
Within the brackets are the latitude and longitude of the waypoints of the route.

/BoatTypes

The fs10.BoatTypes.csv file contains the types of boats, and the routes that they might follow:

Format
Description
# Format is:
# typeKey title speed routeTypes AutoSchedule?
 
CargoB cargoB 25 CARGO yes

supertanker_02_sm VEH_water_supertanker_02_sm 25 OIL yes

Ferry1 ferry1 20 FERRY yes

cruise_linerA_sm cruise_linerA_sm 20 CRUISE yes

cruiseship2_sm VEH_water_cruiseship2_sm 20 CRUISE yes

typeKey = a unique keyword used to identify this type of ship (max 15 chars)

title = the title string from sim.cfg

speed = cruising speed in knots

routeTypes = one or more of: OIL|CRUISE|CARGO|FERRY

AutoSchedule? = automatically generate schedules for this boat type (yes/no)

/Schedules parameter

The /Schedules parameter allows you to manually specify one or more lists of routes and schedules flown by AI aircraft. Since the TrafficDatabaseBuilder can automatically generate routes and schedules, you normally do not need to use the /Schedules parameter. However, the /Schedules parameter can be particularly useful if you want to emulate the routes and schedules of real airlines. For the file format and an example, see To Customize the AI Aircraft Routes.

/AutoSchedule parameter

The /AutoSchedule parameter allows you to control whether the TrafficDatabaseBuilder automatically generates AI traffic routes and schedules. The default is “yes.” You can use /AutoRoute=no in conjunction with the /Schedules parameter if you want to see only AI traffic for which you have created routes and schedules.

/Log parameter

The /Log parameter directs the TrafficDatabaseBuilder to print any status, warning, or error messages to a file of your choosing, in addition to printing them to the screen.

/Quiet parameter

The /Quiet=yes parameter may be used to prevent the TrafficDatabaseBuilder from printing any output messages to the command window.  The default behavior of the TrafficDatabaseBuilder is to print all status, warning, and error messages to the command window, which is equivalent to /Quiet=no.

/StatsDir parameter

If you use the /StatsDir parameter, the TrafficDatabaseBuilder outputs a collection of statistical data files to the directory you specified. Perhaps the most useful of these data files is AirportSchedule.txt, which contains arrival and departure schedules for each airport visited by AI traffic.  

Sample Traffic Database Builder Tasks

The following gives some example uses of the TrafficDatabaseBuilder tool.

1. To Build a Traffic Database using the Default Aircraft and Default Airports

Type the following command:

TrafficDatabaseBuilder /Airports=fs10.Airports.dat /AircraftTypes=fs10.AircraftTypes.csv /Output=traffic.bgl

Then copy the new traffic.bgl file to the scenery\World\scenery directory, and remove the default trafficAircraftnnnnnn.bgl file.

2. To Customize the Airport List

The only safe customizations to make to the airport list are to remove airports, and to remove particular parking spots from within an airport. This list is not used to create airport data, so the adding or changing of data may result in unwanted behavior. If you do not want any light aircraft to fly to a particular airport, then you could delete all of the RAMP parking spaces and then the traffic database builder will not schedule any aircraft to use them. The best method of deleting a parking entry is to comment it out. For example, to disallow any light aircraft to use SeaTac airport, and to prevent any aircraft using Dallas/Fort Worth, then enter the following command:

TrafficDatabaseBuilder /Airports=fs10.Airports.dat /Airports=customairports.dat /Output=trafficAircraft.bgl

where the file customairports.dat contains the following:

# delete Dallas/Fort Worth Airport from the list. This is done simply by entering the ICAO code, with no
# other information

KDFW

# Prevent AI aircraft from using general aviation parking spaces at Seattle-Tacoma Intl.
 
KSEA,47.448999994,-122.309305519,132.0,B,10,1.00,United States
{
RUNWAY,11894,150,HARD
RUNWAY,9421,150,HARD
PARKING,18.0,GATE
PARKING,36.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,36.0,GATE
# PARKING,10.0,RAMP
# PARKING,18.0,RAMP
# PARKING,14.0,RAMP
PARKING,50.0,CARGO
PARKING,50.0,CARGO
# PARKING,10.0,RAMP
# PARKING,18.0,RAMP
PARKING,50.0,CARGO
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,36.0,GATE
PARKING,36.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,36.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,36.0,GATE
PARKING,36.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
# PARKING,18.0,RAMP
# PARKING,18.0,RAMP
# PARKING,14.0,RAMP
# PARKING,18.0,RAMP
# PARKING,14.0,RAMP
# PARKING,10.0,RAMP
# PARKING,10.0,RAMP
# PARKING,18.0,RAMP
# PARKING,18.0,RAMP
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
PARKING,23.0,GATE
PARKING,18.0,GATE
PARKING,18.0,GATE
}

3. To Customize the Aircraft List

To add addition aircraft types, defined in a file named CustomAircraftTypes.csv, type the following command:

TrafficDatabaseBuilder /Airports=fs10.Airports.dat /AircraftTypes=fs10.AircraftTypes.csv /AircraftTypes=CustomAircraftTypes.csv /Output=traffic.bgl

If the only aircraft types to use for AI traffic are in the CustomAircraftTypes.csv file, then type:

TrafficDatabaseBuilder /Airports=fs10.Airports.dat /AircraftTypes=CustomAircraftTypes.csv /Output=traffic.bgl

The format of aircraft type information files is as follows:

Format
Description
typeKey,Title,Cruise,minAlt,maxAlt,minRange,maxRange,minRwyLen,runwayTypes, radius,parkingTypes,IFR%,AutoRoute?,TouchAndGo?

# Examples

BE58-1,Beech Baron 58,200,40,120,50,661,4000,HARD,7,RAMP,50,yes,no

B350-1,Beech King Air 350,315,150,250,100,1298,4000,HARD,11,RAMP,75,yes,no


typeKey = a unique keyword used to identify this type of aircraft (max 15 chars)

title = the aircraft title string from aircraft.cfg

speed = cruising speed in knots true airspeed (KTAS)

minAlt maxAlt = minimum and maximum cruise flight levels in hundreds of feet

minRange maxRange = minimum and maximum range in nautical miles

minRwyLen = minimum runway length in feet required by this aircraft

runwayTypes = HARD|SOFT|WATER|SNOW (one or more)

radius = minimum parking radius in meters required by this aircraft
parkingTypes = RAMP|CARGO|GATE|DOCK|MIL_CARGO|MIL_COMBAT (one or more)

IFR% = probability of this aircraft flying IFR (0 - 100)

AutoRoute? = automatically generate route for this aircraft (yes/no)

TouchAndGo? = allow touch and goes when automatically generating routes (yes/no)
 

4. To Customize the AI Aircraft Routes

To restrict aircraft routes to only those defined in the CustomAircraftSchedules.dat file, type

TrafficDatabaseBuilder /Airports=fs10.Airports.dat /Schedules=CustomAircraftSchedules.dat /AutoSchedule=No /Output=traffic.bgl

Remove the /AutoSchedule parameter, or set it to Yes, to add these routes to the auto-generated schedules.

The format of a Schedules data file is as follows:

Format
Description
# For each scheduled flight enter the following data:
 
typeKey,tailNumber,trafficDensity,repeatEvery,flightRules
{
departureTime,destinationAirportId,flightLevel[,flightNumber][,circuitEndTime]
departureTime,destinationAirportId,flightLevel[,flightNumber][,circuitEndTime]
# enter as many departures as required
}

typeKey = An aircraft typeKey

tailNumber = unique aircraft tail number
 
trafficDensity = minimum traffic density required (1 to 100)
 
repeatEvery = ONE_HOUR, TWO_HOURS, FOUR_HOURS, SIX_HOURS, EIGHT_HOURS, TWELVE_HOURS, ONE_DAY, ONE_WEEK
 
flightRules = IFR or VFR
 
departureTime = DHHMM, where D = optional day of the week (0=Monday, 1=Tuesday, etc) and HHMM = zulu hour and minute of the day
 
destinationAirportId = destination airport ICAO identifier
 
flightLevel = the flight level, for example 20 = 20,000 feet
 
flightNumber = optional airline flight number
 
circuitEndTime = optional time to stop flying circuits at the destination

Routes with two or more destinations are circular. The origin of each leg is inferred from the previous destination. Since routes are circular, the origin of the first leg is inferred from the destination of the last leg in the route. Aircraft whose route includes only a single airport must fly circuits by specifying a circuitEndTime. When choosing departure times, you must allow enough time to travel the great circle route of the previous leg at the aircraft's cruise airspeed plus 45 minutes. The extra 45 minutes is required to compensate for uncertainties due to winds aloft, ATC vectoring, and taxi time before takeoff and after landing.

To make an aircraft fly circuits at the destination, specify a circuitEndTime for that leg. If the circuitEndTime is less than ten minutes before the departure time of the next leg, the aircraft will not park but will fly circuits until the next departure time and then fly on to the next destination. The TrafficDatabaseBuilder will not allow you to schedule more than three aircraft at a time to be doing circuits at an airport to keep the traffic pattern from becoming overly congested.

For example, the following CustomAircraftSchedules.dat file shows some sample airline and general aviation custom schedules:

# Aircraft type: DH8A-1
# Tail number: N681UA
# Traffic density: 66%
# Repeats every: four hours
# Flight rules: IFR
# Schedule:
# Time Departure Destination Altitude FlightNumber
# 0130Z KEUG KSEA FL240 5220
# 0330Z KSEA KEUG FL230 5221

DH8A-1,N681UA,66,FOUR_HOURS,IFR
{
0130,KSEA,240,5220
0330,KEUG,230,5221
}
 
# Aircraft type: B734-2
# Tail number: C-ABCD
# Traffic density: 33%
# Repeats every: day
# Flight rules: IFR
# Schedule:
# Time Departure Destination Altitude FlightNumber
# 1900Z KEUG KSEA 120 (none)
# 2100Z KSEA KSFF 130
# 2300Z KSFF KBOI 130
# 0100Z KBOI KRDD 120
# 0300Z KMFR KEUG 120

B734-2,C-ABCD,33,ONE_DAY,IFR
{
1900,KSEA,120
2100,KGEG,130
2300,KBOI,130
0100,KMFR,120
0300,KEUG,120
}
 
# Aircraft type: C172-0
# Tail number: G-ASDF
# Traffic density: 33%
# Repeats every: week
# Flight rules: VFR
# Schedule:
# Day Time Departure Destination Altitude FlightNumber Circuits?
# Sat 1901Z KEUG KSLE 65 (none) until Sat 2000Z
# Sat 2000Z KSLE KEUG 55 none
 
C172-0,G-ASDF,33,ONE_WEEK,VFR
{
61901,KSLE,65,,62000
62000,KEUG,55
}
 
# Aircraft type: C172-1
# Tail number: N172SP
# Traffic density: 33%
# Repeats every: 2 hours
# Flight rules: VFR
# Schedule:
# Time Departure Destination Altitude FlightNumber Circuits?
# 0010Z KEUG KEUG 12 (none) until 0030Z
# 0100Z KEUG KEUG 12 (none) until 0130Z
 
C172-1,N172SP,33,TWO_HOURS,VFR
{
0010,KEUG,12,,0030
0100,KEUG,12,,0130
}

Limitations

Questions and Answers

Q:  Is it possible to assign an aircraft to only fly from airport A to airport B instead of a round trip?

A:   No. One of the design goals of the AI traffic system was that aircraft should not appear or disappear suddenly while in view. To meet that requirement, all routes must be round-trip so that the aircraft's position in the world can be accounted for at all times.

Q:  Where is the departure airport defined in the custom routes file? You have a destination airport, and even a departure time and frequency. But how do you associate the structure with a particular airport?

A:   All routes are round-trip, so the departure location is the same as the previous arrival location. Also, the departure location of the first leg is the same as the arrival location of the last leg. For example, in the schedule below the departure and destination locations are noted in parenthesis after each line of the schedule.

B734-2,N12345,33,ONE_DAY,IFR
{
  1900,KSEA,120      (depart at 1900Z from KEUG to KSEA at 12,000 feet)
  2100,KSFF,130      (depart at 2100Z from KSEA to KSFF at 13,000 feet)
  2300,KBOI,130      (depart at 2300Z from KSFF to KBOI at 13,000 feet)
  0100,KRDD,120      (depart at 0100Z from KBOI to KRDD at 12,000 feet)
  0300,KEUG,120      (depart at 0300Z from KRDD to KEUG at 12,000 feet)
}

Q:  Why does the TrafficDatabaseBuilder generate an error message if I schedule an aircraft to depart within 45 minutes of the time it arrived at an airport?

A:   The TrafficDatabaseBuilder enforces a minimum aircraft turnaround time of 45 minutes. A bit of flexibility is needed in the schedule to account for uncertainties due to winds aloft, approach vectoring, taxiing, obtaining takeoff clearances, etc. This flexibility in the schedule helps to ensure that if you follow an AI aircraft through its complete route that it would never get too far off schedule. Staying reasonably close to schedule is important because at 100 percent traffic density, nearly 100 percent of the available airport parking is utilized. If the schedules were constructed inflexibly, airports and parking spaces would frequently be over-utilized, creating traffic jams.

Q:  When I try to add a custom route I get an error message that the Zulu hour must be between 0 and 3.

A:   If your route repeats every four hours, then the times you input must be between 0000Z and 0359Z inclusive. Likewise, if your route repeats every eight hours, the times you input must be between 0000Z and 0759Z inclusive, and so on.

Q:  What is the departure time in CustomSchedules.dat? Is it when the aircraft begins to taxi or when it takes off?

A:   The departure time used by the TrafficDatabaseBuilder is the time at which an aircraft begins the process of leaving the parking space by either pushing back, starting the engines, or calling for an IFR clearance. Takeoff usually occurs within ten minutes after the departure time.

Q:  Is there a limit to the number of aircraft present at an airport ?

A:   Yes. Airport traffic is limited by the number (and size) of parking spaces available at the airport. The largest parking space of each type (ramp, cargo, gate, etc.) is always reserved for the user aircraft and the rest may be allocated to AI traffic.