junzis / pyModeS

Python decoder for Mode S and ADS-B signals
GNU General Public License v3.0
527 stars 151 forks source link

Issue with ADSB_Encode #56

Closed PeterFelgate closed 4 years ago

PeterFelgate commented 4 years ago

I am totally new to python. I am trying to run the ADSB_Encode program. I resolved the first issue which appeared to be missing parentheses around a pair of print statements.

I am using the following on the latest Windows 10 build having used pip to load numpy: Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

I get the following error:

C:\ADSB-Out-master>ADSB_Encoder.py 0xABCDEF 12.34 56.78 9999.0 Traceback (most recent call last): File "C:\ADSB-Out-master\ADSB_Encoder.py", line 419, in (df17_even, df17_odd) = df17_pos_rep_encode(ca, icao, tc, ss, nicsb, alt, time, lat, lon, surface) File "C:\ADSB-Out-master\ADSB_Encoder.py", line 273, in df17_pos_rep_encode enc_alt = encode_alt_modes(alt, surface) File "C:\ADSB-Out-master\ADSB_Encoder.py", line 38, in encode_alt_modes tmp1 = (encalt & 0xff8) << 1 TypeError: unsupported operand type(s) for &: 'float' and 'int'

Any ideas as to what has happened?

junzis commented 4 years ago

You should refer to ADSB-Out repository.