diff --git a/src/Navaids/navlist.cxx b/src/Navaids/navlist.cxx index 691431889..dbffc73c3 100644 --- a/src/Navaids/navlist.cxx +++ b/src/Navaids/navlist.cxx @@ -241,7 +241,8 @@ FGNavRecord *FGNavList::findNavFromList( const Point3D &aircraft, // (squared) which is further than matching stations would // ever be placed from each other. if ( fabs(az1) > 90.0 ) { - d2 += 5000*5000; + double dist = sqrt(d2); + d2 = (dist + 5000) * (dist + 5000); } }