How adsbexchange/readsb works
Readsb is an ADS-B/Mode-S receiver and aircraft-data backend. Its main user-facing flow is to obtain radio or network input, decode messages, maintain aircraft state, then expose or forward results. The README also documents Beast push/receive connections, BeastReduce forwarding, JSON-oriented aircraft output, heatmap generation, and interactive display. The source index identifies the relevant modules, but most runtime call paths were not excerpted, so several architectural links are shown as unverified rather than asserted as source-confirmed calls.
Main entry points: readsb.c Readsb runtime · receiver.c Receiver pipeline · aircraft.c Aircraft records · mode_s.c Mode S decode
Components 20
Input and decoding
- Receiver pipeline
receiver.c - SDR backends
sdr.c - Beast / file input
sdr_beast.c - Mode S decode
mode_s.c - UAT decode
uat2esnt/uat_decode.c - Comm-B decode
comm_b.c - CRC correction
crc.c
Aircraft state
- Aircraft records
aircraft.c - Position tracking
track.c
Outputs and history
- Network services
net_io.c - JSON output
json_out.c - API output
api.c - Globe history
globe_index.c - LZO compression
minilzo/minilzo.c
Runtime operations
- Readsb runtime
readsb.c - Statistics
stats.c - Interactive display
interactive.c
Other components
- Operator
- SDR hardware
- Beast peer
Connections 18
- Operator → Readsb runtime: runs
- SDR hardware → SDR backends: supplies samples
- Readsb runtime → Receiver pipeline: starts pipeline
- Receiver pipeline → SDR backends: reads samples
- Receiver pipeline → Mode S decode: demodulates
- Receiver pipeline → UAT decode: demodulates
- Mode S decode → CRC correction: checks messages
- Mode S decode → Comm-B decode: decodes Comm-B
- Network services → Aircraft records: creates or gets
net_io.c - Position tracking → Aircraft records: updates state
- Readsb runtime → Network services: configures connections
- Beast peer → Network services: exchanges Beast
- Aircraft records → JSON output: emits aircraft data
- Readsb runtime → API output: serves data
- Aircraft records → Globe history: records history
- Readsb runtime → Statistics: updates statistics
- Readsb runtime → Interactive display: refreshes display
- Globe history → LZO compression: compresses output