X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAirports%2Frunways.cxx;h=c3e48ecbbd67325b2993498d3f893fe002124b00;hb=960f6881c993a32613e542d1475ad0d1ae97b927;hp=3eb853823e4d39f0927fcba599c71f3d08750217;hpb=98d8a98ef26feb5724295fe89763ec50a1345eea;p=flightgear.git diff --git a/src/Airports/runways.cxx b/src/Airports/runways.cxx index 3eb853823..c3e48ecbb 100644 --- a/src/Airports/runways.cxx +++ b/src/Airports/runways.cxx @@ -27,6 +27,7 @@ #include // sprintf() #include // atoi() +#include #include @@ -36,6 +37,9 @@ #include "runways.hxx" +#include +#include + using std::string; static std::string cleanRunwayNo(const std::string& aRwyNo) @@ -167,3 +171,30 @@ void FGRunway::setReciprocalRunway(FGRunway* other) _reciprocal = other; } +std::vector FGRunway::getSIDs() +{ + std::vector result; + for (unsigned int i=0; i<_airport->numSIDs(); ++i) { + flightgear::SID* s = _airport->getSIDByIndex(i); + if (s->isForRunway(this)) { + result.push_back(s); + } + } // of SIDs at the airport iteration + + return result; +} + +std::vector FGRunway::getSTARs() +{ + std::vector result; + for (unsigned int i=0; i<_airport->numSTARs(); ++i) { + flightgear::STAR* s = _airport->getSTARByIndex(i); + if (s->isForRunway(this)) { + result.push_back(s); + } + } // of STARs at the airport iteration + + return result; +} + +