#include <simgear/compiler.h>
-#include <Airports/runwaybase.hxx>
-
-// forward decls
-class FGAirport;
-class FGNavRecord;
-class SGPropertyNode;
-
-namespace flightgear {
- class SID;
- class STAR;
-}
+#include <Navaids/procedure.hxx>
+#include "runwaybase.hxx"
+#include "airports_fwd.hxx"
class FGRunway : public FGRunwayBase
{
- FGAirport* _airport;
- bool _isReciprocal;
- FGRunway* _reciprocal;
+ PositionedID _airport;
+ PositionedID _reciprocal;
double _displ_thresh;
double _stopway;
- FGNavRecord* _ils;
+ 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,
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
* 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 begining point - this is syntatic sugar, equivalent to
+ * Get the runway beginning point - this is syntatic sugar, equivalent to
* calling pointOnCenterline(0.0);
*/
SGGeod begin() const;
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
*/
- FGAirport* airport() const
- { return _airport; }
+ FGAirport* airport() const;
- // FIXME - should die once airport / runway creation is cleaned up
- void setAirport(FGAirport* aAirport)
- { _airport = aAirport; }
+ FGNavRecord* ILS() const;
- FGNavRecord* ILS() const { return _ils; }
- void setILS(FGNavRecord* nav) { _ils = nav; }
+ /**
+ * retrieve the associated glideslope transmitter, if one is defined.
+ */
+ FGNavRecord* glideslope() const;
- FGRunway* reciprocalRunway() const
- { return _reciprocal; }
- void setReciprocalRunway(FGRunway* other);
+ void setILS(PositionedID nav) { _ils = nav; }
- virtual flightgear::PositionedBinding* createBinding(SGPropertyNode* nd) const;
+ FGRunway* reciprocalRunway() const;
- /**
- * Helper to process property data loaded from an ICAO.threshold.xml file
- */
- void processThreshold(SGPropertyNode* aThreshold);
+ void setReciprocalRunway(PositionedID other);
/**
* Get SIDs (DPs) associated with this runway
*/
- std::vector<flightgear::SID*> getSIDs();
+ flightgear::SIDList getSIDs() const;
/**
* Get STARs associared with this runway
*/
- std::vector<flightgear::STAR*> getSTARs();
+ flightgear::STARList getSTARs() 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
+{
+public:
+ FGHelipad(PositionedID aGuid,
+ PositionedID aAirport, const std::string& rwy_no,
+ const SGGeod& aGeod,
+ const double heading, const double length,
+ const double width,
+ const int surface_code);
+};
+
+
#endif // _FG_RUNWAYS_HXX