Example program to demonstrate the use of the GnssSerial class.

Dependencies:   gnss

Revision:
6:881e2bbf29e4
Parent:
1:3c41bde6d0bc
Child:
7:746ae478fdf7
--- a/main.cpp	Wed Jun 14 13:39:16 2017 +0000
+++ b/main.cpp	Wed Jun 14 20:47:56 2017 +0100
@@ -31,6 +31,8 @@
  * operating correctly, pulse blue when a time reading has been received,
  * pulse white when GNSS position has been received or turn red if there is
  * a failure.
+ * On the C027 and C030 boards the green/red (respectively) LED near the
+ * GNSS module will flash as the module achieves a fix.
  */
 
 int main()
@@ -69,9 +71,8 @@
                                 ledGreen = 0;
                                 
                                 printf("\nGNSS: location is %.5f %.5f.\n\n", latitude, longitude); 
-                                sprintf(link, "I am here!\n"
-                                              "https://maps.google.com/?q=%.5f,%.5f\n",
-                                              latitude, longitude); 
+                                printf("I am here: https://maps.google.com/?q=%.5f,%.5f\n\n",
+                                       latitude, longitude); 
                             }
                         } else if (CHECK_TALKER("GGA") || CHECK_TALKER("GNS")) {
                             double altitude = 0; 
@@ -79,7 +80,7 @@
                             
                              // Altitude
                             if (gnss.getNmeaItem(9, buffer, length, altitude)) {
-                                printf("\nGNSS: altitude is %.1f m.\n\n", altitude); 
+                                printf("\nGNSS: altitude is %.1f m.\n", altitude); 
                             }
         
                             // Time