X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAirports%2Frunways.cxx;h=9f2291f7ba90f31f10f31da246a4a978975572d4;hb=c068049d840c2f4567c7d07e7fb37247d8e23407;hp=e63fb9d73d273f72af8730b5d573841ca60d9584;hpb=45e3b7e2d19e7b0d1201f849c852bae5b6b3005b;p=flightgear.git diff --git a/src/Airports/runways.cxx b/src/Airports/runways.cxx index e63fb9d73..9f2291f7b 100644 --- a/src/Airports/runways.cxx +++ b/src/Airports/runways.cxx @@ -96,15 +96,17 @@ string FGRunway::reverseIdent(const string& aRunwayIdent) return buf; } -double FGRunway::score(double aLengthWt, double aWidthWt, double aSurfaceWt) const +double FGRunway::score(double aLengthWt, double aWidthWt, double aSurfaceWt, double aIlsWt) const { int surface = 1; if (_surface_code == 12 || _surface_code == 5) // dry lakebed & gravel surface = 2; else if (_surface_code == 1 || _surface_code == 2) // asphalt & concrete surface = 3; + + int ils = (_ils != 0); - return _length * aLengthWt + _width * aWidthWt + surface * aSurfaceWt + 1e-20; + return _length * aLengthWt + _width * aWidthWt + surface * aSurfaceWt + ils * aIlsWt + 1e-20; } SGGeod FGRunway::begin() const @@ -155,7 +157,7 @@ FGNavRecord* FGRunway::glideslope() const return NULL; } - return (FGNavRecord*) cache->loadById(gsId); + return loadById(gsId); } flightgear::SIDList FGRunway::getSIDs() const @@ -204,6 +206,16 @@ FGRunway::getApproaches(flightgear::ProcedureType type) const 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,