A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
jakes-process.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2012 Telum (www.telum.ru)
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Kirill Andreev <andreev@telum.ru>, Alexander Sofronov <sofronov@telum.ru>
19
*/
20
#ifndef DOPPLER_PROCESS_H
21
#define DOPPLER_PROCESS_H
22
23
#include "ns3/object.h"
24
#include "ns3/nstime.h"
25
#include "ns3/random-variable-stream.h"
26
#include <complex>
27
28
namespace
ns3
29
{
30
class
PropagationLossModel;
31
class
JakesPropagationLossModel;
55
class
JakesProcess
:
public
Object
56
{
57
public
:
58
static
TypeId
GetTypeId
(
void
);
59
JakesProcess
();
60
virtual
~JakesProcess
();
61
virtual
void
DoDispose
();
62
std::complex<double>
GetComplexGain
()
const
;
64
double
GetChannelGainDb
()
const
;
65
void
SetPropagationLossModel
(
Ptr<const PropagationLossModel>
);
66
private
:
68
struct
Oscillator
69
{
71
Oscillator
(std::complex<double> amplitude,
double
initialPhase,
double
omega);
72
// Get the complex amplitude at moment \param t
73
std::complex<double>
GetValueAt
(
Time
t)
const
;
75
std::complex<double>
m_amplitude
;
77
double
m_phase
;
79
double
m_omega
;
80
};
81
private
:
82
void
SetNOscillators
(
unsigned
int
nOscillators);
83
void
SetDopplerFrequencyHz
(
double
dopplerFrequencyHz);
84
void
ConstructOscillators
();
85
private
:
87
std::vector<Oscillator> m_oscillators;
90
double
m_omegaDopplerMax;
91
unsigned
int
m_nOscillators
;
92
Ptr<UniformRandomVariable>
m_uniformVariable
;
93
Ptr<const JakesPropagationLossModel>
m_jakes
;
95
};
96
}
// namespace ns3
97
#endif // DOPPLER_PROCESS_H
ns3::JakesProcess::m_uniformVariable
Ptr< UniformRandomVariable > m_uniformVariable
Definition:
jakes-process.h:92
ns3::Time
keep track of time values and allow control of global simulation resolution
Definition:
nstime.h:81
ns3::JakesProcess::~JakesProcess
virtual ~JakesProcess()
Definition:
jakes-process.cc:121
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::JakesProcess::DoDispose
virtual void DoDispose()
Definition:
jakes-process.cc:127
ns3::JakesProcess::Oscillator
Represents a single oscillator.
Definition:
jakes-process.h:68
ns3::JakesProcess::Oscillator::Oscillator
Oscillator(std::complex< double > amplitude, double initialPhase, double omega)
Initiate oscillator with complex amplitude, initial phase and rotation speed.
Definition:
jakes-process.cc:34
ns3::JakesProcess::GetChannelGainDb
double GetChannelGainDb() const
Get Channel gain [dB].
Definition:
jakes-process.cc:144
ns3::JakesProcess::GetComplexGain
std::complex< double > GetComplexGain() const
Definition:
jakes-process.cc:133
ns3::JakesProcess::JakesProcess
JakesProcess()
Definition:
jakes-process.cc:115
ns3::JakesProcess::SetDopplerFrequencyHz
void SetDopplerFrequencyHz(double dopplerFrequencyHz)
Definition:
jakes-process.cc:86
ns3::JakesProcess::Oscillator::m_phase
Phase f[\phi_n] of the oscillator double m_phase
Definition:
jakes-process.h:77
ns3::JakesProcess::m_nOscillators
unsigned int m_nOscillators
Definition:
jakes-process.h:91
ns3::JakesProcess::GetTypeId
static TypeId GetTypeId(void)
Definition:
jakes-process.cc:49
ns3::JakesProcess::Oscillator::GetValueAt
std::complex< double > GetValueAt(Time t) const
Definition:
jakes-process.cc:41
ns3::JakesProcess::ConstructOscillators
void ConstructOscillators()
Definition:
jakes-process.cc:92
ns3::JakesProcess::Oscillator::m_omega
Rotation speed of the oscillator f[\omega_d\cos(\alpha_n)] double m_omega
Definition:
jakes-process.h:79
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
ns3::JakesProcess::m_jakes
Ptr< const JakesPropagationLossModel > m_jakes
Definition:
jakes-process.h:93
ns3::JakesProcess::Oscillator::m_amplitude
std::complex< double > m_amplitude
Complex number.
Definition:
jakes-process.h:75
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::JakesProcess::SetPropagationLossModel
void SetPropagationLossModel(Ptr< const PropagationLossModel >)
Definition:
jakes-process.cc:67
ns3::JakesProcess::SetNOscillators
void SetNOscillators(unsigned int nOscillators)
Definition:
jakes-process.cc:80
ns3::JakesProcess
Implementation for a single path Stationary Jakes propagation loss model.
Definition:
jakes-process.h:55
src
propagation
model
jakes-process.h
Generated on Sun Apr 20 2014 11:15:01 for ns-3 by
1.8.6