Bug 895 - SimpleOfdmWimaxPhy SNR computation
SimpleOfdmWimaxPhy SNR computation
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wimax
pre-release
All All
: P3 major
Assigned To: Mohamed Amine ISMAIL
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-26 10:02 EDT by Tom Henderson
Modified: 2010-04-30 13:16 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2010-04-26 10:02:39 EDT
line 336 in simple-ofdm-wimax-phy.cc:

 double Nwb = -114 + m_noiseFigure + 10 * log (GetBandwidth () / 1000000000) / 2.303;

leads to integer division before the log is taken, since GetBandwidth () returns an integer.  

The argument to log() needs to be turned into a floating point number, such as changing the divisor to 1000000000.0
Comment 1 Tom Henderson 2010-04-26 10:11:12 EDT
(In reply to comment #0)

> 
> The argument to log() needs to be turned into a floating point number, such as
> changing the divisor to 1000000000.0

(more precisely, the division needs to be turned into floating point)
Comment 2 Josh Pelkey 2010-04-29 13:36:39 EDT
(In reply to comment #1)
> (In reply to comment #0)
> 
> > 
> > The argument to log() needs to be turned into a floating point number, such as
> > changing the divisor to 1000000000.0
> 
> (more precisely, the division needs to be turned into floating point)

Amine, +1 on this one?  I can only push a change for this as late as Saturday morning.
Comment 3 Mohamed Amine ISMAIL 2010-04-30 04:50:06 EDT
+1
Comment 4 Josh Pelkey 2010-04-30 13:16:52 EDT
changeset 533be42b3c7f