Removed TripStatists min/max latitude/longitude.

This also removed: search does not account for closer tracks (to current position).
This commit is contained in:
Dennis Guse
2019-12-27 11:32:22 +01:00
parent b94f3c176b
commit f89b2b0efb
8 changed files with 12 additions and 133 deletions
@@ -116,10 +116,6 @@ public class ContentProviderUtils {
int totalDistanceIndex = cursor.getColumnIndexOrThrow(TracksColumns.TOTALDISTANCE);
int totalTimeIndex = cursor.getColumnIndexOrThrow(TracksColumns.TOTALTIME);
int movingTimeIndex = cursor.getColumnIndexOrThrow(TracksColumns.MOVINGTIME);
int minLatIndex = cursor.getColumnIndexOrThrow(TracksColumns.MINLAT);
int maxLatIndex = cursor.getColumnIndexOrThrow(TracksColumns.MAXLAT);
int minLonIndex = cursor.getColumnIndexOrThrow(TracksColumns.MINLON);
int maxLonIndex = cursor.getColumnIndexOrThrow(TracksColumns.MAXLON);
int maxSpeedIndex = cursor.getColumnIndexOrThrow(TracksColumns.MAXSPEED);
int minElevationIndex = cursor.getColumnIndexOrThrow(TracksColumns.MINELEVATION);
int maxElevationIndex = cursor.getColumnIndexOrThrow(TracksColumns.MAXELEVATION);
@@ -160,13 +156,6 @@ public class ContentProviderUtils {
if (!cursor.isNull(movingTimeIndex)) {
tripStatistics.setMovingTime(cursor.getLong(movingTimeIndex));
}
if (!cursor.isNull(minLatIndex) && !cursor.isNull(maxLatIndex) && !cursor.isNull(minLonIndex) && !cursor.isNull(maxLonIndex)) {
int bottom = cursor.getInt(minLatIndex);
int top = cursor.getInt(maxLatIndex);
int left = cursor.getInt(minLonIndex);
int right = cursor.getInt(maxLonIndex);
tripStatistics.setBounds(left, top, right, bottom);
}
if (!cursor.isNull(maxSpeedIndex)) {
tripStatistics.setMaxSpeed(cursor.getFloat(maxSpeedIndex));
}
@@ -350,10 +339,6 @@ public class ContentProviderUtils {
values.put(TracksColumns.TOTALDISTANCE, tripStatistics.getTotalDistance());
values.put(TracksColumns.TOTALTIME, tripStatistics.getTotalTime());
values.put(TracksColumns.MOVINGTIME, tripStatistics.getMovingTime());
values.put(TracksColumns.MINLAT, tripStatistics.getBottom());
values.put(TracksColumns.MAXLAT, tripStatistics.getTop());
values.put(TracksColumns.MINLON, tripStatistics.getLeft());
values.put(TracksColumns.MAXLON, tripStatistics.getRight());
values.put(TracksColumns.AVGSPEED, tripStatistics.getAverageSpeed());
values.put(TracksColumns.AVGMOVINGSPEED, tripStatistics.getAverageMovingSpeed());
values.put(TracksColumns.MAXSPEED, tripStatistics.getMaxSpeed());
@@ -247,7 +247,6 @@ public class SearchEngine {
score *= getTitleBoost(query, track.getName(), track.getDescription(), track.getCategory());
TripStatistics statistics = track.getTripStatistics();
score *= getDistanceBoost(query, statistics.getMeanLatitude(), statistics.getMeanLongitude());
long meanTimestamp = (statistics.getStartTime() + statistics.getStopTime()) / 2L;
score *= getTimeBoost(query, meanTimestamp);
@@ -48,14 +48,18 @@ public interface TracksColumns extends BaseColumns {
String TOTALDISTANCE = "totaldistance"; // total distance
String TOTALTIME = "totaltime"; // total time
String MOVINGTIME = "movingtime"; // moving time
String MINLAT = "minlat"; // minimum latitude
String MAXLAT = "maxlat"; // maximum latitude
String MINLON = "minlon"; // minimum longitude
String MAXLON = "maxlon"; // maximum longitude
String AVGSPEED = "avgspeed"; // average speed
// average moving speed
String AVGMOVINGSPEED = "avgmovingspeed";
@Deprecated
String MINLAT = "minlat"; // minimum latitude // TODO UNUSED
@Deprecated
String MAXLAT = "maxlat"; // maximum latitude // TODO UNUSED
@Deprecated
String MINLON = "minlon"; // minimum longitude //TODO UNUSED
@Deprecated
String MAXLON = "maxlon"; // maximum longitude //TODO UNUSED
String AVGSPEED = "avgspeed"; // average speed
String AVGMOVINGSPEED = "avgmovingspeed"; // average moving speed
String MAXSPEED = "maxspeed"; // maximum speed
String MINELEVATION = "minelevation"; // minimum elevation
String MAXELEVATION = "maxelevation"; // maximum elevation