I’m thinking about adding a little LCD display to my RPI to show aircraft within view at the window. Ideally, I’d like to show alt/distances/bearing/type/callsign.
I’ve written a python script to grab the aircraft.json and the receiver.json. This gives me the receiver location and the location of the aircraft. I’ve written the script to work out the bearing and the distances to aircraft. Filtering/sorting shouldn’t be an issue.
However, I’m getting allot of aircraft without callsigns and I’m unclear how I can determine the type. I’ve applied for an ADSBExchange API but I’m reticent to grab their data and consume their resources for something that is just for me.
Anyone know a smart way of grabbing the info from tar1090?
I’ll look at the FA-API, I think I’ve found the registrations.js which attempts to resolve the Hex to the registration… I’ll dig some more to see if I can derive type from registration. However, I think it’ll be beyond my pea like brain to call a function to .js from python…
That just means you don’t have good reception usually.
Or it could be radar returns from TIS-B which don’t include a callsign.
Or it could be anonymous MLAT results from FA which also don’t have a callsign.
For these two mentioned categories you also can’t do a type lookup because you don’t have an ICAO id, just a pseud id.
ADS-B appear to give me callsigns no problems in the aircraft.json, so I suspect you are right they are likely to MLAT. I don’t feed to FA but I do feed to ADSB Exchange and FR24.
I’ll work my way through the steps in your post. Many thanks for your time, appreciate your work as a whole.
I’ve managed to extract the aircraft.csv.gz from the git-db directory - I’ve converted this to a json file. Out of interest, is this updated periodically? Is the entire file updated or is it changes only?
Why? It’s derived from the Mictronics DB, i update tar1090-db via the aircraft.json i linked.
tar1090-db is only updated when you run the tar1090 install/update script.
The aircraft.csv.gz is for my readsb, it reads the directory tar1090 keeps it automatically (or you can specify --db-file).
The reason for that is that if readsb can add type / reg info the browser doesn’t need to load (almost) the entire DB.
The json file from Mictronics appeared to have data missing when I was parsing it, but the aircraft.csv appeared to have more data. Though I accept could be entirely down to my poor coding at the beginning though (my day job isn’t code related and learning python on the fly is a… journey).
I wanted to use the local copy to conserve bandwidth for those who serve the data - I know that allot of websites aren’t money making. If I’ve already got the db in some form I think I should use it. Besides, it works now! I update my tar1090 using the script frequently, so this works fine for me. Cheers for you help