1 // airspeed_indicator.hxx - a regular VSI tied to the static port.
2 // Written by David Megginson, started 2002.
4 // This file is in the Public Domain and comes with no warranty.
7 #ifndef __INSTRUMENTS_AIRSPEED_INDICATOR_HXX
8 #define __INSTRUMENTS_AIRSPEED_INDICATOR_HXX 1
11 # error This library requires C++
14 #include <simgear/props/props.hxx>
15 #include <simgear/structure/subsystem_mgr.hxx>
18 class FGEnvironmentMgr;
21 * Model an airspeed indicator tied to the pitot and static ports.
25 * /instrumentation/"name"/serviceable
26 * "pitot_port"/total-pressure-inhg
27 * "static_port"/pressure-inhg
28 * /environment/density-slugft3
32 * /instrumentation/"name"/indicated-speed-kt
34 class AirspeedIndicator : public SGSubsystem
39 AirspeedIndicator ( SGPropertyNode *node );
40 virtual ~AirspeedIndicator ();
43 virtual void reinit ();
44 virtual void update (double dt);
47 void computeMach(double ias);
51 std::string _total_pressure;
52 std::string _static_pressure;
54 std::string _pressure_alt_source;
57 double _alt_threshold;
59 SGPropertyNode_ptr _ias_limit_node;
60 SGPropertyNode_ptr _mach_limit_node;
61 SGPropertyNode_ptr _alt_threshold_node;
62 SGPropertyNode_ptr _serviceable_node;
63 SGPropertyNode_ptr _total_pressure_node;
64 SGPropertyNode_ptr _static_pressure_node;
65 SGPropertyNode_ptr _density_node;
66 SGPropertyNode_ptr _speed_node;
67 SGPropertyNode_ptr _airspeed_limit;
68 SGPropertyNode_ptr _pressure_alt;
69 SGPropertyNode_ptr _mach_node;
70 SGPropertyNode_ptr _tas_node;
72 FGEnvironmentMgr* _environmentManager;
75 #endif // __INSTRUMENTS_AIRSPEED_INDICATOR_HXX