Bug 1504 - Possible wrong calculations in the received Power
Possible wrong calculations in the received Power
Status: RESOLVED INVALID
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3.13
All All
: P5 major
Assigned To: Nicola Baldo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-15 22:30 UTC by abdo4444
Modified: 2012-09-16 05:20 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description abdo4444 2012-09-15 22:30:07 UTC
In the method: YansWifiPhy::StartReceivePacket {....
  rxPowerDbm += m_rxGainDb;
....
}

rxPowerDbm is calculated in terms of (Dbm) while the rxGainDb is by default initialized in terms of (Db). To the best of my knowledge a signal power represented in terms of (Dbm) does not equal the same value represented in terms of (Dbm).

I believe we need to convert them into single unit before the addition, since a value of x in (dbm) = value of x in (db) + 30

Since db is calculated with One Watt as a reference while dbm is calculated with One MilliWatt as a reference value ( in the denominator).
Comment 1 Nicola Baldo 2012-09-16 05:20:15 UTC
It's correct to have gain in units of dB and powers in dBm, because in linear scale powers are in W, but gains are just scalars with no unit.
You're confusing dB with dBW, in fact the formula you gave is for conversion from dBW to dBm.  
Hence I am closing this bug as invalid.