A Discrete-Event Network Simulator
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
13
14namespace ns3
15{
16
17class 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 */
32{
33 public:
36
37 /**
38 * \brief Get the type ID.
39 * \return the object TypeId
40 */
41 static TypeId GetTypeId();
42
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 */
double CalculateLoss(double f, double d) const
Return the propagation loss L according to a simplified version of Friis' formula in which antenna ga...
Ptr< SpectrumValue > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > params, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Smart pointer class similar to boost::intrusive_ptr.
spectrum-aware propagation loss model
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.