static const double DelaySpread[20] = {0, 3e-9, 4e-9, 5e-9, 5e-9, 6e-9, 7e-9, 7e-9, 7e-9, 17e-9,
18e-9, 20e-9, 23e-9, 24e-9, 26e-9, 38e-9, 40e-9, 42e-9, 45e-9, 50e-9};
static const double DopplerShift[20] = {0.73, 0.78, 0.68, 0.71, 0.79, 0.69, 0.66, 0.70, 0.69, 0.44,
0.48, 0.43, 0.42, 0.47,0.50, 0.53, 0.52, 0.49, 0.55, 0.52};
MmWaveBeamforming::MmWaveBeamforming (uint32_t enbAntenna, uint32_t ueAntenna)
:m_pathNum (20),
m_enbAntennaSize(enbAntenna),
m_ueAntennaSize(ueAntenna),
m_longTermUpdatePeriod (0),
m_smallScale (true),
m_fixSpeed (false),
m_ueSpeed (0.0),
m_update(true)
{
if (g_smallScaleFadingInstance.empty ())
LoadFile();
m_uniformRV = CreateObject ();
}
TypeId
MmWaveBeamforming::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::MmWaveBeamforming")
.SetParent ()
.AddAttribute ("LongTermUpdatePeriod",
"Time (ms) between periodic updating of channel matrix/beamforming vectors",
TimeValue (MilliSeconds (100.0)),
MakeTimeAccessor (&MmWaveBeamforming::m_longTermUpdatePeriod),
MakeTimeChecker ())
.AddAttribute ("SmallScaleFading",
"Enable small scale fading",
BooleanValue (true),
MakeBooleanAccessor (&MmWaveBeamforming::m_smallScale),
MakeBooleanChecker ())
.AddAttribute ("FixSpeed",
"Set a fixed speed (even if constant position) so doppler > 0 for testing",
BooleanValue (false),
MakeBooleanAccessor (&MmWaveBeamforming::m_fixSpeed),
MakeBooleanChecker ())
.AddAttribute ("UeSpeed",
"UE speed (m/s) for fixed speed test",
DoubleValue (0.0),
MakeDoubleAccessor (&MmWaveBeamforming::m_ueSpeed),
MakeDoubleChecker ())
;
return tid;
}
MmWaveBeamforming::~MmWaveBeamforming ()
{
}
void
MmWaveBeamforming::DoDispose ()
{
NS_LOG_FUNCTION (this);
}
void
MmWaveBeamforming::SetConfigurationParameters (Ptr ptrConfig)
{
m_phyMacConfig = ptrConfig;
}
Ptr
MmWaveBeamforming::GetConfigurationParameters (void) const
{
return m_phyMacConfig;
}