Weslex / rpi-led-flight-tracker

Track the aircraft flying above you using a Raspberry Pi, RTL-SDR, and an LED matrix
MIT License
31 stars 2 forks source link

Chain order #2

Closed ChopsKingsland closed 1 week ago

ChopsKingsland commented 1 week ago

Is there a picture of the order that the panels were daisychained together?

Weslex commented 1 week ago

I followed the "U-mapper" arrangement of displays described in the rpi-led-rgb-matrix library. U-mapper instructions.

Any mapping that works with the rpi-rgb-led-matrix should work. You just need to change config.pixel_mapper_config = "U-mapper;Rotate:-90" in run_flight_tracker.py if you are using a different arrangement.

Weslex commented 1 week ago

I noticed that your profile location is in the UK. Unfortunately, runways will not be displayed on the flight tracker outside of the US. Runways are drawn from a csv of runways published by the FAA so only US runways are included right now. Just a heads up.

ChopsKingsland commented 1 week ago

Thanks for the heads up. I have been trying for a while to get data like this for the UK, but haven't been able to find any. I'm now thinking of somehow getting the data from OpenStreetMap

ChopsKingsland commented 1 week ago

After a bit of research, I came across ourairports.com, who have a runways.csv available for download that includes every runway in the world (I think, it at least contains the UK). I will write a python script at some point to filter the data and put it in the same format as the current runways.csv, and submit a PR with it in.

ChopsKingsland commented 1 week ago

@Weslex would just having airport code, lat1, lon1, lat2, lon2 work for UK airports or does this program require more info? From what I can work out in the code, it just needs the 2 sets of coords.

Edit: I can include edits to the code in the PR along with the airports if need be

Weslex commented 1 week ago

@Weslex would just having airport code, lat1, lon1, lat2, lon2 work for UK airports or does this program require more info? From what I can work out in the code, it just needs the 2 sets of coords.

Edit: I can include edits to the code in the PR along with the airports if need be

Yes, the only values used to draw each runway are the latitude and longitude of the each end of the runway. The airport code isn't currently display. I found it adding it to the map cluttered the display. I should add it back as a feature the user can enable in the config though.

Switching to the runways.csv that you found should be simple. You will just have to ensure that le_latitude_deg, le_longitude_deg, he_latitude_deg, and he_longitude_deg are all not none before using a runway because some runways in that file appear to have missing data.

ChopsKingsland commented 1 week ago

I have created a PR with sanitised data. I would be grateful if you could try it because my displays haven’t arrived from aliexpress yet… #3

Edit: I'm hoping my data includes US airports as well, so no other csv is needed

Weslex commented 1 week ago

I have created a PR with sanitised data. I would be grateful if you could try it because my displays haven’t arrived from aliexpress yet… #3

Edit: I'm hoping my data includes US airports as well, so no other csv is needed

Sure! I will take a look at it. I think while you were working on that I tried adding support for your runways.csv file. It is in the new branch "intlrunways". Basically, I just added a flag so you can switch between using the FAA runways.csv or the ourairports csv. All you should have to change "config.use_intl_runways" to True and replace runways.csv with the ourairports.com csv.

Here is an example of a static map of London I generated using that branch. london

I am actually waiting on displays from Aliexpress as well. I gave my first flight tracker to my father and I am waiting on the hardware to build another right now.

ChopsKingsland commented 1 week ago

Wow, the data actually works! Looks like I'll be implementing this as a permanent fixture when I get the displays.

What power supply/driver board did you use by the way? I have a 5v 10a power supply and the Adafruit RGB Matrix Bonnet.

Weslex commented 1 week ago

Wow, the data actually works! Looks like I'll be implementing this as a permanent fixture when I get the displays.

What power supply/driver board did you use by the way? I have a 5v 10a power supply and the Adafruit RGB Matrix Bonnet.

I used 2 5v 6A power supplies on my first one. Although for my second one I think I will try to use a single 10A or 12A power supplies.

I have been using the GPIO pins on the raspberry pi to run the display. It works pretty well, but I think the bonnet would be a better solution. I will look into getting one. I do think you have to solder a jumper on the bonnet to get 64x64 displays to work.

I just found out that the rpi-rgb-led-matrix library doesn't currently support the raspberry pi 5, so I will have to order a new rpi4 as well.

ChopsKingsland commented 1 week ago

I didn't even realise you could drive it straight from the GPIO without a bonnet - quite cool!

I already soldered on a jumper (the one that disables the 3.5mm for PWM I think) for when I used a 32x64 matrix. I will look into the other one for the square matrices when mine turn up.

Thank you for all your help!

ChopsKingsland commented 2 days ago

Sorry to keep asking questions.

My displays arrived from AliExpress. When it came to hooking up power, did you wire them in series or parallel?

Weslex commented 1 day ago

Sorry to keep asking questions.

My displays arrived from AliExpress. When it came to hooking up power, did you wire them in series or parallel?

They are wired in parallel. You want every display to receive 5v.