summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/subsurfacewebservices.cpp
diff options
context:
space:
mode:
authorGravatar Salvador Cuñat <salvador.cunat@gmail.com>2017-12-02 09:12:35 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-10 11:38:19 -0800
commit6f42ab46da1b5956ad15859c1c2f5829e1af2013 (patch)
tree52abc6acdbe264748d6f77b5be8ef4b4f1f980b3 /desktop-widgets/subsurfacewebservices.cpp
parentc3c5256dc4a80fa1ae85841b6f5abe5b8eed171f (diff)
downloadsubsurface-6f42ab46da1b5956ad15859c1c2f5829e1af2013.tar.gz
Do not prefer gps fixes just for being into dive time
ATM we were giving preference to a gps fix taken during dive time over another taken before dive start time (proven both in predefined SAME_GROUP 6 hours range). While this logic is right for a static boat or a shore dive - as it ensures a correct position - will fail for drift dives or dives where boat changes its position during dive time. Instead, will choose the gps fix closer to the dive start time. fixes issue #666 Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/subsurfacewebservices.cpp')
-rw-r--r--desktop-widgets/subsurfacewebservices.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp
index 86554cd8c..0537723b8 100644
--- a/desktop-widgets/subsurfacewebservices.cpp
+++ b/desktop-widgets/subsurfacewebservices.cpp
@@ -91,15 +91,6 @@ static bool merge_locations_into_dives(void)
time_during_dive_with_offset(dive, nextgpsfix->when, SAME_GROUP)) {
if (verbose)
qDebug() << "look at the next gps fix @" << get_dive_date_string(nextgpsfix->when);
- /* first let's test if this one is during the dive */
- if (time_during_dive_with_offset(dive, nextgpsfix->when, 0)) {
- if (verbose)
- qDebug() << "which is during the dive, pick that one";
- copy_gps_location(nextgpsfix, dive);
- changed++;
- tracer = 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 */