Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Difference between revisions of "Flightplan XML formats"

From FlightGear wiki
Jump to: navigation, search
(Created page with "FlightGear can use '''flightplans''' stored in property-list xml files. == Property-list format == <syntaxhighlight lang="xml"> <?xml version="1.0"?> <PropertyList> <flight...")
 
(Extending)
Line 2: Line 2:
  
 
== Property-list format ==
 
== Property-list format ==
<syntaxhighlight lang="xml">
 
<?xml version="1.0"?>
 
<PropertyList>
 
  <flightplan>
 
    ...
 
  </flightplan>
 
</PropertyList>
 
</syntaxhighlight>
 
 
 
=== AI Flightplans ===
 
=== AI Flightplans ===
 +
:''See also [[AI Scenarios#Flightplans and Their Waypoints]].''
 +
 +
These flightplans contain only waypoints.
 +
 +
==== Waypoint tags ====
 
Each waypoint can contain the following tags:
 
Each waypoint can contain the following tags:
* <tt>'''<name>'''</tt> - Waypoint name, if END AI model is deleted
+
* <tt>'''<name>'''</tt> - Waypoint name, if it is the last waypoint use EOF or, if you want the AI model deleted, END.
 
* <tt>'''<lat>'''</tt> - Latitude, decimal degrees
 
* <tt>'''<lat>'''</tt> - Latitude, decimal degrees
 
* <tt>'''<lon>'''</tt> - Longitude, decimal degrees
 
* <tt>'''<lon>'''</tt> - Longitude, decimal degrees
Line 19: Line 15:
 
* <tt>'''<crossat>'''</tt> - Crossing altitude, feet
 
* <tt>'''<crossat>'''</tt> - Crossing altitude, feet
 
* <tt>'''<ktas>'''</tt> - Knots true air speed
 
* <tt>'''<ktas>'''</tt> - Knots true air speed
* <tt>'''<on-ground>'''</tt> - True if on ground, if in air or in a tunnel set to false
+
* <tt>'''<on-ground>'''</tt> - True or 1 if on ground, if in air or in a tunnel set to false or 0
* <tt>'''<gear-down>'''</tt> - True for gear down, false for gear up
+
* <tt>'''<gear-down>'''</tt> - True for gear down, false for gear up, or 0 to 1
* <tt>'''<flaps-down>'''</tt> - True for flaps down, false for flaps up
+
* <tt>'''<flaps-down>'''</tt> - True for flaps down, false for flaps up, or 0 to 1
  
 +
==== Example ====
 
<syntaxhighlight lang="xml">
 
<syntaxhighlight lang="xml">
 +
<?xml version="1.0"?>
 +
<PropertyList>
 +
  <flightplan>
 
     <wpt>
 
     <wpt>
       <name>1</name>
+
       <name>First!</name>
 
       <lat>53.6762</lat>
 
       <lat>53.6762</lat>
 
       <lon>-1.39984</lon>
 
       <lon>-1.39984</lon>
       <alt>51.9773</alt>
+
       <alt>1000</alt>
       <ktas>10</ktas>
+
       <ktas>120</ktas>
       <on-ground>true</on-ground>
+
       <on-ground>false</on-ground>
 +
      <gear-down>1<gear-down>
 +
      <flaps-down>0.25<flaps-down>
 
     </wpt>
 
     </wpt>
</syntaxhighlight>
+
    ...
 
+
<syntaxhighlight lang="xml">
+
 
     <wpt>
 
     <wpt>
       <name>2</name>
+
       <name>END</name>
      <lat>53.6761</lat>
+
    </wpt>
      <lon>-1.40056</lon>
+
  </flightplan>
      <alt>52.199</alt>
+
</PropertyList>
      <ktas>20</ktas>
+
      <on-ground>false</on-ground>
+
    </wpt>
+
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== Route manager flightplans ===
 +
:''See also [[Route manager#Defining a Route]].''
 +
 +
Rout manager waypoints are a bit more complex, for starters they contain departure and destination information and not just one type of waypoint.
 +
 +
Note that the first and last waypoint are the departure and destination airports.
 +
 +
There are in FlightGear support for Level-D 767 SIDs and STARs.
 +
 +
==== Departure and destination tags ====
 +
* <tt>'''<airport type="string">'''</tt> - The ICAO identifier of the airport
 +
* <tt>'''<sid type="string">'''</tt> - Any available SID
 +
* <tt>'''<star type="string">'''</tt> - Any available STAR
 +
* <tt>'''<transition type="string">'''</tt> -
 +
* <tt>'''<runway type="string">'''</tt> - Departure or destination runway
 +
 +
==== Waypoint types and tags ====
 +
* <tt>'''runway'''</tt> - The runway end on the departure and destination airports. Accompanied by the <icao> tag.
 +
* <tt>'''navaid'''</tt> - Any significant point along the route. Both airports, navaids and fixes.
 +
* <tt>'''offset-navaid'''</tt> - An point offset from a navaid by a bearing and distance. Note that true bearings are used here.
 +
 +
* <tt>'''<type type="string">'''</tt> -
 +
* <tt>'''<alt-restrict type="string">'''</tt> -
 +
* <tt>'''<altitude-ft type="double">'''</tt> -
 +
* <tt>'''<ident type="string">'''</tt> -
 +
* <tt>'''<icao type="string">'''</tt> -
 +
* <tt>'''<lon type="double">'''</tt> -
 +
* <tt>'''<lat type="double">'''</tt> -
 +
* <tt>'''<radial-deg type="double">'''</tt> -
 +
* <tt>'''<distance-nm type="double">'''</tt> -
  
 
<syntaxhighlight lang="xml">
 
<syntaxhighlight lang="xml">
     <wpt>
+
<?xml version="1.0"?>
       <name>END</name>
+
 
     </wpt>
+
<PropertyList>
 +
  <version type="int">2</version>
 +
  <departure>
 +
     <airport type="string">KOAK</airport>
 +
    <sid type="string">(none)</sid>
 +
    <runway type="string">29</runway>
 +
  </departure>
 +
  <destination>
 +
    <airport type="string">KSJC</airport>
 +
    <star type="string">(none)</star>
 +
    <transition type="string"></transition>
 +
    <runway type="string">11</runway>
 +
  </destination>
 +
  <route>
 +
    <wp>
 +
       <type type="string">runway</type>
 +
      <departure type="bool">true</departure>
 +
      <generated type="bool">true</generated>
 +
      <ident type="string">29</ident>
 +
      <icao type="string">KOAK</icao>
 +
     </wp>
 +
    <wp n="1">
 +
      <type type="string">offset-navaid</type>
 +
      <alt-restrict type="string">at</alt-restrict>
 +
      <altitude-ft type="double">7500</altitude-ft>
 +
      <ident type="string">SFO</ident>
 +
      <lon type="double">-122.3738889</lon>
 +
      <lat type="double">37.61947222</lat>
 +
      <radial-deg type="double">88.22972768</radial-deg>
 +
      <distance-nm type="double">16</distance-nm>
 +
    </wp>
 +
    <wp n="2">
 +
      <type type="string">navaid</type>
 +
      <alt-restrict type="string">at</alt-restrict>
 +
      <altitude-ft type="double">10000</altitude-ft>
 +
      <ident type="string">MISON</ident>
 +
      <lon type="double">-121.890306</lon>
 +
      <lat type="double">37.496806</lat>
 +
    </wp>
 +
    <wp n="3">
 +
      <type type="string">runway</type>
 +
      <arrival type="bool">true</arrival>
 +
      <generated type="bool">true</generated>
 +
      <ident type="string">11</ident>
 +
      <icao type="string">KSJC</icao>
 +
    </wp>
 +
  </route>
 +
</PropertyList>
 +
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Using the flightplans in FlightGear ==
 
== Using the flightplans in FlightGear ==
 
=== Through the route manager ===
 
=== Through the route manager ===
 +
{{main article|Route manager}}
  
 
=== For AI models ===
 
=== For AI models ===

Revision as of 11:14, 1 June 2013

FlightGear can use flightplans stored in property-list xml files.

Property-list format

AI Flightplans

See also AI Scenarios#Flightplans and Their Waypoints.

These flightplans contain only waypoints.

Waypoint tags

Each waypoint can contain the following tags:

  • <name> - Waypoint name, if it is the last waypoint use EOF or, if you want the AI model deleted, END.
  • <lat> - Latitude, decimal degrees
  • <lon> - Longitude, decimal degrees
  • <alt> - Altitude above mean sea level, feet
  • <crossat> - Crossing altitude, feet
  • <ktas> - Knots true air speed
  • <on-ground> - True or 1 if on ground, if in air or in a tunnel set to false or 0
  • <gear-down> - True for gear down, false for gear up, or 0 to 1
  • <flaps-down> - True for flaps down, false for flaps up, or 0 to 1

Example

<?xml version="1.0"?>
<PropertyList>
  <flightplan>
    <wpt>
      <name>First!</name>
      <lat>53.6762</lat>
      <lon>-1.39984</lon>
      <alt>1000</alt>
      <ktas>120</ktas>
      <on-ground>false</on-ground>
      <gear-down>1<gear-down>
      <flaps-down>0.25<flaps-down>
    </wpt>
    ...
    <wpt>
      <name>END</name>
    </wpt>
  </flightplan>
</PropertyList>

Route manager flightplans

See also Route manager#Defining a Route.

Rout manager waypoints are a bit more complex, for starters they contain departure and destination information and not just one type of waypoint.

Note that the first and last waypoint are the departure and destination airports.

There are in FlightGear support for Level-D 767 SIDs and STARs.

Departure and destination tags

  • <airport type="string"> - The ICAO identifier of the airport
  • <sid type="string"> - Any available SID
  • <star type="string"> - Any available STAR
  • <transition type="string"> -
  • <runway type="string"> - Departure or destination runway

Waypoint types and tags

  • runway - The runway end on the departure and destination airports. Accompanied by the <icao> tag.
  • navaid - Any significant point along the route. Both airports, navaids and fixes.
  • offset-navaid - An point offset from a navaid by a bearing and distance. Note that true bearings are used here.
  • <type type="string"> -
  • <alt-restrict type="string"> -
  • <altitude-ft type="double"> -
  • <ident type="string"> -
  • <icao type="string"> -
  • <lon type="double"> -
  • <lat type="double"> -
  • <radial-deg type="double"> -
  • <distance-nm type="double"> -
<?xml version="1.0"?>

<PropertyList>
  <version type="int">2</version>
  <departure>
    <airport type="string">KOAK</airport>
    <sid type="string">(none)</sid>
    <runway type="string">29</runway>
  </departure>
  <destination>
    <airport type="string">KSJC</airport>
    <star type="string">(none)</star>
    <transition type="string"></transition>
    <runway type="string">11</runway>
  </destination>
  <route>
    <wp>
      <type type="string">runway</type>
      <departure type="bool">true</departure>
      <generated type="bool">true</generated>
      <ident type="string">29</ident>
      <icao type="string">KOAK</icao>
    </wp>
    <wp n="1">
      <type type="string">offset-navaid</type>
      <alt-restrict type="string">at</alt-restrict>
      <altitude-ft type="double">7500</altitude-ft>
      <ident type="string">SFO</ident>
      <lon type="double">-122.3738889</lon>
      <lat type="double">37.61947222</lat>
      <radial-deg type="double">88.22972768</radial-deg>
      <distance-nm type="double">16</distance-nm>
    </wp>
    <wp n="2">
      <type type="string">navaid</type>
      <alt-restrict type="string">at</alt-restrict>
      <altitude-ft type="double">10000</altitude-ft>
      <ident type="string">MISON</ident>
      <lon type="double">-121.890306</lon>
      <lat type="double">37.496806</lat>
    </wp>
    <wp n="3">
      <type type="string">runway</type>
      <arrival type="bool">true</arrival>
      <generated type="bool">true</generated>
      <ident type="string">11</ident>
      <icao type="string">KSJC</icao>
    </wp>
  </route>
</PropertyList>

Using the flightplans in FlightGear

Through the route manager

1rightarrow.png See Route manager for the main article about this subject.

For AI models

1rightarrow.png See AI Systems#AI Models for the main article about this subject.

Related pages