X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fnavradio.hxx;h=17ac3b092b4c56f685f68525c7b1fe53efd68849;hb=caf0138ab35b03bbe7bf367ff2222d0a31be3157;hp=f272f6700419e77d9bc28caba378be590eb3e408;hpb=8338e169f4f26cfb30273c80a13114f2c68384a8;p=flightgear.git diff --git a/src/Instrumentation/navradio.hxx b/src/Instrumentation/navradio.hxx index f272f6700..17ac3b092 100644 --- a/src/Instrumentation/navradio.hxx +++ b/src/Instrumentation/navradio.hxx @@ -26,7 +26,6 @@ #include
-#include "Sound/morse.hxx" #include #include @@ -41,16 +40,11 @@ typedef SGSharedPtr FGNavRecordPtr; class FGNavRadio : public SGSubsystem, public SGPropertyChangeListener { - FGMorse morse; - SGInterpTable *term_tbl; SGInterpTable *low_tbl; SGInterpTable *high_tbl; SGPropertyNode_ptr _radio_node; - SGPropertyNode_ptr lon_node; - SGPropertyNode_ptr lat_node; - SGPropertyNode_ptr alt_node; SGPropertyNode_ptr bus_power_node; // property inputs @@ -59,6 +53,7 @@ class FGNavRadio : public SGSubsystem, public SGPropertyChangeListener SGPropertyNode_ptr power_btn_node; SGPropertyNode_ptr freq_node; // primary freq SGPropertyNode_ptr alt_freq_node; // standby freq + SGPropertyNode_ptr is_loc_freq_node;// is the primary freq a loc/gs (paired) freq? SGPropertyNode_ptr sel_radial_node; // selected radial SGPropertyNode_ptr vol_btn_node; SGPropertyNode_ptr ident_btn_node; @@ -68,7 +63,6 @@ class FGNavRadio : public SGSubsystem, public SGPropertyChangeListener SGPropertyNode_ptr cdi_serviceable_node; SGPropertyNode_ptr gs_serviceable_node; SGPropertyNode_ptr tofrom_serviceable_node; - SGPropertyNode_ptr dme_serviceable_node; // property outputs SGPropertyNode_ptr fmt_freq_node; // formated frequency @@ -102,6 +96,7 @@ class FGNavRadio : public SGSubsystem, public SGPropertyChangeListener SGPropertyNode_ptr gs_deflection_node; SGPropertyNode_ptr gs_deflection_deg_node; SGPropertyNode_ptr gs_deflection_norm_node; + SGPropertyNode_ptr gs_direct_node; SGPropertyNode_ptr gs_rate_of_climb_node; SGPropertyNode_ptr gs_rate_of_climb_fpm_node; SGPropertyNode_ptr gs_dist_node; @@ -133,42 +128,33 @@ class FGNavRadio : public SGSubsystem, public SGPropertyChangeListener FGNavRecordPtr _navaid; FGNavRecordPtr _gs; - string nav_fx_name; - string dme_fx_name; - double target_radial; - SGTimeStamp prev_time; - SGTimeStamp curr_time; double effective_range; double target_gs; double twist; double horiz_vel; double last_x; - double last_loc_dist; double last_xtrack_error; double xrate_ms; double _localizerWidth; // cached localizer width in degrees - string _name; + std::string _name; int _num; // internal periodic station search timer double _time_before_search_sec; - SGVec3d _gsCart, _gsAxis, _gsVertical; + SGVec3d _gsCart, _gsAxis, _gsVertical, _gsBaseline; - FGNavRecordPtr _dme; - bool _dmeInRange; - // CDI properties bool _toFlag, _fromFlag; double _cdiDeflection; double _cdiCrossTrackErrorM; double _gsNeedleDeflection; double _gsNeedleDeflectionNorm; - - SGSharedPtr _sgr; - std::vector _tiedNodes; + double _gsDirect; + + class AudioIdent * _audioIdent; bool updateWithPower(double aDt); @@ -180,11 +166,9 @@ class FGNavRadio : public SGSubsystem, public SGPropertyChangeListener double adjustILSRange( double stationElev, double aircraftElev, double offsetDegrees, double distance ); - void updateAudio(); - void audioNavidChanged(); + void updateAudio( double dt ); void updateReceiver(double dt); - void updateDME(const SGVec3d& aircraft); void updateGlideSlope(double dt, const SGVec3d& aircraft, double signal_quality_norm); void updateGPSSlaved(); void updateCDI(double dt); @@ -197,17 +181,6 @@ class FGNavRadio : public SGSubsystem, public SGPropertyChangeListener bool isOperable() const { return _operable; } - /** - * Tied-properties helper, record nodes which are tied for easy un-tie-ing - */ - template - void tie(const char* aRelPath, const SGRawValue& aRawValue) - { - SGPropertyNode_ptr nd = _radio_node->getNode(aRelPath, true); - _tiedNodes.push_back(nd); - nd->tie(aRawValue); - } - // implement SGPropertyChangeListener virtual void valueChanged (SGPropertyNode * prop); public: