]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/dme.hxx
Fix a dumb bug in NavDisplay text-enable.
[flightgear.git] / src / Instrumentation / dme.hxx
1 // dme.hxx - distance-measuring equipment.
2 // Written by David Megginson, started 2003.
3 //
4 // This file is in the Public Domain and comes with no warranty.
5
6
7 #ifndef __INSTRUMENTS_DME_HXX
8 #define __INSTRUMENTS_DME_HXX 1
9
10 #include <simgear/props/props.hxx>
11 #include <simgear/structure/subsystem_mgr.hxx>
12
13 /**
14  * Model a DME radio.
15  *
16  * Input properties:
17  *
18  * /position/longitude-deg
19  * /position/latitude-deg
20  * /position/altitude-ft
21  * /systems/electrical/outputs/dme
22  * /instrumentation/"name"/serviceable
23  * /instrumentation/"name"/frequencies/source
24  * /instrumentation/"name"/frequencies/selected-mhz
25  *
26  * Output properties:
27  *
28  * /instrumentation/"name"/in-range
29  * /instrumentation/"name"/indicated-distance-nm
30  * /instrumentation/"name"/indicated-ground-speed-kt
31  * /instrumentation/"name"/indicated-time-kt
32  */
33 class DME : public SGSubsystem
34 {
35
36 public:
37
38     DME ( SGPropertyNode *node );
39     virtual ~DME ();
40
41     virtual void init ();
42     virtual void update (double delta_time_sec);
43
44 private:
45
46     SGPropertyNode_ptr _serviceable_node;
47     SGPropertyNode_ptr _electrical_node;
48     SGPropertyNode_ptr _source_node;
49     SGPropertyNode_ptr _frequency_node;
50
51     SGPropertyNode_ptr _in_range_node;
52     SGPropertyNode_ptr _distance_node;
53     SGPropertyNode_ptr _speed_node;
54     SGPropertyNode_ptr _time_node;
55     SGPropertyNode_ptr _ident_btn_node;
56     SGPropertyNode_ptr _volume_node;
57
58     double _last_distance_nm;
59     double _last_frequency_mhz;
60     double _time_before_search_sec;
61
62     FGNavRecord * _navrecord;
63
64     std::string _name;
65     int _num;
66
67     class AudioIdent * _audioIdent;
68 };
69
70
71 #endif // __INSTRUMENTS_DME_HXX