X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Ftacan.hxx;h=7c8873aed438ffd2dc0fec3ab60b6144eb002b11;hb=43b300fe46d8013a90009ec8e1a923ec53a396b5;hp=59985e682ad69bd730aca7274665eac6dfc21539;hpb=4db6e924fe038b4e0a548ab27f70862a40c4f5f7;p=flightgear.git diff --git a/src/Instrumentation/tacan.hxx b/src/Instrumentation/tacan.hxx index 59985e682..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 (); @@ -53,7 +46,11 @@ private: void search (double frequency, double longitude_rad, double latitude_rad, double altitude_m); - double searchChannel (const string& _channel); + 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,22 +73,28 @@ 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; - + 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; bool _transmitter_valid; - Point3D _transmitter; - double _transmitter_lat, _transmitter_lon; - double _transmitter_elevation_ft; + SGVec3d _transmitter; + SGGeod _transmitter_pos; double _transmitter_range_nm; double _transmitter_bearing_deg; double _transmitter_bias; @@ -110,9 +109,7 @@ private: string _mobile_name; string _mobile_ident; - string name; - int num; - + int _listener_active; };