X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAirports%2Frunways.hxx;h=1c5ab85b1071607b60f4d330f1b1ba963f2d62dd;hb=49677f512b8edaaf22c76761dbbf9c0850c79aad;hp=a2cc2ae621e9b48c7922edf2fda91348b144645a;hpb=aa78341698c0ede62bd45d864c1e866d309b420d;p=flightgear.git diff --git a/src/Airports/runways.hxx b/src/Airports/runways.hxx index a2cc2ae62..1c5ab85b1 100644 --- a/src/Airports/runways.hxx +++ b/src/Airports/runways.hxx @@ -26,23 +26,30 @@ #include -#include - -#include "Navaids/positioned.hxx" - -#include +#include // forward decls class FGAirport; +class FGNavRecord; +class SGPropertyNode; -class FGRunway : public FGPositioned -{ - FGAirport* _airport; ///< owning airport - bool _reciprocal; +namespace flightgear { + class SID; + class STAR; +} + +class FGRunway : public FGRunwayBase +{ + FGAirport* _airport; + bool _isReciprocal; + FGRunway* _reciprocal; + double _displ_thresh; + double _stopway; + FGNavRecord* _ils; 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, @@ -67,80 +74,62 @@ 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; + SGGeod end() 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; + double displacedThresholdM() const + { return _displ_thresh * SG_FEET_TO_METER; } + + double stopwayM() const + { return _stopway * SG_FEET_TO_METER; } /** - * Runway length in ft + * Airport this runway is located at */ - double lengthFt() const - { return _length; } + FGAirport* airport() const + { return _airport; } - double lengthM() const - { return _length * SG_FEET_TO_METER; } + // FIXME - should die once airport / runway creation is cleaned up + void setAirport(FGAirport* aAirport) + { _airport = aAirport; } - double widthFt() const - { return _width; } + FGNavRecord* ILS() const { return _ils; } + void setILS(FGNavRecord* nav) { _ils = nav; } - double widthM() const - { return _width * SG_FEET_TO_METER; } + FGRunway* reciprocalRunway() const + { return _reciprocal; } + void setReciprocalRunway(FGRunway* other); /** - * Runway heading in degrees. + * Helper to process property data loaded from an ICAO.threshold.xml file */ - double headingDeg() const - { return _heading; } + void processThreshold(SGPropertyNode* aThreshold); /** - * Airport this runway is located at + * Get SIDs (DPs) associated with this runway */ - FGAirport* airport() const - { return _airport; } + std::vector getSIDs(); - // 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; + /** + * Get STARs associared with this runway + */ + std::vector getSTARs(); }; #endif // _FG_RUNWAYS_HXX