AI Traffic: Difference between revisions

Jump to navigation Jump to search
1,724 bytes removed ,  25 February 2012
→‎Ground networks: Update to the not so new naming conventions.
(→‎Ground networks: Update to the not so new naming conventions.)
Line 284: Line 284:


= Ground networks =
= Ground networks =
The next major aspect of the AI traffic system contains taxiway information. Although the physical layout of each airport is contained in FlightGear's airport database, this information is not sufficient to provide taxiway information. Therefore AI aircraft pickup this type of routing information from an xml file inside the data/AI/Airports directory/. Currently, this information is provided on a one file per airport basis, that can be found in a file called data/AI/Airports/[ICAO]/parking.xml, where ICAO stands for the 4 letter ICAO code for the airport in question.  
The next major aspect of the AI traffic system contains taxiway information. Although the physical layout of each airport is contained in FlightGear's airport database, this information is not sufficient to provide taxiway information. Therefore AI aircraft pickup this type of routing information from an xml file inside the <tt>[[$FG_SCENERY]]/Airports/[I]/[C]/[A]/</tt> directory/. Currently, this information is provided on a one file per airport basis, that can be found in a file called <tt>[[$FG_SCENERY]]/Airports/[I]/[C]/[A]/[ICAO].groundnet.xml</tt>, where ICAO stands for the 4 letter ICAO code for the airport in question.  


For example, see the ground network for EHAM, which is found in <tt>data/Airports/AI/EHAM/parking.xml</tt>. See the end of this page for a small  
For example, see the ground network for EHAM, which is found in <tt>[[$FG_SCENERY]]/Airports/E/H/A/EHAM.groundnet.xml</tt>. See the end of this page for a small excerpt from this file.  
excerpt from this file. It should be noted that current development work is planned that aims to move these files from the base package to the scenery repository, so that ground network information and the physical layout of the airport can be updated in parallel. Once this is done, the new location / name for the file will be [fg-scenery]/Airports/[ICAO1]/[ICAO2]/[ICA03]/[ICAO].groundnet.xml. Here [ICAO] stands for the 4 letter ICAO code of the airport in question, and [ICAO1], [ICAO2], and [ICAO3] for the first to third letter of this code.  


'''NOTE:''' Taxidraw versions with a build date of Feb. 5, or later, 2009 support the new naming convention. To make use of this new functionality, make sure to set the FlightGear scenery directory in TaxiDraw (tab 4 in the preferences menu). The directory specified here should be the top level directory, i.e. the one that contains the "Airports", "Objects", and "Terrain" subdirectory. Note that support for this naming convention was introduced somewhat earlier, but versions of TaxiDraw before Feb 5 contain a potentially fatal bug that might ruin your work.
FlightGear versions older than 2.4.0 look up the ground network in <tt>[[$FG_ROOT]]/AI/Airports/[ICAO]/parking.xml</tt>.
 
In addition, FlightGear cvs of approximately the same date also has support for reading the ground networks from the scenery directory. This feature is not enabled by default. To enable, make sure the property /sim/traffic-manager/use-custom-scenery-data is set to true. This can be done by editing preferences.xml or specifying this property on the command line.  


== A technical perspective ==
== A technical perspective ==
A ground network file consists of 4 major sections. The first section is optional, although recent versions of TaxiDraw add this section automatically. This section contains a list of all the radio frequencies for the airport in question. FlightGear currently (as of 1.9.0) uses these frequencies to display some ATC messages. As of FlightGear 1.9.0, only startup approval requests are implemented. You can "hear" these by tuning to the first ground frequency listed in the frequencies section.  
A ground network file consists of four major sections:
 
* The first section is optional, although recent versions of TaxiDraw add this section automatically. This section contains a list of all the radio frequencies for the airport in question. FlightGear currently (as of 1.9.0) uses these frequencies to display some ATC messages. As of FlightGear 1.9.0, only startup approval requests are implemented. You can "hear" these by tuning to the first ground frequency listed in the frequencies section.  
The second section of the file contains the parameters of the airport's parking  
* The second section of the file contains the parameters of the airport's parking locations.
locations. The third section contains a list of all the nodes in the ground  
* The third section contains a list of all the nodes in the ground network.
network, and the fourth and final section contains a list of segments, or "arcs" as David  
* The fourth and final section contains a list of segments, or "arcs" as David Luff called them initially, which basically describe which node is connected to which other node.  
Luff called them initially, which basically describe which node is connected  
to which other node.  


Each parking and AI node has a unique index number, which is used by the  
Each parking and AI node has a unique index number, which is used by the  
Line 339: Line 334:


== Creating a ground network, a practical approach ==
== Creating a ground network, a practical approach ==
Having finished the technical description of the parking file format, the  
Having finished the technical description of the parking file format, the good news is that one probably doesn't need to know too much about the technical side of the file structure to create a ground network. Advanced editing capabilities are currently available in TaxiDraw, a separately available utility for airport layout, and ground network editing. This document describes the functionality of the NEW_GUI_CODE version of TaxiDraw.
good news is that one probably doesn't need to know too much about the technical  
side of the file structure to create a ground network. Advanced editing capabilities are currently available in TaxiDraw, a separately available utility for airport layout, and ground network editing. The current document describes the functionality of the NEW_GUI_CODE version of TaxiDraw.


== TaxiDraw ==
== TaxiDraw ==
Although currently no officially released version of [[TaxiDraw]] (http://TaxiDraw.sourceforge.net/) exists with the ground editing capability, the current CVS version is capable of doing so. Network editing capabilities in TaxiDraw are currently about as stable as the other editing features, however, the ground network module is still somewhat separate from the rest of the airport project code, and ground networks will 'not' automatically be saved together with the airport project. Therefore, do regular exports while editing, to prevent loss of work.
Although currently no officially released version of [[TaxiDraw]] exists with the ground editing capability, the current CVS version is capable of doing so. Network editing capabilities in TaxiDraw are currently about as stable as the other editing features, however, the ground network module is still somewhat separate from the rest of the airport project code, and ground networks will 'not' automatically be saved together with the airport project. Therefore, do regular exports while editing, to prevent loss of work.  
 
=== Obtaining TaxiDraw ===
Until an official release has been done, linux users can try to check out a version of TaxiDraw from CVS by following
the instructions on http://TaxiDraw.sourceforge.net/#download
 
[[Ubuntu]] or [[Debian]] users may look at the [[Ubuntu fg tools]] page to have TaxiDraw installed in a easy way.


Windows users can also do this either by using the free winCVS program or
See the [[TaxiDraw]] article for instructions on how to obtain a working copy of TaxiDraw.
using the free cygwin environment. Another possibility is to look on [ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32]- here you can find the last build of Taxidraw.


=== Getting good reference material ===
=== Getting good reference material ===
Line 419: Line 405:
You can edit the remaining parameters by loading this groundnet.xml file into a text editor. Once you are done editing make sure you import these changes into TaxiDraw immediately. Do this by going to [File| Import FlightGear AI Network]. This will open a file selection dialog. Choose the file you just edited and click okay. TaxiDraw will ask for confirmation to overwrite existing ground network data and confirm this by clicking on "yes".
You can edit the remaining parameters by loading this groundnet.xml file into a text editor. Once you are done editing make sure you import these changes into TaxiDraw immediately. Do this by going to [File| Import FlightGear AI Network]. This will open a file selection dialog. Choose the file you just edited and click okay. TaxiDraw will ask for confirmation to overwrite existing ground network data and confirm this by clicking on "yes".


== Copying the ground network into FlightGear's data directory ==
== Copying the ground network into FlightGear's scenery directory ==
Finally, once you have finished creating a groundnet work you can test it in FlightGear. Create a directory in FlightGear's <tt>data/Airports/AI</tt> directory, with the name of the ICAO code of your airport. For example <tt>[[$FG ROOT]]/Airports/AI/EHAM</tt>. Next. locate the file [filename]-groundnetwork.xml and copy this to the directory you just created. Finally, rename the file you just copied to "parking.xml".
Finally, once you have finished creating a groundnet work you can test it in FlightGear. Create a directory in your <tt>[[$FG_SCENERY]]/Airports/[I]/[C]/[A]/</tt> directory, with the three first letters of the ICAO code of your airport. For example <tt>[[$FG_SCENERY]]/Airports/E/H/A/</tt>. Next, locate the file [filename]-groundnetwork.xml and copy this to the directory you just created. Finally, rename the file you just copied to <tt>[ICAO].groundnet.xml</tt>.


== Testing the network ==
== Testing the network ==

Navigation menu