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: \f$L = \frac{4 \pi * d * f}{C^2}\f$
25 *
26 * where C = 3e8 m/s is the light speed in the vacuum. The intended
27 * use is to calculate Prx = Ptx * G
28 */
30{
31 public:
34
35 /**
36 * @brief Get the type ID.
37 * @return the object TypeId
38 */
39 static TypeId GetTypeId();
40
43 Ptr<const MobilityModel> b) const override;
44
45 /**
46 * Return the propagation loss L according to a simplified version of Friis'
47 * formula in which antenna gains are unitary
48 *
49 * @param f frequency in Hz
50 * @param d distance in m
51 *
52 * @return if Prx < Ptx then return Prx; else return Ptx
53 */
54 double CalculateLoss(double f, double d) const;
55
56 protected:
57 int64_t DoAssignStreams(int64_t stream) override;
58};
59
60} // namespace ns3
61
62#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.
Keep track of the current position and velocity of an object.
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
a unique identifier for an interface.
Definition type-id.h:50
Every class exported by the ns3 library is enclosed in the ns3 namespace.