-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgpsdatahandler.h
49 lines (30 loc) · 916 Bytes
/
gpsdatahandler.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
#ifndef GPSDATA_H
#define GPSDATA_H
#include <QtCore/qglobal.h>
#include <QVector>
#include <math.h>
using namespace std;
struct point{
double latitude;
double longitude;
};
class gpsdatahandler{
public:
const static QVector<float> Trackpoints;
// Attributes
unsigned int numGPSValues;
QVector<double> distanceData;
QVector<double> altitudeData;
// Methods
gpsdatahandler(void);
void computeDistAlt(void);
inline QVector<double> *getDistanceData(void){ return &this->distanceData;};
inline QVector<double> *getAltitudeData(void){ return &this->altitudeData;};
private:
const static int earthRadius = 6378000; // Unit: mtrs
double computeDistance(point dStart, point dEnd);
inline double degToRad(double degAngle){ return ((degAngle * M_PI) / 180.0); };
point degPointToRad(point dPoint);
void printData();
};
#endif // GPSDATA_H