diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 18cf9d70e..2b76bf960 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -62,6 +62,7 @@ Bugs fixed - Bug 1882 - int64x64 tests trigger valgrind bug - Bug 1883 - IPv6 don't consider the prefix and network when choosing output address - Bug 1887 - Point-to-point traces should contain PPP headers +- Bug 1888 - COST231 propagation loss model: corrections - Bug 1889 - PointToPointNetDevive: In some cases MacTxDrop trace is not called - Bug 1890 - UdpClientTrace: MPEG frame size is squeezed into (insufficient) 16 bit integer - Bug 1891 - UdpSocketImpl::GetSockName doesn't return the IPv6 address diff --git a/src/propagation/model/cost231-propagation-loss-model.cc b/src/propagation/model/cost231-propagation-loss-model.cc index 2ba8c5256..4f100708c 100644 --- a/src/propagation/model/cost231-propagation-loss-model.cc +++ b/src/propagation/model/cost231-propagation-loss-model.cc @@ -166,15 +166,18 @@ Cost231PropagationLossModel::GetLoss (Ptr a, Ptr b return 0.0; } - double log_f = std::log (m_frequency / 1000000000) / 2.302; - double C_H = 0.8 + ((1.11 * log_f) - 0.7) * m_SSAntennaHeight - (1.56 * log_f); - double log_BSH = std::log (m_BSAntennaHeight) / 2.303; + double frequency_MHz = m_frequency * 1e-6; + + double distance_km = distance * 1e-3; + + double C_H = 0.8 + ((1.11 * std::log10(frequency_MHz)) - 0.7) * m_SSAntennaHeight - (1.56 * std::log10(frequency_MHz)); // from the COST231 wiki entry - // 2.303 is for the logarithm base change + // See also http://www.lx.it.pt/cost231/final_report.htm + // Ch. 4, eq. 4.4.3, pg. 135 - double loss_in_db = 46.3 + (33.9 * log_f) - (13.82 * log_BSH) - C_H + ((44.9 - 6.55 * log_BSH) * std::log (distance) - / 2.303) + C + m_shadowing; + double loss_in_db = 46.3 + (33.9 * std::log10(frequency_MHz)) - (13.82 * std::log10 (m_BSAntennaHeight)) - C_H + + ((44.9 - 6.55 * std::log10 (m_BSAntennaHeight)) * std::log10 (distance_km)) + C + m_shadowing; NS_LOG_DEBUG ("dist =" << distance << ", Path Loss = " << loss_in_db);