Implements gps calculations