cosmetical fix: use correct N/E/S/W letters in GPS display with gpsd

This commit is contained in:
drochner 2011-04-12 17:14:53 +00:00
parent e2bc85ba0a
commit 3d3f8c4569
2 changed files with 13 additions and 4 deletions

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.8 2011/04/11 20:15:00 drochner Exp $
$NetBSD: distinfo,v 1.9 2011/04/12 17:14:53 drochner Exp $
SHA1 (merkaartor-0.17.2.tar.bz2) = f789141db427bf25bb3b61801fefc98ab0430012
RMD160 (merkaartor-0.17.2.tar.bz2) = c5c8944872828ba5ada6003cd5821f33899da3cb
Size (merkaartor-0.17.2.tar.bz2) = 7138991 bytes
SHA1 (patch-aa) = a5bdc832ed6a14c9fffe0a6db046cf9842686877
SHA1 (patch-aa) = bd8ac239c841f47260925a2749063849d67c839f

View file

@ -1,4 +1,4 @@
$NetBSD: patch-aa,v 1.3 2011/04/11 20:15:00 drochner Exp $
$NetBSD: patch-aa,v 1.4 2011/04/12 17:14:53 drochner Exp $
--- src/GPS/qgpsdevice.cpp.orig 2011-02-10 12:00:35.000000000 +0000
+++ src/GPS/qgpsdevice.cpp
@ -33,9 +33,18 @@ $NetBSD: patch-aa,v 1.3 2011/04/11 20:15:00 drochner Exp $
{
errno = 0;
gpsdata = Server->read();
@@ -1027,13 +1026,13 @@ void QGPSDDevice::onDataAvailable()
@@ -1026,14 +1025,22 @@ void QGPSDDevice::onDataAvailable()
setFixStatus(StatusActive);
setLatitude(gpsdata->fix.latitude);
setLongitude(gpsdata->fix.longitude);
+ if (gpsdata->fix.latitude < 0)
+ setLatCardinal(CardinalSouth);
+ else
+ setLatCardinal(CardinalNorth);
+ if (gpsdata->fix.longitude < 0)
+ setLongCardinal(CardinalWest);
+ else
+ setLongCardinal(CardinalEast);
double Alt = gpsdata->fix.altitude;
- if (!__isnan(Alt))
+ if (!std::isnan(Alt))