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.
Fork of C027_Support_Plus_Dialing by
Diff: GPS.cpp
- Revision:
- 20:535ef78655df
- Parent:
- 18:e5697801df29
- Child:
- 24:0e287a85ac9e
--- a/GPS.cpp Fri Mar 14 13:07:48 2014 +0000 +++ b/GPS.cpp Mon Mar 17 13:18:04 2014 +0000 @@ -203,19 +203,17 @@ return false; } -bool GPSParser::getNmeaAngle(int ix, char* buf, int len, double& d) +bool GPSParser::getNmeaAngle(int ix, char* buf, int len, double& val) { char ch; - char val; if (getNmeaItem(ix,buf,len,val) && getNmeaItem(ix+1,buf,len,ch) && ((ch == 'S') || (ch == 'N') || (ch == 'E') || (ch == 'W'))) { val *= 0.01; - int i = (int)d; + int i = (int)val; val = (val - i) / 0.6 + i; if (ch == 'S' || ch == 'W') val = -val; - d = val; return true; } return false;