public static void updateGlobalGps(final Geopoint gpsPosition) {
        if (gpsPosition != null) {
            INSTANCE.coords = gpsPosition;
            gpsPosVersion.incrementAndGet();
        }
    }
sorts caches by distance to given GPS position
main/src/main/java/cgeo/geocaching/sorting/GlobalGPSDistanceComparator.java