X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Ftacan.hxx;h=7c8873aed438ffd2dc0fec3ab60b6144eb002b11;hb=43b300fe46d8013a90009ec8e1a923ec53a396b5;hp=abf710e4e70a70c0d71f1a76cea0ef803b4c9ef0;hpb=32c39edf4416b303dce53e916c2c93782856fe2d;p=flightgear.git diff --git a/src/Instrumentation/tacan.hxx b/src/Instrumentation/tacan.hxx index abf710e4e..7c8873aed 100755 --- a/src/Instrumentation/tacan.hxx +++ b/src/Instrumentation/tacan.hxx @@ -7,11 +7,6 @@ #ifndef __INSTRUMENTS_TACAN_HXX #define __INSTRUMENTS_TACAN_HXX 1 -#ifndef __cplusplus -# error This library requires C++ -#endif - -#include #include #include @@ -27,7 +22,6 @@ * /heading * /systems/electrical/outputs/TACAN * /instrumentation/"name"/serviceable - * /instrumentation/"name"/frequencies/source * /instrumentation/"name"/frequencies/selected-mhz * * Output properties: @@ -37,13 +31,12 @@ * /instrumentation/"name"/indicated-ground-speed-kt * /instrumentation/"name"/indicated-time-kt */ -class TACAN : public SGSubsystem +class TACAN : public SGSubsystem, public SGPropertyChangeListener { public: TACAN ( SGPropertyNode *node ); - TACAN (); virtual ~TACAN (); virtual void init (); @@ -54,6 +47,10 @@ private: void search (double frequency, double longitude_rad, double latitude_rad, double altitude_m); double searchChannel (const string& channel); + void valueChanged (SGPropertyNode *); + + string _name; + unsigned int _num; SGPropertyNode_ptr _longitude_node; SGPropertyNode_ptr _latitude_node; @@ -62,15 +59,11 @@ private: SGPropertyNode_ptr _yaw_node; SGPropertyNode_ptr _serviceable_node; SGPropertyNode_ptr _electrical_node; - SGPropertyNode_ptr _source_node; SGPropertyNode_ptr _frequency_node; SGPropertyNode_ptr _display_node; SGPropertyNode_ptr _x_shift_node; SGPropertyNode_ptr _y_shift_node; SGPropertyNode_ptr _rotation_node; - /*SGPropertyNode_ptr _x_shift_calibration_node; - SGPropertyNode_ptr _y_shift_calibration_node; - SGPropertyNode_ptr _distance_calibration_node;*/ SGPropertyNode_ptr _in_range_node; SGPropertyNode_ptr _distance_node; @@ -80,15 +73,21 @@ private: SGPropertyNode_ptr _ident_node; SGPropertyNode_ptr _name_node; - SGPropertyNode_ptr _carrier_name_node; SGPropertyNode_ptr _channel_node; - - SGPropertyNode_ptr _tanker_callsign_node; - SGPropertyNode_ptr _mp_callsign_node; - - string _last_channel; + SGPropertyNode_ptr _channel_in0_node; + SGPropertyNode_ptr _channel_in1_node; + SGPropertyNode_ptr _channel_in2_node; + SGPropertyNode_ptr _channel_in3_node; + SGPropertyNode_ptr _channel_in4_node; + + SGPropertyNode_ptr _carrier_name_node; // FIXME unused + SGPropertyNode_ptr _tanker_callsign_node; // FIXME + SGPropertyNode_ptr _mp_callsign_node; // FIXME + + bool _new_frequency; + string _channel; double _last_distance_nm; - double _last_frequency_mhz; + double _frequency_mhz; double _time_before_search_sec; bool _mobile_valid; @@ -110,9 +109,7 @@ private: string _mobile_name; string _mobile_ident; - string _name; - int _num; - + int _listener_active; };