wifi: Cleanup unused functions in WifiSpectrumValueHelper
This commit is contained in:
committed by
Sébastien Deronne
parent
67f517faa3
commit
ac7a5074b5
@@ -23,6 +23,8 @@
|
||||
|
||||
#include "wifi-spectrum-value-helper.h"
|
||||
|
||||
#include "wifi-utils.h"
|
||||
|
||||
#include "ns3/assert.h"
|
||||
#include "ns3/fatal-error.h"
|
||||
#include "ns3/log.h"
|
||||
@@ -689,37 +691,6 @@ WifiSpectrumValueHelper::CreateHeMuOfdmTxPowerSpectralDensity(
|
||||
return c;
|
||||
}
|
||||
|
||||
Ptr<SpectrumValue>
|
||||
WifiSpectrumValueHelper::CreateNoisePowerSpectralDensity(uint16_t centerFrequency,
|
||||
ChannelWidthMhz channelWidth,
|
||||
uint32_t carrierSpacing,
|
||||
double noiseFigure,
|
||||
ChannelWidthMhz guardBandwidth)
|
||||
{
|
||||
Ptr<SpectrumModel> model =
|
||||
GetSpectrumModel({centerFrequency}, channelWidth, carrierSpacing, guardBandwidth);
|
||||
return CreateNoisePowerSpectralDensity(noiseFigure, model);
|
||||
}
|
||||
|
||||
Ptr<SpectrumValue>
|
||||
WifiSpectrumValueHelper::CreateNoisePowerSpectralDensity(double noiseFigureDb,
|
||||
Ptr<SpectrumModel> spectrumModel)
|
||||
{
|
||||
NS_LOG_FUNCTION(noiseFigureDb << spectrumModel);
|
||||
|
||||
// see "LTE - From theory to practice"
|
||||
// Section 22.4.4.2 Thermal Noise and Receiver Noise Figure
|
||||
const double kT_dBm_Hz = -174.0; // dBm/Hz
|
||||
double kT_W_Hz = DbmToW(kT_dBm_Hz);
|
||||
double noiseFigureLinear = std::pow(10.0, noiseFigureDb / 10.0);
|
||||
double noisePowerSpectralDensity = kT_W_Hz * noiseFigureLinear;
|
||||
|
||||
Ptr<SpectrumValue> noisePsd = Create<SpectrumValue>(spectrumModel);
|
||||
(*noisePsd) = noisePowerSpectralDensity;
|
||||
NS_LOG_INFO("NoisePowerSpectralDensity has integrated power of " << Integral(*noisePsd));
|
||||
return noisePsd;
|
||||
}
|
||||
|
||||
void
|
||||
WifiSpectrumValueHelper::CreateSpectrumMaskForOfdm(
|
||||
Ptr<SpectrumValue> c,
|
||||
@@ -1132,12 +1103,6 @@ WifiSpectrumValueHelper::NormalizeSpectrumMask(Ptr<SpectrumValue> c, double txPo
|
||||
}
|
||||
}
|
||||
|
||||
double
|
||||
WifiSpectrumValueHelper::DbmToW(double dBm)
|
||||
{
|
||||
return std::pow(10.0, 0.1 * (dBm - 30.0));
|
||||
}
|
||||
|
||||
double
|
||||
WifiSpectrumValueHelper::GetBandPowerW(Ptr<SpectrumValue> psd,
|
||||
const std::vector<WifiSpectrumBandIndices>& segments)
|
||||
|
||||
@@ -238,34 +238,6 @@ class WifiSpectrumValueHelper
|
||||
ChannelWidthMhz guardBandwidth,
|
||||
const std::vector<WifiSpectrumBandIndices>& ru);
|
||||
|
||||
/**
|
||||
* Create a power spectral density corresponding to the noise
|
||||
*
|
||||
* \param centerFrequency center frequency (MHz)
|
||||
* \param channelWidth channel width (MHz)
|
||||
* \param carrierSpacing carrier spacing (Hz)
|
||||
* \param noiseFigure the noise figure in dB w.r.t. a reference temperature of 290K
|
||||
* \param guardBandwidth width of the guard band (MHz)
|
||||
* \return a pointer to a newly allocated SpectrumValue representing the noise Power Spectral
|
||||
* Density in W/Hz for each Band
|
||||
*/
|
||||
static Ptr<SpectrumValue> CreateNoisePowerSpectralDensity(uint16_t centerFrequency,
|
||||
ChannelWidthMhz channelWidth,
|
||||
uint32_t carrierSpacing,
|
||||
double noiseFigure,
|
||||
ChannelWidthMhz guardBandwidth);
|
||||
|
||||
/**
|
||||
* Create a thermal noise power spectral density
|
||||
*
|
||||
* \param noiseFigure the noise figure
|
||||
* \param spectrumModel the spectrum model
|
||||
* \return a pointer to a newly allocated SpectrumValue representing the noise Power Spectral
|
||||
* Density in W/Hz corresponding to thermal noise, for each Band
|
||||
*/
|
||||
static Ptr<SpectrumValue> CreateNoisePowerSpectralDensity(double noiseFigure,
|
||||
Ptr<SpectrumModel> spectrumModel);
|
||||
|
||||
/**
|
||||
* Create a transmit power spectral density corresponding to OFDM
|
||||
* transmit spectrum mask requirements for 11a/11g/11n/11ac/11ax
|
||||
@@ -333,17 +305,6 @@ class WifiSpectrumValueHelper
|
||||
*/
|
||||
static void NormalizeSpectrumMask(Ptr<SpectrumValue> c, double txPowerW);
|
||||
|
||||
/**
|
||||
* Convert from dBm to Watts.
|
||||
* Taken from wifi-utils since the original method couldn't be called from here
|
||||
* due to resulting circular dependencies of spectrum and wifi modules.
|
||||
*
|
||||
* \param dbm the power in dBm
|
||||
*
|
||||
* \return the equivalent Watts for the given dBm
|
||||
*/
|
||||
static double DbmToW(double dbm);
|
||||
|
||||
/**
|
||||
* Calculate the power of the specified band composed of uniformly-sized sub-bands.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user