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_TACAN_HXX
8 #define __INSTRUMENTS_TACAN_HXX 1
10 #include <simgear/props/props.hxx>
11 #include <simgear/structure/subsystem_mgr.hxx>
15 * Model a TACAN radio.
19 * /position/longitude-deg
20 * /position/latitude-deg
21 * /position/altitude-ft
23 * /systems/electrical/outputs/TACAN
24 * /instrumentation/"name"/serviceable
25 * /instrumentation/"name"/frequencies/selected-mhz
29 * /instrumentation/"name"/in-range
30 * /instrumentation/"name"/indicated-distance-nm
31 * /instrumentation/"name"/indicated-ground-speed-kt
32 * /instrumentation/"name"/indicated-time-kt
34 class TACAN : public SGSubsystem, public SGPropertyChangeListener
39 TACAN(SGPropertyNode *node);
43 virtual void reinit ();
44 virtual void update (double delta_time_sec);
48 void disabled(bool force = false);
50 void search (double frequency, const SGGeod& pos);
51 double searchChannel (const std::string& channel);
52 void valueChanged (SGPropertyNode *);
57 SGPropertyNode_ptr _heading_node;
58 SGPropertyNode_ptr _serviceable_node;
59 SGPropertyNode_ptr _electrical_node;
60 SGPropertyNode_ptr _frequency_node;
61 SGPropertyNode_ptr _display_node;
62 SGPropertyNode_ptr _x_shift_node;
63 SGPropertyNode_ptr _y_shift_node;
65 SGPropertyNode_ptr _in_range_node;
66 SGPropertyNode_ptr _distance_node;
67 SGPropertyNode_ptr _speed_node;
68 SGPropertyNode_ptr _time_node;
69 SGPropertyNode_ptr _bearing_node;
70 SGPropertyNode_ptr _ident_node;
71 SGPropertyNode_ptr _name_node;
73 SGPropertyNode_ptr _channel_node;
74 SGPropertyNode_ptr _channel_in0_node;
75 SGPropertyNode_ptr _channel_in1_node;
76 SGPropertyNode_ptr _channel_in2_node;
77 SGPropertyNode_ptr _channel_in3_node;
78 SGPropertyNode_ptr _channel_in4_node;
83 double _last_distance_nm;
84 double _frequency_mhz;
85 double _time_before_search_sec;
87 FGNavRecordRef _active_station;
93 #endif // __INSTRUMENTS_TACAN_HXX