GPS library
Diff: GPS.cpp
- Revision:
- 4:3aa177df0bcb
- Parent:
- 3:5cfc893bfd25
- Child:
- 5:42f6779a9584
--- a/GPS.cpp Wed Mar 16 04:28:03 2016 +0000 +++ b/GPS.cpp Wed Mar 16 04:37:56 2016 +0000 @@ -51,15 +51,18 @@ latitude = 0.0; return 0; } else { - if(ns == 'S') { latitude *= -1.0; } - if(ew == 'W') { longitude *= -1.0; } - float degrees = trunc(latitude / 100.0f); - float minutes = latitude - (degrees * 100.0f); - latitude = degrees + minutes / 60.0f; - degrees = trunc(longitude / 100.0f * 0.01f); - minutes = longitude - (degrees * 100.0f); - longitude = degrees + minutes / 60.0f; - pc1.printf(msg); + //if(ns == 'S') { latitude *= -1.0; } +// if(ew == 'W') { longitude *= -1.0; } +// float degrees = trunc(latitude / 100.0f); +// float minutes = latitude - (degrees * 100.0f); +// latitude = degrees + minutes / 60.0f; +// degrees = trunc(longitude / 100.0f * 0.01f); +// minutes = longitude - (degrees * 100.0f); +// longitude = degrees + minutes / 60.0f; +// pc1.printf(msg); + latitude /= 100; + longitude /= 100; + return 1; }