From abb0221c74c0c47fdc355d73b89ae5feac1bf5b8 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 20 Jul 2004 00:59:17 +0000 Subject: [PATCH] Make distance penalty math for opposite oriented navaids more correct. --- src/Navaids/navlist.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } -- 2.39.5