Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Where are they flying to?

Where are they flying to?

Experiments in flight tracking using golang

Andrew Larcombe

November 02, 2016
Tweet

More Decks by Andrew Larcombe

Other Decks in Technology

Transcript

  1. …but fortunately not under either of the main flightpaths. The

    east-west prevailing winds mean that the other people get more problems from flights. We do have the occasional aircraft flying overhead though.
  2. I don’t know what i’m talking about. I’m not an

    expert on this, and this is only a hobby project. Some of what follows might be incorrect or hearsay, but broadly it’s correct. So, how do we find out which airport an aeroplane is bound for?
  3. Often it’s like this - secondary radar. The dish spins

    which activates a transponder on the aircraft which in turn sends information back.
  4. ✈ ✈ ✈ More frequently these days it’s using ADS-B

    “automatic dependent surveillance-broadcast”. Aircraft constantly broadcast information such as speed, position, altitude - this can be picked up by ground stations, other aircraft, potentially even satellites. More like a distributed system.
  5. This is how flightradar24 works - users receive these broadcasts

    then feed back into flightradar24 who use the aggregated data to produce realtime maps. I wanted to build up a database of flights over my house to find out where they were going to.
  6. ✈ position velocity identifier 1090MHz Aircraft constantly broadcast packets of

    data on 1090MHz Position, velocity, identifiers and other information.
  7. ✈ position velocity identifier 1090MHz You can pick these messages

    up using a $15 USB DVB/FM stick. The supplied aerial can pick up aircraft in a ~10 miles radius. Alternatively you can build your own aerial using a wire coat hanger and pick up aircraft hundreds of miles away.
  8. ✈ position velocity identifier 1090MHz dump1090 These messages can be

    decoded using the dump1090 software https://github.com/MalcolmRobb/dump1090 which can in turn stream out the decoded messages over tcp network connection.
  9. ✈ position velocity identifier 1090MHz dump1090 collector wherearetheyflyingto I wrote

    ‘wherearetheyflyingto’ in go - a high performance language from google. I knew it would have no problem with the amount of data being received.
 Internally it’s built from a number of components. The ‘collector’ assembles information about a flight from the various messages it transmits. It stores this in a lightweight, expirable, in-memory cache.
  10. ✈ position velocity identifier 1090MHz dump1090 collector overhead? wherearetheyflyingto The

    ‘overhead’ component determines whether a flight has passed overhead. Overhead is quite an imprecise term though and what constitutes ‘overhead’ is actually determined in part by the altitude of the aircraft.
  11. ✈ position velocity identifier 1090MHz dump1090 collector destination
 finder Website

    Website Website overhead? wherearetheyflyingto The Destination Finder component takes a flight number and retrieves the destination latitude-longitude by means of screen scraping various websites. The website sources are independent and pluggable (ie you can choose at runtime which sources to use) and take advantage of go’s interfaces.
  12. ✈ position velocity identifier 1090MHz dump1090 collector destination
 finder Website

    Website Website overhead? wherearetheyflyingto Logs logger Once a complete set of data for an aircraft flying overhead - altitude, position and destination - has been collected the logger component writes an entry to a log file. This is aggregated in a centralised logging system which then pushes a notification to a slack channel…
  13. ✈ position velocity identifier 1090MHz dump1090 collector destination
 finder Website

    Website Website overhead? output wherearetheyflyingto DB Logs logger …the output component then also writes a record to a db. Periodically this database is queried and produces new data for a heat map - this is published using github’s publishing framework, github-pages at https://andrewl.github.io/wherearetheyflyingto
  14. Heatmap indicates that most flights are destined along an arc

    from central Europe, the Middle East and Indonesia, with another hotspot in North America.
  15. The altitude filter provides a more nuanced view.
 Flights under

    9000 feet are often destined for Frankfurt, Munich, Geneva, Athens, Istanbul
  16. At the other end of the altitude scale, flights over

    27000 feet - usually seen leaving vapour trails are destined for locations nearer to home - including Paris, Netherlands, Bristol, Birmingham, Newcastle and Dublin
  17. In the middle of the altitude range - around 9000-18000

    feet - there’s a huge hotspot around London. What’s going on?
  18. It appears that although I’m not under a flight path

    from Heathrow it appears that I am under major flightpaths for both Luton and Stanstead airports!