sdr-enthusiasts / docker-readsb-protobuf

Multi-architecture readsb-protobuf container with support for RTLSDR, bladeRF and plutoSDR (x86_64, arm32v7, arm64v8)
224 stars 38 forks source link

Include Aircraft Registration in InfluxDB export? #115

Open tejasitraj opened 2 years ago

tejasitraj commented 2 years ago

Hi! Would it be possible to add a tag for aircraft's registration (SE-RPK, for example) when sending data over to InfluxDB? Thanks!

mikenye commented 1 year ago

The data that gets sent to InfluxDB is effectively the SBS JSON, interpreted by Telegraf.

The JSON details for each aircraft look like this:

{"Sig":134,"Icao":"7C4203","Alt":1350,"GAlt":1325,"InHg":29.80,"TAlt":3008,"Call":"VOZ9264 ","Lat":-31.873619,"Long":115.984572,"PosTime":1675920958167,"Mlat":false,"Tisb":false,"Spd":130,"SpdTyp":0,"Trak":193,"TrkH":false,"Sqk":"3641","Vsi":-704,"VsiT":1,"Gnd":false,"Trt":3,"Cmsgs":11505}

As you can see, there's no track information provided.

Furthermore, looking at the /run/readsb/aircraft.pb file, the information isn't captured here either.

In order to implement this, we'd need to re-write exporting the flight data to InfluxDB, and have something look up the ICAO/Callsign against a route database.

I'll mark this as help-wanted. And will happily accept PRs for this.