]> git.mxchange.org Git - flightgear.git/blob - src/Navaids/fixlist.hxx
Fixed gauge spelling error.
[flightgear.git] / src / Navaids / fixlist.hxx
1 // fixlist.hxx -- fix list 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_FIXLIST_HXX
25 #define _FG_FIXLIST_HXX
26
27
28 #include <simgear/compiler.h>
29 #include <simgear/misc/sg_path.hxx>
30
31 #include <map>
32 #include <vector>
33 #include STL_STRING
34
35 #include "fix.hxx"
36
37 SG_USING_STD(map);
38 SG_USING_STD(vector);
39 SG_USING_STD(string);
40
41
42 class FGFixList {
43
44     // typedef map < string, FGFix, less<string> > fix_map_type;
45     typedef map < string, FGFix > fix_map_type;
46     typedef fix_map_type::iterator fix_map_iterator;
47     typedef fix_map_type::const_iterator fix_map_const_iterator;
48
49     fix_map_type fixlist;
50
51 public:
52
53     FGFixList();
54     ~FGFixList();
55
56     // load the navaids and build the map
57     bool init( SGPath path );
58
59     // query the database for the specified frequency, lon and lat are
60     // in degrees, elev is in meters
61     bool query( const string& ident, double lon, double lat, double elev,
62                 FGFix *f, double *heading, double *dist);
63 };
64
65
66 extern FGFixList *current_fixlist;
67
68
69 #endif // _FG_FIXLIST_HXX