An extension of original API for working with GPS devices.

Dependents:   A_TeseoLocationNEW A_TeseoLocation TeseoLocation

GPS_Provider Library

A controller-neutral API for working with GPS devices.

Overview

This library is an extension of the original API published on os.mbed.com

Besides the basic geo-location functionality, this extended API includes the following features:

  • Geofencing
  • Odometer
  • Datalogging

Getting started

This GPS API is meant to be used for building projects on os.mbed.com

A good starting point is this page:

TeseoLocation

Committer:
apalmieri
Date:
Fri Nov 09 17:09:12 2018 +0000
Revision:
0:0a9c622571d7
Child:
3:ccd86d6bd3bc
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
apalmieri 0:0a9c622571d7 1 /**
apalmieri 0:0a9c622571d7 2 ******************************************************************************
apalmieri 0:0a9c622571d7 3 * @file GPSDatalog.h
apalmieri 0:0a9c622571d7 4 * @author AST/CL
apalmieri 0:0a9c622571d7 5 * @version V1.1.0
apalmieri 0:0a9c622571d7 6 * @date Jun, 2017
apalmieri 0:0a9c622571d7 7 * @brief .
apalmieri 0:0a9c622571d7 8 ******************************************************************************
apalmieri 0:0a9c622571d7 9 * @attention
apalmieri 0:0a9c622571d7 10 *
apalmieri 0:0a9c622571d7 11 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
apalmieri 0:0a9c622571d7 12 *
apalmieri 0:0a9c622571d7 13 * Redistribution and use in source and binary forms, with or without modification,
apalmieri 0:0a9c622571d7 14 * are permitted provided that the following conditions are met:
apalmieri 0:0a9c622571d7 15 * 1. Redistributions of source code must retain the above copyright notice,
apalmieri 0:0a9c622571d7 16 * this list of conditions and the following disclaimer.
apalmieri 0:0a9c622571d7 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
apalmieri 0:0a9c622571d7 18 * this list of conditions and the following disclaimer in the documentation
apalmieri 0:0a9c622571d7 19 * and/or other materials provided with the distribution.
apalmieri 0:0a9c622571d7 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
apalmieri 0:0a9c622571d7 21 * may be used to endorse or promote products derived from this software
apalmieri 0:0a9c622571d7 22 * without specific prior written permission.
apalmieri 0:0a9c622571d7 23 *
apalmieri 0:0a9c622571d7 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
apalmieri 0:0a9c622571d7 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
apalmieri 0:0a9c622571d7 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
apalmieri 0:0a9c622571d7 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
apalmieri 0:0a9c622571d7 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
apalmieri 0:0a9c622571d7 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
apalmieri 0:0a9c622571d7 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
apalmieri 0:0a9c622571d7 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
apalmieri 0:0a9c622571d7 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
apalmieri 0:0a9c622571d7 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
apalmieri 0:0a9c622571d7 34 *
apalmieri 0:0a9c622571d7 35 ******************************************************************************
apalmieri 0:0a9c622571d7 36 */
apalmieri 0:0a9c622571d7 37
apalmieri 0:0a9c622571d7 38 #ifndef __GPS_DATALOG_H__
apalmieri 0:0a9c622571d7 39 #define __GPS_DATALOG_H__
apalmieri 0:0a9c622571d7 40
apalmieri 0:0a9c622571d7 41 class GPSDatalog {
apalmieri 0:0a9c622571d7 42 public:
apalmieri 0:0a9c622571d7 43
apalmieri 0:0a9c622571d7 44 /**
apalmieri 0:0a9c622571d7 45 * Construct a GPSDatalog instance.
apalmieri 0:0a9c622571d7 46 */
apalmieri 0:0a9c622571d7 47 GPSDatalog(bool enableBufferFullAlarm,
apalmieri 0:0a9c622571d7 48 bool enableCircularBuffer,
apalmieri 0:0a9c622571d7 49 unsigned minRate,
apalmieri 0:0a9c622571d7 50 unsigned minSpeed,
apalmieri 0:0a9c622571d7 51 unsigned minPosition,
apalmieri 0:0a9c622571d7 52 int logMask) :
apalmieri 0:0a9c622571d7 53 _enableBufferFullAlarm(enableBufferFullAlarm),
apalmieri 0:0a9c622571d7 54 _enableCircularBuffer(enableCircularBuffer),
apalmieri 0:0a9c622571d7 55 _minRate(minRate),
apalmieri 0:0a9c622571d7 56 _minSpeed(minSpeed),
apalmieri 0:0a9c622571d7 57 _minPosition(minPosition),
apalmieri 0:0a9c622571d7 58 _logMask(logMask) {
apalmieri 0:0a9c622571d7 59 }
apalmieri 0:0a9c622571d7 60
apalmieri 0:0a9c622571d7 61 bool getEnableBufferFullAlarm(void) const {
apalmieri 0:0a9c622571d7 62 return _enableBufferFullAlarm;
apalmieri 0:0a9c622571d7 63 }
apalmieri 0:0a9c622571d7 64 bool getEnableCircularBuffer(void) const {
apalmieri 0:0a9c622571d7 65 return _enableCircularBuffer;
apalmieri 0:0a9c622571d7 66 }
apalmieri 0:0a9c622571d7 67 unsigned getMinRate(void) const {
apalmieri 0:0a9c622571d7 68 return _minRate;
apalmieri 0:0a9c622571d7 69 }
apalmieri 0:0a9c622571d7 70 unsigned getMinSpeed(void) const {
apalmieri 0:0a9c622571d7 71 return _minSpeed;
apalmieri 0:0a9c622571d7 72 }
apalmieri 0:0a9c622571d7 73 unsigned getMinPosition(void) const {
apalmieri 0:0a9c622571d7 74 return _minPosition;
apalmieri 0:0a9c622571d7 75 }
apalmieri 0:0a9c622571d7 76 int getLogMask(void) const {
apalmieri 0:0a9c622571d7 77 return _logMask;
apalmieri 0:0a9c622571d7 78 }
apalmieri 0:0a9c622571d7 79
apalmieri 0:0a9c622571d7 80 protected:
apalmieri 0:0a9c622571d7 81 bool _enableBufferFullAlarm;
apalmieri 0:0a9c622571d7 82 bool _enableCircularBuffer;
apalmieri 0:0a9c622571d7 83 unsigned _minRate;
apalmieri 0:0a9c622571d7 84 unsigned _minSpeed;
apalmieri 0:0a9c622571d7 85 unsigned _minPosition;
apalmieri 0:0a9c622571d7 86 int _logMask;
apalmieri 0:0a9c622571d7 87
apalmieri 0:0a9c622571d7 88 private:
apalmieri 0:0a9c622571d7 89 /* disallow copy constructor and assignment operators */
apalmieri 0:0a9c622571d7 90 GPSDatalog(const GPSDatalog&);
apalmieri 0:0a9c622571d7 91 GPSDatalog & operator= (const GPSDatalog&);
apalmieri 0:0a9c622571d7 92 };
apalmieri 0:0a9c622571d7 93
apalmieri 0:0a9c622571d7 94 #endif /* __GPS_DATALOG_H__ */