View on GitHub

TLeconte.github.io

Feeding dump1090 aircraft DB with vdlm2dec

Introduction

Modern versions of dump1090 comes with a webmap that uses a static database of json files to provide aircraft information. Helas this database is often not very uptodate, and lots of aircrafts are lacking. Let’s see if man could do something with acars data from vdlm2dec.

The json files are generated by the dump1090 tools : csv-to-json.py from cvs files of different origins. The CSV format is very simple. The first line must be a header line that names three columns :

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

the following lines contain aircraft data, ie :

icao24,r,t
484045,PH-MCI,B763
400AA2,G-EZEJ
405588,G-RIDA,AS55
40415F,G-RICO,AA5
406EFF,G-KIAN
...

Notes that the aircraft type could be missing.

Using vdlm2dec

I recently add to vdlm2dec an output mode (-a) that output this csv format from ACARS messages. Only the icao address and aircraft registration could be extracted. So if man let’s run :

vdlm2dec -a 136.725 136.775 136.875 136.975 » regs

For some sufficiently long time, man will have in regs file , something like that :

398501,F-HBIB
393A6E,F-GOTO
4066CE,G-TAWG
495281,CS-TTA
3C4903,D-ABHC
...

that could be directly used for dump1090 database generation in a few steps.

  1. Suppress any duplicates :

    sort regs | uniq > regsu

  2. count the number of different receved aircrafts (just to know) :

    wc regsu

  3. Add the header :

    sed -i “1iicao24,r” regsu

  4. run cvs-to-json.py tools :

    csv-to-json.py vrs.csv flightaware-xxxxxxx.csv regsu yourwebserverpath/dump1090/db

Notes :

At home, in one week, vdlm2dec received around 2000 different aircrafts, more than 500 where not in the original database.