1 |
#!/usr/bin/env python
|
66 all except ✔ |
2 |
""" selftest """
|
41 all except ✔ |
3 |
from numpy import isclose |
84 all except ✔ |
4 |
from numpy.testing import run_module_suite |
107 all except ✔ |
5 |
from radioutils.distrssi import dist2rssi,rssi2dist |
93 all except ✔ |
6 |
from radioutils import Link |
119 all except ✔ |
7 |
|
119 all except ✔ |
8 |
|
105 all except ✔ |
9 |
def test_distrssi(): |
118 all except ✔ |
10 |
assert isclose(dist2rssi(10), -74.23110491) |
118 all except ✔ |
11 |
assert isclose(rssi2dist(ctx=-54,rssi=-74),10) |
123 all except ✔ |
12 |
|
99 all except ✔ |
13 |
def test_fspl(): |
105 all except ✔ |
14 |
assert isclose(Link(10,2450e6).fspl(), 60.23110491) |
85 all except ✔ |
15 |
|
93 all except ✔ |
16 |
if __name__ == '__main__': |
68 all except ✔ |
17 |
run_module_suite() |
75 all except ✔ |