ADS-DB SQLite Database of Local Flights

Hey everyone,

I’ve been using this local database for a number of years to lookup and save everything my receiver sees, allowing me to lookup details on local air traffic in the future. If you’ve ever wanted to know how many 787’s you’ve ever seen, or how many times a plane has been in your area, you may like this.

It’s relatively easy to install on a Raspberry Pi with Flightaware installed, and is designed to keep running 24/7. So far, there’s over 30,000 planes in my local database, and it scales quite well. It can also read from multiple receivers at once, and even play sounds to alert you of certain flights if you install it on your desktop.

ADS-DB Plane Stats
----------------------------------------------
 Plane Types:  465    24hrs: 147    New: 0
 Plane Totals: 31433  24hrs: 1735   New: 80


$ ./ads-db.py -lts B7%
MFR      TYPE  CNT  LAST_IDENT      FIRST SEEN            LAST SEEN             MODEL
Boeing   B738  1064 AA7E56          2019-07-17 13:13:50   2022-03-08 16:21:54   737-800/737-800 BBJ2/BBJ2
Boeing   B737  682  A95A2B          2019-07-17 13:13:47   2022-03-08 16:21:54   737-700/737-700 BBJ/C-40/C-40 Clipper/Clipper/BBJ
Boeing   B763  436  A0F4B5          2019-07-17 13:13:53   2022-03-08 14:55:44   767-300
Boeing   B752  406  A0A8DF          2019-07-17 13:47:05   2022-03-08 15:15:16   757-200/C-32
Boeing   B739  360  AC8D3C          2019-07-17 13:13:48   2022-03-08 15:52:39   737-900/737-900 BBJ3/BBJ3
Boeing   B772  203  4007F9          2019-07-17 13:14:02   2022-03-08 15:59:16   777-200/777-200ER

$ ./ads-db.py -h
usage: ads-db.py [-h] [-D] [-st] [-rs RS] [-rf RF] [-db DB] [-lt LT] [-lts LTS] [-li LI] [-ld LD] [-lr LR] [-af AF] [-ad AD] [-fa FA] [-fc FC] [-fc0] [-fm] [-fd FD] [-sc SC] [-v] [--update_db] [--cleanup_db]
                 [--quiet]

Save ADS-B Data to SQLite

optional arguments:
  -h, --help    show this help message and exit
  -D            Run Daemon
  -st           Database Stats
  -rs RS        Receiver IP List separated by commas (default 127.0.0.1)
  -rf RF        Refresh Interval (default 10sec)
  -db DB        Different Database File
  -lt LT        Lookup Planes by Type
  -lts LTS      Lookup Type Totals by type (use percent-sign for all type)
  -li LI        Lookup Planes by IACO
  -ld LD        Lookup Planes by IDENT
  -lr LR        Lookup Planes by Registration
  -af AF        Alert on Flight Name / ICAO
  -ad AD        Alert Distance from Receiver (default unlimited)
  -fa FA        Filter Low Altitude
  -fc FC        Filter Category Above int (A[3])
  -fc0          Filter A0 no categories
  -fm           Filter Military Planes
  -fd FD        Filter by Days Seen Above Count
  -sc SC        Save Cycle (increase > 10 to reduce disk writes)
  -v            Debug Mode
  --update_db   Update all planes with latest DB info
  --cleanup_db  Cleanup excess plane days

Enjoy!
Jonathan

Nice Job

Are you collecting aircraft or flights?
I am asking because an aircraft can pass your receiver several times a day on different flights.

I am currently using a script pulling the information from the json of dump1090/readsb, storing all flights as long as the aircraft hasn’t been shown up in the last hour with the same flight number.

What you also can do is a query against a basestation file containing all aircraft information. that would complete your records.
EDIT: Forget this, you are doing this already. But i’Ve found out that the Flightairmap-DB is missing lots of entries.
Maybe this is a better one:

Maybe you want to take a look of what i am using:
http://cactusprojects.com/logging-dump1090-fa-to-local-database/

I’ve adjusted it to my needs

Hey fox hunter,

Seems we think alike! Currently this only tracks planes, per day, but could easily be modified to tracks flights per day. The database is currently 80MB after three years, so it wouldn’t be a big deal to add a few more entries per day. I will be thinking about that, though I tend to look for specific planes personally rather than general commercial flights.

That said, I’m most excited about the updated basestation database. I’m waiting on my admin approval, and will test that out. The current database is certainly not completely accurate or up to date, so better data is always appreciated.

Thanks for sharing!

Best,
Jonathan

Thanks, it was most helpful using FlightRadar data over the previous BaseStation data. I have cleaned that up, referenced in the docs, and removed the flight-aware CSV requirement altogether.

Model names and everything are FAR better!

Best,
Jonathan

I am using a Jetvision device (Airsquitter) which is also getting once a week a basestation.sqb file where the data is compiled from Planebase.
This is also pretty complete, but only eligible to be used on the Jetvision devices.

Interesting receiver, I haven’t heard of them before.

I also added flight tracking to the database for known call_signs, along with options to store all idents as flight plans each day. I’ve reset it a few times, and it seems pretty well tested so far. It will track a summary of first and last seen stats for each flight plan, and a daily entry for which aircraft flew the flight and that flights stats.

Thanks again for all the ideas and feedback,
Jonathan

Jetvision is the manufacturer/developer of the Radarcape devices and other professional solutions. These are very popular, some smaller Airports are using it as a backup solution or for special purposes.

If i am not totally wrong, the feeders provided by Flightradar24 are relabelled Radarcapes
It’s a hardware based decoder and a “fire and forget” solution, almost nothing to be configured.

The Airsquitter is similar but more consumer oriented. They started with a discount price where i got it, meanwhile it’s getting expensive for many users

Will keep an eye on it!

I wanted to follow up, since after adding flight tracking, I am wondering if you know the best source for flight data in the StandingData.sqb format? I am testing with one from virtualradarserver.co.uk, but for many flights, it has the wrong destination airport.

Example from the last hour:

ads -lf % -fh 0.1

FLIGHT#   FROM  TO   PTYPE  REGISTR    ICAO    CT  DST MIN  ALT     LOW     FIRST                 LAST
-------   ---- ----  ----   --------   ------  --- --- ---  -----   -----   --------------------  -------------------
DAL1424   KATL KATL  B752   N548US     A6F777  0   43  6    37000   35000   2022-03-11 10:30:33   2022-03-11 10:41:34
NKS980    KFLL KCLT  A20N   N926NK     ACD5AA  0   72  71   38000   34525   2022-03-10 09:17:33   2022-03-11 10:41:34
AAL1394   KSAT KLAX  A319   N764US     AA5237  0   57  57   36000   35975   2022-03-11 10:32:14   2022-03-11 10:41:34
JIA5135   KDCA KDCA  CRJ7   N720PS     A9A4E2  0   55  0    17175   625     2022-03-10 10:27:29   2022-03-11 10:41:34
JIA5304   KDCA KDCA  CRJ9   N607NN     A7E279  0   36  36   34200   34200   2022-03-10 10:37:21   2022-03-11 10:41:34

Others are just blank

2022-03-11 10:40:32,756 INFO     New Flight    JBU6469 (A321) A3 [108nm FL380] JBU6469     <>     N969JT AD7E6F JetBlue Airways
2022-03-11 10:40:32,757 DEBUG    Todays Flight JBU6469 (A321) A3 [108nm FL380] JBU6469     <>     N969JT AD7E6F site:172.20.30.30
2022-03-11 10:40:42,980 DEBUG    Todays Plane  SUB1318 (B190) A6 [ 15nm  1525] SUB1318 N253SF Suburban Air Freight A26439 site:172.20.30.30

Thanks again for all the help!
Jonathan

That is the source am using as well. So far i haven’t found any better source.

The problem is indeed that many flights are incorrect or simply empty. I would assume that this is still the mpact from pandemic situation where many flights are operated differently.

I’ve just downloaded a new basestation.sqb file from my vendor.
Replaced the one where the flights are written to.

The amount of “unknown” aircraft went down from 1506 to 1275
So it is always good to update the sources

Hey,

The Basestation you linked to is great and very up to date. The open flight databases unfortunately are pretty out of date though. I check all flights against confirmed local flights for about 12 hours, and saw an 85% lookup failure rate with that VCS database.

After that I broke down and signed up for the personal AeroAPI account. Now I’m able to cache up to date data, which is great, other than it requires full time internet access and can cost money. It’s looking like I’ll spend $5 - 10$ the first month, and then it should be free after that if I do an update every three months or so based on my usage and the number of flights I’m seeing in my area. That good with me since my usage should drop off considerably here soon.

2022-03-13 19:45:03,700 DEBUG    Todays Flight JBU1852 (A321) A3 [ 88nm FL350] JBU1852 MMUN->KJFK 1559nm N997JL ADED77 site:172.20.30.30
2022-03-13 19:45:44,574 DEBUG    Todays Flight DAL1412 (B739) A3 [ 27nm 3425 ] DAL1412 KATL->KCHS  259nm N842DN AB879F site:172.20.30.30
2022-03-13 19:48:10,972 DEBUG    Todays Flight JBU2468 (E190) A3 [  8nm 1150 ] JBU2468 KCHS->KBOS  820nm N323JB A37A3F site:172.20.30.30
2022-03-13 19:48:29,486 DEBUG    Todays Flight AAL2500 (B738) A3 [ 65nm FL370] AAL2500 KMCO->KDCA  785nm N894NN AC5569 site:172.20.30.109
2022-03-13 19:48:45,849 DEBUG    Todays Flight  DAL643 (B752) A4 [ 88nm FL370]  DAL643 MMUN->KJFK 1559nm N665DN A8C724 site:172.20.30.30
2022-03-13 19:49:03,088 DEBUG    Todays Flight UAL2162 (B738) A3 [ 79nm FL370] UAL2162 KMCO->KIAD  760nm N14214 A0ACB6 site:172.20.30.30

The best part is they provide the flight distance, which is a nice addition/filter.

Should be good for now, need to get back to real work :wink:

Jonathan

1 Like

Jetvision may now be marketing the Radarcape and Beast but they were not the developer (FPGAADSB - A FPGA based decoder including one miniADSB+ receiver). Their initial interest was in ADSB software (RTL1090 and GlobeS) and antenna. Seems the developer has joined Jetvision to better support the hardware.

Günter Köllner (the one from your link) is the owner and founder of Jetvision from what i know.

It’s also stated on their “about” page:

But this discussion exceed the thread topic :wink:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.