Fixed equals method, which was screwing up accuracy improvement algo

This commit is contained in:
dkeen@dkeen-laptop 2012-01-07 11:39:26 -08:00
parent c72d07ce3a
commit c0f00cd9f4
2 changed files with 4 additions and 7 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dougkeen.bart"
android:versionCode="9"
android:versionName="1.1" >
android:versionCode="10"
android:versionName="1.1.1" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

View File

@ -7,6 +7,7 @@ import com.dougkeen.bart.Line;
import com.dougkeen.bart.Station;
public class Departure implements Parcelable, Comparable<Departure> {
private static final int ESTIMATE_EQUALS_TOLERANCE_MILLIS = 59999;
private static final int MINIMUM_MERGE_OVERLAP_MILLIS = 10000;
public Departure() {
@ -249,11 +250,7 @@ public class Departure implements Parcelable, Comparable<Departure> {
return false;
if (line != other.line)
return false;
if (maxEstimate != other.maxEstimate)
return false;
if (minEstimate != other.minEstimate)
return false;
if (minutes != other.minutes)
if (Math.abs(maxEstimate - other.maxEstimate) > ESTIMATE_EQUALS_TOLERANCE_MILLIS)
return false;
if (platform == null) {
if (other.platform != null)