From 1ecd5065a0f821bb9406b5f651ebf6db5d6c2040 Mon Sep 17 00:00:00 2001 From: Willem Ferguson Date: Sun, 19 Jan 2020 12:06:50 -0800 Subject: Desktop: Import dive coordinates directly from GPS This allows Subsurface to obtain the coordinates of a dive directly from a GPS track. It parses a GPX file (GPX V1.0 or V1.1) from a GPS to locate the trackpoint immediatedly after the start of a dive. There is an additional "Use GPS file" button in the Edit Dive Site panel that is selected from the Notes tab. Image: This allows one to select a GPX file, bringing up the Import GPS dialog. There is extensive provision for cross-checking that the dive track synchronises with the dive start and end. If the Save button in the dialog is pressed the dive coordinates are copied into the Dive Coordinates text box in the Edit Dive Site panel. The map moves to indicate the location of the dive site. The bulk of the work is done in importgps.cpp. The code is pretty intergrated: I tried to break it up in smaller commits but that was not feasible. The code includes responses to the comments by @neolit123 and @bstoeger. The C-based file input was replaced with Qt-based code using QChar, QString and QFile. [Dirk Hohndel: fixed several small issues in the .ui file, removed various headers includes that weren't needed and fixed printing of minutes as zero padded] Signed-off-by: willemferguson Signed-off-by: Dirk Hohndel --- icons/resultgreen.png | Bin 0 -> 596 bytes icons/resultred.png | Bin 0 -> 595 bytes icons/resultyellow.png | Bin 0 -> 599 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 icons/resultgreen.png create mode 100644 icons/resultred.png create mode 100644 icons/resultyellow.png (limited to 'icons') diff --git a/icons/resultgreen.png b/icons/resultgreen.png new file mode 100644 index 000000000..c9beafc5a Binary files /dev/null and b/icons/resultgreen.png differ diff --git a/icons/resultred.png b/icons/resultred.png new file mode 100644 index 000000000..68e7ad8e4 Binary files /dev/null and b/icons/resultred.png differ diff --git a/icons/resultyellow.png b/icons/resultyellow.png new file mode 100644 index 000000000..bd40afc73 Binary files /dev/null and b/icons/resultyellow.png differ -- cgit v1.2.3-70-g09d2