GPS code

Some code for the GPS (not written in an object-oriented manner but
won't be hard to rewrite as such)