]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/navrecord.hxx
Merge branch 'next' of http://git.gitorious.org/fg/flightgear into next
[flightgear.git] / src / Navaids / navrecord.hxx
index 5d205d654706e7392a31f542617dd8c51b9d0569..09abb6e9786a1589d6961ec089fc3eab8e8a84d3 100644 (file)
 #define FG_DME_DEFAULT_RANGE 50 // nm
 #define FG_NAV_MAX_RANGE 300    // nm
 
-// FIXME - get rid of these, and use the real enum directly
-#define FG_NAV_VOR FGPositioned::VOR
-#define FG_NAV_NDB FGPositioned::NDB
-#define FG_NAV_ILS FGPositioned::ILS
-#define FG_NAV_ANY FGPositioned::INVALID
-
-typedef FGPositioned::Type fg_nav_types;
-
 // forward decls
 class FGRunway;
+class SGPropertyNode;
 
 class FGNavRecord : public FGPositioned 
 {
@@ -54,7 +47,7 @@ class FGNavRecord : public FGPositioned
                                 // (degrees) or dme bias (nm)
 
     std::string _name;                // verbose name in nav database
-    FGRunway* runway;
+    FGRunway* mRunway;        // associated runway, if there is one
 
     bool serviceable;          // for failure modeling
     std::string trans_ident;         // for failure modeling
@@ -64,7 +57,10 @@ class FGNavRecord : public FGPositioned
    */
   void initAirportRelation();
   
-  void alignLocaliserWithRunway(FGRunway* aRunway, double aThreshold);
+  void alignLocaliserWithRunway(double aThreshold);
+  
+  void readAirportSceneryData();
+  void processSceneryILS(SGPropertyNode* aILSNode);
 public:
   inline ~FGNavRecord(void) {}
 
@@ -87,6 +83,18 @@ public:
 
   virtual const std::string& name() const
   { return _name; }
+  
+  /**
+   * Retrieve the runway this navaid is associated with (for ILS/LOC/GS)
+   */
+  FGRunway* runway() const { return mRunway; }
+  
+  /**
+   * return the localizer width, in degrees
+   * computation is based up ICAO stdandard width at the runway threshold
+   * see implementation for further details.
+   */
+  double localizerWidth() const;
 };
 
 class FGTACANRecord : public SGReferenced {