x72y5e / radar

Display flight data on the UnicornHatHD module for Raspberry Pi
MIT License
24 stars 4 forks source link

IndexError: index -17 is out of bounds for axis 1 with size 16 #4

Closed IT-Berater closed 5 years ago

IT-Berater commented 5 years ago

Hi,

Traceback (most recent call last): File "./tracker.py", line 163, in track(fixed, x_low, x_high, y_low, y_high, 18.) File "./tracker.py", line 128, in track grid = make_grid(current_ac, lat_min, lat_max, long_min, long_max) File "./tracker.py", line 43, in make_grid grid[x, y] = (h, s, .1) IndexError: index -17 is out of bounds for axis 1 with size 16

Param:

python3 ./tracker.py pygame 1.9.4.post1 Hello from the pygame community. https://www.pygame.org/contribute.html enter coordinate (in format lat, long) for bottom-left of the map: (or press enter for default) 51.074079, 6.980566 enter coordinate (in format lat, long) for top-right of the map: (or press enter for default)53.296305, 13.854978 enter coordinates (in format lat, long) for any fixed point, or press enter to continue: getting data... From: LFBO Toulouse-Blagnac, Toulouse/Blagnac, France To: EGLL London Heathrow, United Kingdom Type: Airbus A319 131 Operator: British Airways Altitude: 37000 Last Info: 0.01 seconds ago ...

x72y5e commented 5 years ago

OK I have replicated the error. It's because there is a default value for the centre of tracking, which is currently at LHR, but which should be set to be the middle of the grid coordinates entered. I will fix this when I get a minute.

IT-Berater commented 5 years ago

I would be happy. I'm waiting intently.

x72y5e commented 5 years ago

I have tried to patch this - let me know if it is working for you now?

IT-Berater commented 5 years ago

No, its this error:

python3 ./tracker.py pygame 1.9.4.post1 Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "./tracker.py", line 79, in r: float = 25.): File "/usr/lib/python3.5/typing.py", line 626, in inner return func(*args, **kwds) File "/usr/lib/python3.5/typing.py", line 1052, in getitem _check_generic(self, params) File "/usr/lib/python3.5/typing.py", line 607, in _check_generic ("many" if alen > elen else "few", repr(cls), alen, elen)) TypeError: Too many parameters for typing.List; actual 2, expected 1

x72y5e commented 5 years ago

This seems to be fixed now. Please refer to the updated Readme. I have replaced the command line dialogue with a config.json where you can load the coordinates you wish to track. The default is London. If you supply me some alternative coordinates that you would like to use, I can test them.

IT-Berater commented 5 years ago

No, its this error:

python3 ./tracker.py pygame 1.9.4.post1 Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "./tracker.py", line 79, in r: float = 25.): File "/usr/lib/python3.5/typing.py", line 626, in inner return func(*args, **kwds) File "/usr/lib/python3.5/typing.py", line 1052, in getitem _check_generic(self, params) File "/usr/lib/python3.5/typing.py", line 607, in _check_generic ("many" if alen > elen else "few", repr(cls), alen, elen)) TypeError: Too many parameters for typing.List; actual 2, expected 1

IT-Berater commented 5 years ago

This error Message came because not config.json available, please better error Message.

IT-Berater commented 5 years ago

I fix this from update git. Then the next error:

python3 ./tracker.py getting data... 51.4785 -0.45799999999999996 19.0 From: OMDB Dubai, United Arab Emirates To: EGLL London Heathrow, United Kingdom Type: Boeing 777 236ER Operator: British Airways Altitude: 8000 Last Info: 0.01 seconds ago

From: EGCC Manchester, United Kingdom To: EGLL London Heathrow, United Kingdom Type: Airbus A319 131 Operator: British Airways Altitude: 14175 Last Info: 0.03 seconds ago

From: MMMX Licenciado Benito Juarez, Mexico City, Mexico To: EGLL London Heathrow, United Kingdom Type: Boeing 787 9 Operator: British Airways Altitude: 11900 Last Info: 0.04 seconds ago

From: OKBK Kuwait, Kuwait City, Kuwait To: EGLL London Heathrow, United Kingdom Type: Boeing 777 300ER Operator: Kuwait Airways Altitude: 7881 Last Info: 0.05 seconds ago

From: KPHX Phoenix Sky Harbor, United States To: EGLL London Heathrow, United Kingdom Type: Boeing 747 436 Operator: British Airways Altitude: 225 Last Info: 0.07 seconds ago

From: EGLL London Heathrow, United Kingdom To: KIAH George Bush Intercontinental Houston, United States Type: 1999 BOEING 777-224 Operator: UNITED AIRLINES INC - CHICAGO, IL Altitude: 225 Last Info: 0.09 seconds ago

From: KSJC Norman Y. Mineta San Jose, United States To: EGLL London Heathrow, United Kingdom Type: Boeing 787 9 Operator: British Airways Altitude: 32850 Last Info: 0.1 seconds ago

From: EBBR Brussels, Belgium To: EGLL London Heathrow, United Kingdom Type: Airbus A319 131 Operator: British Airways Altitude: 7925 Last Info: 0.11 seconds ago

From: LIPE Bologna / Borgo Panigale, Italy To: EGLL London Heathrow, United Kingdom Type: Airbus A319 131 Operator: British Airways Altitude: 2575 Last Info: 0.12 seconds ago

From: None To: None Type: Airbus A319 131 Operator: British Airways Altitude: 1975 Last Info: 0.14 seconds ago

From: LEBL Barcelona, Spain To: EGLL London Heathrow, United Kingdom Type: Airbus A320 232SL Operator: British Airways Altitude: 3125 Last Info: 0.15 seconds ago

From: KSFO San Francisco, United States To: EGLL London Heathrow, United Kingdom Type: Airbus A340 642 Operator: Virgin Atlantic Airways Altitude: 2100 Last Info: 0.16 seconds ago

From: LFPG Charles de Gaulle, Paris, France To: EGLL London Heathrow, United Kingdom Type: Airbus A319 111 Operator: Air France Altitude: 475 Last Info: 0.18 seconds ago

From: EGLL London Heathrow, United Kingdom To: EDDF Frankfurt am Main, Frankfurt-am-Main, Germany Type: Airbus A320 271NSL Operator: Lufthansa Altitude: 5350 Last Info: 0.2 seconds ago

From: KLAX Los Angeles, United States To: EGLL London Heathrow, United Kingdom Type: 2001 BOEING 777-223 Operator: AMERICAN AIRLINES INC - FORT WORTH, TX Altitude: 1450 Last Info: 0.2 seconds ago

Traceback (most recent call last): File "./tracker.py", line 162, in track(fixed, x_low, x_high, y_low, y_high, r) File "./tracker.py", line 127, in track plot(grid) File "./tracker.py", line 25, in plot u.show() File "/usr/local/lib/python3.5/dist-packages/unicornhathd/init.py", line 269, in show setup() File "/usr/local/lib/python3.5/dist-packages/unicornhathd/init.py", line 102, in setup _spi.open(0, 0) FileNotFoundError: [Errno 2] No such file or directory

x72y5e commented 5 years ago

I think the problem is that you have installed the unicorn module, but you do not have the physical unicornhathd hardware. Try removing the unicorn module software from your python install, and run again. You should then see the "printing to console" message. I am going to close this issue now because it no longer relates to the title /original bug. Feel free to open a new issue if you are still having problems. Thanks.

IT-Berater commented 5 years ago

Ok, see https://github.com/x72y5e/radar/issues/6