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
src
propagation
model
jakes-process.h
Generated on Tue May 14 2013 11:08:32 for ns-3 by
1.8.1.2