mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 18:13:57 +02:00
Bugfixes and performance optimizations
This commit is contained in:
parent
0f49ceb4aa
commit
dd55b495c4
7 changed files with 19 additions and 17 deletions
|
@ -179,22 +179,23 @@ MockChannel::Deliver (
|
|||
|
||||
if (srcMob != 0 && dstMob != 0)
|
||||
{
|
||||
// performance optimization
|
||||
if (srcMob->GetDistanceFrom (dstMob) > 3.0e6)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Ptr<PropagationLossModel> pLoss = GetPropagationLoss ();
|
||||
if (pLoss != 0)
|
||||
{
|
||||
// check if signal reaches destination
|
||||
rxPower = pLoss->CalcRxPower (txPower, srcMob, dstMob);
|
||||
if (rxPower == 0.0)
|
||||
if (rxPower == -1000.0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
delay += GetPropagationDelay (srcMob, dstMob, txTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Simulator::ScheduleWithContext (dst->GetNode ()->GetId (),
|
||||
delay,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue