Exemple d'utilisation de la librairie Gps NMEA
Dependencies: gps_event_vitesse mbed
Revision 1:a963d11a19d2, committed 2016-05-20
- Comitter:
- schnf30
- Date:
- Fri May 20 16:25:50 2016 +0000
- Parent:
- 0:49a81d0d029d
- Commit message:
- Programme adapt? ? EM406 et EM506 attention Gps.baud = 4800 bauds
Changed in this revision
gps_event_vitesse.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 49a81d0d029d -r a963d11a19d2 gps_event_vitesse.lib --- a/gps_event_vitesse.lib Mon May 16 21:46:54 2016 +0000 +++ b/gps_event_vitesse.lib Fri May 20 16:25:50 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/schnf30/code/gps_event_vitesse/#ba9bedfe1044 +https://developer.mbed.org/users/schnf30/code/gps_event_vitesse/#dfc738d8aba1
diff -r 49a81d0d029d -r a963d11a19d2 main.cpp --- a/main.cpp Mon May 16 21:46:54 2016 +0000 +++ b/main.cpp Fri May 20 16:25:50 2016 +0000 @@ -3,7 +3,7 @@ #define PCBAUD 115200 #define GPSRX p10 #define GPSTX p9 -#define GPSBAUD 9600 +#define GPSBAUD 4800 #define BLUERX p27 #define BLUETX p28 @@ -17,7 +17,7 @@ int main() { pc.baud(PCBAUD); -// gps.baud(GPSBAUD); + gps.baud(GPSBAUD); // pc.printf("Hello, Gps event.\r\n"); // pc.printf("Patientez attente Gps\r\n"); @@ -26,17 +26,17 @@ if (gps.lock()) { #ifdef bluetooth - blue.printf("Gps Loocked,%d,%06.0lf,%d,%f,%c,%lf,%c,%.0lf,%.0lf,$\r\n",gps.nbsattelite(),gps.time(),gps.lock(),gps.latitude(),gps.ns(),gps.longitude(),gps.ew(),gps.vitesse(),gps.vitesse_gps()); + blue.printf("Gps Locked,%d,%06.0lf,%d,%f,%c,%lf,%c,%.0lf,%.0lf,$\r\n",gps.nbsattelite(),gps.time(),gps.lock(),gps.latitude(),gps.ns(),gps.longitude(),gps.ew(),gps.vitesse(),gps.vitesse_gps()); #else - pc.printf("Gps Loocked,%d,%06.0lf,%d,%f,%c,%lf,%c,%.0lf,%.0lf,$\r\n",gps.nbsattelite(),gps.time(),gps.lock(),gps.latitude(),gps.ns(),gps.longitude(),gps.ew(),gps.vitesse(),gps.vitesse_gps()); + pc.printf("Gps Locked,%d,%06.0lf,%d,%f,%c,%lf,%c,%.0lf,%.0lf,$\r\n",gps.nbsattelite(),gps.time(),gps.lock(),gps.latitude(),gps.ns(),gps.longitude(),gps.ew(),gps.vitesse(),gps.vitesse_gps()); #endif } else { #ifdef bluetooth - blue.printf("Gps UnLoocked,%d,%06.0lf,%d,%lf,%c,%lf,%c,%s,%s,$\r\n",gps.nbsattelite(),gps.time(),gps.lock(),gps.latitude(),gps.ns(),gps.longitude(),gps.ew(),"--","--"); + blue.printf("Gps UnLocked,%d,%06.0lf,%d,%lf,%c,%lf,%c,%s,%s,$\r\n",gps.nbsattelite(),gps.time(),gps.lock(),gps.latitude(),gps.ns(),gps.longitude(),gps.ew(),"--","--"); #else - pc.printf("Gps UnLoocked,%d,%06.0lf,%d,%lf,%c,%lf,%c,%s,%s,$\r\n",gps.nbsattelite(),gps.time(),gps.lock(),gps.latitude(),gps.ns(),gps.longitude(),gps.ew(),"--","--"); + pc.printf("Gps UnLocked,%d,%06.0lf,%d,%lf,%c,%lf,%c,%s,%s,$\r\n",gps.nbsattelite(),gps.time(),gps.lock(),gps.latitude(),gps.ns(),gps.longitude(),gps.ew(),"--","--"); #endif } }