Bug 1526 - Wrong calculation of pathloss within UanPropModelThorp::GetPathLossDb (...)
Wrong calculation of pathloss within UanPropModelThorp::GetPathLossDb (...)
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: uan
ns-3.15
All All
: P5 blocker
Assigned To: Andrea Sacco
:
: 1538 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-07 06:08 UTC by Federico Guerra
Modified: 2012-11-28 00:18 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Federico Guerra 2012-11-07 06:08:20 UTC
Within this function the distance is obtained in meters, but a piece of the calculation should be done in kilometers, as hinted by the function GetAttenDbKm (). 


-----------------
HINTED SOLUTION: 
--------------------
double
UanPropModelThorp::GetPathLossDb (Ptr<MobilityModel> a, Ptr<MobilityModel> b, UanTxMode mode)
{
  double dist = a->GetDistanceFrom (b);
  
  return m_SpreadCoef * 10.0 * std::log10 (dist)
         + dist/1000.0 * GetAttenDbKm (mode.GetCenterFreqHz () / 1000.0);
}
Comment 1 Federico Guerra 2012-11-07 06:12:14 UTC
I set the importance to blocker since this bug could invalidate any paper/research done with UAN.
Comment 2 Andrea Sacco 2012-11-09 04:24:13 UTC
Fixed: changeset 9129
Comment 3 Tom Henderson 2012-11-28 00:18:20 UTC
*** Bug 1538 has been marked as a duplicate of this bug. ***