From ee9531f76ec31ac2d1f35ba5b7b1513874f2be01 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Tue, 12 Dec 2017 08:59:41 +0100 Subject: Do not prefer gps fixes just for being into dive time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See commit 6f42ab46da1b5956. Unfortunately, this code is duplicated (and an obvious candidate for code cleanup). So replicate the mentioned commit here. In fact, the mentioned issue #666 talkes about the mobile app, and the fix was only done for the desktop. Originally-by: Salvador Cuñat Signed-off-by: Jan Mulder --- core/gpslocation.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'core') diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp index 753b4a72f..15c7f0ab0 100644 --- a/core/gpslocation.cpp +++ b/core/gpslocation.cpp @@ -294,15 +294,6 @@ bool GpsLocation::applyLocations() if (j + 1 < cnt && time_during_dive_with_offset(d, gpsTable[j+1].when, SAME_GROUP)) { if (verbose) qDebug() << "look at the next gps fix @" << get_dive_date_string(gpsTable[j+1].when); - /* first let's test if this one is during the dive */ - if (time_during_dive_with_offset(d, gpsTable[j+1].when, 0)) { - if (verbose) - qDebug() << "which is during the dive, pick that one"; - copy_gps_location(gpsTable[j+1], d); - changed = true; - last = j + 1; - break; - } /* we know the gps fixes are sorted; if they are both before the dive, ignore the first, * if theay are both after the dive, take the first, * if the first is before and the second is after, take the closer one */ -- cgit v1.2.3-70-g09d2