コード例 #1
0
  public boolean Add(Location location) {

    if (location.getAccuracy() < EXCELLENT_ACCURACY) {
      currentAccuracy = ACCURACY.EXCELLENT;
    } else if (location.getAccuracy() < GOOOD_ACCURACY) {
      currentAccuracy = ACCURACY.GOOD;
    } else if (location.getAccuracy() < AVERAGE_ACCURACY) {
      currentAccuracy = ACCURACY.AVERAGE;
    } else if (location.getAccuracy() < LOW_ACCURACY) {
      currentAccuracy = ACCURACY.BAD;
    } else if (location.getAccuracy() < VERY_LOW_ACCURACY) {
      currentAccuracy = ACCURACY.VERY_BAD;
    }

    if (location.getAccuracy() > LOW_ACCURACY && connectTries < MAX_CONNECT_TRIES) {
      connectTries++;
      return false;
    }

    connectTries = 0;
    buffer.Add(location);
    return true;
  }
コード例 #2
0
 public float DistanceToDestination(LatLng destination) {
   return buffer.DistanceToDestination(destination);
 }
コード例 #3
0
 public float TimeToDestination(LatLng destination) {
   return buffer.TimeToDestination(destination);
 }
コード例 #4
0
 public float getAverageSpeed() {
   return buffer.getAverageSpeed();
 }