#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 FGRunway : public FGPositioned
-{
- FGAirport* _airport; ///< owning airport
+class FGRunway : public FGRunwayBase
+{
+ FGAirport* _airport;
bool _reciprocal;
+ double _displ_thresh;
+ double _stopway;
public:
FGRunway(FGAirport* aAirport, const std::string& rwy_no,
- const double longitude, const double latitude,
+ const SGGeod& aGeod,
const double heading, const double length,
const double width,
const double displ_thresh,
{ return _reciprocal; }
/**
- * 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; }
+ SGGeod end() const;
- double widthFt() const
- { return _width; }
+ double displacedThresholdM() const
+ { return _displ_thresh * SG_FEET_TO_METER; }
- double widthM() const
- { return _width * SG_FEET_TO_METER; }
-
- /**
- * Runway heading in degrees.
- */
- double headingDeg() const
- { return _heading; }
+ double stopwayM() const
+ { return _stopway * SG_FEET_TO_METER; }
- /**
+ /**
* Airport this runway is located at
*/
FGAirport* airport() const
// FIXME - should die once airport / runway creation is cleaned up
void setAirport(FGAirport* aAirport)
{ _airport = aAirport; }
-
- std::string _rwy_no;
-
- double _lon;
- double _lat;
- double _displ_thresh;
- double _stopway;
-
- double _heading;
- double _length;
- double _width;
-
- int _surface_code;
};
#endif // _FG_RUNWAYS_HXX