lexfp / fpvradar

Raspberry pi & SDR dongle combined to notify you if aircraft are close by
11 stars 5 forks source link

Doesnt work with Bullseye & Python 3 #2

Open WarrenLead opened 1 year ago

WarrenLead commented 1 year ago

Great job with this but FYI I had a lot of trouble getting it to work with Bullseye and Python 3. e.g. setting up the GPS receiver or more specifically the gpsd library and the print function syntax.

Python 2: print 'Hello, World!' Python 3: print('Hello, World!')

Also this line: distanceToPlane = geopy.distance.vincenty(homecoords, planecoords).miles

vincenty ??? throws a general error, I changed it to "distance" and seemed it fixed it but I am not sure.

Any ideas?

Edit: I found the answer, 'vincenty' is no longer supported in gpsd - the recommendation is to use 'geodesic' instead which is also 'distance'.

Anyway I just thought I would mention this for anyone else trying to use this in 2023 and beyond.

Regards Warren Leadbeatter

blurcak commented 10 months ago

Hello after 3 day i finaly got the script is working under bullseye and pythan3 (Rpi0, BN880, blue piaware stick)

1) gps problem for me solved (sudo systemctl enable gpsd, sudo systemctl unmask gpsd ) 2) as mentioned up, print needs () and switch "vincenty" to "geodesic" helps too :) 3) over all, pyth3 is realy sensitive to formating, , dont mix TAB and SPACE :) (if it crashes check the lines, the force will guide U) 4) almost forgot, commet out last 4 lines 5) totaly forgot change "dump1090-fa" to "skyaware" if u use latest piaware :)

Sry for my engliš. B.