merge
authorNicola Baldo <nbaldo@cttc.es>
Tue, 09 Apr 2013 11:21:32 +0200
changeset 9688 17f49271f94f
parent 9684 53599b6a2e30 (current diff)
parent 9687 a5f50a5bb6f6 (diff)
child 9689 43cf4176edb8
merge
src/lte/model/lte-ue-phy.cc
--- a/src/lte/model/lte-ue-phy.cc	Sun Apr 07 23:15:04 2013 +0200
+++ b/src/lte/model/lte-ue-phy.cc	Tue Apr 09 11:21:32 2013 +0200
@@ -465,11 +465,17 @@
       Values::const_iterator it;
       for (it = m_rsReceivedPower.ConstValuesBegin (); it != m_rsReceivedPower.ConstValuesEnd (); it++)
         {
-          sum += (*it);
+          // convert PSD [W/Hz] to linear power [W] for the single RE
+          // we consider only one RE for the RS since the channel is
+          // flat within the same RB
+          double powerTxW = ((*it) * 180000.0) / 12.0;
+          sum += powerTxW;
           rbNum++;
         }
       double rsrp = sum / (double)rbNum;
       // averaged SINR among RBs
+      sum = 0.0;
+      rbNum = 0;
       for (it = sinr.ConstValuesBegin (); it != sinr.ConstValuesEnd (); it++)
         {
           sum += (*it);