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

(-)a/src/lte/model/lte-spectrum-value-helper.cc (-5 / +4 lines)
 Lines 264-288    Link Here 
264
  Ptr<SpectrumValue> txPsd = Create <SpectrumValue> (model);
264
  Ptr<SpectrumValue> txPsd = Create <SpectrumValue> (model);
265
265
266
  // powerTx is expressed in dBm. We must convert it into natural unit.
266
  // powerTx is expressed in dBm. We must convert it into natural unit.
267
  double powerTxW = std::pow (10., (powerTx - 30) / 10);
268
  double basicPowerTxW = std::pow (10., (powerTx - 30) / 10);
267
  double basicPowerTxW = std::pow (10., (powerTx - 30) / 10);
269
268
  double basicTxPowerDensity = (basicPowerTxW / (txBandwidthConfiguration * 180000));
270
  double txPowerDensity = (powerTxW / (txBandwidthConfiguration * 180000));
271
269
272
  for (std::vector <int>::iterator it = activeRbs.begin (); it != activeRbs.end (); it++)
270
  for (std::vector <int>::iterator it = activeRbs.begin (); it != activeRbs.end (); it++)
273
    {
271
    {
274
      int rbId = (*it);
272
      int rbId = (*it);
275
273
276
      std::map<int, double>::iterator powerIt = powerTxMap.find (rbId);
274
      std::map<int, double>::iterator powerIt = powerTxMap.find (rbId);
275
      double txPowerDensity;
277
276
278
      if (powerIt != powerTxMap.end ())
277
      if (powerIt != powerTxMap.end ())
279
        {
278
        {
280
          powerTxW = std::pow (10., (powerIt->second - 30) / 10);
279
          double powerTxW = std::pow (10., (powerIt->second - 30) / 10);
281
          txPowerDensity = (powerTxW / (txBandwidthConfiguration * 180000));
280
          txPowerDensity = (powerTxW / (txBandwidthConfiguration * 180000));
282
        }
281
        }
283
      else
282
      else
284
        {
283
        {
285
          txPowerDensity = (basicPowerTxW / (txBandwidthConfiguration * 180000));
284
          txPowerDensity = basicTxPowerDensity;
286
        }
285
        }
287
286
288
      (*txPsd)[rbId] = txPowerDensity;
287
      (*txPsd)[rbId] = txPowerDensity;

Return to bug 2562