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