Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C027_Support SWO mbed-rtos mbed picojson
Fork of lpc4088_ebb_ublox_Cellular_PubNubDemo_rtos by
LocationUpdate.cpp
00001 #include "LocationUpdate.h" 00002 00003 LocationUpdate::LocationUpdate(GPSTracker& gpsTracker) : 00004 _gpsTracker(gpsTracker) 00005 { 00006 _init = false; 00007 } 00008 00009 bool LocationUpdate::init() 00010 { 00011 if (_init) 00012 return false; 00013 00014 _init = true; 00015 return true; 00016 } 00017 00018 bool LocationUpdate::run() 00019 { 00020 GPSTracker::Position position; 00021 00022 if (!_gpsTracker.position(&position)) { 00023 puts("No GPS data available."); 00024 return true; 00025 } 00026 00027 puts("Starting measurement sending."); 00028 00029 float altitude = position.altitude; 00030 float latitude = position.latitude; 00031 float longitude = position.longitude; 00032 00033 printf("Lat: %9.7f Long: %9.7f Altitude %.2f", latitude, longitude, altitude); 00034 00035 return true; 00036 }
Generated on Sun Jul 17 2022 02:39:36 by
1.7.2
