From: david Date: Tue, 11 Feb 2003 20:05:18 +0000 (+0000) Subject: Temporarily disabled ILS range tweaking, until we come up with a X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4c93c8a070071be3fa3ca79a759b78cc15257509;p=flightgear.git Temporarily disabled ILS range tweaking, until we come up with a better scheme. While it's true that the actual ILS indications are unreliable when far off the approach path, the ILS is not out of range -- you can still ident it (an essential part of any approach procedure), and the indicator will usually be doing something, however bizarre. The current scheme did not allow the user to ident the ILS until practically on the approach path. --- diff --git a/src/Cockpit/navcom.cxx b/src/Cockpit/navcom.cxx index a5f5b9357..2f11e188d 100644 --- a/src/Cockpit/navcom.cxx +++ b/src/Cockpit/navcom.cxx @@ -276,23 +276,24 @@ double FGNavCom::adjustILSRange( double stationElev, double aircraftElev, // altitude difference // double alt = ( aircraftElev * SG_METER_TO_FEET - stationElev ); - double offset = fabs( offsetDegrees ); - - if ( offset < 10 ) { - return FG_ILS_DEFAULT_RANGE; - } else if ( offset < 35 ) { - return 10 + (35 - offset) * (FG_ILS_DEFAULT_RANGE - 10) / 25; - } else if ( offset < 45 ) { - return (45 - offset); - } else if ( offset > 170 ) { - return FG_ILS_DEFAULT_RANGE; - } else if ( offset > 145 ) { - return 10 + (offset - 145) * (FG_ILS_DEFAULT_RANGE - 10) / 25; - } else if ( offset > 135 ) { - return (offset - 135); - } else { - return 0; - } +// double offset = fabs( offsetDegrees ); + +// if ( offset < 10 ) { +// return FG_ILS_DEFAULT_RANGE; +// } else if ( offset < 35 ) { +// return 10 + (35 - offset) * (FG_ILS_DEFAULT_RANGE - 10) / 25; +// } else if ( offset < 45 ) { +// return (45 - offset); +// } else if ( offset > 170 ) { +// return FG_ILS_DEFAULT_RANGE; +// } else if ( offset > 145 ) { +// return 10 + (offset - 145) * (FG_ILS_DEFAULT_RANGE - 10) / 25; +// } else if ( offset > 135 ) { +// return (offset - 135); +// } else { +// return 0; +// } + return FG_ILS_DEFAULT_RANGE; }