Пример #1
0
 def test_call(self):
     pl = LogDistancePathLoss(2.1)
     bs = BaseStation('bs')
     ue = UserEquipment('ue')
     ue.set_position(Position(250, 0))
     assert pl(ue, bs) == approx(86.85097)
     ue.set_position(Position(0, 500))
     assert pl(ue, bs) == approx(92.87156)
Пример #2
0
 def test_call(self):
     pl = CostHataPathLoss(2.1, AreaType.URBAN)
     bs = BaseStation('bs')
     ue = UserEquipment('ue')
     ue.set_position(Position(250, 0))
     assert pl(bs, ue) == approx(121.44557455875727)
     assert pl(ue, bs) == approx(114.35415557446962)
     ue.set_position(Position(0, 500))
     assert pl(bs, ue) == approx(132.2768393081241)
     assert pl(ue, bs) == approx(127.5231950610599)
Пример #3
0
 def test_set_position(self):
     ue = UserEquipment('ue')
     ue.set_position(Position(-123.45, 78.9))
     assert ue.position.as_tuple() == (-123.45, 78.9)