Bugzilla – Bug 1885
WifiSpectrumValue5MhzFactory::CreateRfFilter does not align with the used 5Mhz SpectrumModel
Last modified: 2014-03-17 08:56:22 UTC
Assuming the channel in CreateRfFilter(uint32_t channel) represents the same channel in CreateTxPowerSpectralDensity (double txPower, uint32_t channel), then the configuration of the filter: (*rf)[channel - 1] = 1; (*rf)[channel ] = 1; (*rf)[channel + 1] = 1; (*rf)[channel + 2] = 1; should be with an offset as in CreateTxPowerSpectralDensity: (*txPsd)[channel + 3] = 1; (*txPsd)[channel + 4] = 1; (*txPsd)[channel + 5] = 1; (*txPsd)[channel + 6] = 1;
Hi Taqi, you're right, the implementation of CeateRfFilter() is inconsistent. Anyway, there is currently no code using this method. Do you have a use case for it? If so, it would make sense to fix the implementation. Otherwise, I would just remove it.
Actually I use WifiSpectrumValue5MhzFactory to generate Spectrum Values and Rf Filters for a spectrum sensor implementation I am working on. I can re-implement the functionality though, if you see it is not worth keeping in ns-3 code.
Well if there is at least one person finding it useful it makes sense to keep it! I just fixed it in changeset ad359a6b7e7d.