13,208
edits
m (small fixes) |
(→Related content: + Links to the source code) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
FlightGear use a few different '''flightplan | FlightGear use a few different '''flightplan XML formats''' stored in property-list xml files. Due to different needs the flightplans used in the route manager and AI scenarios and have different formats. | ||
== AI flightplans == | == AI flightplans == | ||
Line 9: | Line 9: | ||
Each waypoint can contain the following tags: | Each waypoint can contain the following tags: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Tag !! Type !! Use !! | ! Tag !! Type !! Use !! Remarks | ||
|- | |- | ||
| <name> || | | <code><name></code> || string || Waypoint name || The last waypoint use <code>EOF</code>, or if the AI model is to be deleted <code>END</code>. | ||
|- | |- | ||
| <lat> || | | <code><lat></code> || double || Latitude, decimal degrees || | ||
|- | |- | ||
| <lon> || | | <code><lon></code> || double || Longitude, decimal degrees || | ||
|- | |- | ||
| <alt> || | | <code><alt></code> || double || Altitude above mean sea level, feet || | ||
|- | |- | ||
| <crossat> || | | <code><crossat></code> || double || Crossing altitude, feet || | ||
|- | |- | ||
| <ktas> || | | <code><ktas></code> || double || True air speed, knots || | ||
|- | |- | ||
| <on-ground> || | | <code><on-ground></code> || bool || Set to <code>true</code> or <code>1</code> if on ground | ||
Set to | Set to <code>false</code> or <code>0</code> if in air or in a tunnel | ||
| | | | ||
|- | |- | ||
| <gear-down> || | | <code><gear-down></code> || double || <code>true</code> for gear down | ||
<code>false</code> for gear up | |||
| Or any number between | | Or any number between 0 and 1 | ||
|- | |- | ||
| <flaps-down> || | | <code><flaps-down></code> || double || <code>true</code> for flaps down | ||
<code>false</code> for flaps up | |||
| Or any number between | | Or any number between 0 and 1 | ||
|} | |} | ||
Line 73: | Line 73: | ||
=== Departure and destination tags === | === Departure and destination tags === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Tag !! Type !! Use !! | ! Tag !! Type !! Use !! Remarks | ||
|- | |- | ||
| <airport> || string || The ICAO identifier of the airport || | | <code><airport></code> || string || The ICAO identifier of the airport || | ||
|- | |- | ||
| <sid> || string || Any available SID || | | <code><sid></code> || string || Any available SID || | ||
|- | |- | ||
| <star> || string || Any available STAR || | | <code><star></code> || string || Any available STAR || | ||
|- | |- | ||
| <transition> || string || | | <code><transition></code> || string || || | ||
|- | |- | ||
| <runway> || string || Departure or destination runway || | | <code><runway></code> || string || Departure or destination runway || | ||
|} | |} | ||
=== Waypoint types and tags === | === Waypoint types and tags === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Tag !! Type !! Use !! | ! Tag !! Type !! Use !! Remarks | ||
|- | |- | ||
| <type> || string || Type of waypoint. Either | | <code><type></code> || string || Type of waypoint. Either <code>runway</code>, <code>navaid</code> or <code>offset-navaid</code> || | ||
|- | |- | ||
| <alt-restrict> || string || | | <code><alt-restrict></code> || string || || | ||
|- | |- | ||
| <altitude-ft> || double || Altitude in feet || | | <code><altitude-ft></code> || double || Altitude in feet || | ||
|- | |- | ||
| <ident> || string || If | | <code><ident></code> || string || If <code><type></code> is | ||
: | : <code>runway</code>: The departure or destination airport's runway number. Accompanied in the waypoint by the <code><icao></code> tag. | ||
: | : <code>navaid</code>: Any significant point along the route. Both airports, navaids and fixes. | ||
: | : <code>offset-navaid</code>: An point offset from a navaid by a bearing and distance. Note that true bearings are used here. | ||
| | | | ||
|- | |- | ||
| <icao> || string || ICAO code of an airport || Used only if <type> is | | <code><icao></code> || string || ICAO code of an airport || Used only if <code><type></code> is <code>runway</code> | ||
|- | |- | ||
| <lon> || double || Longitude of the waypoint in decimal degrees || | | <code><lon></code> || double || Longitude of the waypoint in decimal degrees || | ||
|- | |- | ||
| <lat> || double || Latitude of the waypoint in decimal degrees || | | <code><lat></code> || double || Latitude of the waypoint in decimal degrees || | ||
|- | |- | ||
| <radial-deg> || double || True bearing from a navaid, fix or airport || {{inote|Radials on charts are magnetic!}} | | <code><radial-deg></code> || double || True bearing from a navaid, fix or airport || {{inote|Radials on charts are magnetic!}} | ||
|- | |- | ||
| <distance-nm> || double || Distance from a navaid, fix or airport || | | <code><distance-nm></code> || double || Distance from a navaid, fix or airport || | ||
|} | |} | ||
Line 175: | Line 175: | ||
== Related content == | == Related content == | ||
=== Wiki articles === | |||
* [[AI Systems]] | * [[AI Systems]] | ||
* [[ | * [[Howto:Create a flightplan]] – Contains no information whatsoever on using flightplans in FlightGear though. | ||
* [[Interactive traffic#An example of a traffic file]] – Not flightplans per see as they only cover cruise altitude and departure and destination airport. | |||
* [[List of Nasal extension functions#flightplan()]] | * [[List of Nasal extension functions#flightplan()]] | ||
* [[Nasal Flightplan]] | * [[Nasal Flightplan]] | ||
* [[PropertyList XML File]] | * [[PropertyList XML File]] | ||
* [[ | * [[UFO from the 'White Project' of the UNESCO]] | ||
=== Source code === | |||
* {{flightgear source|src/AIModel/AIFlightPlan.hxx}} | |||
* {{flightgear source|src/AIModel/AIFlightPlan.cxx}} | |||
* {{flightgear source|src/Navaids/FlightPlan.hxx}} | |||
* {{flightgear source|src/Navaids/FlightPlan.cxx}} | |||
[[Category:XML]] | |||
[[Category:Artificial intelligence]] | |||
[[Category:Autoflight]] |