Revert "#1990 Ignores GPS positions with 0/0 latitude and longitude values."

This reverts commit 55b20c75c0.
This commit is contained in:
sheirerd
2024-09-22 09:50:53 -04:00
parent 55b20c75c0
commit 8070ae3c4b
3 changed files with 38 additions and 54 deletions

View File

@@ -87,20 +87,17 @@ public class PlottableEntityHistory
*/
public void add(PlottableDecodeEvent event)
{
if(event.isValidLocation())
TimestampedGeoPosition mostRecentPosition = getLatestPosition();
TimestampedGeoPosition latest = new TimestampedGeoPosition(event.getLocation(), event.getTimeStart());
if(isUnique(latest, mostRecentPosition))
{
TimestampedGeoPosition mostRecentPosition = getLatestPosition();
TimestampedGeoPosition latest = new TimestampedGeoPosition(event.getLocation(), event.getTimeStart());
mCurrentEvent = event;
mLocationHistory.add(0, latest);
if(isUnique(latest, mostRecentPosition))
while(mLocationHistory.size() > MAX_LOCATION_HISTORY)
{
mCurrentEvent = event;
mLocationHistory.add(0, latest);
while(mLocationHistory.size() > MAX_LOCATION_HISTORY)
{
mLocationHistory.remove(mLocationHistory.size() - 1);
}
mLocationHistory.remove(mLocationHistory.size() - 1);
}
}
}