Added sending route to server.
[speedfreak] / Client / gpsdata.h
1 /*
2  * GPS data
3  *
4  * @author     Toni Jussila <toni.jussila@fudeco.com>
5  * @copyright  (c) 2010 Speed Freak team
6  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
7  */
8
9 #ifndef GPSDATA_H
10 #define GPSDATA_H
11
12 #include <QObject>
13 #include <maemo5location.h>
14 #include <QFile>
15 #include <QTextStream>
16
17 class GPSData : public QObject
18 {
19     Q_OBJECT
20 public:
21     GPSData(Maemo5Location *maemo5location);
22     ~GPSData();
23     void startRouteRecording(QString time);
24     void stopRouteRecording(QString time);
25     int roundCounter; //testing, move private!!!
26     double *getGpsDataArray();
27     int getRoundCounter();
28
29 private:
30     Maemo5Location *location;
31     void resetAll();
32     void saveRoute();
33
34     int satellitesInUse; //Number of satellites in use.
35     int satellitesInView;//Number of satellites in view.
36     int signalStrength;  //Average signal strength of satellites which are in use.
37     double latitude;     //Latitude.
38     double longitude;    //Longitude.
39     double time;         //Timestamp of the update in seconds.
40     double ept;          //Time accuracy in seconds.
41     double eph;          //Horizontal position accuracy in cm.
42     double altitude;     //Fix altitude in meters.
43     double epv;          //Altitude accuracy in meters.
44     double track;        //Direction of motion in degrees(0-359).
45     double epd;          //Track accuracy in degrees.
46     double speed;        //Current speed in km/h.
47     double eps;          //Speed accuracy in km/h.
48     double climb;        //Current rate of climb in m/s.
49     double epc;          //Climb accuracy in m/s.
50     QString routeStartTime;
51     QString routeStopTime;
52     QString latitudeNow;
53     QString longitudeNow;
54     QString latitudePrevious;
55     QString longitudePrevious;
56
57     bool recordingStatus;
58     //int roundCounter;
59     double gpsDataArray[100][4];
60
61 private slots:
62     void agnss();
63     void awcp();
64     void locationUpdated();
65     void gpsConnected();
66     void gpsDisconnected();
67     void gpsError();
68     void gpsdRunning();
69     void gpsdStopped();
70
71 };
72
73 #endif // GPSDATA_H