This example is a modified version of "three-gpp-channel-example", to include the 3GPP NTN channel model. More...
#include "ns3/channel-condition-model.h"
#include "ns3/constant-position-mobility-model.h"
#include "ns3/core-module.h"
#include "ns3/geocentric-constant-position-mobility-model.h"
#include "ns3/isotropic-antenna-model.h"
#include "ns3/mobility-model.h"
#include "ns3/net-device.h"
#include "ns3/node-container.h"
#include "ns3/node.h"
#include "ns3/parabolic-antenna-model.h"
#include "ns3/simple-net-device.h"
#include "ns3/spectrum-signal-parameters.h"
#include "ns3/three-gpp-channel-model.h"
#include "ns3/three-gpp-propagation-loss-model.h"
#include "ns3/three-gpp-spectrum-propagation-loss-model.h"
#include "ns3/uniform-planar-array.h"
#include <ns3/antenna-model.h>
#include <fstream>
Go to the source code of this file.
Classes | |
struct | ComputeSnrParams |
A structure that holds the parameters for the ComputeSnr function. More... | |
Functions | |
static void | ComputeSnr (ComputeSnrParams ¶ms) |
Compute the average SNR. | |
Ptr< SpectrumValue > | CreateNoisePowerSpectralDensity (double fcHz, double noiseFigureDb, double bwHz, double rbWidthHz) |
Create the noise PSD for the. | |
Ptr< SpectrumValue > | CreateTxPowerSpectralDensity (double fcHz, double pwrDbm, double bwHz, double rbWidthHz) |
Create the PSD for the TX. | |
static void | DoBeamforming (Ptr< NetDevice > thisDevice, Ptr< PhasedArrayModel > thisAntenna, Ptr< NetDevice > otherDevice) |
Perform the beamforming using the DFT beamforming method. | |
Variables | |
static Ptr< ThreeGppPropagationLossModel > | m_propagationLossModel |
the PropagationLossModel object | |
static Ptr< ThreeGppSpectrumPropagationLossModel > | m_spectrumLossModel |
the SpectrumPropagationLossModel object | |
static std::ofstream | resultsFile |
The results file. | |
This example is a modified version of "three-gpp-channel-example", to include the 3GPP NTN channel model.
Specifically, most changes (which are also highlighted throughout the code) impact the main method, and comprise:
Definition in file three-gpp-ntn-channel-example.cc.
|
static |
Compute the average SNR.
params | A structure that holds the parameters that are needed to perform calculations in ComputeSnr |
Definition at line 248 of file three-gpp-ntn-channel-example.cc.
References ns3::ConstCast(), ns3::Create(), CreateNoisePowerSpectralDensity(), CreateTxPowerSpectralDensity(), ns3::Time::GetSeconds(), m_propagationLossModel, m_spectrumLossModel, ns3::Simulator::Now(), NS_ASSERT_MSG, NS_LOG_DEBUG, resultsFile, and ns3::Sum().
Ptr< SpectrumValue > CreateNoisePowerSpectralDensity | ( | double | fcHz, |
double | noiseFigureDb, | ||
double | bwHz, | ||
double | rbWidthHz ) |
Create the noise PSD for the.
fcHz | the carrier frequency in Hz |
noiseFigureDb | the noise figure in dB |
bwHz | the bandwidth in Hz |
rbWidthHz | the Resource Block (RB) width in Hz |
Definition at line 107 of file three-gpp-ntn-channel-example.cc.
References ns3::Create(), ns3::BandInfo::fc, ns3::BandInfo::fh, and ns3::BandInfo::fl.
Referenced by ComputeSnr().
Ptr< SpectrumValue > CreateTxPowerSpectralDensity | ( | double | fcHz, |
double | pwrDbm, | ||
double | bwHz, | ||
double | rbWidthHz ) |
Create the PSD for the TX.
fcHz | the carrier frequency in Hz |
pwrDbm | the transmission power in dBm |
bwHz | the bandwidth in Hz |
rbWidthHz | the Resource Block (RB) width in Hz |
Definition at line 64 of file three-gpp-ntn-channel-example.cc.
References ns3::Create(), ns3::BandInfo::fc, ns3::BandInfo::fh, and ns3::BandInfo::fl.
Referenced by ComputeSnr().
|
static |
Perform the beamforming using the DFT beamforming method.
thisDevice | the device performing the beamforming |
thisAntenna | the antenna object associated to thisDevice |
otherDevice | the device towards which point the beam |
Definition at line 203 of file three-gpp-ntn-channel-example.cc.
References ns3::Angles::GetAzimuth(), and ns3::Angles::GetInclination().
|
static |
the PropagationLossModel object
Definition at line 48 of file three-gpp-ntn-channel-example.cc.
Referenced by ComputeSnr().
|
static |
the SpectrumPropagationLossModel object
Definition at line 50 of file three-gpp-ntn-channel-example.cc.
Referenced by ComputeSnr().
|
static |
The results file.
Definition at line 51 of file three-gpp-ntn-channel-example.cc.
Referenced by ComputeSnr().