Added custom button for users dialog and changed place of www-button. Www-button...
[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 #include <QXmlStreamWriter>
17 #include <qdatetime.h>
18
19 class GPSData : public QObject
20 {
21     Q_OBJECT
22 public:
23     GPSData( Maemo5Location *maemo5location );
24     ~GPSData();
25     void startRouteRecording();
26     void stopRouteRecording();
27     int roundCounter; //testing, move private!!!
28
29     double getDistanceTraveled();
30     double getDirection();
31
32 private:
33     Maemo5Location *location;
34     void resetAll();
35     QXmlStreamWriter xmlwriter;
36     void writeRouteXml(QIODevice *device, int round);
37
38     int satellitesInUse; //Number of satellites in use.
39     int satellitesInView;//Number of satellites in view.
40     int signalStrength;  //Average signal strength of satellites which are in use.
41     double latitude;     //Latitude.
42     double longitude;    //Longitude.
43     double time;         //Timestamp of the update in seconds.
44     double ept;          //Time accuracy in seconds.
45     double eph;          //Horizontal position accuracy in cm.
46     double altitude;     //Fix altitude in meters.
47     double epv;          //Altitude accuracy in meters.
48     double track;        //Direction of motion in degrees(0-359).
49     double epd;          //Track accuracy in degrees.
50     double speed;        //Current speed in km/h.
51     double eps;          //Speed accuracy in km/h.
52     double climb;        //Current rate of climb in m/s.
53     double epc;          //Climb accuracy in m/s.
54     double latitudePrevious;
55     double longitudePrevious;
56     double distance;
57     QString routeStartTime;
58     QString routeStopTime;
59     QString sLatitudeNow;
60     QString sLongitudeNow;
61     QString sLatitudePrevious;
62     QString sLongitudePrevious;
63     QDateTime *gpsDateTime;
64     bool recordingStatus;
65     //int roundCounter;
66
67 private slots:
68     void agnss();
69     void awcp();
70     void locationUpdated();
71     void gpsConnected();
72     void gpsDisconnected();
73     void gpsError();
74     void gpsdRunning();
75     void gpsdStopped();
76
77 };
78
79 #endif // GPSDATA_H