fix import error in Python3
This commit is contained in:
parent
1e82b5c59c
commit
fefd26a787
@ -17,8 +17,9 @@
|
||||
A python package for decoding ABS-D messages.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import, print_function, division
|
||||
import math
|
||||
import util
|
||||
from . import util
|
||||
|
||||
|
||||
def df(msg):
|
||||
|
@ -17,9 +17,8 @@
|
||||
A python package for decoding ModeS (DF20, DF21) messages.
|
||||
"""
|
||||
|
||||
import util
|
||||
from util import crc
|
||||
|
||||
from __future__ import absolute_import, print_function, division
|
||||
from . import util
|
||||
|
||||
def df(msg):
|
||||
"""Get the downlink format (DF) number
|
||||
@ -53,7 +52,7 @@ def icao(msg):
|
||||
# raise RuntimeError("Message DF must be in (4, 5, 20, 21)")
|
||||
return None
|
||||
|
||||
c0 = util.bin2int(crc(msg, encode=True))
|
||||
c0 = util.bin2int(util.crc(msg, encode=True))
|
||||
c1 = util.hex2int(msg[-6:])
|
||||
icao = '%06X' % (c0 ^ c1)
|
||||
return icao
|
||||
|
@ -1,6 +1,4 @@
|
||||
import os, sys
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+'/pyModeS')
|
||||
import adsb, ehs, util
|
||||
from pyModeS import adsb, ehs, util
|
||||
|
||||
|
||||
# === Decode sample data file ===
|
||||
|
@ -1,6 +1,4 @@
|
||||
import os, sys
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+'/pyModeS')
|
||||
import adsb
|
||||
from pyModeS import adsb
|
||||
|
||||
# === TEST ADS-B package ===
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
import os, sys
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+'/pyModeS')
|
||||
import ehs
|
||||
from pyModeS import ehs
|
||||
|
||||
|
||||
def test_ehs_icao():
|
||||
|
@ -1,6 +1,4 @@
|
||||
import os, sys
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+'/pyModeS')
|
||||
import util
|
||||
from pyModeS import util
|
||||
|
||||
|
||||
def test_hex2bin():
|
||||
|
Loading…
Reference in New Issue
Block a user