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

(-)a/src/wimax/model/simple-ofdm-wimax-phy.cc (-3 / +2 lines)
 Lines 342-348    Link Here 
342
                                  Ptr<PacketBurst> burst)
342
                                  Ptr<PacketBurst> burst)
343
{
343
{
344
344
345
  UniformVariable URNG;
346
  uint8_t drop = 0;
345
  uint8_t drop = 0;
347
  double Nwb = -114 + m_noiseFigure + 10 * log (GetBandwidth () / 1000000000.0) / 2.303;
346
  double Nwb = -114 + m_noiseFigure + 10 * log (GetBandwidth () / 1000000000.0) / 2.303;
348
  double SNR = rxPower - Nwb;
347
  double SNR = rxPower - Nwb;
 Lines 351-359    Link Here 
351
  double I1 = record->GetI1 ();
350
  double I1 = record->GetI1 ();
352
  double I2 = record->GetI2 ();
351
  double I2 = record->GetI2 ();
353
352
354
  double blockErrorRate = URNG.GetValue (I1, I2);
353
  double blockErrorRate = m_rng.GetValue (I1, I2);
355
354
356
  double rand = URNG.GetValue (0.0, 1.0);
355
  double rand = m_rng.GetValue (0.0, 1.0);
357
356
358
  if (rand < blockErrorRate)
357
  if (rand < blockErrorRate)
359
    {
358
    {
(-)a/src/wimax/model/simple-ofdm-wimax-phy.h (+2 lines)
 Lines 27-32    Link Here 
27
#include "ns3/callback.h"
27
#include "ns3/callback.h"
28
#include "ns3/nstime.h"
28
#include "ns3/nstime.h"
29
#include "ns3/event-id.h"
29
#include "ns3/event-id.h"
30
#include "ns3/random-variable.h"
30
#include "wimax-phy.h"
31
#include "wimax-phy.h"
31
#include "bvec.h"
32
#include "bvec.h"
32
#include "ns3/snr-to-block-error-rate-manager.h"
33
#include "ns3/snr-to-block-error-rate-manager.h"
 Lines 256-261    Link Here 
256
  double m_noiseFigure;
257
  double m_noiseFigure;
257
  double m_txGain;
258
  double m_txGain;
258
  double m_rxGain;
259
  double m_rxGain;
260
  UniformVariable m_rng;
259
  /**
261
  /**
260
   * The trace source fired when a packet begins the transmission process on
262
   * The trace source fired when a packet begins the transmission process on
261
   * the medium.
263
   * the medium.

Return to bug 1217