* remove unused functions

* cythonize common

* add bds05

* separate cleanly cython and python, bds05, bds06, modulo issues

* bds08

* bds09

* optimisations in bds09

* "make" things easier

* clean up useless stuff

* add make options

* fix hidden altitude() call

* minor updates to C code

* update tests

* update benchmark

* consolidation

* update clean script

* reduce complexity and change default type to str

Co-authored-by: Xavier Olive <1360812+xoolive@users.noreply.github.com>
This commit is contained in:
Junzi Sun
2020-02-26 00:16:48 +01:00
committed by GitHub
parent 768b80df8e
commit 2046b1de07
31 changed files with 751 additions and 371 deletions

View File

@@ -1,10 +1,8 @@
from pyModeS import common
from pyModeS.decoder import common
def test_conversions():
assert common.hex2bin("6E406B") == "011011100100000001101011"
assert common.bin2hex("011011100100000001101011") == "6E406B"
assert common.int2hex(11160538) == "AA4BDA"
def test_crc_decode():
@@ -28,7 +26,7 @@ def test_crc_decode():
def test_crc_encode():
parity = common.crc("8D406B902015A678D4D220AA4BDA", encode=True)
assert common.int2hex(parity) == "AA4BDA"
assert parity == 11160538
def test_icao():