]> git.mxchange.org Git - flightgear.git/blob - src/Systems/pitot.hxx
Merge branch 'timoore/ptrfix'
[flightgear.git] / src / Systems / pitot.hxx
1 // pitot.hxx - the pitot air system.
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 __SYSTEMS_PITOT_HXX
8 #define __SYSTEMS_PITOT_HXX 1
9
10 #ifndef __cplusplus
11 # error This library requires C++
12 #endif
13
14 #include <simgear/compiler.h>
15
16 #include <string>
17 using std::string;
18
19 #include <simgear/props/props.hxx>
20 #include <simgear/structure/subsystem_mgr.hxx>
21
22
23 /**
24  * Model a pitot air system.
25  *
26  * The output is the sum of static and dynamic pressure (not just the
27  * dynamic pressure).
28  *
29  * Input properties:
30  *
31  * /systems/"name"/serviceable
32  * /environment/pressure-slugft3
33  * /environment/density-slugft3
34  * /velocities/airspeed-kt
35  *
36  * Output properties:
37  *
38  * /systems/"name"/total-pressure-inhg
39  */
40 class PitotSystem : public SGSubsystem
41 {
42
43 public:
44
45     PitotSystem ( SGPropertyNode *node );
46     virtual ~PitotSystem ();
47
48     virtual void init ();
49     virtual void bind ();
50     virtual void unbind ();
51     virtual void update (double dt);
52
53 private:
54
55     string _name;
56     int _num;
57     SGPropertyNode_ptr _serviceable_node;
58     SGPropertyNode_ptr _pressure_node;
59     SGPropertyNode_ptr _density_node;
60     SGPropertyNode_ptr _velocity_node;
61     SGPropertyNode_ptr _slip_angle;
62     SGPropertyNode_ptr _total_pressure_node;
63 };
64
65 #endif // __SYSTEMS_PITOT_HXX