Debian Codegraph @

src/Systems/pitot.hxx

raw symbols SCIP
1 // pitot.hxx - the pitot air system.
2 // Written by David Megginson, started 2002.
3 //
4 // Last modified by Eric van den Berg, 01 Nov 2013
5 // This file is in the Public Domain and comes with no warranty.
6
7
8 #pragma once
9
10 #ifndef __cplusplus
11 # error This library requires C++
12 #endif
13
14 #include <simgear/compiler.h>
15
16 #include <string>
17
18 #include <simgear/props/props.hxx>
19 #include <simgear/structure/subsystem_mgr.hxx>
20
21
22 /**
23 * Model a pitot air system.
24 *
25 * The output is the sum of static and dynamic pressure (not just the
26 * dynamic pressure).
27 *
28 * Input properties:
29 *
30 * /systems/"name"/serviceable
31 * /environment/pressure-inhg
32 * /velocities/mach
33 *
34 * Output properties:
35 *
36 * /systems/"name"/total-pressure-inhg
37 * /systems/"name"/measured-total-pressure-inhg
38 */
39 class PitotSystem : public SGSubsystem
40 {
41 public:
42 PitotSystem ( SGPropertyNode *node );
43 virtual ~PitotSystem ();
44
45 // Subsystem API.
46 void bind() override;
47 void init() override;
48 void unbind() override;
49 void update(double dt) override;
50
51 // Subsystem identification.
52 static const char* staticSubsystemClassId() { return "pitot"; }
53
54 private:
55 std::string _name;
56 int _num;
57 double _stall_factor;
58 SGPropertyNode_ptr _serviceable_node;
59 SGPropertyNode_ptr _pressure_node;
60 SGPropertyNode_ptr _mach_node;
61 SGPropertyNode_ptr _total_pressure_node;
62 SGPropertyNode_ptr _measured_total_pressure_node;
63 SGPropertyNode_ptr _alpha_deg_node;
64 SGPropertyNode_ptr _beta_deg_node;
65 };