]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/runways.hxx
toggle fullscreen: also adapt GUI plane when resizing
[flightgear.git] / src / Airports / runways.hxx
index 7bb21b6b4532d688c2817a1ee07232e1fec5f6ea..36f342c00f24edaca428ea135091296cc4fb8380 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;
+namespace flightgear {
+  class SID;
+  class STAR;
+  class Approach;
+}
+
+class FGRunway : public FGRunwayBase
+{
+  PositionedID _airport;
+  bool _isReciprocal;
+  PositionedID _reciprocal;
   double _displ_thresh;
   double _stopway;
-  int _surface_code;
-  
+  PositionedID _ils;
 public:
   
-  FGRunway(FGAirport* aAirport, const std::string& rwy_no,
+  FGRunway(PositionedID aGuid,
+           PositionedID aAirport, const std::string& rwy_no,
             const SGGeod& aGeod,
             const double heading, const double length,
             const double width,
@@ -74,51 +76,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 beginning 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; }
@@ -127,32 +102,36 @@ public:
   { return _stopway * SG_FEET_TO_METER; }
   
   /**
-   * Runway heading in degrees.
+   * Airport this runway is located at
    */
-  double headingDeg() const
-  { return _heading; }
+  FGAirport* airport() const;
+  
+  FGNavRecord* ILS() const;
   
   /**
-   * Airport this runway is located at
+   * retrieve the associated glideslope transmitter, if one is defined.
    */
-  FGAirport* airport() const
-  { return _airport; }
+  FGNavRecord* glideslope() const;
   
-  // FIXME - should die once airport / runway creation is cleaned up
-  void setAirport(FGAirport* aAirport)
-  { _airport = aAirport; }
+  void setILS(PositionedID nav) { _ils = nav; }
+  
+  FGRunway* reciprocalRunway() const;
+  
+  void setReciprocalRunway(PositionedID other);
   
   /**
-   * Predicate to test if this runway has a hard surface. For the moment, this
-   * means concrete or asphalt
+   * Get SIDs (DPs) associated with this runway
    */
-  bool isHardSurface() const;
+  std::vector<flightgear::SID*> getSIDs() const;
   
   /**
-   * Retrieve runway surface code, as define in Robin Peel's data
-   */
-  int surface() const 
-  { return _surface_code; }
+   * Get STARs associared with this runway
+   */ 
+  std::vector<flightgear::STAR*> getSTARs() const;
+  
+  
+  std::vector<flightgear::Approach*> getApproaches() const;
+  
 };
 
 #endif // _FG_RUNWAYS_HXX