From 045912f5a75cdad86388cbc1e022553d361575c3 Mon Sep 17 00:00:00 2001 From: adrian Date: Mon, 9 Jan 2012 19:47:25 +0200 Subject: [PATCH] ITM radio calculations are only considered valid between 40 MHz and 20 GHz. Fix for bug which assigns a frequency of 0 MHz to AI aircraft, thus resulting in infinite values. --- src/Radio/radio.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Radio/radio.cxx b/src/Radio/radio.cxx index 34f43cf69..169cd322f 100644 --- a/src/Radio/radio.cxx +++ b/src/Radio/radio.cxx @@ -211,7 +211,8 @@ void FGRadioTransmission::receiveATC(SGGeod tx_pos, double freq, string text, in double FGRadioTransmission::ITM_calculate_attenuation(SGGeod pos, double freq, int transmission_type) { - + if((freq < 40.0) || (freq > 20000.0)) // frequency out of recommended range + return -1; /** ITM default parameters TODO: take them from tile materials (especially for sea)? **/ -- 2.39.5