Merge branch 'fixing/MeasuresClass'
[speedfreak] / Client / gpsdata.h
index b51a929..165b937 100644 (file)
 
 #include <QObject>
 #include <maemo5location.h>
+#include <QFile>
+#include <QTextStream>
+#include <QTimer>
 
 class GPSData : public QObject
 {
+    Q_OBJECT
 public:
-    GPSData();
+    GPSData(Maemo5Location *maemo5location);
     ~GPSData();
+    void startRouteRecording(QString time);
+    void stopRouteRecording(QString time);
+    int roundCounter; //testing, move private!!!
+    double *getGpsDataArray();
+    int getRoundCounter();
 
 private:
     Maemo5Location *location;
+    void resetAll();
+    void saveRoute();
+
+    int satellitesInUse; //Number of satellites in use.
+    int satellitesInView;//Number of satellites in view.
+    int signalStrength;  //Average signal strength of satellites which are in use.
+    double latitude;     //Latitude.
+    double longitude;    //Longitude.
+    double time;         //Timestamp of the update in seconds.
+    double ept;          //Time accuracy in seconds.
+    double eph;          //Horizontal position accuracy in cm.
+    double altitude;     //Fix altitude in meters.
+    double epv;          //Altitude accuracy in meters.
+    double track;        //Direction of motion in degrees(0-359).
+    double epd;          //Track accuracy in degrees.
+    double speed;        //Current speed in km/h.
+    double eps;          //Speed accuracy in km/h.
+    double climb;        //Current rate of climb in m/s.
+    double epc;          //Climb accuracy in m/s.
+    QString routeStartTime;
+    QString routeStopTime;
+    QString latitudeNow;
+    QString longitudeNow;
+    QString latitudePrevious;
+    QString longitudePrevious;
+
+    bool recordingStatus;
+    //int roundCounter;
+    double gpsDataArray[4];
+    QTimer *gpsTimer;
+    int gpsTimeMS;
 
 private slots:
     void agnss();
@@ -27,9 +67,11 @@ private slots:
     void locationUpdated();
     void gpsConnected();
     void gpsDisconnected();
-    void gps_error(int error);
-    void gpsd_running();
-    void gpsd_stopped();
+    void gpsError();
+    void gpsdRunning();
+    void gpsdStopped();
+    void gpsTimerTimeout();
+
 };
 
 #endif // GPSDATA_H