]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/dme.hxx
commradio: typo: cuttoff --> cutoff
[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     double _last_distance_nm;
63     double _last_frequency_mhz;
64     double _time_before_search_sec;
65
66     FGNavRecord * _navrecord;
67
68     std::string _name;
69     int _num;
70
71     class AudioIdent * _audioIdent;
72 };
73
74
75 #endif // __INSTRUMENTS_DME_HXX