Traffic ToolboxThe best Traffic Sources and Tools for Affiliate Marketing 2020

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 theConfiguring Surface Vehicle Trafficdocument.

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 SDKTraffic Toolbox SDK. To install a new library first locate the dll.xml file. The file should be placed in the %APPDATA%Lockheed MartinPrepar3D v2 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.

  Launch
  dll.xml
  False
  False

  
    Traffic Toolbox
    False
    SDKEnvironment SDKTraffic Toolbox SDKTrafficToolbox.dll
  

Note that the Path parameter is either absolute, or relative to the installation Lockheed MartinPrepar3D v2 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 SimDirector, or the Special Effect Tool, then they will also need Launch.Addon entries. This is all the setup that is necessary.

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

Related Links

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.

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 MartinPrepar3D v2/ 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.

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

Airport entryDescription
KSEA,47.448999994,-122.309305519,132.0,B,10,1.00,United StatesThe 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.
{
RUNWAY,11894,150,HARD
RUNWAY,9421,150,HARD
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
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
}
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 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 sceneryWorldscenery 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 p3d.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.

FormatDescription
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…

Source

Leave a Comment