summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-12-12 08:59:41 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-13 05:07:15 -0800
commitee9531f76ec31ac2d1f35ba5b7b1513874f2be01 (patch)
tree9c74143da8811e693979705332385444eef22c03
parent5707554e98eab431c1b2c50bf13c51770ff38db8 (diff)
downloadsubsurface-ee9531f76ec31ac2d1f35ba5b7b1513874f2be01.tar.gz
Do not prefer gps fixes just for being into dive time
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 <salvador.cunat@gmail.com> Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
-rw-r--r--core/gpslocation.cpp9
1 files changed, 0 insertions, 9 deletions
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 */