]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/airspeed_indicator.hxx
Quiet some log output.
[flightgear.git] / src / Instrumentation / airspeed_indicator.hxx
1 // airspeed_indicator.hxx - a regular VSI tied to the static port.
2 // Written by David Megginson, started 2002.
3 //
4 // This file is in the Public Domain and comes with no warranty.
5
6
7 #ifndef __INSTRUMENTS_AIRSPEED_INDICATOR_HXX
8 #define __INSTRUMENTS_AIRSPEED_INDICATOR_HXX 1
9
10 #ifndef __cplusplus
11 # error This library requires C++
12 #endif
13
14 #include <simgear/props/props.hxx>
15 #include <simgear/structure/subsystem_mgr.hxx>
16
17 /**
18  * Model an airspeed indicator tied to the pitot and static ports.
19  *
20  * Input properties:
21  *
22  * /instrumentation/"name"/serviceable
23  * "pitot_port"/total-pressure-inhg
24  * "static_port"/pressure-inhg
25  * /environment/density-slugft3
26  *
27  * Output properties:
28  *
29  * /instrumentation/"name"/indicated-speed-kt
30  */
31 class AirspeedIndicator : public SGSubsystem
32 {
33
34 public:
35
36     AirspeedIndicator ( SGPropertyNode *node );
37     virtual ~AirspeedIndicator ();
38
39     virtual void init ();
40     virtual void reinit ();
41     virtual void update (double dt);
42
43 private:
44     void computeMach(double ias);
45
46     std::string _name;
47     unsigned int _num;
48     std::string _total_pressure;
49     std::string _static_pressure;
50     bool _has_overspeed;
51     std::string _pressure_alt_source;
52     double _ias_limit;
53     double _mach_limit;
54     double _alt_threshold;
55     
56     SGPropertyNode_ptr _ias_limit_node;
57     SGPropertyNode_ptr _mach_limit_node;
58     SGPropertyNode_ptr _alt_threshold_node;
59     SGPropertyNode_ptr _serviceable_node;
60     SGPropertyNode_ptr _total_pressure_node;
61     SGPropertyNode_ptr _static_pressure_node;
62     SGPropertyNode_ptr _density_node;
63     SGPropertyNode_ptr _speed_node;
64     SGPropertyNode_ptr _airspeed_limit;
65     SGPropertyNode_ptr _pressure_alt;
66     SGPropertyNode_ptr _mach_node;
67     SGPropertyNode_ptr _tas_node;
68     SGPropertyNode_ptr _sea_level_pressure_node;
69     SGPropertyNode_ptr _oat_celsius_node;
70 };
71
72 #endif // __INSTRUMENTS_AIRSPEED_INDICATOR_HXX