1 // groundlist.hxx -- ATC Ground data management class
3 // Written by David Luff, started November 2002.
4 // Based on navlist.hxx by Curtis Olson, started April 2000.
6 // Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #ifndef _FG_GROUNDLIST_HXX
24 #define _FG_GROUNDLIST_HXX
27 #include <simgear/compiler.h>
28 #include <simgear/misc/sg_path.hxx>
44 typedef vector < FGGround > ground_list_type;
45 typedef ground_list_type::iterator ground_list_iterator;
46 typedef ground_list_type::const_iterator ground_list_const_iterator;
48 // Map containing FGGround keyed by frequency.
49 // A vector of FGGround is kept at each node since some may share frequency
50 typedef map < int, ground_list_type > ground_map_type;
51 typedef ground_map_type::iterator ground_map_iterator;
52 typedef ground_map_type::const_iterator ground_map_const_iterator;
54 ground_map_type groundlist;
61 // load all atis and build the map
62 bool init( SGPath path );
64 // query the database for the specified frequency, lon and lat are
65 // in degrees, elev is in meters
66 bool query( double lon, double lat, double elev, double freq, FGGround *g );
71 extern FGGroundList *current_groundlist;
74 #endif // _FG_GROUNDLIST_HXX