1
0
Fork 0
flightgear/src/Airports
curt 0bb1494452 David Luff:
Attached is a patch to the airport data storage that I would like committed
after review if acceptable.  Currently the storage of airports mapped by ID
is by locally created objects - about 12 Meg or so created on the stack if
I am not mistaken.  I've changed this to creating the airports on the heap,
and storing pointers to them - see FGAirportList.add(...) in
src/Airports/simple.cxx.  I believe that this is probably better practice,
and it's certainly cured some strange problems I was seeing when accessing
the airport data with some gps unit code.  Changes resulting from this have
cascaded through a few files which access the data - 11 files are modified
in all.  Melchior and Durk - you might want to test this and shout if there
are problems since the metar and traffic code are probably the biggest
users of the airport data.  I've also added a fuzzy search function that
returns the next matching airport code in ASCII sequence in order to
support gps units that have autocompletion of partially entered codes.

More generally, the simple airport class seems to have grown a lot with the
fairly recent addition of the parking, runway preference and schedule time
code.  It is no longer just an encapsulation of the global airport data
file, and has grown to 552 bytes in size when unpopulated (about 1/2 a K!).
 My personal opinion is that we should look to just store the basic data in
apt.dat for all global airports in a simple airport class, plus globally
needed data (metar available?), and then have the traffic, AI and ATC
subsystems create more advanced airports for themselves as needed in the
area of interest.  Once a significant number of airports worldwide have
ground networks and parking defined, it will be impractical and unnecessary
to store them all in memory.  That's just a thought for the future though.
2005-09-20 20:26:57 +00:00
..
.cvsignore Ignore calc_loc program. 2003-06-07 13:54:35 +00:00
apt_loader.cxx David Luff: 2005-09-20 20:26:57 +00:00
apt_loader.hxx Replace the data/Airports/basic.dat.gz and data/Airports/runways.dat.gz with 2004-12-22 23:57:07 +00:00
calc_loc.cxx Clean up various compiler warnings that have crept into the code. This 2004-04-01 15:27:53 +00:00
Makefile.am Replace the data/Airports/basic.dat.gz and data/Airports/runways.dat.gz with 2004-12-22 23:57:07 +00:00
runways.cxx David Luff: 2004-12-26 23:31:35 +00:00
runways.hxx Replace the data/Airports/basic.dat.gz and data/Airports/runways.dat.gz with 2004-12-22 23:57:07 +00:00
simple.cxx David Luff: 2005-09-20 20:26:57 +00:00
simple.hxx David Luff: 2005-09-20 20:26:57 +00:00
testair.cxx source tree reorganization prior to flightgear 0.7 2009-09-14 14:26:20 +02:00