AI Traffic: Difference between revisions

Jump to navigation Jump to search
2,717 bytes added ,  23 June 2010
Updated documentation on creating traffic.
m (small fixes)
(Updated documentation on creating traffic.)
Line 230: Line 230:
One major motivation for introducing the traffic manager II file format is to make it easier for FlightGear users to contribute to the traffic database. To further motivate this, some tools are currently in development that aim to make user interaction even easier. Although most of these tools are not ready for public use yet, it is probably worth mentioning some of these developments. First of all, the custrom scenery project is working on extending their scene model database to store traffic. A web based front end will allow users to enter their favorite flight, and thus collect an extensive amount of traffic data. Users will be able to download the collected results and place the downloaded files in their traffic directory.
One major motivation for introducing the traffic manager II file format is to make it easier for FlightGear users to contribute to the traffic database. To further motivate this, some tools are currently in development that aim to make user interaction even easier. Although most of these tools are not ready for public use yet, it is probably worth mentioning some of these developments. First of all, the custrom scenery project is working on extending their scene model database to store traffic. A web based front end will allow users to enter their favorite flight, and thus collect an extensive amount of traffic data. Users will be able to download the collected results and place the downloaded files in their traffic directory.


Secondly, the author of the traffic manager code has written some scripts, mainly for private use, that will allow one to input the flight data into a simple text format and then convert the resulting text file to xml. These scrips are not available yet, because they haven't been tested well enough for general use, but that is likely to change in the not too distant future.  
Secondly, the author of the traffic manager code has written some scripts, mainly for private use, that will allow one to input the flight data into a simple text format and then convert the resulting text file to xml. The most important of these scripts is now available for download  [http://www.xs4all.nl/~dtalsma/trafficdata.zip trafficdata.zip]. This zip archive contains a collection of traffic configuration files, along with a perl script to convert these scripts to xml.
 
Creating AI traffic files this way is easy. First, you need to define the aircraft for each fleet (data taken from the June 2010 Malayasian project):
 
###HOMEP RegNo  TypeCode        Type    AirLine        Livery  Offset  Radius  FltType Perf.Class      Heavy  Model
############################################################################################################################################
AC WMKK TF-ARN 747 747-2F6B MAS MAS 19 39 gate jet_transport true Aircraft/747-400/747-400-Malaysian.xml
AC WMKK TF-ARJ 747 747-2F6B MAS MAS 19 39 gate jet_transport true Aircraft/747-400/747-400-Malaysian.xml
AC WMKK TF-ATZ 747 747-2F6B MAS MAS 19 39 gate jet_transport true Aircraft/747-400/747-400-Malaysian.xml
 
 
Then, you need to define all the flights according to the following layout:
 
########Flt.No      Flt.Rules Days    Departure      Arrival        FltLev. A/C type
################### ######### ####### ############### ############### #################
# London Heathrow (EGLL; UTC+1 ) to Kuala Lumpur (WMKK +8:00)  vv.
FLIGHT Malaysian0001 IFR      0123456 21:00  EGLL    09:25  WMKK  360      747MAS
FLIGHT Malaysian0002 IFR      0123456 15:40  WMKK    04:50  EGLL  360      747MAS
FLIGHT Malaysian0003 IFR      0123456 11:00  EGLL    23:25  WMKK  360      747MAS
FLIGHT Malaysian0004 IFR      0123456 09:05  WMKK    08:15  EGLL  360      747MAS
# Frankfurt (EDDF; UTC+2 ) to Kuala Lumpur (WMKK +8:00)  vv.
FLIGHT Malaysian0005 IFR      0.2.456 10:30  EDDF    22:25  WMKK  360      777MAS
FLIGHT Malaysian0006 IFR      .1.3456 15:50  WMKK    04:25  EDDF  360      777MAS
 
 
Note that the flight information laid out above resembles that of a standard airline schedule table as close as possible, with a few known exceptions:
- Weekdays are in the range 0 to 6, but do follow standard airline conventions (0 = monday; 6 is sunday)
- All times in the table are in UTC; to convert from local time, as given in the airline table, subtract the airport in question's UTC offset).
- The last entry in each line (A/C type) should correspond to the ''combination'' of the '''TypeCode''' and '''Airline''' entries in the aircraft sections.
 
The resulting table can now easily be converted to xml output by running the conf2xml.pl script.
 
For unix based operating systems, simply run conf2xml.pl from the directory where you unpacked the trafficdata.zip archive:
 
./conf2xml.pl
 
will give the output:
 
Writing to ADR.xml
Writing to AFL.xml
...
Writing to VLG.xml
Writing to VLM.xml
 
When the script encounters an error, it will stop prematurely.


= Ground networks =
= Ground networks =
117

edits

Navigation menu