]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/dme.hxx
83078c70a7135e208936d72676e4d1e5cca06d03
[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 // forward decls
14 class FGNavRecord;
15
16 /**
17  * Model a DME radio.
18  *
19  * Input properties:
20  *
21  * /position/longitude-deg
22  * /position/latitude-deg
23  * /position/altitude-ft
24  * /systems/electrical/outputs/dme
25  * /instrumentation/"name"/serviceable
26  * /instrumentation/"name"/frequencies/source
27  * /instrumentation/"name"/frequencies/selected-mhz
28  *
29  * Output properties:
30  *
31  * /instrumentation/"name"/in-range
32  * /instrumentation/"name"/indicated-distance-nm
33  * /instrumentation/"name"/indicated-ground-speed-kt
34  * /instrumentation/"name"/indicated-time-kt
35  */
36 class DME : public SGSubsystem
37 {
38
39 public:
40
41     DME ( SGPropertyNode *node );
42     virtual ~DME ();
43
44     virtual void init ();
45     virtual void reinit ();
46     virtual void update (double delta_time_sec);
47
48 private:
49
50     SGPropertyNode_ptr _serviceable_node;
51     SGPropertyNode_ptr _electrical_node;
52     SGPropertyNode_ptr _source_node;
53     SGPropertyNode_ptr _frequency_node;
54
55     SGPropertyNode_ptr _in_range_node;
56     SGPropertyNode_ptr _distance_node;
57     SGPropertyNode_ptr _speed_node;
58     SGPropertyNode_ptr _time_node;
59     SGPropertyNode_ptr _ident_btn_node;
60     SGPropertyNode_ptr _volume_node;
61
62     SGPropertyNode_ptr _distance_string;
63     SGPropertyNode_ptr _speed_string;
64     SGPropertyNode_ptr _time_string;
65
66     double _last_distance_nm;
67     double _last_frequency_mhz;
68     double _time_before_search_sec;
69
70     FGNavRecord * _navrecord;
71
72     std::string _name;
73
74     int _num;
75
76     class AudioIdent * _audioIdent;
77 };
78
79
80 #endif // __INSTRUMENTS_DME_HXX