]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/rad_alt.hxx
httpd: better handling of first-time notifications
[flightgear.git] / src / Instrumentation / rad_alt.hxx
index 5babe31605339beaa9a8a0830c8ca6a2c351c8cf..568d6741bccab6b17534efeeb790ed37efce6efa 100644 (file)
 #define _INST_RADALT_HXX
 
 #include <simgear/structure/subsystem_mgr.hxx>
-#include <Scenery/scenery.hxx>
-#include <simgear/scene/material/mat.hxx>
+#include <simgear/props/props.hxx>
+#include <simgear/math/SGMath.hxx>
 
-#include <Cockpit/agradar.hxx>
-
-class radAlt : public agRadar{
+class RadarAltimeter : public SGSubsystem
+{
 public:
 
-    radAlt ( SGPropertyNode *node );
-    radAlt ();
-    virtual ~radAlt ();
+    RadarAltimeter ( SGPropertyNode *node );
+    virtual ~RadarAltimeter ();
 
 private:
 
@@ -43,10 +41,26 @@ private:
     virtual void update (double dt);
 
     void update_altitude();
-    double getDistanceAntennaToHit(SGVec3d h) const;
-
+    void updateSetHeight();
+    
+    double getDistanceAntennaToHit(const SGVec3d& h) const;
+    SGVec3d getCartAntennaPos()const;
+    
+    SGVec3d rayVector(double az, double el) const;
+    
+    SGPropertyNode_ptr _Instrument;
     SGPropertyNode_ptr _user_alt_agl_node;
     SGPropertyNode_ptr _rad_alt_warning_node;
+    SGPropertyNode_ptr _serviceable_node;
+    SGPropertyNode_ptr _sceneryLoaded;
+    
+    
+    SGVec3d _antennaOffset; // in aircraft local XYZ frame
+    
+    std::string _name;
+    int _num;
+    double _time;
+    double _interval;
 
     double _min_radalt;