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 9: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 5:03 pm, edited 1 time in total.
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: List of Airport runways

Postby sanhozay » Mon May 25, 2015 10: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 12:57 pm
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: List of Airport runways

Postby clm76 » Thu May 28, 2015 5: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: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: [SOLVED] List of Airport runways

Postby gkick » Wed Jun 19, 2019 6: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: Mon Jan 02, 2017 12:04 am


Return to Nasal

Who is online

Users browsing this forum: No registered users and 1 guest