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/props/props.hxx>
17 #include <Main/fgfs.hxx>
25 * /position/longitude-deg
26 * /position/latitude-deg
27 * /position/altitude-ft
28 * /systems/electrical/outputs/dme
29 * /instrumentation/dme/serviceable
30 * /instrumentation/dme/frequencies/source
31 * /instrumentation/dme/frequencies/selected-mhz
35 * /instrumentation/dme/in-range
36 * /instrumentation/dme/indicated-distance-nm
37 * /instrumentation/dme/indicated-ground-speed-kt
38 * /instrumentation/dme/indicated-time-kt
40 class DME : public FGSubsystem
49 virtual void update (double delta_time_sec);
53 void search (double frequency, double longitude_rad,
54 double latitude_rad, double altitude_m);
56 SGPropertyNode_ptr _longitude_node;
57 SGPropertyNode_ptr _latitude_node;
58 SGPropertyNode_ptr _altitude_node;
59 SGPropertyNode_ptr _serviceable_node;
60 SGPropertyNode_ptr _electrical_node;
61 SGPropertyNode_ptr _source_node;
62 SGPropertyNode_ptr _frequency_node;
64 SGPropertyNode_ptr _in_range_node;
65 SGPropertyNode_ptr _distance_node;
66 SGPropertyNode_ptr _speed_node;
67 SGPropertyNode_ptr _time_node;
69 double _last_distance_nm;
70 double _last_frequency_mhz;
71 double _time_before_search_sec;
73 bool _transmitter_valid;
75 double _transmitter_elevation_ft;
76 double _transmitter_range_nm;
81 #endif // __INSTRUMENTS_DME_HXX