dump1090/tools
2018-07-20 21:14:23 +01:00
..
csv-to-json.py Increase the DB block size. 2016-09-14 22:09:24 +01:00
debug.html A few bugs fixed in debug.html. 2013-01-27 21:42:40 +01:00
extract-icao-ranges.py Regenerate the ICAO ranges table based on data extracted from Annex 10. 2015-09-01 14:21:25 +01:00
filter-regs.js Add filtering of icao type descriptions / wtc based on descriptor. 2016-09-14 19:06:51 +01:00
flightaware-20180720.csv.xz Update FlightAware registry data export; regenerate json db. 2018-07-20 21:14:23 +01:00
fuzzy-30003-matcher.py Add a port-30003 regression diff script. 2016-10-02 13:27:13 +01:00
README.aircraft-db Add a script that filters redundant registrations from the json db 2016-09-10 15:54:59 +01:00
replay-beast.py Tool to replay beast captures with the right inter-message timing. 2016-10-01 15:06:02 +01:00
vrs-to-csv.py Rearrange json DB stuff so it can work with CSV input. 2016-08-27 16:13:10 +01:00
vrs.csv.xz Compress vrs.csv since it's basically readonly. 2016-09-10 17:43:10 +01:00

The dump1090 webmap uses a static database of json files to provide aircraft
information.

This directory has some tools to turn a CSV file with aircraft data into
the json format that the dump1090 map expects.

The default data comes from a database kindly provided by VRS (unfortunately
no longer updated). This data is in vrs.csv. It was extracted by:

  $ wget http://www.virtualradarserver.co.uk/Files/BasicAircraftLookup.sqb.gz
  $ gunzip BasicAircraftLookup.sqb.gz
  $ tools/vrs-to-csv.py BasicAircraftLookup.sqb >tools/vrs.csv

You can modify vrs.csv (or build a new CSV entirely) and update the database.

First, as an optional step, you can prune out all registrations which match
what the in-browser hexid-to-registration logic would generate anyway. This
requires nodejs, see the comments in filter-regs.js

  $ nodejs tools/filter-regs.js <tools/vrs.csv >tools/vrs-pruned.csv

Next, turn the pruned CSV into a set of json files:

  $ tools/csv-to-json.py tools/vrs-pruned.csv public_html/db

The contents of public_html/db should be installed where the webmap can find
them; the Debian packaging puts these in
/usr/share/dump1090-mutability/html/db

The CSV format is very simple. The first line must be a header line that names
the columns. These columns are understood:

 icao24: the 6-digit hex address of the aircraft
 r: the registration / tail number of the aircraft
 t: the ICAO aircraft type of the aircraft, e.g. B773

Any other columns are put into the json DB under the name you give them, but
the standard map code won't do anything special with them. You can pick these
columns up in the PlaneObject constructor (see planeObject.js where it calls
getAircraftData()) for later use.