]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/rad_alt.hxx
Support helipad names in the --runway startup option
[flightgear.git] / src / Instrumentation / rad_alt.hxx
index 7ab1e657f784ad254d29ab95d0f915aa8f09a345..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 "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;