example application with TFT display and SMS receive send

Dependencies:   C027 C027_Support SeeedStudioTFTv2 TFT_fonts UbloxUSBModem mbed

Fork of C027_DisplayTest by Michael Ammann

This is an application that combines several libraries together and demonstartes the use of cellular, GPS and a Touch enabled TFT on the u-blox C027 board. /media/uploads/mazgch/c027_display.jpg

Revision:
3:4ec009118465
Parent:
2:fde6fc911c61
Child:
4:b18b0bc4142f
--- a/main.cpp	Mon Oct 21 19:46:57 2013 +0000
+++ b/main.cpp	Mon Oct 21 19:55:45 2013 +0000
@@ -10,7 +10,6 @@
 
 #include "UbloxUSBGSMModem.h"
 #include "UbloxUSBCDMAModem.h"
-#include "UbloxGSMModem.h"
 
 void ubxLogo(SPI_TFT_ILI9341* tft, int x0/*160*/, int y0/*160*/, int r)
 {
@@ -141,14 +140,21 @@
                     gps.getNmeaItem(3,msg,len,lo) && gps.getNmeaItem(4,msg,len,cLo) && 
                     gps.getNmeaItem(6,msg,len,ch) && ch == 'A')
                 {
+                    la *= 0.01;
+                    lo *= 0.01;
+                    int iLa = (int)la;
+                    int iLo = (int)lo;
+                    la = (la - iLa) / 0.6 + iLa;
+                    lo = (lo - iLo) / 0.6 + iLo;
                     if (cLa == 'S') la = -la;
                     if (cLo == 'N') lo = -lo;
+                    
                     TFT.locate(220,175);
                     TFT.printf("      GPS");
                     TFT.locate(220,187);
-                    TFT.printf("%11.4f ", la);
+                    TFT.printf("%11.6f ", la);
                     TFT.locate(220,199);
-                    TFT.printf("%11.4f ", lo);
+                    TFT.printf("%11.6f ", lo);
                 }
             }
         }