]> git.mxchange.org Git - flightgear.git/blob - src/Navaids/ilslist.hxx
Frederic Bouvier:
[flightgear.git] / src / Navaids / ilslist.hxx
1 // ilslist.hxx -- ils management class
2 //
3 // Written by Curtis Olson, started April 2000.
4 //
5 // Copyright (C) 2000  Curtis L. Olson - curt@flightgear.org
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 //
21 // $Id$
22
23
24 #ifndef _FG_ILSLIST_HXX
25 #define _FG_ILSLIST_HXX
26
27
28 #include <simgear/compiler.h>
29 #include <simgear/misc/sg_path.hxx>
30
31 #include <map>
32 #include <vector>
33
34 #include "ils.hxx"
35
36 SG_USING_STD(map);
37 SG_USING_STD(vector);
38
39
40 class FGILSList {
41
42     // convenience types
43     typedef vector < FGILS* > ils_list_type;
44     typedef ils_list_type::iterator ils_list_iterator;
45     typedef ils_list_type::const_iterator ils_list_const_iterator;
46
47     // typedef map < int, ils_list_type, less<int> > ils_map_type;
48     typedef map < int, ils_list_type > ils_map_type;
49     typedef ils_map_type::iterator ils_map_iterator;
50     typedef ils_map_type::const_iterator ils_map_const_iterator;
51
52     ils_map_type ilslist;
53
54 public:
55
56     FGILSList();
57     ~FGILSList();
58
59     // load the navaids and build the map
60     bool init( SGPath path );
61
62     // query the database for the specified frequency, lon and lat are
63     // in degrees, elev is in meters
64     // bool query( double lon, double lat, double elev, double freq, FGILS *i );
65
66     // Query the database for the specified frequency.  It is assumed
67     // that there will be multiple stations with matching frequencies
68     // so a position must be specified.  Lon and lat are in degrees,
69     // elev is in meters.
70     FGILS *findByFreq( double freq, double lon, double lat, double elev );
71
72 };
73
74
75 extern FGILSList *current_ilslist;
76
77
78 #endif // _FG_ILSLIST_HXX