From c2eeda44e69679bd4257985f9321460fddad6710 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 22 Jan 2016 06:41:43 -0800 Subject: 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 --- subsurface-core/gpslocation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'subsurface-core/gpslocation.cpp') 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); -- cgit v1.2.3-70-g09d2