Board index FlightGear Development

Code to name

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Code to name

Postby Jabberwocky » Fri Aug 01, 2014 9:44 pm

Hello,

I have an airport code like for example "KPHX" and I want the name for that airport, in this case "Phoenix Sky Harbor". I can't find it anywhere in the airport xmls (groundet, ils, twr, ...), so is it somewhere else hidden?

J.
Jabberwocky
Retired
 
Posts: 1319
Joined: Sat Mar 22, 2014 7:36 pm
Callsign: JWOCKY
Version: 3.0.0
OS: Ubuntu 14.04

Re: Code to name

Postby Hooray » Fri Aug 01, 2014 9:45 pm

See the airportinfo() scripting API (Nasal): http://wiki.flightgear.org/List_of_Nasa ... info.28.29

PS: The thread title is misleading: "ICAO code" would have been more appropriate - I was expecting this to be about something very different.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11925
Joined: Tue Mar 25, 2008 8:40 am

Re: Code to name

Postby Jabberwocky » Sat Aug 02, 2014 1:45 am

Yeah, IACO code would have been better, sorry.

I tried to get this list code and name for outside FG for a test program. So no nasal, but where is the information stored is what I would need.

Thanks
Jabberwocky
Retired
 
Posts: 1319
Joined: Sat Mar 22, 2014 7:36 pm
Callsign: JWOCKY
Version: 3.0.0
OS: Ubuntu 14.04

Re: Code to name

Postby Hooray » Sat Aug 02, 2014 8:59 am

then, it's not a good idea to use FlightGear data at all - however, it's all stored in the SQLite navdb, which you shouldn't rely on: http://wiki.flightgear.org/Navdata_Cache

Depending on what it is you're doing, it would be better to use a different source (non-FG), or if it is FG related, just use a socket connection into FG pull out the required info - e.g. using the mongoose API
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11925
Joined: Tue Mar 25, 2008 8:40 am


Return to Development

Who is online

Users browsing this forum: YandexBot [Bot] and 1 guest