The power delay profile returned by propagation models. More...
#include "uan-prop-model.h"
Public Types | |
typedef std::vector< Tap >::const_iterator | Iterator |
Convenience iterator typedef. More... | |
Public Member Functions | |
UanPdp () | |
Create empty PDP object. More... | |
UanPdp (std::vector< double > arrivals, Time resolution) | |
Create PDP object from real valued arrival amplitudes. More... | |
UanPdp (std::vector< std::complex< double > > arrivals, Time resolution) | |
Create PDP object from vector of arrival amplitudes. More... | |
UanPdp (std::vector< Tap > taps, Time resolution) | |
Create PDP object from a vector of Tap objects. More... | |
~UanPdp () | |
Dummy destructor, see DoDispose. More... | |
Iterator | GetBegin (void) const |
Get the beginning of the tap vector. More... | |
Iterator | GetEnd (void) const |
Get the end of the tap list (one beyond the last entry). More... | |
uint32_t | GetNTaps (void) const |
Get the number of taps. More... | |
Time | GetResolution (void) const |
Get the delay time resolution (time duration between arrivals). More... | |
const Tap & | GetTap (uint32_t i) const |
Get the Tap at the specified delay index. More... | |
UanPdp | NormalizeToSumNc (void) const |
Creates a new UanPdp normalized to its non coherent sum. More... | |
void | SetNTaps (uint32_t nTaps) |
Resize the tap vector. More... | |
void | SetResolution (Time resolution) |
Set the time duration (resolution) between arrivals. More... | |
void | SetTap (std::complex< double > arrival, uint32_t index) |
Set the arrival value for a tap. More... | |
std::complex< double > | SumTapsC (Time begin, Time end) const |
Compute the coherent sum of tap amplitudes between a start and end time. More... | |
std::complex< double > | SumTapsFromMaxC (Time delay, Time duration) const |
Compute the coherent sum of tap amplitudes starting after a delay from the maximum amplitude for a total duration. More... | |
double | SumTapsFromMaxNc (Time delay, Time duration) const |
Compute the non-coherent sum of tap amplitudes starting after a delay from the maximum amplitude for a total time duration. More... | |
double | SumTapsNc (Time begin, Time end) const |
Compute the non-coherent sum of tap amplitudes between a start and end time. More... | |
Static Public Member Functions | |
static UanPdp | CreateImpulsePdp (void) |
Get a unit impulse PDP at time 0. More... | |
Private Attributes | |
Time | m_resolution |
The time resolution. More... | |
std::vector< Tap > | m_taps |
The vector of Taps. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const UanPdp &pdp) |
Writes PDP to stream as list of arrivals. More... | |
std::istream & | operator>> (std::istream &is, UanPdp &pdp) |
Reads in list of arrivals from stream is. More... | |
The power delay profile returned by propagation models.
Container class to describe power delay profile returned from UAN propagation models using tapped delay line model. This should model a channel impulse response as a set of equally spaced signal arrivals.
Generally, the profile should be normalized, such that the sum of all taps should equal 1. The received signal power on any interval (t1, t2) can then be found from summing the taps on the interval and multiplying by the total received power at the receiver.
Definition at line 91 of file uan-prop-model.h.
typedef std::vector<Tap>::const_iterator ns3::UanPdp::Iterator |
Convenience iterator typedef.
Definition at line 97 of file uan-prop-model.h.
ns3::UanPdp::UanPdp | ( | ) |
Create empty PDP object.
Definition at line 108 of file uan-prop-model.cc.
Referenced by NormalizeToSumNc().
Create PDP object from a vector of Tap objects.
taps | Taps to include in this PDP. |
resolution | Resolution of PDP object. |
Definition at line 113 of file uan-prop-model.cc.
ns3::UanPdp::UanPdp | ( | std::vector< std::complex< double > > | arrivals, |
Time | resolution | ||
) |
Create PDP object from vector of arrival amplitudes.
arrivals | Vector of complex amplitude arrivals. |
resolution | Time duration between arrivals in vector. |
Definition at line 119 of file uan-prop-model.cc.
References m_resolution, m_taps, and ns3::Seconds().
ns3::UanPdp::UanPdp | ( | std::vector< double > | arrivals, |
Time | resolution | ||
) |
Create PDP object from real valued arrival amplitudes.
arrivals | Vector of real valued arrivals. |
resolution | Time duration between arrivals in vector. |
Definition at line 131 of file uan-prop-model.cc.
References m_resolution, m_taps, and ns3::Seconds().
ns3::UanPdp::~UanPdp | ( | ) |
Dummy destructor, see DoDispose.
Definition at line 143 of file uan-prop-model.cc.
References m_taps.
|
static |
Get a unit impulse PDP at time 0.
Definition at line 352 of file uan-prop-model.cc.
References ns3::Seconds(), SetResolution(), and SetTap().
Referenced by ns3::UanPropModelIdeal::GetPdp(), and ns3::UanPropModelThorp::GetPdp().
UanPdp::Iterator ns3::UanPdp::GetBegin | ( | void | ) | const |
Get the beginning of the tap vector.
Definition at line 176 of file uan-prop-model.cc.
References m_taps.
Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().
UanPdp::Iterator ns3::UanPdp::GetEnd | ( | void | ) | const |
Get the end of the tap list (one beyond the last entry).
Definition at line 182 of file uan-prop-model.cc.
References m_taps.
Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().
uint32_t ns3::UanPdp::GetNTaps | ( | void | ) | const |
Get the number of taps.
Definition at line 188 of file uan-prop-model.cc.
References m_taps.
Referenced by GetTap(), NormalizeToSumNc(), SumTapsC(), SumTapsFromMaxC(), SumTapsFromMaxNc(), and SumTapsNc().
Time ns3::UanPdp::GetResolution | ( | void | ) | const |
Get the delay time resolution (time duration between arrivals).
Definition at line 194 of file uan-prop-model.cc.
References m_resolution.
const Tap & ns3::UanPdp::GetTap | ( | uint32_t | i | ) | const |
Get the Tap at the specified delay index.
i | Index number of tap to return (0 based). |
Definition at line 160 of file uan-prop-model.cc.
References GetNTaps(), m_taps, and NS_ASSERT_MSG.
Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().
UanPdp ns3::UanPdp::NormalizeToSumNc | ( | void | ) | const |
Creates a new UanPdp normalized to its non coherent sum.
Definition at line 333 of file uan-prop-model.cc.
References UanPdp(), GetNTaps(), m_resolution, and m_taps.
void ns3::UanPdp::SetNTaps | ( | uint32_t | nTaps | ) |
Resize the tap vector.
nTaps | Number of taps in this PDP |
Definition at line 166 of file uan-prop-model.cc.
References m_taps.
void ns3::UanPdp::SetResolution | ( | Time | resolution | ) |
Set the time duration (resolution) between arrivals.
resolution | The resolution. |
Definition at line 171 of file uan-prop-model.cc.
References m_resolution.
Referenced by CreateImpulsePdp().
void ns3::UanPdp::SetTap | ( | std::complex< double > | arrival, |
uint32_t | index | ||
) |
Set the arrival value for a tap.
The delay time is the index multiplied by the resolution. The tap vector will be expanded to accommodate the requested index.
arrival | Complex arrival value. |
index | Index of arrival. |
Definition at line 149 of file uan-prop-model.cc.
References m_resolution, and m_taps.
Referenced by CreateImpulsePdp().
Compute the coherent sum of tap amplitudes between a start and end time.
Assuming that Tap at index 0 arrives at time 0, this function sums coherently (sums amplitude of arrivals considering phase difference) all arrivals between a start and end time.
Definition at line 302 of file uan-prop-model.cc.
References GetNTaps(), m_resolution, m_taps, min, NS_ASSERT_MSG, and ns3::Seconds().
Compute the coherent sum of tap amplitudes starting after a delay from the maximum amplitude for a total duration.
this function sums coherently (sums amplitude of arrivals considering phase difference) all arrivals in a given duration starting the given time after the maximum amplitude arrival received
delay | Time duratation after max to begin summing arrivals. |
duration | Time duration to sum arrivals for. |
Definition at line 200 of file uan-prop-model.cc.
References GetNTaps(), ns3::Time::IsZero(), m_resolution, m_taps, min, NS_ASSERT_MSG, ns3::Seconds(), and visualizer.core::start().
Compute the non-coherent sum of tap amplitudes starting after a delay from the maximum amplitude for a total time duration.
This function sums non-coherently (sums amplitude of arrivals ignoring phase difference) all arrivals in a given duration starting the given time after the maximum amplitude arrival received.
delay | Time duratation after max to begin summing arrivals. |
duration | Time duration to sum arrivals for. |
Definition at line 233 of file uan-prop-model.cc.
References GetNTaps(), ns3::Time::IsZero(), m_resolution, m_taps, min, NS_ASSERT_MSG, ns3::Seconds(), and visualizer.core::start().
Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().
Compute the non-coherent sum of tap amplitudes between a start and end time.
Assuming that Tap at index 0 arrives at time 0, this function sums non-coherently (sums amplitude of arrivals ignoring phase difference) all arrivals between a start and end time.
Definition at line 269 of file uan-prop-model.cc.
References GetNTaps(), m_resolution, m_taps, min, NS_ASSERT_MSG, and ns3::Seconds().
Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().
|
friend |
Writes PDP to stream as list of arrivals.
os | The output stream. |
pdp | The PDP. |
Definition at line 29 of file uan-prop-model.cc.
|
friend |
Reads in list of arrivals from stream is.
is | The input stream. |
pdp | The PDP variable to set. |
Definition at line 44 of file uan-prop-model.cc.
|
private |
The time resolution.
Definition at line 254 of file uan-prop-model.h.
Referenced by UanPdp(), GetResolution(), NormalizeToSumNc(), SetResolution(), SetTap(), SumTapsC(), SumTapsFromMaxC(), SumTapsFromMaxNc(), and SumTapsNc().
|
private |
The vector of Taps.
Definition at line 253 of file uan-prop-model.h.
Referenced by UanPdp(), ~UanPdp(), GetBegin(), GetEnd(), GetNTaps(), GetTap(), NormalizeToSumNc(), SetNTaps(), SetTap(), SumTapsC(), SumTapsFromMaxC(), SumTapsFromMaxNc(), and SumTapsNc().