]> git.mxchange.org Git - flightgear.git/commitdiff
Make distance penalty math for opposite oriented navaids more correct.
authorcurt <curt>
Tue, 20 Jul 2004 00:59:17 +0000 (00:59 +0000)
committercurt <curt>
Tue, 20 Jul 2004 00:59:17 +0000 (00:59 +0000)
src/Navaids/navlist.cxx

index 691431889f1b8e59570bb7f8fe24ea111f3f694a..dbffc73c372fbe2c184ba289febe3c46ec82867e 100644 (file)
@@ -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);
             }
         }