added working bearing and distance functions for gps calculations