-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgpsPosition.h
43 lines (42 loc) · 1.06 KB
/
gpsPosition.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
#ifndef GPSPOSITION_H_
#define GPSPOSITION_H_
class GPSPosition {
private:
unsigned int hour;
unsigned int minute;
unsigned int second;
time_t unixtime;
float latitude;
float longitude;
float altitude;
int sats;
bool gotfix;
int time;
public:
GPSPosition();
~GPSPosition();
void setTime(char *time);
void setLatitude(float lat);
void setLatitude(char *lat, char *ind);
void setLongitude(float lon);
void setLongitude(char *lon, char *ind);
void setAltitude(float alt);
void setAltitude(char *alt, char* unit);
void setSats(int sats);
void setSats(char *sats); // null terminated String as taken from GPGGA
void setFix(bool fix);
void setFix(char *f); // null terminated String as taken from GPGGA
void clearAll();
void setUnixTime(char *date, char *time);
void setSpeed(char *speed);
void setCourse(char *course);
float getLatitude();
float getLongitude();
float getAltitude();
int getSats();
bool getFix();
time_t getUnixTime();
time_t getTime();
struct tm *getTime(struct tm *time);
};
#endif /* GPSPOSITION_H_ */