1 // dme.hxx - distance-measuring equipment.
2 // Written by David Megginson, started 2003.
4 // This file is in the Public Domain and comes with no warranty.
7 #ifndef __INSTRUMENTS_DME_HXX
8 #define __INSTRUMENTS_DME_HXX 1
11 # error This library requires C++
14 #include <simgear/math/point3d.hxx>
15 #include <simgear/misc/props.hxx>
16 #include <Main/fgfs.hxx>
24 * /position/longitude-deg
25 * /position/latitude-deg
26 * /position/altitude-ft
27 * /systems/electrical/outputs/dme
28 * /instrumentation/dme/serviceable
29 * /instrumentation/dme/frequencies/source
30 * /instrumentation/dme/frequencies/selected-mhz
34 * /instrumentation/dme/in-range
35 * /instrumentation/dme/indicated-distance-nm
36 * /instrumentation/dme/indicated-ground-speed-kt
37 * /instrumentation/dme/indicated-time-kt
39 class DME : public FGSubsystem
48 virtual void update (double delta_time_sec);
52 void search (double frequency, double longitude_rad,
53 double latitude_rad, double altitude_m);
55 SGPropertyNode_ptr _longitude_node;
56 SGPropertyNode_ptr _latitude_node;
57 SGPropertyNode_ptr _altitude_node;
58 SGPropertyNode_ptr _serviceable_node;
59 SGPropertyNode_ptr _electrical_node;
60 SGPropertyNode_ptr _source_node;
61 SGPropertyNode_ptr _frequency_node;
63 SGPropertyNode_ptr _in_range_node;
64 SGPropertyNode_ptr _distance_node;
65 SGPropertyNode_ptr _speed_node;
66 SGPropertyNode_ptr _time_node;
68 double _last_distance_nm;
69 double _last_frequency_mhz;
70 double _time_before_search_sec;
72 bool _transmitter_valid;
74 double _transmitter_elevation_ft;
75 double _transmitter_range_nm;
80 #endif // __INSTRUMENTS_DME_HXX