A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
kun-2600-mhz-propagation-loss-model.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Marco Miozzo <marco.miozzo@cttc.es>,
7 * Nicola Baldo <nbaldo@cttc.es>
8 *
9 */
11
12#include "ns3/double.h"
13#include "ns3/enum.h"
14#include "ns3/log.h"
15#include "ns3/mobility-model.h"
16
17#include <cmath>
18
19namespace ns3
20{
21
22NS_LOG_COMPONENT_DEFINE("Kun2600MhzPropagationLossModel");
23
24NS_OBJECT_ENSURE_REGISTERED(Kun2600MhzPropagationLossModel);
25
26TypeId
28{
29 static TypeId tid = TypeId("ns3::Kun2600MhzPropagationLossModel")
31 .SetGroupName("Propagation")
32 .AddConstructor<Kun2600MhzPropagationLossModel>();
33
34 return tid;
35}
36
41
45
46double
48{
49 double dist = a->GetDistanceFrom(b);
50 double loss = 36 + 26 * std::log10(dist);
51 return loss;
52}
53
54double
57 Ptr<MobilityModel> b) const
58{
59 return (txPowerDbm - GetLoss(a, b));
60}
61
62int64_t
64{
65 return 0;
66}
67
68} // namespace ns3
Empirical propagation model for the 2.6 GHz frequency.
double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
PropagationLossModel.
Models the propagation loss through a transmission medium.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
Every class exported by the ns3 library is enclosed in the ns3 namespace.