aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-core/gpslocation.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-22 06:41:43 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-22 06:41:43 -0800
commitc2eeda44e69679bd4257985f9321460fddad6710 (patch)
treeec1eda30e55a8d64ddf096eef474a0ed227e81ad /subsurface-core/gpslocation.cpp
parent260cd14a2b7331e8b6a607058b43ea26f32667a5 (diff)
downloadsubsurface-c2eeda44e69679bd4257985f9321460fddad6710.tar.gz
Avoid precision loss on GPS fixes
It appears that the Qt documentation might be incorrect. It claims that the precision value is digits after the decimal point, but we have seen examples where the values posted to the server appear to have a total of 6 digits, including the digits ahead of the decimal point. Upping this to 9 shouldn't hurt if Qt gets fixed, but should work around the issue reported by a tester. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/gpslocation.cpp')
-rw-r--r--subsurface-core/gpslocation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/subsurface-core/gpslocation.cpp b/subsurface-core/gpslocation.cpp
index e44f793ae..00c297864 100644
--- a/subsurface-core/gpslocation.cpp
+++ b/subsurface-core/gpslocation.cpp
@@ -506,8 +506,8 @@ void GpsLocation::uploadToServer()
data.addQueryItem("login", prefs.userid);
data.addQueryItem("dive_date", dt.toString("yyyy-MM-dd"));
data.addQueryItem("dive_time", dt.toString("hh:mm"));
- data.addQueryItem("dive_latitude", QString::number(gt.latitude.udeg / 1000000.0, 'f', 6));
- data.addQueryItem("dive_longitude", QString::number(gt.longitude.udeg / 1000000.0, 'f', 6));
+ data.addQueryItem("dive_latitude", QString::number(gt.latitude.udeg / 1000000.0, 'f', 9));
+ data.addQueryItem("dive_longitude", QString::number(gt.longitude.udeg / 1000000.0, 'f', 9));
if (gt.name.isEmpty())
gt.name = "Auto-created dive";
data.addQueryItem("dive_name", gt.name);