forked from Integreight/1Sheeld-Arduino-Library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GPSShield.h
60 lines (46 loc) · 1.07 KB
/
GPSShield.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
Project: 1Sheeld Library
File: GPSShield.h
Version: 1.0
Compiler: Arduino avr-gcc 4.3.2
Author: Integreight
Date: 2014.5
*/
#ifndef GPSShield_h
#define GPSShield_h
#include <math.h>
#include "ShieldParent.h"
//Literal Constants
#define RADIUS_OF_EARTH 6371
#define PI 3.1415926535897932384626433832795
//Input Function ID
#define GPS_VALUE 0x01
class GPSShieldClass : public ShieldParent
{
public:
//Constructor
GPSShieldClass();
//Getters
float getLatitude();
float getLongitude();
//Checkers
bool isInRange(float , float , float );
//Distance Calculator
float getDistance(float , float );
//Radian Calculator
float radian(float);
//setOnChange for Users Function
void setOnValueChange(void (*)(float ,float ));
private:
//Reserving Variables
float LatValue,LonValue;
//Boolean checkers
bool isInit;
bool isCallBackAssigned;
//Processing Input Data
void processData ();
void (*changeCallBack)(float ,float);
};
//Extern Object
extern GPSShieldClass GPS;
#endif