subsurface/qt-ui
Salvador Cuñat 7eb422d988 Change in logic while aplying gps fixes to dives
We were actually searching dives which match the dowloaded position
fixes. So we're also trying to take into account if the fix is automatic
or no based on a limited amount of predefined strings (bad idea, as the
user can change in companion app settings the predefined string).
This way, in actual implementation, if program concludes that a fix has
been manually got or, simply, the user is unlucky enough to have all the
position fixes out of the dive time, find_dive_n_near() function will
pair fix and dive in an ordered way (1st fix -> 1st dive; 2nd fix -> 2nd
dive ...) which is probably erroneous, except for manual position fixes.

BTW actual implementation can't pair the same gps position with more
than one dive, which would be the case, e.g. in repetitive dives while at
anchor in the same point.

The patch changes the logic:

- Search positions for defined dives (instead of dives for defined
positions) without care if position has manually or  automatically been
set.
- Only take care of those dives that don't have a position yet.
- It makes two assumptions:
   a.- If the position fix has been taken during the dive time, is
correct. If there are more than one inside the dive time, takes the
first one (closest to the DC's reported time).
   b.- If not during diving time, the correct one is the nearest fix
before the dive begins (also the usual case if manually fixed from the
smartphone just before jump into the water). But will work too if there
is only one fix *in SAME_GROUP range* after the dive (another usual
case).
- Finally, as copy_gps_location() in dive.h is used only here, let it
take care of naming the dive if user hasn't named it yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16 07:38:31 -07:00
..
css
marble
profile Do not create a backup for Q_FOREACH container 2014-07-15 16:55:10 -07:00
about.cpp Quit Subsurface with about window in front 2014-04-25 10:21:55 -07:00
about.h Headers cleanup. 2014-06-26 15:47:02 -07:00
about.ui SubsurfaceAbout class cleanup. 2014-02-08 08:00:27 -08:00
completionmodels.cpp Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
completionmodels.h Put include guard to every header 2014-02-11 12:37:01 -08:00
divecomputermanagementdialog.cpp misc capitalisation and spelling 2014-07-11 07:06:26 -07:00
divecomputermanagementdialog.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
divecomputermanagementdialog.ui divecomputermanagementdilog capitalisation consitency 2014-07-10 16:26:20 -07:00
divelistview.cpp Do not create a backup for Q_FOREACH container 2014-07-15 16:55:10 -07:00
divelistview.h Fix crash when trying to add a dive or plan when a filter is active. 2014-06-26 15:49:19 -07:00
divelogexportdialog.cpp HTML: Add dive photos to the detailed view 2014-07-14 21:38:22 -07:00
divelogexportdialog.h Headers cleanup. 2014-06-26 15:47:02 -07:00
divelogexportdialog.ui Change default export tab to "General export" 2014-07-13 21:39:33 -07:00
divelogimportdialog.cpp Add quirks for Seabear CSV settings for pressure 2014-07-10 12:40:41 -07:00
divelogimportdialog.h Add support for importing pressure from CSV files 2014-07-10 12:40:25 -07:00
divelogimportdialog.ui divelogimportdialog capitalisation consitency 2014-07-10 16:27:50 -07:00
divepicturewidget.cpp Do not create a backup for Q_FOREACH container 2014-07-15 16:55:10 -07:00
divepicturewidget.h UI restructure: always display pictures for displayed dive 2014-07-03 09:37:55 -07:00
diveplanner.cpp Save and restore Dive Planner Settings 2014-07-15 17:05:38 -07:00
diveplanner.h Save and restore Dive Planner Settings 2014-07-15 17:05:38 -07:00
diveplanner.ui Planner: limit altitude and pressure 2014-07-15 17:19:49 -07:00
downloadfromdivecomputer.cpp Try to avoid inconsistent selection state after divecomputer download 2014-07-14 21:44:57 -07:00
downloadfromdivecomputer.h Headers cleanup. 2014-06-26 15:47:02 -07:00
downloadfromdivecomputer.ui downloadfromdivecomputer capitalisation consitency 2014-07-10 16:29:24 -07:00
globe.cpp misc capitalisation and spelling 2014-07-11 07:06:26 -07:00
globe.h Headers cleanup. 2014-06-26 15:47:02 -07:00
graphicsview-common.cpp Make heartrate grid less confusing 2014-04-28 12:45:42 -07:00
graphicsview-common.h Make heartrate grid less confusing 2014-04-28 12:45:42 -07:00
groupedlineedit.cpp Forbid the use of empty strings as tags 2014-07-10 10:17:50 -07:00
groupedlineedit.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
kmessagewidget.cpp Don't add a close button to KMessageWidget 2014-07-04 07:46:35 -07:00
kmessagewidget.h Another small tweak to whitespace tool 2014-03-05 13:02:23 -08:00
maintab.cpp Correctly track the 'changed' status of the equipment widgets 2014-07-15 20:36:25 -07:00
maintab.h Remove uneeded function 2014-07-15 17:05:46 -07:00
maintab.ui Typo fix Ave. => Avg. 2014-07-13 21:39:25 -07:00
mainwindow.cpp Save and restore Dive Planner Settings 2014-07-15 17:05:38 -07:00
mainwindow.h Remove unused menu "Filter" 2014-07-14 18:33:54 -07:00
mainwindow.ui Remove warning about undeclared menuFilter 2014-07-14 18:43:42 -07:00
modeldelegates.cpp Selects the delegate text on Cylinder edition 2014-07-15 17:05:30 -07:00
modeldelegates.h Add step size in our SpinBox delegates 2014-07-12 08:03:34 -07:00
models.cpp Improve handling of cylinders with identical gasmix 2014-07-15 20:36:49 -07:00
models.h Printing: print depth unit in table 2014-07-11 21:59:21 -07:00
plannerSettings.ui plannersettings capitalisation consitency 2014-07-10 16:30:14 -07:00
preferences.cpp Do not create a backup for Q_FOREACH container 2014-07-15 16:55:10 -07:00
preferences.h Rename slot to get rid of auto-connect warning 2014-06-28 06:35:19 -07:00
preferences.ui "non-used" just didn't sound right to me. 2014-07-11 10:44:49 -07:00
printdialog.cpp Print dialog: make Ctrl-Q and Ctlr-W work 2014-04-25 10:27:44 -07:00
printdialog.h Remove printing when building for Android 2014-03-27 10:42:07 -07:00
printlayout.cpp Printing: print depth unit in table 2014-07-11 21:59:21 -07:00
printlayout.h Headers cleanup. 2014-06-26 15:47:02 -07:00
printoptions.cpp
printoptions.h Headers cleanup. 2014-06-26 15:47:02 -07:00
printoptions.ui UI adjustments in Print Dialog Window 2014-04-16 12:17:49 -07:00
renumber.ui Make some dialogs modal to MainWindow 2014-03-12 10:14:17 -07:00
searchbar.ui Add a horizontal spacer to make the searchbar layout better 2014-07-11 17:00:23 -07:00
shiftimagetimes.ui shifimmagetimes capitalisation consitency and title 2014-07-11 07:05:10 -07:00
shifttimes.ui shiftimes capitalisation consitency and title 2014-07-11 07:05:17 -07:00
simplewidgets.cpp Misc UI capitalisation consitencies and other text changes 2014-07-11 10:44:09 -07:00
simplewidgets.h Calendar widget should hide when clicking somewhere else 2014-06-30 16:05:43 -07:00
starwidget.cpp Change the Star Widget to use QImage instead of QPixmap 2014-06-20 15:43:10 -07:00
starwidget.h Change the Star Widget to use QImage instead of QPixmap 2014-06-20 15:43:10 -07:00
subsurfacewebservices.cpp Change in logic while aplying gps fixes to dives 2014-07-16 07:38:31 -07:00
subsurfacewebservices.h Fix Qt4 build 2014-06-30 14:05:02 -07:00
tableview.cpp Misc UI capitalisation consitencies and other text changes 2014-07-11 10:44:09 -07:00
tableview.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
tableview.ui
tagwidget.cpp Misc UI capitalisation consitencies and other text changes 2014-07-11 10:44:09 -07:00
tagwidget.h Headers cleanup. 2014-06-26 15:47:02 -07:00
updatemanager.cpp Remove HTML from translated strings 2014-07-09 10:34:51 -07:00
updatemanager.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
usermanual.cpp Use a layout to lay down the search and the help 2014-07-11 16:59:14 -07:00
usermanual.h Use a layout to lay down the search and the help 2014-07-11 16:59:14 -07:00
usersurvey.cpp usersurvey: Add : for consistency 2014-07-14 18:42:10 -07:00
usersurvey.h User survey: actually collect and send the data to the backend 2014-06-30 12:30:46 -07:00
usersurvey.ui Implements consistent capitalisation and minor tweaks to survey text 2014-07-10 16:24:55 -07:00
webservices.ui webservice capitalisation consitency 2014-07-11 07:05:38 -07:00