View | Details | Raw Unified | Return to bug 1888
Collapse All | Expand All

(-)a/src/propagation/model/cost231-propagation-loss-model.cc (-5 / +7 lines)
 Lines 168-182    Link Here 
168
      return 0.0;
168
      return 0.0;
169
    }
169
    }
170
170
171
  double log_f = std::log (m_frequency / 1000000000) / 2.302;
171
  double frequency_MHz = m_frequency * 1e-6;
172
  double C_H = 0.8 + ((1.11 * log_f) - 0.7) * m_SSAntennaHeight - (1.56 * log_f);
172
173
  double log_BSH = std::log (m_BSAntennaHeight) / 2.303;
173
  double distance_km = distance * 1e-3;
174
175
  double C_H = 0.8 + ((1.11 * std::log10(frequency_MHz)) - 0.7) * m_SSAntennaHeight - (1.56 * std::log10(frequency_MHz));
174
176
175
  // from the COST231 wiki entry
177
  // from the COST231 wiki entry
176
  // 2.303 is for the logarithm base change
178
  // 2.303 is for the logarithm base change
177
179
178
  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)
180
  double loss_in_db = 46.3 + (33.9 * std::log10(frequency_MHz)) - (13.82 * std::log10 (m_BSAntennaHeight)) - C_H
179
                                                                         / 2.303) + C + m_shadowing;
181
		  	  	  + ((44.9 - 6.55 * std::log10 (m_BSAntennaHeight)) * std::log10 (distance_km)) + C + m_shadowing;
180
182
181
  NS_LOG_DEBUG ("dist =" << distance << ", Path Loss = " << loss_in_db);
183
  NS_LOG_DEBUG ("dist =" << distance << ", Path Loss = " << loss_in_db);
182
184

Return to bug 1888