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