From: curt Date: Tue, 20 Jul 2004 00:59:17 +0000 (+0000) Subject: Make distance penalty math for opposite oriented navaids more correct. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=abb0221c74c0c47fdc355d73b89ae5feac1bf5b8;p=flightgear.git Make distance penalty math for opposite oriented navaids more correct. --- 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); } }