If I use the following in nasal it finds the airport and works as expected, listing the two runways at Lundy Island:
- Code: Select all
# following taken from nasal library examples, with EG69 added as target airport
# prints to lengths of the runways of the nearest airport in feet and metres
var info = airportinfo("EG69");
print("-- Lengths of the runways at ", info.name, " (", info.id, ") --");
foreach(var rwy; keys(info.runways)){
print(rwy, ": ", math.round(info.runways[rwy].length * M2FT), " ft (", info.runways[rwy].length, " m)");
}
However, If I run the following it's as if the "airport" doesn't exist:
- Code: Select all
#again taken from nasal library with EG69 inserted as target
var apt = findAirportsByICAO("EG69"); # one way to check if an airport does exist
if (size(apt) == 0) {
print("Airport does not exist"); # this one will be printed
} else {
print("Airport does exist");
}
Could someone please help with why the two find-airport methods give different results.
(I'm using flightgear with Ubuntu 18.04, and it's updated to the latest in the default Ubuntu repos)
Thanks