Realtime plane tracking on OSX using DVB-T SDR
This is a quick post showing how to to get Realtime plane tracking working on Mac OSX. I decided to write this after I purchased this DVB-T dongle from Pimoroni
They had several links to good tutorials showing how to get the DVB-T dongle to work as a Software-defined Radio (SDR). I used the one written by David Taylor of SatSignal.eu. The tutorials listed show you how to get this running on a RaspberryPi.
This was a fun project I wanted to do with my youngest son, so I wanted to check that it would work, and see how quick the process was as I wanted to keep him interested. So I used the steps below to get it working in secret first on my Mac running OSX High Sierra 10.13.4
Prerequisites:
Install Brew and then use it to install git
The rtl-sdr repo depends on the libusb-1.0–0-dev package but this isnt available on OSX, its closest equivalent is libusb-compat, so we need to install that instead.
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build/
brew install cmake
brew upgrade cmake
brew install libusb-compat
Changes for Catalina (10.15.7) insert here:
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig
rtl_test -t
git clone git://github.com/MalcolmRobb/dump1090.git
cd dump1090/
make
Thats both the required repo’s sorted, so now we can run a quick terminal session based test to see if the dongle can pick up any realtime flight information about some of the planes passing overhead!
EDIT: For this to work on OSX 10.15.7 (Catalina) - You need to add 2 extra steps to the above make process, as shown below:
export CPATH=”/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/”
cmake ../ -DINSTALL_UDEV_RULES=ON -DCMAKE_POLICY_DEFAULT_CMP0042=OLD
There has also been a change to GoogleMaps terms of service that mean you now need to add an API key into the dump1090 code, or switch to using dump1090-mutability ver 1.15~dev as this uses OpenStreetMaps instead. At the moment I have only found a .deb version available, but am looking to extract the .deb files and create a fork on Github.
I will post an update here once I’ve had a chance to take a look at that.
If you run dump1090 with the interactive switch you see a live updating table of everything that the DVB-T dongle is picking up through it aerial.
./dump1090 — interactive
Or you can run it bound to your local machine, which will produce the following output in Terminal.
./dump1090 — net — net-bind-address 127.0.0.1
Once that is running you can open a browser on your Mac and point it to http://127.0.0.1:8080
Which should produce a nice page like this!
How awesome is that!
My son thoroughly enjoyed doing this on his RaspberryPi and looking at the planes moving around on the map, and its encouraged him to ask all sorts of questions about the World, Planes and Computing. Its simple but great project to get up and running, and a great way of teaching kids some basic geography.
You can look up each flight number by clicking on the flight number and then clicking on the FlightStats link will take you to a third party site with details of where the flight is going, etc.
(I originally wrote this post when I ran metallic-badger.com which is no longer running, and thought I would post it here as my first post on Medium to see how things go!)