+void FGRunway::setReciprocalRunway(PositionedID other)
+{
+ assert(_reciprocal==0);
+ _reciprocal = other;
+}
+
+FGAirport* FGRunway::airport() const
+{
+ return loadById<FGAirport>(_airport);
+}
+
+FGRunway* FGRunway::reciprocalRunway() const
+{
+ return loadById<FGRunway>(_reciprocal);
+}
+
+FGNavRecord* FGRunway::ILS() const
+{
+ if (_ils == 0) {
+ return NULL;
+ }
+
+ return loadById<FGNavRecord>(_ils);
+}
+
+FGNavRecord* FGRunway::glideslope() const
+{
+ flightgear::NavDataCache* cache = flightgear::NavDataCache::instance();
+ PositionedID gsId = cache->findNavaidForRunway(guid(), FGPositioned::GS);
+ if (gsId == 0) {
+ return NULL;
+ }
+
+ return loadById<FGNavRecord>(gsId);
+}
+
+flightgear::SIDList FGRunway::getSIDs() const
+{
+ FGAirport* apt = airport();
+ flightgear::SIDList result;
+ for (unsigned int i=0; i<apt->numSIDs(); ++i) {
+ flightgear::SID* s = apt->getSIDByIndex(i);
+ if (s->isForRunway(this)) {
+ result.push_back(s);
+ }
+ } // of SIDs at the airport iteration
+
+ return result;
+}
+
+flightgear::STARList FGRunway::getSTARs() const
+{
+ FGAirport* apt = airport();
+ flightgear::STARList result;
+ for (unsigned int i=0; i<apt->numSTARs(); ++i) {
+ flightgear::STAR* s = apt->getSTARByIndex(i);
+ if (s->isForRunway(this)) {
+ result.push_back(s);
+ }
+ } // of STARs at the airport iteration
+
+ return result;
+}
+
+flightgear::ApproachList
+FGRunway::getApproaches(flightgear::ProcedureType type) const
+{
+ FGAirport* apt = airport();
+ flightgear::ApproachList result;
+ for (unsigned int i=0; i<apt->numApproaches(); ++i)
+ {
+ flightgear::Approach* s = apt->getApproachByIndex(i);
+ if( s->runway() == this
+ && (type == flightgear::PROCEDURE_INVALID || type == s->type()) )
+ {
+ result.push_back(s);
+ }
+ } // of approaches at the airport iteration
+
+ return result;
+}
+
+void FGRunway::updateThreshold(const SGGeod& newThreshold, double newHeading,
+ double newDisplacedThreshold,
+ double newStopway)
+{
+ modifyPosition(newThreshold);
+ _heading = newHeading;
+ _stopway = newStopway;
+ _displ_thresh = newDisplacedThreshold;
+}
+
+FGHelipad::FGHelipad(PositionedID aGuid,
+ PositionedID aAirport, const string& aIdent,
+ const SGGeod& aGeod,
+ const double heading, const double length,
+ const double width,
+ const int surface_code) :
+ FGRunwayBase(aGuid, RUNWAY, aIdent, aGeod,
+ heading, length, width, surface_code)
+{
+}