]> git.mxchange.org Git - flightgear.git/blob - src/ATC/groundlist.hxx
Use the property /sim/sound/voice to disable voice support even if
[flightgear.git] / src / ATC / groundlist.hxx
1 // groundlist.hxx -- ATC Ground data management class
2 //
3 // Written by David Luff, started November 2002.
4 // Based on navlist.hxx by Curtis Olson, started April 2000.
5 //
6 // Copyright (C) 2000  Curtis L. Olson - curt@flightgear.org
7 //
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.
12 //
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.
17 //
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.
21
22
23 #ifndef _FG_GROUNDLIST_HXX
24 #define _FG_GROUNDLIST_HXX
25
26
27 #include <simgear/compiler.h>
28 #include <simgear/misc/sg_path.hxx>
29
30 #include <map>
31 #include <vector>
32 #include <string>
33
34 #include "ground.hxx"
35
36 SG_USING_STD(map);
37 SG_USING_STD(vector);
38 SG_USING_STD(string);
39
40
41 class FGGroundList {
42
43     // convenience types
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;
47
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;
53
54     ground_map_type groundlist;
55
56 public:
57
58     FGGroundList();
59     ~FGGroundList();
60
61     // load all atis and build the map
62     bool init( SGPath path );
63
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 );
67
68 };
69
70
71 extern FGGroundList *current_groundlist;
72
73
74 #endif // _FG_GROUNDLIST_HXX