# Home ADS-B Receiver

> A self-hosted ADS-B receiver (Raspberry Pi + SDR dongle) that decodes the 1090 MHz broadcasts aircraft send out and feeds Flightradar24. Its live status shows on this site, and a 24/7 YouTube live stream draws the aircraft on a map around Kaohsiung — with no receiver marker, no range rings.

- Result: Decoded messages: 0 → 6,663 in 41 minutes after tuning the gain
- Stack: Raspberry Pi, ADS-B, SDR, Node.js, PowerShell

A flight radar I built at home. Aircraft keep broadcasting their position, altitude and flight code on 1090 MHz (ADS-B); a Raspberry Pi with an SDR TV dongle can receive them, decode them and share them with Flightradar24 in real time. The flight log page records flights I've taken; this one picks up the planes flying overhead.

## Problem

Aircraft constantly broadcast their position, altitude and flight code on 1090 MHz (ADS-B). I wanted to receive those signals at home, share them with Flightradar24 and bring the live status onto this site — but the receiver is at my home, so the site must not reveal where it is.

## Key decisions

1. **Pi24 image + a DVB-T TV dongle**: A Raspberry Pi with a TV dongle as an SDR receiver; Flightradar24's fr24feed has dump1090 decoding built in — cheap, and the data is shared straight away.
2. **The site only reads two JSON files on the LAN and keeps only aggregates**: The Flightradar24 sharing key and internal IP in the status data are never stored or sent out; the site reads every 2 seconds and keeps only now / today / peak concurrent aircraft, airlines, aircraft types and uptime.
3. **Numbers only on the stats page; a map only on the live stream, and never centred on the receiver**: Plotting received aircraft positions puts the receiver at the centre of the circle. So /radar shows numbers only; the live stream map (since 2026-11-29) is fixed on the Kaohsiung area, draws no range rings, doesn't mark the receiver, doesn't compute coverage, and coarsens positions to about 100 metres.
4. **Monitor the receiver too**: Offline for more than 15 minutes, or no aircraft at all for 2 hours in the daytime, sends an email; the weekly and monthly reports include a radar section.

## Trade-offs

- The stats page has no track map — the map lives only on the live stream; cutting the stream's delay from 5 minutes to zero was traded for not disclosing the receiver's location and drawing no range rings
- A Raspberry Pi 3 on an ordinary micro-USB power supply is under-powered: after logging under-voltage warnings the whole board dropped off, and only the official power supply fixed it

## Results

- Right after setup, about a million candidate signals a minute decoded into nothing; the gain was at maximum and noise drowned the signal — at gain 40 it decoded 6,663 messages from 21 aircraft in 41 minutes
- 1,021 position decodes, 0 failures
- Live status, hourly distribution, the last 30 days, airline and aircraft-type stats all feed this site's /radar page
- Turned into a 24-hour YouTube live stream: reads the receiver every 2 seconds with zero delay and draws the map and aircraft on a canvas; with no aircraft around it rotates through the Kaohsiung airport timetable, METAR weather reports and stats for the last three days

## Architecture

```mermaid
flowchart TD
  A["Aircraft<br/>ADS-B 1090 MHz"] --> R["SDR TV dongle"]
  R --> P["Raspberry Pi<br/>fr24feed"]
  P --> F["Flightradar24"]
  P -->|"LAN JSON"| S["This site's server<br/>reads every 2 s"]
  S --> API["Aggregate numbers<br/>no positions"]
  API --> V["/radar stats page"]
  S --> L["Live stream screen<br/>map + aircraft"]
  L --> Y["OBS → YouTube 24h"]
  S -.email when offline.-> W["Watchdog"]
```

## Setup

- Raspberry Pi (Flightradar24's Pi24 system) + a DVB-T TV dongle as the SDR receiver
- fr24feed does the decoding (dump1090) and sends the data to Flightradar24
- Two JSON files are exposed on the LAN — receiver status and the list of aircraft currently received — and this site reads from them

## Troubleshooting

- Right after setup: connected to Flightradar24 and the receiver was running, but about a million candidate signals a minute decoded into nothing, with noise at -31 dBFS
- The gain had never been set and defaulted to maximum, so noise drowned out the aircraft; with --gain 40 the noise dropped to -37 dBFS
- After a restart it decoded 6,663 messages from 21 aircraft in 41 minutes — 1,021 position decodes, 0 failures
- Restarting after a settings change, the software hung "half shut down" for half an hour: Flightradar24 still showed it as connected and the restart button on the web page did nothing, so the only fix was pulling the power — that case is now part of the automatic monitoring

## On this site

- The web server reads the radar on the LAN every 2 seconds and keeps only aggregates — now / today / peak concurrent aircraft, today's airlines and 7-day uptime — shown on the flight log page
- Privacy: the status data contains the Flightradar24 sharing key and an internal IP, which are never stored or sent out; the stats page shows no positions and computes no coverage; the live stream map isn't centred on the receiver, draws no range rings and doesn't mark the receiver
- Live stream: the same data drawn as a 24-hour YouTube stream (OBS captures the web page); with no aircraft around it rotates through the Kaohsiung airport arrivals and departures, airport weather reports (there's also a METAR translator tool) and stats for the last three days; the details are in the blog post "Turning my home flight radar into a live stream" (in Chinese)
- Monitoring: offline for more than 15 minutes, or no aircraft at all for 2 hours in the daytime, sends an email; the weekly operations report includes a radar section

## Hardware & reliability

- Hardware: Raspberry Pi 3 Model B on Wi-Fi with a 16 GB SanDisk card; the DVB-T dongle connects to an antenna. The Pi 3 is fussy about power: an ordinary micro-USB supply under-volts it, and after logging under-voltage warnings the whole board dropped off — the official supply fixed it for good.
- Gain: the dump1090 built into fr24feed defaults to maximum gain, and the noise drowns out the aircraft; switching to --gain 40 took decoding from nothing to 6,663 messages in 41 minutes.
- Temperature: without a heatsink the Pi 3 sits at 68–72 °C right after boot (it throttles at 80 °C), so the admin panel tracks the 24-hour maximum.
- "Half shut down": when network time sync jumps the clock forward after boot, fr24feed restarts itself and then gets stuck in a shutdown state; Flightradar24 still shows it as connected, and the web restart button doesn't help. The site now treats "receiver reports shutdown" as offline, in both the display and the alerts.
- Debugging disconnects: the journal is now kept on the SD card and Wi-Fi power saving is off, so after the next reboot I can still see what happened at the end of the previous boot; before, the logs lived only in memory and vanished on reboot.
- Every 5 minutes the admin panel checks the Pi's power status, temperature and SD card health.

## The live stream screen

- Data: the server reads the receiver's aircraft list every 2 seconds and keeps each aircraft's position, speed and heading for the last 20 minutes only; what it serves is "position at a point in time", with aircraft identifiers replaced by short HMAC codes whose key is regenerated on every start, and coordinates coarsened to about 100 metres.
- Drawing: the whole screen is one canvas. Things that don't move — coastline, county borders, runways, navaids — are drawn once and pasted onto every frame; aircraft are interpolated linearly between samples and dead-reckoned from speed and heading when data is late. It keeps up at 2560×1440 and 60 frames a second.
- Base map: the coastline is Natural Earth 10m data clipped to the Kaohsiung area and simplified to about 700 points (11 KB), county borders come from g0v's taiwan-atlas, and airports and navaids are OurAirports public-domain data — no external map service, which keeps the stream stable.
- With no aircraft: the map blurs and dims and rotates through the Kaohsiung airport timetable, airport METAR reports (with a plain-language translation) and stats for the last three days, switching back as soon as a plane appears. "Offline" is judged by whether aircraft actually arrive, not just the reported status, so a stuck status doesn't leave the screen stuck on offline.
- OBS: the stream captures the web page with OBS's browser source. It never refreshes on its own, so the page reloads itself when it detects a new deploy, and also after 40 seconds without data. The volume meter on the left reads the mixer levels over OBS's built-in WebSocket, because OBS's embedded browser doesn't let web pages use the microphone.
- Privacy rules: the map is fixed on the Kaohsiung area, not centred on the receiver; no range rings, no receiver marker, no coverage; the sweep line is centred on downtown Kaohsiung purely for atmosphere. The site never states the receiver's location or radar code.

---

Author: PINGWEI LI (李秉威, Li Ping-Wei)
Original page: https://kbs0830.com/en/projects/fr24-receiver
