]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/runways.hxx
Code to stop loading of invalid flightplans
[flightgear.git] / src / Airports / runways.hxx
index 0c4cd4e37feb9bef0800a93122a956fbf901f492..e795d9ee5c9cc3fcdaea53799ae87a7326a7c54d 100644 (file)
 
 #include <simgear/compiler.h>
 
-#include <Airports/runwaybase.hxx>
-
-// forward decls
-class FGAirport;
-class FGNavRecord;
-class SGPropertyNode;
-
-namespace flightgear {
-  class SID;
-  class STAR;
-  class Approach;
-}
+#include <Navaids/procedure.hxx>
+#include "runwaybase.hxx"
+#include "airports_fwd.hxx"
 
 class FGRunway : public FGRunwayBase
 {
   PositionedID _airport;
-  bool _isReciprocal;
   PositionedID _reciprocal;
   double _displ_thresh;
   double _stopway;
@@ -56,8 +46,7 @@ public:
             const double width,
             const double displ_thresh,
             const double stopway,
-            const int surface_code,
-            const bool reciprocal);
+            const int surface_code);
   
   /**
    * given a runway identifier (06, 18L, 31R) compute the identifier for the
@@ -69,14 +58,7 @@ public:
    * score this runway according to the specified weights. Used by
    * FGAirport::findBestRunwayForHeading
    */
-  double score(double aLengthWt, double aWidthWt, double aSurfaceWt) const;
-
-  /**
-   * Test if this runway is the reciprocal. This allows users who iterate
-   * over runways to avoid counting runways twice, if desired.
-   */
-  bool isReciprocal() const
-  { return _isReciprocal; }
+  double score(double aLengthWt, double aWidthWt, double aSurfaceWt, double aIlsWt) const;
 
   /**
    * Get the runway beginning point - this is syntatic sugar, equivalent to
@@ -96,10 +78,10 @@ public:
   SGGeod end() const;
   
   double displacedThresholdM() const
-  { return _displ_thresh * SG_FEET_TO_METER; }
+  { return _displ_thresh; }
   
   double stopwayM() const
-  { return _stopway * SG_FEET_TO_METER; }
+  { return _stopway; }
   
   /**
    * Airport this runway is located at
@@ -122,21 +104,27 @@ public:
   /**
    * Get SIDs (DPs) associated with this runway
    */
-  std::vector<flightgear::SID*> getSIDs() const;
+  flightgear::SIDList getSIDs() const;
   
   /**
    * Get STARs associared with this runway
    */ 
-  std::vector<flightgear::STAR*> getSTARs() const;
+  flightgear::STARList getSTARs() const;
   
   
-  std::vector<flightgear::Approach*> getApproaches() const;
+  flightgear::ApproachList getApproaches
+  (
+    flightgear::ProcedureType type = flightgear::PROCEDURE_INVALID
+  ) const;
   
+  void updateThreshold(const SGGeod& newThreshold,
+                       double newHeading,
+                       double newDisplacedThreshold,
+                       double newStopway);
 };
 
 class FGHelipad : public FGRunwayBase
 {
-  PositionedID _airport;
 public:
     FGHelipad(PositionedID aGuid,
            PositionedID aAirport, const std::string& rwy_no,