]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/ilslist.cxx
Removed FGEnvironmentMgr as a special case in globals, initialization,
[flightgear.git] / src / Navaids / ilslist.cxx
index abbff312acf783eec938d90c568b9cfddf7f0ed4..0c278989bc15e4771fdd7d9f2cbe7b675db04a99 100644 (file)
@@ -137,7 +137,7 @@ FGILS *FGILSList::findByFreq( double freq,
     Point3D aircraft = sgGeodToCart( Point3D(lon, lat, elev) );
     Point3D station;
     double d2;
-    for ( unsigned int i = 1; i < stations.size(); ++i ) {
+    for ( unsigned int i = 0; i < stations.size(); ++i ) {
        // cout << "  testing " << current->get_locident() << endl;
        station = Point3D(stations[i]->get_x(), 
                          stations[i]->get_y(),
@@ -179,7 +179,7 @@ FGILS *FGILSList::findByFreq( double freq,
                                 &reciprocal_bearing, &dummy, &dummy );
             angle_to_beam_deg = fabs(reciprocal_bearing - s_ils_deg);
             if ( angle_to_beam_deg <= best_angle ) {
-                *ils = *stations[i];
+                ils = stations[i];
                 best_angle = angle_to_beam_deg;
             }
        }