]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/runways.hxx
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / Airports / runways.hxx
index 8e40f9e76936a1c48837b3cd1ba81b8c001ec199..e6f97ea95d7790c30898fbcd6e4ec9c7a5bc865d 100644 (file)
 
 #include <simgear/compiler.h>
 
-#include <simgear/math/sg_geodesy.hxx>
-
-#include "Navaids/positioned.hxx"
-
-#include <string>
+#include <Airports/runwaybase.hxx>
 
 // forward decls
 class FGAirport;
+class FGNavRecord;
+class SGPropertyNode;
 
-class FGRunway : public FGPositioned
-{  
-  FGAirport* _airport; ///< owning airport
-  bool _reciprocal;
-  double _heading;
-  double _length;
-  double _width;
+class FGRunway : public FGRunwayBase
+{
+  FGAirport* _airport;
+  bool _isReciprocal;
+  FGRunway* _reciprocal;
   double _displ_thresh;
   double _stopway;
-  
-  /** surface, as defined by:
-   * http://www.x-plane.org/home/robinp/Apt810.htm#RwySfcCodes
-   */
-  int _surface_code;
-  
+  FGNavRecord* _ils;
 public:
   
   FGRunway(FGAirport* aAirport, const std::string& rwy_no,
@@ -78,51 +69,24 @@ public:
    * over runways to avoid counting runways twice, if desired.
    */
   bool isReciprocal() const
-  { return _reciprocal; }
+  { return _isReciprocal; }
 
   /**
-   * Test if this is a taxiway or not
-   */
-  bool isTaxiway() const;
-  
-  /**
-   * Get the runway threshold point - this is syntatic sugar, equivalent to
+   * Get the runway begining point - this is syntatic sugar, equivalent to
    * calling pointOnCenterline(0.0);
    */
-  SGGeod threshold() const;
+  SGGeod begin() const;
   
   /**
    * Get the (possibly displaced) threshold point.
    */
-  SGGeod displacedThreshold() const;
+  SGGeod threshold() const;
   
   /**
-   * Get the opposite threshold - this is equivalent to calling
+   * Get the 'far' end - this is equivalent to calling
    * pointOnCenterline(lengthFt());
    */
-  SGGeod reverseThreshold() const;
-  
-  /**
-   * Retrieve a position on the extended runway centerline. Positive values
-   * are in the direction of the runway heading, negative values are in the
-   * opposited direction. 0.0 corresponds to the (non-displaced) threshold
-   */
-  SGGeod pointOnCenterline(double aOffset) const;
-  
-  /**
-   * Runway length in ft
-   */
-  double lengthFt() const
-  { return _length; }
-  
-  double lengthM() const
-  { return _length * SG_FEET_TO_METER; }
-  
-  double widthFt() const
-  { return _width; }
-  
-  double widthM() const
-  { return _width * SG_FEET_TO_METER; }
+  SGGeod end() const;
   
   double displacedThresholdM() const
   { return _displ_thresh * SG_FEET_TO_METER; }
@@ -130,12 +94,6 @@ public:
   double stopwayM() const
   { return _stopway * SG_FEET_TO_METER; }
   
-  /**
-   * Runway heading in degrees.
-   */
-  double headingDeg() const
-  { return _heading; }
-  
   /**
    * Airport this runway is located at
    */
@@ -146,17 +104,17 @@ public:
   void setAirport(FGAirport* aAirport)
   { _airport = aAirport; }
   
-  /**
-   * Predicate to test if this runway has a hard surface. For the moment, this
-   * means concrete or asphalt
-   */
-  bool isHardSurface() const;
+  FGNavRecord* ILS() const { return _ils; }
+  void setILS(FGNavRecord* nav) { _ils = nav; }
+  
+  FGRunway* reciprocalRunway() const
+  { return _reciprocal; }
+  void setReciprocalRunway(FGRunway* other);
   
   /**
-   * Retrieve runway surface code, as define in Robin Peel's data
+   * Helper to process property data loaded from an ICAO.threshold.xml file
    */
-  int surface() const 
-  { return _surface_code; }
+  void processThreshold(SGPropertyNode* aThreshold);
 };
 
 #endif // _FG_RUNWAYS_HXX