Bibliothèque pur gps, trame NMEA, conversion des coordonnées au format WSG84
Dependencies: mbed
Fork of GPSINT by
Revision 2:de2d5174457f, committed 2016-06-01
- Comitter:
- maxlh23
- Date:
- Wed Jun 01 15:09:42 2016 +0000
- Parent:
- 1:c266b90b4c74
- Commit message:
- Ticket envoi de la position
Changed in this revision
GPSINT.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r c266b90b4c74 -r de2d5174457f GPSINT.cpp --- a/GPSINT.cpp Wed Nov 05 16:43:55 2014 +0000 +++ b/GPSINT.cpp Wed Jun 01 15:09:42 2016 +0000 @@ -25,7 +25,7 @@ #include "GPSINT.h" GPSINT::GPSINT(PinName tx, PinName rx) : _gps(tx, rx) { - _gps.baud(4800); + _gps.baud(9600); GPSidx=0; // Index for GPS buffer GPSstate=0; // Used to wait for '$' in GPS interrupt _gps.attach(this,&GPSINT::GPSSerialRecvInterrupt, _gps.RxIrq); // Recv interrupt handler @@ -71,8 +71,8 @@ void GPSINT::parseGPSString(char *GPSstrParse){ //check if $GPGGA string - if(!strncmp(GPSstrParse, "$GPGGA", 6)){ - if (sscanf(GPSstrParse, "$GPGGA,%f,%f,%c,%f,%c,%d,%d,%f,%f,%c", &utc_time, &nmea_latitude, &ns, &nmea_longitude, &ew, &lock, &satelites, &hdop, &msl_altitude, &msl_units) >= 1) { + if(!strncmp(GPSstrParse, "$GNGGA", 6)){ + if (sscanf(GPSstrParse, "$GNGGA,%f,%f,%c,%f,%c,%d,%d,%f,%f,%c", &utc_time, &nmea_latitude, &ns, &nmea_longitude, &ew, &lock, &satelites, &hdop, &msl_altitude, &msl_units) >= 1) { // printf("%s", GPSstrParse); return; }
diff -r c266b90b4c74 -r de2d5174457f mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jun 01 15:09:42 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7c328cabac7e \ No newline at end of file