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
friis-spectrum-propagation-loss.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 CTTC
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Nicola Baldo <nbaldo@cttc.es>
7
*/
8
9
#ifndef FRIIS_SPECTRUM_PROPAGATION_LOSS_H
10
#define FRIIS_SPECTRUM_PROPAGATION_LOSS_H
11
12
#include "
spectrum-propagation-loss-model.h
"
13
14
namespace
ns3
15
{
16
17
class
MobilityModel;
18
19
/**
20
* \ingroup spectrum
21
* \brief Friis spectrum propagation loss model
22
*
23
* The propagation loss is calculated according to a simplified version of Friis'
24
* formula in which antenna gains are unitary:
25
*
26
* \f$ L = \frac{4 \pi * d * f}{C^2}\f$
27
*
28
* where C = 3e8 m/s is the light speed in the vacuum. The intended
29
* use is to calculate Prx = Ptx * G
30
*/
31
class
FriisSpectrumPropagationLossModel
:
public
SpectrumPropagationLossModel
32
{
33
public
:
34
FriisSpectrumPropagationLossModel
();
35
~FriisSpectrumPropagationLossModel
()
override
;
36
37
/**
38
* \brief Get the type ID.
39
* \return the object TypeId
40
*/
41
static
TypeId
GetTypeId
();
42
43
Ptr<SpectrumValue>
DoCalcRxPowerSpectralDensity
(
Ptr<const SpectrumSignalParameters>
params,
44
Ptr<const MobilityModel>
a,
45
Ptr<const MobilityModel>
b)
const override
;
46
47
/**
48
* Return the propagation loss L according to a simplified version of Friis'
49
* formula in which antenna gains are unitary
50
*
51
* @param f frequency in Hz
52
* @param d distance in m
53
*
54
* @return if Prx < Ptx then return Prx; else return Ptx
55
*/
56
double
CalculateLoss
(
double
f,
double
d)
const
;
57
58
protected
:
59
int64_t
DoAssignStreams
(int64_t stream)
override
;
60
};
61
62
}
// namespace ns3
63
64
#endif
/* FRIIS_SPECTRUM_PROPAGATION_LOSS_MODEL_H */
ns3::FriisSpectrumPropagationLossModel
Friis spectrum propagation loss model.
Definition
friis-spectrum-propagation-loss.h:32
ns3::FriisSpectrumPropagationLossModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
friis-spectrum-propagation-loss.cc:31
ns3::FriisSpectrumPropagationLossModel::CalculateLoss
double CalculateLoss(double f, double d) const
Return the propagation loss L according to a simplified version of Friis' formula in which antenna ga...
Definition
friis-spectrum-propagation-loss.cc:66
ns3::FriisSpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity
Ptr< SpectrumValue > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > params, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Definition
friis-spectrum-propagation-loss.cc:41
ns3::FriisSpectrumPropagationLossModel::~FriisSpectrumPropagationLossModel
~FriisSpectrumPropagationLossModel() override
Definition
friis-spectrum-propagation-loss.cc:26
ns3::FriisSpectrumPropagationLossModel::DoAssignStreams
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Definition
friis-spectrum-propagation-loss.cc:87
ns3::FriisSpectrumPropagationLossModel::FriisSpectrumPropagationLossModel
FriisSpectrumPropagationLossModel()
Definition
friis-spectrum-propagation-loss.cc:22
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::SpectrumPropagationLossModel
spectrum-aware propagation loss model
Definition
spectrum-propagation-loss-model.h:33
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
spectrum-propagation-loss-model.h
src
spectrum
model
friis-spectrum-propagation-loss.h
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0