GPS Speedometer with Python and SL4A

On a very hungover 8 hour train journey back from a spontaneous weekend trip to Berlin I was mucking around SL4A with my Nexus 7 and somehow we ended up wanting to know how fast the train was going and figured we could use the GPS positions to do this. A challenge was issued - I had to write this before we reached Brno. We were just passed Usti nad Labem at this point giving me plenty of time in theory, but my dwindling battery life added a bit of drama to the proceedings. Anyway I managed:

Here's what the output looks like when I run it on my morning tram to work:

The journey this tram follows looks a little like this: