A pure Go implementation of dump1090, a Mode S ADS-B decoder for RTL-SDR devices.
- Full Mode S decoding - DF0-21 message types with CRC error correction
- CPR position decoding - Global, relative, and surface position calculations
- Aircraft tracking - State management with CPR frame pairing and timeout handling
- Multiple output formats - Beast, AVR, SBS, FATSV, JSON
- Network I/O - TCP servers for data output and input
- Interactive display - Real-time TTY aircraft list
- JSON file output - dump1090-mutability compatible format (no bundled WebUI)
- Docker support - Minimal container image (network-only by default)
# Clone the repository
git clone https://github.com/aomsir/dump1090-server.git
cd dump1090-server
# Build (requires librtlsdr for hardware support)
go build -o bin/dump1090-server ./cmd/dump1090-server
# Or build without CGO (network-only mode)
CGO_ENABLED=0 go build -o bin/dump1090-server ./cmd/dump1090-server
# Build companion utilities
CGO_ENABLED=0 go build -o bin/view1090 ./cmd/view1090
CGO_ENABLED=0 go build -o bin/faup1090 ./cmd/faup1090For RTL-SDR hardware support:
- macOS:
brew install librtlsdr - Debian/Ubuntu:
apt install librtlsdr-dev - Fedora:
dnf install rtl-sdr-devel
The default Docker image runs in network-only mode and does not access USB RTL-SDR hardware.
Output ports (30002, 30003, 30005, 8080, 10001) serve data to consumers.
Input ports (30001, 30004, 30104) accept remote data ingestion and are only
needed when external senders connect to the container — expose them selectively.
docker build -t dump1090-server .
# Output ports only (typical)
docker run -p 30002:30002 -p 30003:30003 -p 30005:30005 -p 8080:8080 -p 10001:10001 dump1090-server
# All ports (including input, for remote senders)
docker run -p 30001:30001 -p 30002:30002 -p 30003:30003 -p 30004:30004 -p 30005:30005 -p 30104:30104 -p 8080:8080 -p 10001:10001 dump1090-serverThe default Docker image does not access USB RTL-SDR hardware. To use hardware,
build with CGO enabled and run with --privileged or --device flags.
# Live decoding from RTL-SDR device
./dump1090-server
# Network-only mode (receive data from other sources)
./dump1090-server --net-only
# Read from recorded I/Q file
./dump1090-server --infile samples.bin
# Interactive mode with statistics
./dump1090-server --interactive --statsInteractive aircraft display client that connects to a Beast TCP stream (typically dump1090-server port 30005) and shows a live table of tracked aircraft.
# Connect to local dump1090-server
./view1090
# Connect to remote Beast source
./view1090 --beast 192.168.1.10:30005
# Metric units, 30 display rows
./view1090 --metric --interactive-rows 30
# Filter to specific ICAO address
./view1090 --show-only ABCDEFFlags:
| Flag | Default | Description |
|---|---|---|
--beast |
127.0.0.1:30005 |
Beast TCP input address (host:port) |
--interactive-rows |
22 |
Number of display rows |
--interactive-ttl |
60 |
Display TTL in seconds |
--metric |
false |
Use metric units |
--modeac |
false |
Enable Mode A/C decoding |
--show-only |
Only show this ICAO address (hex) | |
--quiet |
false |
Suppress interactive display |
--rtl1090 |
false |
Use RTL1090 display format |
Limitations: Reconnects automatically on connection loss. Only supports Beast binary TCP input (not raw/AVR).
FlightAware uploader proxy that connects to a Beast TCP stream, decodes and tracks Mode S messages, and writes FlightAware TSV (FATSV) to stdout.
# Connect to local dump1090-server
./faup1090
# Connect to remote Beast source
./faup1090 --beast 192.168.1.10:30005
# Disable reconnect
./faup1090 --reconnect 0Flags:
| Flag | Default | Description |
|---|---|---|
--beast |
127.0.0.1:30005 |
Beast TCP input address (host:port) |
--reconnect |
5 |
Reconnect delay in seconds (0 to disable) |
--modeac |
false |
Enable Mode A/C decoding |
--quiet |
false |
Suppress stderr logging |
Limitations: Outputs FATSV to stdout only. Does not forward to FlightAware directly — use with a downstream FA client.
| Port | Protocol | Description |
|---|---|---|
| 30001 | Raw In | Receive AVR/Raw format messages |
| 30002 | AVR Out | Output in AVR text format |
| 30003 | SBS Out | Output in SBS (BaseStation) format |
| 30004 | Beast In | Receive Beast binary format |
| 30005 | Beast Out | Output in Beast binary format |
| 30104 | Beast In | Receive Beast binary format (secondary) |
| 8080 | HTTP | JSON API endpoints |
| 10001 | FATSV | FlightAware TSV format |
/data/aircraft.json- Current aircraft list/data/receiver.json- Receiver information/data/stats.json- Decoding statistics/data/history_N.json- Historical snapshots
--device <N> RTL-SDR device index (default: 0)
--freq <Hz> Center frequency (default: 1090000000)
--gain <N> Gain in 0.1dB units (-1 for auto)
--ppm <N> Frequency correction in PPM
--enable-agc Enable automatic gain control
--bias-tee Enable bias-T power
--infile <file> Read samples from file
--net Enable network services (HTTP, Beast, AVR, SBS, FATSV)
--net-only Network only mode, no RTL-SDR/file input (implies --net)
--net-bind-address <ip> Bind address for all servers
--beast-out-port <N> Beast output port (default: 30005)
--avr-out-port <N> AVR output port (default: 30002)
--sbs-port <N> SBS output port (default: 30003)
--fatsv-port <N> FATSV output port (default: 10001)
--http-port <N> HTTP server port (default: 8080)
--no-beast-out Disable Beast output
--no-avr-out Disable AVR output
--no-sbs Disable SBS output
--raw-in-port <N> Raw/AVR input port (default: 30001)
--beast-in-port <ports> Beast input port(s) (default: 30004,30104)
Comma or whitespace separated list; 0 to disable
--lat <degrees> Receiver latitude
--lon <degrees> Receiver longitude
--max-range <nm> Maximum range in nautical miles
--quiet Suppress all output
--raw Output raw messages only
--onlyaddr Output ICAO addresses only
--mlat Include MLAT timestamps
--show-only <icao> Only show specific ICAO address
--fix Enable 1-bit error correction
--aggressive Enable 2-bit error correction
--interactive Enable interactive TTY display
--interactive-rows <N> Number of rows (default: 22)
--interactive-ttl <N> Display timeout in seconds (default: 60)
--metric Use metric units
--write-json <dir> JSON output directory
--write-json-every <s> Update interval in seconds (default: 1.0)
--history-size <N> Number of history files (default: 120)
--history-interval <N> History snapshot interval (default: 30)
┌─────────────────┐
│ RTL-SDR │ (cgo wrapper, optional)
│ Hardware │
└────────┬────────┘
│ I/Q samples ([]byte, 16-32ms chunks)
▼
┌─────────────────┐
│ DSP Demodulator │ modes/demod.go
│ - Magnitude │ (2.4MHz Manchester decoding)
│ - Preamble │ (5-phase correlation)
│ - Manchester │
└────────┬────────┘
│ Raw messages
▼
┌─────────────────┐
│ Mode S Decoder │ modes/decoder.go
│ - CRC check │ (table-driven, zero-alloc)
│ - DF parsing │ (DF0-21 support)
│ - CPR decode │
└────────┬────────┘
│ Decoded messages
▼
┌─────────────────┐
│ Aircraft Track │ modes/track.go
│ - State merge │ (RWMutex, thread-safe)
│ - Position │ (CPR frame pairing)
│ - Timeout │ (5min TTL)
└────────┬────────┘
│ Aircraft states
▼
┌─────────────────┐
│ Network I/O │ modes/output.go
│ - Beast TCP │ (binary protocol)
│ - AVR TCP │ (text format)
│ - SBS TCP │ (BaseStation format)
│ - FATSV TCP │ (FlightAware TSV)
│ - JSON files │ (periodic dump)
│ - HTTP API │ (REST endpoints)
└─────────────────┘
All critical path functions are optimized for minimal latency:
| Operation | Performance | Allocations |
|---|---|---|
| CRC calculation | 12.7 ns/op | 0 |
| CPR airborne decode | 44.85 ns/op | 0 |
| CPR relative decode | 25.92 ns/op | 0 |
# Run all tests
go test ./...
# Run with coverage
go test -cover ./modes/
# Run benchmarks
go test -bench=. -benchmem ./modes/This implementation maintains bit-exact compatibility with dump1090-mutability:
- Integer fields: Exact match
- Float fields: < 0.000001 error tolerance
- Output formats: Protocol-compatible with existing tools
- JSON schema: dump1090-mutability compatible (use external tools like tar1090 for visualization)
Not supported: WebUI / browser-based map display. The upstream public_html/
assets are not included. Use an external visualizer (e.g., tar1090)
with the JSON API endpoints.
GPL v2+ (matching dump1090-mutability)
Original work:
- Copyright (c) 2014-2016 Oliver Jowett oliver@mutability.co.uk
- Copyright (C) 2012 Salvatore Sanfilippo antirez@gmail.com
Go implementation:
- Copyright (c) 2025 aomsir
- dump1090-mutability - Original C implementation
- ICAO Annex 10, Volume IV - Mode S specification
- 1090-WP29-07 - CPR decoding specification
- SBS BaseStation Format - SBS protocol documentation