PiAware - Aircraft Overhead Indicator LED

I’ve been using the PiAware software to track aircraft flying near me and I liked the idea of turning an LED on when a plane was overhead (or at least near by!). The first step was creating a way of reading data from PiAware using Python 3, so I created a module called flightdata.py. Once I had the data it was simply a case of looping through each of the aircraft signals found, calculating the distance between my gps co-ordinates and the gps position of the aircraft. If the distance was less than 10km I turned the led on! I ‘reused’ the code to calculate the distance between 2 GPS co-ords from codecodex.”