]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/mag_compass.hxx
Add aubmodels to AI objects
[flightgear.git] / src / Instrumentation / mag_compass.hxx
1 // mag_compass.hxx - an altimeter 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_MAG_COMPASS_HXX
8 #define __INSTRUMENTS_MAG_COMPASS_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 /**
19  * Model a magnetic compass.
20  *
21  * Input properties:
22  *
23  * /instrumentation/"name"/serviceable
24  * /orientation/roll-deg
25  * /orientation/pitch-deg
26  * /orientation/heading-magnetic-deg
27  * /orientation/side-slip-deg
28  * /environment/magnetic-dip-deg
29  * /accelerations/pilot/north-accel-fps_sec
30  * /accelerations/pilot/east-accel-fps_sec
31  * /accelerations/pilot/down-accel-fps_sec
32  *
33  * Output properties:
34  *
35  * /instrumentation/"name"/indicated-heading-deg
36  */
37 class MagCompass : public SGSubsystem
38 {
39
40 public:
41
42     MagCompass ( SGPropertyNode *node);
43     MagCompass ();
44     virtual ~MagCompass ();
45
46     virtual void init ();
47     virtual void update (double dt);
48
49 private:
50
51     double _error_deg;
52     double _rate_degps;
53
54     string _name;
55     int _num;
56
57     SGPropertyNode_ptr _serviceable_node;
58     SGPropertyNode_ptr _roll_node;
59     SGPropertyNode_ptr _pitch_node;
60     SGPropertyNode_ptr _heading_node;
61     SGPropertyNode_ptr _beta_node;
62     SGPropertyNode_ptr _dip_node;
63     SGPropertyNode_ptr _x_accel_node;
64     SGPropertyNode_ptr _y_accel_node;
65     SGPropertyNode_ptr _z_accel_node;
66     SGPropertyNode_ptr _out_node;
67
68 };
69
70 #endif // __INSTRUMENTS_MAG_COMPASS_HXX