summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/gps.cpp
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/gps.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/gps.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/wellenreiter/gui/gps.cpp b/noncore/net/wellenreiter/gui/gps.cpp
index 31f95ce..b814427 100644
--- a/noncore/net/wellenreiter/gui/gps.cpp
+++ b/noncore/net/wellenreiter/gui/gps.cpp
@@ -55,29 +55,29 @@ GpsLocation GPS::position() const
55 if ( numAvail ) 55 if ( numAvail )
56 { 56 {
57 QTextStream stream( _socket ); 57 QTextStream stream( _socket );
58 58
59 QString str; 59 QString str;
60 stream.readRawBytes( &buf[0], 7 ); 60 stream.readRawBytes( &buf[0], 7 );
61 float lat = -111.111; 61 float lat = -111;
62 stream >> lat; 62 stream >> lat;
63 stream.skipWhiteSpace(); 63 stream.skipWhiteSpace();
64 float lon = -111.111; 64 float lon = -111;
65 stream >> lon; 65 stream >> lon;
66 stream.readRawBytes( &buf[0], 200 ); // read and discard the stuff until EOF 66 stream.readRawBytes( &buf[0], 200 ); // read and discard the stuff until EOF
67 67
68 return GpsLocation( lat, lon ); 68 return GpsLocation( lat, lon );
69 } 69 }
70 } 70 }
71 return GpsLocation( -111.111, -111.111 ); 71 return GpsLocation( -111, -111 );
72} 72}
73 73
74 74
75QString GpsLocation::dmsPosition() const 75QString GpsLocation::dmsPosition() const
76{ 76{
77 if ( _latitude == -111.111 || _longitude == -111.11 ) 77 if ( _latitude == -111 || _longitude == -111 )
78 return "N/A"; 78 return "N/A";
79 if ( _latitude == 0.0 && _longitude == 0.0 ) 79 if ( _latitude == 0.0 && _longitude == 0.0 )
80 return "NULL"; 80 return "NULL";
81 81
82 /* compute latitude */ 82 /* compute latitude */
83 83