src/lte/model/lte-enb-phy.cc
changeset 7950 4a4009fdd6b8
parent 7949 3bf9450ac03f
parent 7947 4ed7cfac199d
child 7953 1db2126cb7c9
--- a/src/lte/model/lte-enb-phy.cc	Wed Apr 06 14:48:55 2011 +0200
+++ b/src/lte/model/lte-enb-phy.cc	Wed Apr 06 14:50:49 2011 +0200
@@ -33,6 +33,7 @@
 #include "ideal-control-messages.h"
 #include "lte-enb-net-device.h"
 #include "lte-enb-mac.h"
+#include <ns3/lte-common.h>
 
 
 NS_LOG_COMPONENT_DEFINE ("LteEnbPhy");
@@ -419,8 +420,11 @@
   int i = 0;
   for (it = sinr.ConstValuesBegin (); it != sinr.ConstValuesEnd (); it++)
   {
-    ulcqi.m_sinr.push_back ((*it));
-    //NS_LOG_DEBUG(this << " RB " << i << " SINR " << (*it));
+  	double sinrdb = 10*log10 ((*it));
+ 	  // convert from double to fixed point notation Sxxxxxxxxxxx.xxx
+ 	  int16_t sinrFp = LteFfConverter::double2fpS11dot3 (sinrdb);
+    ulcqi.m_sinr.push_back (sinrFp);
+    //NS_LOG_DEBUG(this << " RB " << i << " SINR FP " << sinrFp << " orig " << sinrdb);
     i++;
   }
   return (ulcqi);