Plane Spotter
Details
- Date: November 2016
- View code
Technologies/Skills
- Raspberry Pi
- Node
- dump1090
- LCD touchscreen
- Promises
- ES2015
- Websockets
Overview
Yet another pointless experiment, this one is a Node app that uses a Raspberry Pi, a USB DVB-T Receiver (RTLSDR RTL2832U) and Dump1090 to identify nearby aeroplanes and display information about them and their destination on an LCD touchscreen.
Dump1090 gives data about a route, such as its latitude, longitude and callsign.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"hex": "405a46",
"squawk": "7707",
"flight": "BAW364 ",
"lat": 50.755280,
"lon": -0.161751,
"validposition": 1,
"altitude": 18700,
"vert_rate": 1920,
"track": 153,
"validtrack": 1,
"speed": 424,
"messages": 433,
"seen": 0
}
From this data the closest plane is selected, and its callsign is used to identify its route via data provided by Virtual Radar Server. This provides the origin and destination airport codes in ICAO format (for example EGKK for London Gatwick).
With the airport codes, further information about each airport is gathered via data provided by ourairports.com. It identifies the latitude and longitude of the airport, along with its closest city and the ISO two-character country code.
Once the location of the origin or destination airport (whichever is further away) is found, a custom Google image search is performed to select an image of the closest city. The app then uses a smart-cropping algorithm to download and trim the image to the size of the screen.
The node app is set up on the Pi to auto-start on boot, opening the site in Chromium (in full-screen kiosk mode).
By default the images are shown full-screen, with a tap on the touchscreen toggling the display of further information about the flight.
Full setup notes are on Github