AI Traffic: Difference between revisions

Jump to navigation Jump to search
561 bytes added ,  19 January 2009
No edit summary
Line 174: Line 174:
== Defining a flight ==
== Defining a flight ==


'''The documentation has been updated until here. The text below still reflects the old traffic manager format.'''


The next series of lines within the '''<aircraft>''' section define the flights. Again, each flight is defined between the '''<flight>''' and '''</flight>''' statements. For example, let's have a look at the first two
The original traffic file format contained a series of flights enclosed within the <aircraft> section, e.g.,
flights specified in our PH-KCA example.


        <!-- Day one: Amsterdam to San Fransisco, CA, USA -->
<aircraft>
        <flight>
    ...
             <callsign>KLM0605</callsign>
    <flight>
    </flight>
</aircraft>
 
One major difference from this format is that the traffic manager II file formats now contain separate sections for aircraft and flight information, with the common denominator being a shared key that links aircraft and flight information together. In other words, the general layout of a traffic manager II file looks something like this:
 
<aircraft>
    ...
    <required-aircraft>MD11KLM</required-aircraft>
    ...
</aircraft>
 
<flight>
    ...
    <required-aircraft> MD11KLM </required-aircraft>
    ...
</flight>
 
Each flight is defined between the '''<flight>''' and '''</flight>''' statements. For example, let's have a look at a randomly selected flight from our KLM.xml example.
 
        <flight>
             <callsign>KLM0769</callsign>
            <required-aircraft>MD11KLM</required-aircraft>
             <fltrules>IFR</fltrules>
             <fltrules>IFR</fltrules>
             <departure>
             <departure>
              <port>EHAM</port>
                <port>EHAM</port>
              <time>0/09:45:00</time>
                <time>2/12:35:00</time>
             </departure>
             </departure>
             <cruise-alt>330</cruise-alt>
             <cruise-alt>330</cruise-alt>
             <arrival>
             <arrival>
                 <port>KSFO</port>
                 <port>TNCB</port>
                 <time>0/20:55:00</time>
                 <time>2/22:15:00</time>
             </arrival>
             </arrival>
        <repeat>WEEK</repeat>  
            <repeat>WEEK</repeat>
      </flight>  
        </flight>
        <!-- Return Flight: Arrive the next day -->
 
        <flight>
            <callsign>KLM0606</callsign>
            <fltrules>IFR</fltrules>
            <departure>
              <port>KSFO</port>
              <time>0/23:00:00</time>
            </departure>
            <cruise-alt>340</cruise-alt>
            <arrival>
                <port>EHAM</port>
                <time>1/09:35:00</time>
            </arrival>
        <repeat>WEEK</repeat>
      </flight>


The '''<flights>''' section is slightly more complex than the aircraft definition itself, because it has a few nested levels. The following keywords should be specified:
The '''<flights>''' section is slightly more complex than the aircraft definition itself, because it has a few nested levels, however, these should mostly be self-explanatory. The following keywords should be specified:
* '''<flight>''' All the relevant parameter should be specified between the '''<flight></flight>''' keywords.
* '''<flight>''' All the relevant parameter should be specified between the '''<flight></flight>''' keywords.
* '''<callsign>''' The airline callsign used for ATC. If this is an airline flight it should be combination of the airline callsign (e.g. '''KLM''' for KLM, or '''Springbok''' for South African Airways), and the flight number (e.g. '''KLM0605''', or '''Springbok0033''').
* '''<callsign>''' The airline callsign used for ATC. If this is an airline flight it should be combination of the airline callsign (e.g. '''KLM''' for KLM, or '''Springbok''' for South African Airways), and the flight number (e.g. '''KLM0605''', or '''Springbok0033''').
* '''<required-aircraft>''' The key that links this flight to a particular aircraft. The see explanation in the ''aircraft'' section.
* '''<fltrules>''' Can be ''IFR'' or ''VFR''. This is required for use in ATC, but currently not used. This is likely to change, however.
* '''<fltrules>''' Can be ''IFR'' or ''VFR''. This is required for use in ATC, but currently not used. This is likely to change, however.
* '''<departure>''' Definition of the departure airport. This section should contain the '''<port>''' and '''<time>''' keywords.
* '''<departure>''' Definition of the departure airport. This section should contain the '''<port>''' and '''<time>''' keywords.
* '''<cruise-alt>''' Cruising altitude for this flight. This is a bit of a simplification from the real world, where aircraft usually don't stay at the same cruise altitude throughout the flight. This behavior will probably also change in future versions.  
* '''<cruise-alt>''' Cruising altitude for this flight. This is a bit of a simplification from the real world, where aircraft usually don't stay at the same cruise altitude throughout the flight. This behavior will probably also change in future versions.  
* '''<arrival>''' Same as '''<departure>''', but now defining the port of arrival.
* '''<arrival>''' Same as '''<departure>''', but now defining the port of arrival.
* '''<repeat>''' Repeat period. This can be either the keyword ''WEEK'', or a number followed by ''Hr''. ''WEEK'' means that the whole schedule repeats itself on a weekly basis. ''Hr'' means that the whole schedule repeats after the number of hours specified directly before it (e.g. ''24Hr'' means that the schedule repeats after 24 hours).
* '''<repeat>''' Repeat period. This can be either the keyword ''WEEK'', or a number followed by ''Hr''. ''WEEK'' means that the whole schedule repeats itself on a weekly basis. ''Hr'' means that the whole schedule repeats after the number of hours specified directly before it (e.g. ''24Hr'' means that the schedule repeats after 24 hours). With traffic manager II, it is generally recommended not to mix schedules that rotate on different frequencies. In general, the best results are obtained when using only weekly rotating flights. For flights that are in reality operated on a daily basis, it is recommended to just specify multiple entries, i.e. one separate flight for every weekday.
* '''<port>''' This should be the international ICAO airport code. This keyword should be specified only within the '''<departure>''' or '''<arrival>''' sections. As far as I know, here it should still be in upper case, although the FlightGear command line currently also supports lower case ICAO codes.  
* '''<port>''' This should be the international ICAO airport code. This keyword should be specified only within the '''<departure>''' or '''<arrival>''' sections. As far as I know, here it should still be in upper case, although the FlightGear command line currently also supports lower case ICAO codes.  
* '''<time>''' Used to specify the '''<departure>''' or '''<arrival>''' time. The format of this string is ''hour:minute:second''. Notice that departure day is optional and is specifically intended to be used in combination with a weekly repeating schedule. When used in combination with other schedules, results may be unpredicatble. Times should be in UTC. Weekdays start at sunday (0) and end at saturday (6).
* '''<time>''' Used to specify the '''<departure>''' or '''<arrival>''' time. The format of this string is ''hour:minute:second''. Notice that departure day is optional and is specifically intended to be used in combination with a weekly repeating schedule. When used in combination with other schedules, results may be unpredicatble. Times should be in UTC. Weekdays start at sunday (0) and end at saturday (6).
117

edits

Navigation menu