]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/runwayprefs.cxx
Clean up naming of the 'point on runway' helpers, to get rid of the confusing
[flightgear.git] / src / Airports / runwayprefs.cxx
index ae204474e46dc2a68b5cfce948006da5c51e4445..3572275c0d8534d9683e274c5b692c1832fed748 100644 (file)
@@ -202,7 +202,7 @@ void RunwayGroup::setActive(const FGAirport* airport,
                            stringVec *currentlyActive)
 {
 
-  FGRunway rwy;
+  FGRunway* rwy;
   int activeRwys = rwyList.size(); // get the number of runways active
   int nrOfPreferences;
   // bool found = true;
@@ -238,7 +238,7 @@ void RunwayGroup::setActive(const FGAirport* airport,
             rwy = airport->getRunwayByIdent(rwyList[j].getRwyList(i));
        
                          //cerr << "Succes" << endl;
-                 hdgDiff = fabs(windHeading - rwy._heading);
+                 hdgDiff = fabs(windHeading - rwy->headingDeg());
                  //cerr << "Wind Heading: " << windHeading << "Runway Heading: " <<rwy._heading << endl;
                  //cerr << "Wind Speed  : " << windSpeed << endl;
                  if (hdgDiff > 180)
@@ -307,7 +307,7 @@ void RunwayGroup::setActive(const FGAirport* airport,
         rwy = airport->getRunwayByIdent(name);
         
                  //cerr << "Succes" << endl;
-                 hdgDiff = fabs(windHeading - rwy._heading);
+                 hdgDiff = fabs(windHeading - rwy->headingDeg());
                  if (hdgDiff > 180)
                    hdgDiff = 360 - hdgDiff;
                  hdgDiff *= ((2*M_PI)/360.0); // convert to radians