diff options
Diffstat (limited to 'libraries/TinyGPS')
-rw-r--r-- | libraries/TinyGPS/TinyGPS.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libraries/TinyGPS/TinyGPS.cpp b/libraries/TinyGPS/TinyGPS.cpp index a3f5a1e..5a5b86b 100644 --- a/libraries/TinyGPS/TinyGPS.cpp +++ b/libraries/TinyGPS/TinyGPS.cpp @@ -143,18 +143,18 @@ unsigned long TinyGPS::parse_degrees() { char *p; unsigned long left = gpsatol(_term); - unsigned long tenk_minutes = (left % 100UL) * 10000UL; + unsigned long tenk_minutes = (left % 100UL) * 100000UL; for (p=_term; gpsisdigit(*p); ++p); if (*p == '.') { - unsigned long mult = 1000; + unsigned long mult = 10000; while (gpsisdigit(*++p)) { tenk_minutes += mult * (*p - '0'); mult /= 10; } } - return (left / 100) * 100000 + tenk_minutes / 6; + return (left / 100) * 1000000 + tenk_minutes / 6; } #define COMBINE(sentence_type, term_number) (((unsigned)(sentence_type) << 5) | term_number) |