Bugzilla – Bug 1576
Frequency units HERTZ & MEGAHERTZ mix up
Last modified: 2013-04-08 05:57:23 UTC
Reported by Kevin Macdonald <kmac@loxcel.com>: This snippet is from the function OkumuraHataPropagationLossModel::GetLoss () if (m_frequency < 200) { log_bHeight = 8.29 * pow (log10 (1.54 * hm), 2) - 1.1; } else { log_bHeight = 3.2 * pow (log10 (11.75 * hm), 2) - 4.97; } The Okumura-Hata model does indeed switch at 200, but the units are MEGAHERTZ and not HERTZ. However, the units for m_frequency is HERTZ, and this is where the problem lies. Instead, the if condition above should reference fmhz, which is defined below, instead of m_frequency: double fmhz = m_frequency / 1e6; And here is how I think the code snippet above should appear: if (fmhz < 200) { log_bHeight = 8.29 * pow (log10 (1.54 * hm), 2) - 1.1; } else { log_bHeight = 3.2 * pow (log10 (11.75 * hm), 2) - 4.97; }
Any reason not to commit this for upcoming build?
fixed in changeset 01cda0150630