mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
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>
This commit is contained in:
parent
c3c5256dc4
commit
6f42ab46da
1 changed files with 0 additions and 9 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue