1 // mag_compass.hxx - an altimeter 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_MAG_COMPASS_HXX
8 #define __INSTRUMENTS_MAG_COMPASS_HXX 1
11 # error This library requires C++
14 #include <simgear/props/props.hxx>
15 #include <simgear/structure/subsystem_mgr.hxx>
16 #include <simgear/math/interpolater.hxx>
20 * Model a magnetic compass.
24 * /instrumentation/"name"/serviceable
25 * /instrumentation/"name"/pitch-offset-deg
26 * /instrumentation/"name"/max-pitch-deg
27 * /instrumentation/"name"/max-roll-deg
28 * /orientation/roll-deg
29 * /orientation/pitch-deg
30 * /orientation/heading-magnetic-deg
31 * /orientation/side-slip-deg
32 * /environment/magnetic-dip-deg
33 * /accelerations/pilot/north-accel-fps_sec
34 * /accelerations/pilot/east-accel-fps_sec
35 * /accelerations/pilot/down-accel-fps_sec
39 * /instrumentation/"name"/indicated-heading-deg
41 class MagCompass : public SGSubsystem
46 MagCompass ( SGPropertyNode *node);
48 virtual ~MagCompass ();
51 virtual void reinit ();
52 virtual void update (double dt);
60 SGSharedPtr<SGInterpTable> _deviation_table;
61 SGPropertyNode_ptr _deviation_node;
63 SGPropertyNode_ptr _serviceable_node;
64 SGPropertyNode_ptr _pitch_offset_node;
65 SGPropertyNode_ptr _roll_node;
66 SGPropertyNode_ptr _pitch_node;
67 SGPropertyNode_ptr _heading_node;
68 SGPropertyNode_ptr _beta_node;
69 SGPropertyNode_ptr _dip_node;
70 SGPropertyNode_ptr _x_accel_node;
71 SGPropertyNode_ptr _y_accel_node;
72 SGPropertyNode_ptr _z_accel_node;
73 SGPropertyNode_ptr _out_node;
77 #endif // __INSTRUMENTS_MAG_COMPASS_HXX