LEFT | RIGHT |
(no file at all) | |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya
(CTTC) | 3 * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya
(CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 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 | 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 | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Author: Marco Miozzo <marco.miozzo@cttc.es>, | 18 * Author: Marco Miozzo <marco.miozzo@cttc.es>, |
19 * Nicola Baldo <nbaldo@cttc.es> | 19 * Nicola Baldo <nbaldo@cttc.es> |
20 * | 20 * |
21 */ | 21 */ |
22 #include "ns3/log.h" | 22 #include "ns3/log.h" |
23 #include "ns3/double.h" | 23 #include "ns3/double.h" |
24 #include "ns3/enum.h" | 24 #include "ns3/enum.h" |
25 #include "ns3/mobility-model.h" | 25 #include "ns3/mobility-model.h" |
26 #include <cmath> | 26 #include <cmath> |
27 | 27 |
28 #include "itu-r-1238-propagation-loss-model.h" | 28 #include "itu-r-1238-propagation-loss-model.h" |
29 #include <ns3/mobility-building-info.h> | 29 #include <ns3/mobility-building-info.h> |
30 | 30 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 { | 96 { |
97 NS_LOG_ERROR (this << " Unkwnon Wall Type"); | 97 NS_LOG_ERROR (this << " Unkwnon Wall Type"); |
98 } | 98 } |
99 double loss = 20 * std::log10 (m_frequency / 1e6 /*MHz*/) + N * std::log10 (a1
->GetDistanceFrom (b1)) + Lf - 28.0; | 99 double loss = 20 * std::log10 (m_frequency / 1e6 /*MHz*/) + N * std::log10 (a1
->GetDistanceFrom (b1)) + Lf - 28.0; |
100 NS_LOG_INFO (this << " Node " << a1->GetPosition () << " <-> " << b1->GetPosit
ion () << " loss = " << loss << " dB"); | 100 NS_LOG_INFO (this << " Node " << a1->GetPosition () << " <-> " << b1->GetPosit
ion () << " loss = " << loss << " dB"); |
101 | 101 |
102 return loss; | 102 return loss; |
103 } | 103 } |
104 | 104 |
105 | 105 |
106 double | 106 double |
107 ItuR1238PropagationLossModel::DoCalcRxPower (double txPowerDbm, | 107 ItuR1238PropagationLossModel::DoCalcRxPower (double txPowerDbm, |
108 » » » » » » Ptr<MobilityModel> a, | 108 Ptr<MobilityModel> a, |
109 » » » » » » Ptr<MobilityModel> b) const | 109 Ptr<MobilityModel> b) const |
110 { | 110 { |
111 return (txPowerDbm - GetLoss (a, b)); | 111 return (txPowerDbm - GetLoss (a, b)); |
112 } | 112 } |
113 | 113 |
114 | 114 |
115 int64_t | 115 int64_t |
116 ItuR1238PropagationLossModel::DoAssignStreams (int64_t stream) | 116 ItuR1238PropagationLossModel::DoAssignStreams (int64_t stream) |
117 { | 117 { |
118 return 0; | 118 return 0; |
119 } | 119 } |
120 | 120 |
121 | 121 |
122 } // namespace ns3 | 122 } // namespace ns3 |
LEFT | RIGHT |