]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/adf.hxx
httpd: better handling of first-time notifications
[flightgear.git] / src / Instrumentation / adf.hxx
index 0feac829db1cd041d842f25722777627d5859de0..2ac32fa9d10effff6a818382c77806c225e7e854 100644 (file)
 
 #include <string>
 
-#include <simgear/math/point3d.hxx>
 #include <simgear/props/props.hxx>
 
 #include <simgear/structure/subsystem_mgr.hxx>
-#include <Sound/morse.hxx>
-
-using std::string;
+#include <simgear/math/SGMath.hxx>
 
+class SGSampleGroup;
 
 /**
  * Model an ADF radio.
@@ -60,15 +58,11 @@ private:
 
     void set_bearing (double delta_time_sec, double bearing);
 
-    void search (double frequency, double longitude_rad,
-                 double latitude_rad, double altitude_m);
+    void search (double frequency, const SGGeod& pos);
 
-    string _name;
+    std::string _name;
     unsigned int _num;
 
-    SGPropertyNode_ptr _longitude_node;
-    SGPropertyNode_ptr _latitude_node;
-    SGPropertyNode_ptr _altitude_node;
     SGPropertyNode_ptr _heading_node;
     SGPropertyNode_ptr _serviceable_node;
     SGPropertyNode_ptr _error_node;
@@ -81,21 +75,24 @@ private:
     SGPropertyNode_ptr _ident_node;
     SGPropertyNode_ptr _ident_audible_node;
     SGPropertyNode_ptr _volume_node;
+    SGPropertyNode_ptr _power_btn_node;
+    SGPropertyNode_ptr _operable_node;
 
     double _time_before_search_sec;
 
     int _last_frequency_khz;
     bool _transmitter_valid;
-    string _last_ident;
+    std::string _last_ident;
     SGGeod _transmitter_pos;
     SGVec3d _transmitter_cart;
     double _transmitter_range_nm;
 
-    FGMorse morse;
     int _ident_count;
     time_t _last_ident_time;
-    double _last_volume;
-    string _adf_ident;
+    float _last_volume;
+    std::string _adf_ident;
+
+    SGSharedPtr<SGSampleGroup> _sgr;
 };