|
|
| 145 |
double rxPowerDbm = 0; |
145 |
double rxPowerDbm = 0; |
| 146 |
Ptr<MobilityModel> senderMobility = 0; |
146 |
Ptr<MobilityModel> senderMobility = 0; |
| 147 |
Ptr<MobilityModel> receiverMobility = 0; |
147 |
Ptr<MobilityModel> receiverMobility = 0; |
| 148 |
if (phy->GetMobility ()) |
148 |
senderMobility = phy->GetDevice ()->GetNode ()->GetObject<MobilityModel> (); |
| 149 |
{ |
|
|
| 150 |
senderMobility = phy->GetMobility ()->GetObject<MobilityModel> (); |
| 151 |
} |
| 152 |
|
149 |
|
| 153 |
for (std::list<Ptr<SimpleOfdmWimaxPhy> >::iterator iter = m_phyList.begin (); iter != m_phyList.end (); ++iter) |
150 |
for (std::list<Ptr<SimpleOfdmWimaxPhy> >::iterator iter = m_phyList.begin (); iter != m_phyList.end (); ++iter) |
| 154 |
{ |
151 |
{ |
| 155 |
double delay = 0; |
152 |
double delay = 0; |
| 156 |
if (phy != *iter) |
153 |
if (phy != *iter) |
| 157 |
{ |
154 |
{ |
| 158 |
if ((*iter)->GetMobility ()) |
155 |
receiverMobility = (*iter)->GetDevice ()->GetNode ()->GetObject<MobilityModel> (); |
| 159 |
{ |
|
|
| 160 |
receiverMobility = (*iter)->GetMobility ()->GetObject<MobilityModel> (); |
| 161 |
} |
| 162 |
if (receiverMobility != 0 && senderMobility != 0 && m_loss != 0) |
156 |
if (receiverMobility != 0 && senderMobility != 0 && m_loss != 0) |
| 163 |
{ |
157 |
{ |
| 164 |
delay = (senderMobility->GetDistanceFrom (receiverMobility)) / 300000000LL; |
158 |
delay = (senderMobility->GetDistanceFrom (receiverMobility)) / 300000000LL; |