]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/runways.cxx
NewAtis: handle varying winds
[flightgear.git] / src / Airports / runways.cxx
index 4dc8660767be7d0dc745f8a72af91148385c356f..9f2291f7ba90f31f10f31da246a4a978975572d4 100644 (file)
@@ -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