NMEA GPS receiver Bug fixes
Fork of lib_gps by
Revision 13:9b6cd6eb808e, committed 2017-08-02
- Comitter:
- shaunkrnelson
- Date:
- Wed Aug 02 11:07:18 2017 -0400
- Parent:
- 12:f1b3d656125e
- Commit message:
- Update to latest lib_gps
Changed in this revision
gps.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f1b3d656125e -r 9b6cd6eb808e gps.cpp --- a/gps.cpp Mon Jul 24 11:04:15 2017 -0400 +++ b/gps.cpp Wed Aug 02 11:07:18 2017 -0400 @@ -234,7 +234,8 @@ Longitude *= -1; } - //printf("DD %f, %f\r\n", Latitude, Longitude); + if(verbose) + printf("GPS: LAT=%f, LONG=%f\n", Latitude, Longitude); } void GPS::ConvertPositionIntoBinary( ) @@ -263,13 +264,16 @@ LongitudeBinary = temp / 180; } - if (LatitudeBinary == LAT_UNFIXED && LongitudeBinary == LONG_UNFIXED) + if ((LatitudeBinary == LAT_UNFIXED) || (LongitudeBinary == LONG_UNFIXED)) have_fix = false; else { + LatitudeBinary &= 0xffffff; + LongitudeBinary &= 0xffffff; + have_fix = true; if(verbose == true) - printf("GPS: latitude=%f, longitude=%f\r\n", Latitude, Longitude); + printf("GPS: BLAT=%lx, BLONG=%lx\r\n", LatitudeBinary, LongitudeBinary); } }