Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: GP20U7_HelloWorld gpsmpu60500 BaseStation healt_monitor_ECE4180
Revision 4:3aa177df0bcb, committed 2016-03-16
- Comitter:
- wschon
- Date:
- Wed Mar 16 04:37:56 2016 +0000
- Parent:
- 3:5cfc893bfd25
- Child:
- 5:42f6779a9584
- Commit message:
- minor fix
Changed in this revision
GPS.cpp | Show annotated file Show diff for this revision Revisions of this file |
GPS.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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; }
--- a/GPS.h Wed Mar 16 04:28:03 2016 +0000 +++ b/GPS.h Wed Mar 16 04:37:56 2016 +0000 @@ -45,6 +45,12 @@ /** The latitude (call sample() to set) */ float latitude; + int num_sat; + float hori_dilute; + float alt; + float geoid, time; + char ns, ew; + private: float trunc(float v); void getline();