]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/navradio.hxx
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / Instrumentation / navradio.hxx
index 0337bf219d34e0fd9e7380dba5325eb0f6077ee1..a8451a6496d453333cdac004d90da50c1e849ffd 100644 (file)
@@ -39,7 +39,7 @@ class SGSampleGroup;
 class FGNavRecord;
 typedef SGSharedPtr<FGNavRecord> FGNavRecordPtr;
 
-class FGNavRadio : public SGSubsystem
+class FGNavRadio : public SGSubsystem, public SGPropertyChangeListener
 {
     FGMorse morse;
 
@@ -137,8 +137,6 @@ class FGNavRadio : public SGSubsystem
     string dme_fx_name;
 
     double target_radial;
-    SGTimeStamp prev_time;
-    SGTimeStamp curr_time;
     double effective_range;
     double target_gs;
     double twist;
@@ -168,7 +166,7 @@ class FGNavRadio : public SGSubsystem
     double _gsNeedleDeflectionNorm;
     
     SGSharedPtr<SGSampleGroup> _sgr;
-    std::vector<SGPropertyNode*> _tiedNodes;
+    std::vector<SGPropertyNode_ptr> _tiedNodes;
     
     bool updateWithPower(double aDt);
 
@@ -191,11 +189,6 @@ class FGNavRadio : public SGSubsystem
     
     void clearOutputs();
 
-    /**
-     * Compute the localizer width in degrees - see implementation for 
-     * more information on the relevant standards and formulae.
-     */
-    double localizerWidth(FGNavRecord* aLOC);
     FGNavRecord* findPrimaryNavaid(const SGGeod& aPos, double aFreqMHz);
     
     /// accessor for tied, read-only 'operable' property
@@ -208,10 +201,13 @@ class FGNavRadio : public SGSubsystem
     template <typename T>
     void tie(const char* aRelPath, const SGRawValue<T>& aRawValue)
     {
-      SGPropertyNode* nd = _radio_node->getNode(aRelPath, true);
+      SGPropertyNode_ptr nd = _radio_node->getNode(aRelPath, true);
       _tiedNodes.push_back(nd);
       nd->tie(aRawValue);
     }
+    
+  // implement SGPropertyChangeListener
+    virtual void valueChanged (SGPropertyNode * prop);
 public:
 
     FGNavRadio(SGPropertyNode *node);