Flight Tracker
More Raspberry Pi Projects
Project 7 — ADS-B Flight Tracker
What Is ADS-B?
Modern commercial aircraft broadcast their position, altitude, speed, and flight number every second using a radio signal called ADS-B (Automatic Dependent Surveillance–Broadcast) on 1090 MHz. This data is used by air traffic control — but it's also transmitted openly and unencrypted, meaning anyone with the right hardware can receive it.
A cheap RTL-SDR USB dongle — originally designed to receive digital TV broadcasts — can receive these 1090 MHz signals. Combined with software running on your Pi, you get a live radar map of every ADS-B-equipped aircraft within roughly 200–300 km of your antenna.
What You Will Need
Step 1 — Install readsb
readsb is a high-performance ADS-B decoder that reads the raw signal from your RTL-SDR dongle and decodes it into structured flight data. It is the successor to the popular dump1090 family and is actively maintained.
# Add the wiedehopf repository (author of readsb and tar1090) pi@raspberrypi:~$ sudo apt install -y curl gnupg pi@raspberrypi:~$ curl -L https://github.com/wiedehopf/adsb-wiki/raw/master/readsb-install.sh | sudo bash
If you prefer to install manually:
# Manual install (if the script is unavailable or you prefer step-by-step control) pi@raspberrypi:~$ sudo apt update pi@raspberrypi:~$ sudo apt install -y rtl-sdr # Blacklist the DVB-T driver so it doesn't claim the dongle pi@raspberrypi:~$ sudo bash -c 'echo "blacklist dvb_usb_rtl28xxu" > /etc/modprobe.d/rtlsdr.conf' # Add the readsb Debian package repository pi@raspberrypi:~$ sudo bash -c '(source /etc/os-release; echo "deb [arch=arm64] https://github.com/wiedehopf/readsb-packages/raw/master/apt stable main") > /etc/apt/sources.list.d/readsb.list' pi@raspberrypi:~$ sudo apt update pi@raspberrypi:~$ sudo apt install -y readsb
Configure readsb with your location
pi@raspberrypi:~$ sudo nano /etc/default/readsb
Find and set these lines (replace with your actual coordinates and elevation):
RECEIVER="rtlsdr" DECODER_OPTIONS="--dcfilter --fix" NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1250 --net-ro-interval 0.05 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005" JSON_OPTIONS="--json-location-accuracy 2" LAT=51.5074 # your latitude (positive = North) LON=-0.1278 # your longitude (negative = West) ALTITUDE=50 # your elevation in metres above sea level
pi@raspberrypi:~$ sudo systemctl restart readsb pi@raspberrypi:~$ sudo systemctl status readsb ● readsb.service Active: active (running)
Check that the dongle is being detected
pi@raspberrypi:~$ sudo readsb --device-type rtlsdr --device 0 --interactive Found 1 device(s): 0: Realtek, RTL2838UHIDIR, SN: 00000001 Using device 0: Generic RTL2832U OEM Found Rafael Micro R820T tuner Sampling at 2400000 S/s. ...
Step 2 — Verify Data Is Flowing
Before installing the web interface, confirm readsb is actually decoding aircraft:
# readsb writes decoded aircraft to this JSON file every second pi@raspberrypi:~$ watch -n1 'cat /run/readsb/aircraft.json | python3 -m json.tool | head -40'
Or use the raw data stream directly:
pi@raspberrypi:~$ nc localhost 30003 | head -20 MSG,3,1,1,400F3A,1,,,,,,,36000,,,51.23,-0.41,,,0,0,0,0 MSG,4,1,1,4CA7B6,1,,,,,,449,215,,,,,,,0,0,0 MSG,1,1,1,400F3A,1,,,,,BAW123,,,,,,,,0,0,0,0
If you see output like this, readsb is receiving and decoding ADS-B messages. No output means no aircraft in range yet — try pointing the antenna out of a window, or wait a few minutes.
Step 3 — Install tar1090 (Radar Web Interface)
tar1090 is a polished, feature-rich web interface that reads readsb's JSON output and displays it as an interactive radar map. It's fast, beautiful, and runs entirely locally with no internet connection required for the map itself.
pi@raspberrypi:~$ curl -L https://github.com/wiedehopf/tar1090/raw/master/install.sh | sudo bash
The installer sets up tar1090 to run under a lightweight HTTP server on port 8080. Open it in your browser:
http://raspberrypi.local:8080
Configure tar1090 for your location
pi@raspberrypi:~$ sudo nano /etc/tar1090/config.js
// Centre the map on your location SiteLat = 51.5074; SiteLon = -0.1278; SiteShow = true; // show your location as a dot on the map SiteName = "My Pi"; // Display preferences DefaultZoom = 7; // map zoom level on load (7 shows a wide regional view) ShowAltitudeChart = true; TrackHistorySize = 200; // number of trail points per aircraft PageName = "My Flight Radar";
Step 4 — Install graphs1090 (Statistics Dashboard)
graphs1090 generates historical graphs of your station's performance — message rates, aircraft counts, range over time, and signal strength. Install it alongside tar1090:
pi@raspberrypi:~$ curl -L https://github.com/wiedehopf/graphs1090/raw/master/install.sh | sudo bash
Access the graphs dashboard at:
http://raspberrypi.local:8080/graphs1090/
After a day of operation you'll see charts showing when aircraft traffic peaks (morning and evening rushes are clearly visible), your maximum detection range, and how different antenna positions affect your message rate.
Step 5 — Feed Data to FlightAware (Optional)
FlightAware, Flightradar24, ADSBexchange, and others aggregate ADS-B data from volunteer feeders worldwide to build their global flight tracking maps. Sharing your local data earns you a free premium account on most of these services — and it genuinely improves flight tracking coverage in your area.
Install PiAware (FlightAware feeder)
# Add FlightAware's repository pi@raspberrypi:~$ wget -O /tmp/piaware_bullseye_arm64.deb \ https://flightaware.com/adsb/piaware/files/packages/raspbian/bullseye/piaware_10.0_arm64.deb pi@raspberrypi:~$ sudo apt install /tmp/piaware_bullseye_arm64.deb pi@raspberrypi:~$ sudo piaware-config allow-auto-updates yes pi@raspberrypi:~$ sudo piaware-config allow-manual-updates yes pi@raspberrypi:~$ sudo systemctl start piaware pi@raspberrypi:~$ sudo systemctl enable piaware
Claim your feeder at flightaware.com/adsb/piaware/claim — log in or create a free account and it will automatically detect your running PiAware instance.
Install fr24feed (Flightradar24 feeder)
pi@raspberrypi:~$ wget -O /tmp/fr24feed.deb https://repo-feed.flightradar24.com/linux_arm_binaries/fr24feed_1.0.40-2_armhf.deb pi@raspberrypi:~$ sudo dpkg -i /tmp/fr24feed.deb # Run the signup wizard (creates an account and generates your sharing key) pi@raspberrypi:~$ sudo fr24feed --signup
The signup wizard asks for your email address, location, and MLAT preference. It configures fr24feed to read from readsb's output port automatically.
Step 6 — Improve Your Range
Once everything is working, antenna placement is the single biggest factor in how many aircraft you can see. Here's what makes the biggest difference:
Antenna height
ADS-B signals travel in straight lines (line-of-sight). Every metre of additional antenna height extends your horizon. A loft-mounted antenna will typically see 2–3× more aircraft than one on a windowsill.
Avoid coax cable runs
Standard coax cable loses signal at 1090 MHz — roughly 6–10 dB per 10 metres of RG58. Use low-loss cable (LMR-400 or equivalent) for runs longer than 2 metres, or use a long USB cable and put the Pi near the antenna instead.
Use a bandpass filter
Strong nearby signals (mobile phone masts, FM radio) can overload the RTL-SDR's tuner and mask weak ADS-B signals. A 1090 MHz bandpass filter (~£10) placed between the antenna and dongle dramatically improves performance in urban areas. The FlightAware 1090 MHz dark blue filter is the standard recommendation.
Build a simple DIY antenna
A quarter-wave ground-plane antenna for 1090 MHz is one of the most cost-effective projects in amateur radio. You need one vertical element of 69 mm and four radial ground elements of the same length, made from stiff wire or a coat hanger. Plenty of build guides exist at rtl-sdr.com.
Troubleshooting
lsusb | grep RTL — you should see a Realtek entry. If not, try a different USB port or cable. If it shows up but readsb sees nothing, check the DVB-T driver isn't claiming it: lsmod | grep dvb_usb — if it appears, the blacklist file wasn't applied; reboot and try again. Finally, check you have an antenna connected — a bare dongle with no antenna receives almost nothing. Even indoors, a connected antenna should pick up at least a few strong nearby aircraft within minutes.cat /etc/modprobe.d/rtlsdr.conf — should contain blacklist dvb_usb_rtl28xxu. If the file is missing or empty, create it: sudo echo "blacklist dvb_usb_rtl28xxu" > /etc/modprobe.d/rtlsdr.conf, then reboot. Also try sudo rtl_test — if it finds the device, the issue is readsb's config; if it also fails, the device truly isn't being recognised.sudo systemctl status readsb. Then check the aircraft JSON is being updated: ls -la /run/readsb/aircraft.json — the timestamp should be recent. If tar1090 is looking in the wrong place, check its config: cat /etc/tar1090/nginx.conf for the JSON path. Restart both services: sudo systemctl restart readsb tar1090.Quick Reference
| Task | Command / URL |
|---|---|
| Live radar map | http://raspberrypi.local:8080 |
| Statistics graphs | http://raspberrypi.local:8080/graphs1090/ |
| Restart readsb | sudo systemctl restart readsb |
| View readsb log | sudo journalctl -u readsb -f |
| Check aircraft JSON | cat /run/readsb/aircraft.json | python3 -m json.tool | head -30 |
| Raw ADS-B data stream | nc localhost 30003 | head |
| Detect RTL-SDR dongle | rtl_test -t |
| List USB devices | lsusb | grep RTL |
| Check DVB-T not loaded | lsmod | grep dvb_usb |
| readsb config | /etc/default/readsb |
| tar1090 config | /etc/tar1090/config.js |
| PiAware feeder status | sudo systemctl status piaware |
| FR24 feeder status | sudo systemctl status fr24feed |
| Claim FlightAware feeder | flightaware.com/adsb/piaware/claim |
| RTL-SDR buying guide | rtl-sdr.com |
| 1090 MHz antenna guide | rtl-sdr.com ADS-B guide |
| readsb / tar1090 author | github.com/wiedehopf |