Bug 1055 - Wrong UAN's Thorp absorption loss model formula

This commit is contained in:
Andrea Sacco committed 2011-11-12 12:33:47 +01:00
1 parent 6660edb884
commit 1def3df2ec
2 files changed
+12 -4

No files matched your search

+11 -4
View File
@@ -54,10 +54,10 @@ UanPropModelThorp::GetTypeId (void)
double
UanPropModelThorp::GetPathLossDb (Ptr<MobilityModel> a, Ptr<MobilityModel> b, UanTxMode mode)
{
double distKyd = a->GetDistanceFrom (b) / 1.093613298; // Convert from dB/km to dB/kyd
double dist = a->GetDistanceFrom (b);
return m_SpreadCoef * 10.0 * log10 (distKyd)
+ distKyd * GetAttenDbKyd (mode.GetCenterFreqHz () / 1000.0);
return m_SpreadCoef * 10.0 * log10 (dist)
+ dist * GetAttenDbKm (mode.GetCenterFreqHz () / 1000.0);
}
UanPdp
@@ -74,12 +74,19 @@ UanPropModelThorp::GetDelay (Ptr<MobilityModel> a, Ptr<MobilityModel> b, UanTxMo
double
UanPropModelThorp::GetAttenDbKyd (double freqKhz)
{
return GetAttenDbKm (freqKhz) / 1.093613298;
}
double
UanPropModelThorp::GetAttenDbKm (double freqKhz)
{
double fsq = freqKhz * freqKhz;
double atten;
if (freqKhz < 0.4)
if (freqKhz >= 0.4)
{
atten = 0.11 * fsq / (1 + fsq) + 44 * fsq / (4100 + freqKhz)
+ 2.75 * 0.0001 * fsq + 0.003;
+1
View File
@@ -45,6 +45,7 @@ public:
private:
double GetAttenDbKyd (double freqKhz);
double GetAttenDbKm (double freqKhz);
double m_SpreadCoef;
};