]> git.mxchange.org Git - flightgear.git/blob - Simulator/Cockpit/proposed-navaids.hpp
Initial revision
[flightgear.git] / Simulator / Cockpit / proposed-navaids.hpp
1 /**************************************************************************
2  * navaids.hpp -- navigation defines and prototypes
3  *
4  * Written by Charles Hotchkiss, started March 1998.
5  *
6  * Copyright (C) 1998  Charles Hotchkiss chotchkiss@namg.us.anritsu.com
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  * $Id$
23  * (Log is kept at end of this file)
24  **************************************************************************/
25
26
27 // Class nav_aid
28 //
29 //  Includes NDB and IMO Markers, base for all other navigational aids.
30 //  The destructor is virtual to permit use of nav_aid pointers to derived
31 //  classes, but is instantiable none the less.
32 //  Assumes global pointer to current aircraft.
33
34 class nav_aid
35   private:
36     LRECT  here_at;   // Codes left = Long,
37                       //        top = Lat,
38                       //      right = Alt,
39                       //     bottom = Range
40     UINT   frequency; // special coding
41     UINT   range;
42     char  *ID;
43     char  *Name;
44
45   public:
46     nav_aid( LRECT loc,
47              UNIT freq, UINT range,
48              const char *eye_dee, const char *MyName );
49
50     virtual ~nav_aid();
51     operator ==
52
53     void update_status( void );  // Called by main loop?
54
55     bool        in_range   ( LRECT loc );
56     const char *pID        ( void );
57     const char *pName      ( void );
58     Cartestian  Location   ( void );
59 };
60
61 // Class ATIS_stn
62 //
63
64 class ATIS_stn :: public nav_aid {
65   private:
66     int   runways;
67     int  *pref_rnwys; // prefered runway list;
68     char *format;
69
70   public:
71     bool set_message( const char *pmsg ); // MSFS coded message
72     ~ATIS_stn();
73     ATIS_stn( LRECT here,
74               UINT  radius,
75               char *eye_dee,
76               char *itsname,
77               int  *runways,
78               char *defaultmsg);
79 };
80
81 // Class DirBeacon
82 //
83 // Includes VOR Stations. Base for Omni?
84
85 class DirBeacon :: public nav_aid{
86   private:
87     UINT        radial;
88
89   public:
90     int         phase_angle( void );
91     int         deflection ( void );
92     double      ground_rate( void );
93 };
94
95 // Class ils_station
96 //
97 // Includes ILS
98
99 class ils_station :: public DirBeacon{
100   private:
101     long slope_freq;
102     UINT glide_angle;
103     UINT approach_angle;
104
105   public:
106     ULONG deflection( void );
107 };