Board index FlightGear Development Nasal

[SOLVED] List of Airport runways

Nasal is the scripting language of FlightGear.

[SOLVED] List of Airport runways

Postby clm76 » Mon May 25, 2015 8:51 pm

Hello,

Working on a CDU (fmz2000), I would like to load the runways of an airport on the screen of the CDU to choose one of them.
The standard route manager gives this possibility, but I don't know where it finds these informations, except in the apt.dat. In this case, how to extract them ?
Last edited by clm76 on Thu May 28, 2015 4:03 pm, edited 1 time in total.
clm76
 
Posts: 149
Joined: Tue Oct 30, 2012 8:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2018.3.0
OS: Linux Mint 18.3

Re: List of Airport runways

Postby sanhozay » Mon May 25, 2015 9:56 pm

See the airportinfo function:

http://wiki.flightgear.org/Nasal_librar ... _functions

Developed aircraft like the 777 and CRJ700-family have examples.
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 11:57 am
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: List of Airport runways

Postby clm76 » Thu May 28, 2015 4:02 pm

Thanks sanhozay.

This code allow to print all runways of an airport, for example LFPG :

Code: Select all
var apt = airportinfo("LFPG").runways;
foreach(var key;keys(apt)) {
print (key);
}
clm76
 
Posts: 149
Joined: Tue Oct 30, 2012 8:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2018.3.0
OS: Linux Mint 18.3

Re: [SOLVED] List of Airport runways

Postby gkick » Wed Jun 19, 2019 5:42 am

And how would one get the output to populate a combo with the first runway being displayed before opening the combo ?
gkick
 
Posts: 106
Joined: Sun Jan 01, 2017 11:04 pm


Return to Nasal

Who is online

Users browsing this forum: No registered users and 1 guest