An application to log WiFi SSIDs for position lookup testing

Dependencies:   C027_Support SWO mbed-rtos mbed picojson

Fork of lpc4088_ebb_ublox_Cellular_PubNubDemo_rtos by EmbeddedArtists AB

Revision:
1:cac9b2960637
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/measurement/LocationUpdate.cpp	Sun Feb 15 22:04:12 2015 +0000
@@ -0,0 +1,36 @@
+#include "LocationUpdate.h"
+
+LocationUpdate::LocationUpdate(GPSTracker& gpsTracker) :
+    _gpsTracker(gpsTracker)
+{
+    _init = false;
+}
+
+bool LocationUpdate::init()
+{
+    if (_init)
+        return false;
+    
+    _init = true;
+    return true;
+}
+
+bool LocationUpdate::run()
+{
+    GPSTracker::Position position;
+    
+    if (!_gpsTracker.position(&position)) {
+        puts("No GPS data available.");
+        return true;
+    }
+        
+    puts("Starting measurement sending.");
+
+    float altitude = position.altitude;
+    float latitude = position.latitude;
+    float longitude = position.longitude;
+    
+    printf("Lat: %9.7f Long: %9.7f Altitude %.2f", latitude, longitude, altitude);
+    
+    return true;
+}