initial fork from ublox

Dependencies:   ublox-at-cellular-interface

Revision:
1:26a67ab07275
Parent:
0:0b75e22c9231
Child:
5:9fd89567f769
--- a/TESTS/unit_tests/cell-locate/main.cpp	Mon Jun 05 12:58:04 2017 +0000
+++ b/TESTS/unit_tests/cell-locate/main.cpp	Wed Jun 07 23:52:33 2017 +0100
@@ -84,6 +84,13 @@
 // Lock for debug prints
 static Mutex mtx;
 
+// Power up GNSS
+#ifdef TARGET_UBLOX_C030
+static DigitalInOut gnssEnable(GNSSEN, PIN_OUTPUT, PushPullNoPull, 1);
+#elif TARGET_UBLOX_C027
+static DigitalOut gnssEnable(GNSSEN, 1);
+#endif
+
 // An instance of the cellular interface
 static UbloxATCellularInterfaceExt *pDriver =
        new UbloxATCellularInterfaceExt(MDMTXD, MDMRXD,
@@ -110,15 +117,12 @@
     char timeString[25];
 
     tr_debug("Cell Locate data:");
-    if (strftime(timeString, sizeof(timeString), "%a %b %d %H:%M:%S %Y", (const tm *) &(pData->time)) > 0) {
+    if (strftime(timeString, sizeof(timeString), "%F %T", (const tm *) &(pData->time)) > 0) {
         tr_debug("  time:               %s", timeString);
     }
     tr_debug("  longitude:          %.6f", pData->longitude);
     tr_debug("  latitude:           %.6f", pData->latitude);
-    tr_debug("  altitude:           %d metres", pData->altitude);
-    tr_debug("  uncertainty:        %d metres", pData->uncertainty);
-    tr_debug("  speed:              %d metres/second", pData->speed);
-    tr_debug("  vertical accuracy:  %d metres/second", pData->speed);
+    tr_debug("  altitude:           %d metre(s)", pData->altitude);
     switch (pData->sensor) {
         case UbloxATCellularInterfaceExt::CELL_LAST:
             tr_debug("  sensor type:        last");
@@ -136,7 +140,13 @@
             tr_debug("  sensor type:        unknown");
             break;
     }
-    tr_debug("  satellites used:    %d", pData->svUsed);
+    tr_debug("  uncertainty:        %d metre(s)", pData->uncertainty);
+    tr_debug("  speed:              %d metre(s)/second", pData->speed);
+    tr_debug("  direction:          %d degree(s)", pData->direction);
+    tr_debug("  vertical accuracy:  %d metre(s)/second", pData->speed);
+    tr_debug("  satellite(s) used:  %d", pData->svUsed);
+    tr_debug("I am here:            "
+            "https://maps.google.com/?q=%.5f,%.5f", pData->latitude, pData->longitude);       
 }
 
 // ----------------------------------------------------------------