]> git.mxchange.org Git - flightgear.git/blob - src/Cockpit/steam.hxx
Propogate colocated dme flag.
[flightgear.git] / src / Cockpit / steam.hxx
1 // steam.hxx - Steam Gauge Indications
2 //
3 // Started by Alex Perry
4 //
5 // Copyright (C) 2000  Alexander Perry - alex.perry@ieee.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_STEAM
25 #define FG_STEAM
26
27
28 #ifdef HAVE_CONFIG_H
29 #  include <config.h>
30 #endif
31
32 #include <simgear/compiler.h>
33
34 #include <time.h>
35 #include STL_STRING
36
37 FG_USING_NAMESPACE(std);
38
39
40 /**
41  * STEAM GAUGES
42  *
43  * This class is a mapping layer, which retrieves information from
44  * the BFI (which reports truthful and ideal values) and generates
45  * all the instrument errors and inaccuracies that pilots (err)
46  * love, of course.  Please report any missing flaws (!).
47  *
48  * These should be used to operate cockpit instruments, 
49  * and autopilot features where these are slaved thus.
50  * They should not be used for other simulation purposes.
51  *
52  */
53 class FGSteam
54 {
55 public:
56
57   static void update ( int timesteps );
58
59                                 // Position
60   static double get_ALT_ft ();
61   static double get_MH_deg ();
62   static double get_DG_deg ();
63   static double get_TC_rad ();
64
65                                 // Velocities
66   static double get_ASI_kias ();
67   static double get_TC_std ();
68   static double get_VSI_fps ();
69
70                                 // Engine Gauges
71   static double get_VACUUM_inhg ();
72
73                                 // Hacks ... temporary stuff
74   static double get_HackVOR1_deg ();
75   static double get_HackOBS1_deg ();
76   static double get_HackGS_deg ();
77   static double get_HackVOR2_deg ();
78   static double get_HackOBS2_deg ();
79   static double get_HackADF_deg ();
80
81
82 private:
83         static double   the_ALT_ft;
84         static double   the_TC_rad, the_TC_std;
85         static double   the_STATIC_inhg, the_VACUUM_inhg;
86         static double   the_VSI_fps, the_VSI_case;
87         static double   the_MH_deg, the_MH_degps, the_MH_err;
88         static double   the_DG_deg, the_DG_degps, the_DG_inhg;
89
90         static int      _UpdatesPending;
91         static void     _CatchUp ();
92
93         static void     set_lowpass ( double *outthe, 
94                                 double inthe, double tc );
95 };
96
97
98 #endif // FG_STEAM