A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
jakes-process.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012 Telum (www.telum.ru)
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Kirill Andreev <andreev@telum.ru>, Alexander Sofronov <sofronov@telum.ru>
18
*/
19
#ifndef DOPPLER_PROCESS_H
20
#define DOPPLER_PROCESS_H
21
22
#include "ns3/nstime.h"
23
#include "ns3/object.h"
24
#include "ns3/random-variable-stream.h"
25
26
#include <complex>
27
28
namespace
ns3
29
{
30
class
PropagationLossModel;
31
class
JakesPropagationLossModel;
32
57
class
JakesProcess
:
public
Object
58
{
59
public
:
64
static
TypeId
GetTypeId
();
65
JakesProcess
();
66
~JakesProcess
()
override
;
67
72
std::complex<double>
GetComplexGain
()
const
;
77
double
GetChannelGainDb
()
const
;
78
83
void
SetPropagationLossModel
(
Ptr<const PropagationLossModel>
model);
84
85
protected
:
86
void
DoDispose
()
override
;
87
88
private
:
92
struct
Oscillator
93
{
100
Oscillator
(std::complex<double> amplitude,
double
initialPhase,
double
omega);
106
std::complex<double>
GetValueAt
(
Time
t)
const
;
107
108
std::complex<double>
109
m_amplitude
;
110
double
m_phase
;
111
double
m_omega
;
112
};
113
114
private
:
119
void
SetNOscillators
(
unsigned
int
nOscillators);
120
125
void
SetDopplerFrequencyHz
(
double
dopplerFrequencyHz);
126
130
void
ConstructOscillators
();
131
132
private
:
133
std::vector<Oscillator>
m_oscillators
;
134
double
m_omegaDopplerMax
;
135
unsigned
int
m_nOscillators
;
136
Ptr<UniformRandomVariable>
m_uniformVariable
;
137
Ptr<const JakesPropagationLossModel>
m_jakes
;
138
};
139
}
// namespace ns3
140
#endif
// DOPPLER_PROCESS_H
ns3::JakesProcess
Implementation for a single path Stationary Jakes propagation loss model.
Definition:
jakes-process.h:58
ns3::JakesProcess::JakesProcess
JakesProcess()
Definition:
jakes-process.cc:125
ns3::JakesProcess::m_uniformVariable
Ptr< UniformRandomVariable > m_uniformVariable
random stream
Definition:
jakes-process.h:136
ns3::JakesProcess::SetNOscillators
void SetNOscillators(unsigned int nOscillators)
Set the number of Oscillators to use.
Definition:
jakes-process.cc:88
ns3::JakesProcess::m_nOscillators
unsigned int m_nOscillators
number of oscillators
Definition:
jakes-process.h:135
ns3::JakesProcess::SetDopplerFrequencyHz
void SetDopplerFrequencyHz(double dopplerFrequencyHz)
Set the Doppler frequency.
Definition:
jakes-process.cc:94
ns3::JakesProcess::m_oscillators
std::vector< Oscillator > m_oscillators
Vector of oscillators.
Definition:
jakes-process.h:133
ns3::JakesProcess::~JakesProcess
~JakesProcess() override
Definition:
jakes-process.cc:131
ns3::JakesProcess::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
jakes-process.cc:137
ns3::JakesProcess::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
jakes-process.cc:54
ns3::JakesProcess::GetChannelGainDb
double GetChannelGainDb() const
Get the channel gain in dB.
Definition:
jakes-process.cc:155
ns3::JakesProcess::m_omegaDopplerMax
double m_omegaDopplerMax
max rotation speed Doppler frequency
Definition:
jakes-process.h:134
ns3::JakesProcess::GetComplexGain
std::complex< double > GetComplexGain() const
Get the channel complex gain.
Definition:
jakes-process.cc:144
ns3::JakesProcess::m_jakes
Ptr< const JakesPropagationLossModel > m_jakes
pointer to the propagation loss model
Definition:
jakes-process.h:137
ns3::JakesProcess::SetPropagationLossModel
void SetPropagationLossModel(Ptr< const PropagationLossModel > model)
Set the propagation model using this class.
Definition:
jakes-process.cc:74
ns3::JakesProcess::ConstructOscillators
void ConstructOscillators()
Builds the object Oscillators.
Definition:
jakes-process.cc:100
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::JakesProcess::Oscillator
This class Represents a single oscillator.
Definition:
jakes-process.h:93
ns3::JakesProcess::Oscillator::m_phase
double m_phase
Phase of the oscillator.
Definition:
jakes-process.h:110
ns3::JakesProcess::Oscillator::m_omega
double m_omega
Rotation speed of the oscillator .
Definition:
jakes-process.h:111
ns3::JakesProcess::Oscillator::m_amplitude
std::complex< double > m_amplitude
Complex number .
Definition:
jakes-process.h:109
ns3::JakesProcess::Oscillator::GetValueAt
std::complex< double > GetValueAt(Time t) const
Get the complex amplitude at a given moment.
Definition:
jakes-process.cc:46
src
propagation
model
jakes-process.h
Generated on Thu Feb 8 2024 09:25:55 for ns-3 by
1.9.6