Flight Radar Display
Live closest aircraft to me, received from ADS-B messages using a 1090 MHz antenna
Motivation and background
Several years back, I purchased a few dozen 32x32 LED matrix panels to be converted into a live stock ticker to hang on my wall. After realizing the power draw, API costs, and overall idea would be a bit overkill, I kept thinking about other applications instead – see Word Clock PCB.
Around that same time, I purchased an aircraft receiver kit from Nooelec which came with a couple of antennas and two USB SDRs. A software defined radio (SDR) is a device that can convert radio signals into digital information that can be read by a computer. In this case, the kit came with 978 MHz and 1090 MHz antennas meant to pickup signals from aircraft. Most commercial airplanes use 1090 MHz to communicate using the ADS-B protocol. 978 MHz is commonly used for GA aircraft and was excluded from my device as commercial aircraft were my primary focus.
My ADS-B receiver that fed to Flightaware
The kit allowed me to mount my Raspberry Pi on my window with both antennas to pickup nearby aircraft. At the time, I even fed that data back into Flightaware, a large, online aicraft tracking site with live global coverage. However, other than viewing the results on my Flightaware dashboard, I had no feedback on what my receiver was actually picking up. Since then I envisioned some sort of device that could show this in real time.
First movers advantage
A few months ago, I saw an ad for a company called TheFlightWall. They produce an extremely similar device to what I was imagining, which reignited my desire to work on this project. Although their model has similar functionality, it achieves it using live data fed via API. While I like the execution of their device, I thought it would be cool to finally work on my fully offline version.
The plan
I already had most of the components I needed from prior projects: LED matrix displays, Raspberry Pi and LED matrix hat, 1090 MHz antenna, and various cabling. The goal now was to connect everything together to feed data from the antenna via SDR to the Pi, extract relevant data, and push any updates to the 32x64 pixel display made up of two LED matrix displays. The goal was to display the callsign, altitude, speed, vertical speed, and track of the nearest aircraft to my location.
I had planned on using the hzeller/rpi-rgb-led-matrix library to drive the displays. Natively, the Pi can drive the display using its GPIO headers, however, the author of the library also included plans for a custom Pi hat PCB that would expose the correct pins to connectors that the displays already used. This made connecting additional displays considerably easier. I had already ordered the hat and its components, and soldered the board in a prior project.

The execution
Now that I had a plan for driving the displays, it was time to focus on the RF side of things. As I mentioned, the ADS-B protocol would be used to receive data from any nearby aircraft. This protocol is required for all commercial aviation, and contains some very useful information. Planes automatically transmit ADS-B messages via onboard antennas to give ground controllers, towers, and other aircraft data on its position. More general information about the protocol can be found here mode-s.org.
For my purposes, I am interested in messages that contain informatoin about the position of the aircraft and any messages that contain a callsign. Per the site above, this could be any messages with type 1-4, 9-18, 19, 20-22, or 28. More importantly, however, are the fields of the message, which contain the data itself. The fields can be empty, which would mean I do not have any data to act upon. A simple decoder can be used, such as the following, to actually extract the relevant information needed.
#include <iostream>#include <optional>#include <string>#include <string_view>#include <vector>
struct SBS1Message { std::string message_type; // Field 0 (e.g., "MSG") int transmission_type = 0; // Field 1 (1-8) std::string session_id; // Field 2 std::string aircraft_id; // Field 3 std::string hex_ident; // Field 4 (ICAO 24-bit hex) std::string flight_id; // Field 5 std::string date_generated; // Field 6 std::string time_generated; // Field 7 std::string date_logged; // Field 8 std::string time_logged; // Field 9 std::optional<std::string> callsign; // Field 10 std::optional<int> altitude; // Field 11 (ft) std::optional<double> ground_speed; // Field 12 (knots) std::optional<double> track; // Field 13 (degrees) std::optional<double> latitude; // Field 14 std::optional<double> longitude; // Field 15 std::optional<int> vertical_rate; // Field 16 (ft/min) std::optional<std::string> squawk; // Field 17 std::optional<bool> alert; // Field 18 (Squawk change) std::optional<bool> emergency; // Field 19 std::optional<bool> spi; // Field 20 (Ident active) std::optional<bool> is_on_ground; // Field 21};
class SBS1Decoder {private: static std::vector<std::string_view> splitCSV(std::string_view line) { std::vector<std::string_view> fields; fields.reserve(22);
size_t start = 0; while (start <= line.size()) { size_t end = line.find(',', start); if (end == std::string_view::npos) { fields.push_back(line.substr(start)); break; } fields.push_back(line.substr(start, end - start)); start = end + 1; } return fields; }
static std::optional<int> parseInt(std::string_view sv) { if (sv.empty()) return std::nullopt; try { return std::stoi(std::string(sv)); } catch (...) { return std::nullopt; } }
static std::optional<double> parseDouble(std::string_view sv) { if (sv.empty()) return std::nullopt; try { return std::stod(std::string(sv)); } catch (...) { return std::nullopt; } }
static std::optional<bool> parseBool(std::string_view sv) { if (sv.empty()) return std::nullopt; if (sv == "1" || sv == "-1") return true; if (sv == "0") return false; return std::nullopt; }
static std::string_view trim(std::string_view sv) { size_t first = sv.find_first_not_of(" \r\n\t"); if (first == std::string_view::npos) return ""; size_t last = sv.find_last_not_of(" \r\n\t"); return sv.substr(first, (last - first + 1)); }
public: static std::optional<SBS1Message> decode(std::string_view raw_line) { std::string_view clean_line = trim(raw_line); if (clean_line.empty()) return std::nullopt;
auto fields = splitCSV(clean_line);
if (fields.size() < 10) return std::nullopt;
SBS1Message msg; msg.message_type = std::string(fields[0]); msg.transmission_type = parseInt(fields[1]).value_or(0); msg.session_id = std::string(fields[2]); msg.aircraft_id = std::string(fields[3]); msg.hex_ident = std::string(fields[4]); msg.flight_id = std::string(fields[5]); msg.date_generated = std::string(fields[6]); msg.time_generated = std::string(fields[7]); msg.date_logged = std::string(fields[8]); msg.time_logged = std::string(fields[9]);
if (fields.size() > 10 && !fields[10].empty()) msg.callsign = std::string(trim(fields[10])); if (fields.size() > 11) msg.altitude = parseInt(fields[11]); if (fields.size() > 12) msg.ground_speed = parseDouble(fields[12]); if (fields.size() > 13) msg.track = parseDouble(fields[13]); if (fields.size() > 14) msg.latitude = parseDouble(fields[14]); if (fields.size() > 15) msg.longitude = parseDouble(fields[15]); if (fields.size() > 16) msg.vertical_rate = parseInt(fields[16]); if (fields.size() > 17 && !fields[17].empty()) msg.squawk = std::string(fields[17]); if (fields.size() > 18) msg.alert = parseBool(fields[18]); if (fields.size() > 19) msg.emergency = parseBool(fields[19]); if (fields.size() > 20) msg.spi = parseBool(fields[20]); if (fields.size() > 21) msg.is_on_ground = parseBool(fields[21]);
return msg; }};Now I know how I will extract the data and how I will display the data on the displays. But what about actually receiving the data? Thats where flightaware/dump1090 comes in. I mentioned earlier that Flightaware was the live tracking site for all of these aircraft, and that I fed data to the site using my Pi and the two antennas. This is the software that runs on the Pi to actually translate the raw data from the SDR to ADS-B message frames. There are several versions of this software, including a rust fork, however, for ease of use I chose the Flightaware fork as I was already familiar with it. These message frames are passed via http to my program using SBS1 packets, which is what the decoder above extracts data from.
I am planning on mounting this entire display and antenna device on the wall near my window. For testing purposes, though, the device is on my workbench where I can use my benchtop power supply and other tools to work on the hardware. As my workbench is nowhere near my window, the antenna would have a hard time picking up any useful information. During testing, I used the 1090 antenna combined with an RTL-SDR, a significantly fancier version of the small USB SDRs I have, plugged into my server which is conveneiently sitting near my window. While this version of the project isn’t entirely offline since I am pulling data in from the server over my network, the RF portion still stands as valid.
My homelab server with the RTL-SDR and 1090 MHz antenna
Example dump1090 output of decoded ADS-B frames
Finally, it was time to put all of the pieces together. I have not mentioned it yet, but this project was mainly written in C++, one of my preferred languages. This fits in well with the display driver library which is also in C++.
The program continously reads in any and all input coming from the SDR. While a large portion of the messages are uninteresting for the purposes of this project, I still need to decode and check each data frame to see if anything relevant appears. Once the closest aircraft is found, its callsign, altitude, speed, track, and vertical speed are all displayed on the board. The display also has a little pixelated logo for most known operators in the Altanta area. The logo area turns into a pixelated biplane if the plane is GA, denoted by a November registration number, or a UFO if the carrier is unknown. While testing the program intitally, I saw UFO icon popup very early on, leading me to peekd outside to see that the military was flying a blackhawks over the city.
Pixelated logos included in the project
Photos from testing






Current status
You may notice I flagged this project as unfinished. I have not yet made the final enclosure to be mounted on the wall for the display yet. I recently experimented with FreeCAD, an open source CAD program that is entirely free and cross platform. I do not use CAD often, however, I typically use Fusion 360 as my main program. I had planned on giving FreeCAD a chance to design the enclosure for this project, but I kept falling short of my goals in my designs. While I continue to look for a solid alternative to Fusion for my Linux laptop, I will finalize the design for this enclosure on Fusion 360. Until then, the display remains on my workbench, pulling data from the skies with help from my server.