Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def find_random_position(conf, nodes):
pathLoss = phy.estimate_path_loss(conf, dist, conf.FREQ)
rssi = conf.PTX + 2*conf.GL - pathLoss
# At least one node should be able to reach it
if rssi >= conf.SENSMODEM[conf.MODEM]:
if rssi >= conf.current_preset["sensitivity"]:
foundMax = True
if foundMin and foundMax:
x = posx
Expand Down Expand Up @@ -389,8 +389,8 @@ def setup_asymmetric_links(conf, nodes):
rssiAB = conf.PTX + nodeA.antennaGain - pathLossAB - offsetAB
rssiBA = conf.PTX + nodeB.antennaGain - pathLossAB - offsetBA

canAhearB = (rssiAB >= conf.SENSMODEM[conf.MODEM])
canBhearA = (rssiBA >= conf.SENSMODEM[conf.MODEM])
canAhearB = (rssiAB >= conf.current_preset["sensitivity"])
canBhearA = (rssiBA >= conf.current_preset["sensitivity"])

totalPairs += 1
if canAhearB and canBhearA:
Expand Down
Loading