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
device/GPSTracker.h
- Committer:
- rosterloh84
- Date:
- 2015-02-15
- Revision:
- 1:cac9b2960637
File content as of revision 1:cac9b2960637:
#pragma once
#include <stddef.h>
#include "GPS.h"
#include "rtos.h"
/**
* A GPS tracker class providing access to the current position.
*/
class GPSTracker
{
public:
/**
* Initialize a new GPSTracker object.
* @param gps a previously initialized instance of the GPSI2C class
*/
GPSTracker(GPSI2C&);
typedef struct {
double altitude; // altitude meters
double latitude; // latitude degrees
double longitude; // longitude degrees
} Position;
/**
* Retrieves and invalidates the current position.
* @param position a pointer of type Position where the current position is written to
* @return true on success, false otherwise
*/
bool position(Position*);
protected:
void thread();
static void thread_func(void const*);
private:
GPSI2C _gps;
Thread _thread;
Mutex _mutex;
Position _position;
bool _positionSet;
};
Richard Osterloh
