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; }
public float DistanceToDestination(LatLng destination) { return buffer.DistanceToDestination(destination); }
public float TimeToDestination(LatLng destination) { return buffer.TimeToDestination(destination); }
public float getAverageSpeed() { return buffer.getAverageSpeed(); }