From 65f28817700c9ec208474c0ff92b650932131c36 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Thu, 27 Sep 2012 17:02:39 +0200 Subject: [PATCH] Fix finding ATIS CommStation --- src/ATCDCL/atis.cxx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ATCDCL/atis.cxx b/src/ATCDCL/atis.cxx index 56e6c618b..14fd44e33 100644 --- a/src/ATCDCL/atis.cxx +++ b/src/ATCDCL/atis.cxx @@ -610,6 +610,17 @@ public: return d2 <= (rangeM * rangeM); } + + virtual CommStation::Type minType() const + { + return CommStation::FREQ_ATIS; + } + + virtual CommStation::Type maxType() const + { + return CommStation::FREQ_AWOS; + } + private: SGVec3d _cart; SGGeod _pos; @@ -620,9 +631,9 @@ void FGATIS::search(void) { double frequency = _freq->getDoubleValue(); - // Note: 122.375 must be rounded DOWN to 12237 + // Note: 122.375 must be rounded DOWN to 122370 // in order to be consistent with apt.dat et cetera. - int freqKhz = static_cast(frequency * 100.0 + 0.25); + int freqKhz = 10 * static_cast(frequency * 100 + 0.25); // throttle frequency searches if ((freqKhz == _last_frequency)&&(_time_before_search_sec > 0)) -- 2.39.5