-
Notifications
You must be signed in to change notification settings - Fork 0
/
GPS.h
42 lines (34 loc) · 693 Bytes
/
GPS.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
#ifndef _GPS_h
#define _GPS_h
#include "Arduino.h"
#include "Display.h"
#define LINE_STATE_DOLLAR 1
#define LINE_STATE_TITLE 2
#define LINE_STATE_BODY 3
class GPS {
public:
bool hasFix();
bool hasTime();
bool hasHadFix();
unsigned int getTime();
float getLat();
float getLon();
void init();
int handleByte(byte byteGPS);
int getDayOfYear();
int getMinuteOfDayGMT();
private:
float lat;
float lon;
bool fix = 0, hadFix = 0;
bool validTime = 0;
int month, day, year;
int hours, minutes;
void processBuffer();
String title;
String GPSbuffer;
int lineState = LINE_STATE_DOLLAR;
int sectionCounter;
};
void gps_test(GPS gps, Display disp);
#endif