During my school days, when I see a flight flying above , just curious to understand , from where to where it is flying, what would be its speed and at what height it is flying and details like that..
When my colleague Sanjay Saxena , a developer advocate @ IBM US Digital group updated me about a similar solution, I got excited and thought of quickly replicating it to have the experience of collecting the data from the flights flying above.
I understand that all commercial flights are emitting the data in the 1090MHz frequency and the same can be decoded using the ADS-Bprotocol.
Sanjay has done this using RasperryPi device (https://github.com/ibm/air-traffic-control) but I prefer to use Intel Edison which I find it very convenient.
Some of the challenges in installing the device drivers and running the decoder is addressed in this blog. Hope you will find it useful.
Part 1 covers the device integration and decoding the data. part 2 wil be focused on moving the data to Bluemix (cloud) for further exploration.
Step 1: Understand the Hardware Device
- Device specification: NooElec – RB20T2 SDR & DVB-T (NESDR Mini 2)
- Intel Edison
Step 2: Connect the Noolec -SDR Antenna to Intel
- Connect to the power source as shown in the picture (featured image @ top).
- Connect the NooElec device in the USB slot and notice the switch position.
- Connect to the Intel Edison device with the ip address assigned to it. Refer relevant documents on how to connect to Edison.
- “lsusb” commands return blank since the driver is not yet installed
Step 3: Setup Edison environment for USB driver installation
“opkg” can be used to install the required filesets in Edison. The base feed for the same should be updated.
- Update /etc/opkg/base-feeds.conf contents with below URL details:
- opkg update
- opkg install libusb-1.0-dev
src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32
Step 4: – Build and Install RTL-SDR Driver @ Edison
- cd ~
- $ git clone git://git.osmocom.org/rtl-sdr.git
- $ cd ~/rtl-sdr
- $ cmake ./ -DINSTALL_UDEV_RULES=ON
- $ make
- $ sudo make install
- $ sudo ldconfig
Step 5: Build Dump1090 server
( configured to receive the ADS-B raw message packets like 8d8005fb42e489…)
- cd ~
- $ git clone https://github.com/MalcolmRobb/dump1090
- $ cd ~/dump1090
- $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
- $ make
Step 6: Run the Dump server
(Ensure that the SDR device is connected with Edison and Powered ON )
- cd ~/dump1090
- $ ./dump1090 –raw –net
At this stage, the SDR is tuned to 1090MHz frequency and listen for client TCP connections on port 30002. All the connected clients will receive the raw ADS-B messages.
- output sample: a80007000000000000000081225d How to interpret this data – Refer Decoding guide – http://adsb-decode-guide.readthedocs.io/en/latest/content/introduction.html
- Issue: Error opening the RTLSDR device: Device or resource busy
- Soln : Reboot Edison
Step 7: Decode the Raw message to readable
- clone the git , https://github.com/RajeshJeyapaul/ADSB-Bluemix-Intel.git onto the Edison
- Modify the host to the IP address of Edison (line 5) var host = ‘192.168.1.144’; var port = 30002;
- Run it as : Run the nodejs – node node-examplenet.js
output sample :
- Flight status : 05 (air or ground), 0 – airborne a80007000000000000000081225d – Flight Status 5: Special Position Identification. Airborne or Ground
Wow !! it is quite interesting to see the flights altitude ramping up whenever a flight from our nearby airport takes off..