UI development. More icons.
[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 private:
30     Maemo5Location *location;
31     void resetAll();
32     QXmlStreamWriter xmlwriter;
33     void writeRouteXml(QIODevice *device, int round);
34
35     int satellitesInUse; //Number of satellites in use.
36     int satellitesInView;//Number of satellites in view.
37     int signalStrength;  //Average signal strength of satellites which are in use.
38     double latitude;     //Latitude.
39     double longitude;    //Longitude.
40     double time;         //Timestamp of the update in seconds.
41     double ept;          //Time accuracy in seconds.
42     double eph;          //Horizontal position accuracy in cm.
43     double altitude;     //Fix altitude in meters.
44     double epv;          //Altitude accuracy in meters.
45     double track;        //Direction of motion in degrees(0-359).
46     double epd;          //Track accuracy in degrees.
47     double speed;        //Current speed in km/h.
48     double eps;          //Speed accuracy in km/h.
49     double climb;        //Current rate of climb in m/s.
50     double epc;          //Climb accuracy in m/s.
51     double latitudePrevious;
52     double longitudePrevious;
53     QString routeStartTime;
54     QString routeStopTime;
55     QString sLatitudeNow;
56     QString sLongitudeNow;
57     QString sLatitudePrevious;
58     QString sLongitudePrevious;
59     QDateTime *gpsDateTime;
60     bool recordingStatus;
61     //int roundCounter;
62
63 private slots:
64     void agnss();
65     void awcp();
66     void locationUpdated();
67     void gpsConnected();
68     void gpsDisconnected();
69     void gpsError();
70     void gpsdRunning();
71     void gpsdStopped();
72
73 };
74
75 #endif // GPSDATA_H