]> Pileus Git - aweather/blobdiff - src/plugins/gps-plugin.h
Add basic GPS track support.
[aweather] / src / plugins / gps-plugin.h
index ba2913698e0ff1798d469585a91f1bf1f33f7ff9..6517cddfefec69bee759c53f1ac785590393832b 100644 (file)
@@ -49,6 +49,7 @@ struct gps_ui_t {
     /* control frame */
     GtkWidget *gps_follow_checkbox;
     GtkWidget *gps_track_checkbox;
+    GtkWidget *gps_clear_button;
 
     /* log frame */
     GtkWidget *gps_log_checkbox;
@@ -57,18 +58,20 @@ struct gps_ui_t {
     guint gps_log_timeout_id;          /* id of timeout so we can delete it */
     unsigned int gps_log_number;       /* sequential log number */
 
-    /* spotternetwork frame */
-    GtkWidget *gps_sn_checkbox;
-    GtkWidget *gps_sn_active_checkbox;
-    gboolean gps_sn_active;            /* Whether chaser is "active" or not */
-    SoupSession *soup_session;         /* for sn requests */
-    guint gps_sn_timeout_id;           /* id of timeout so we can delete it */
-    GtkWidget *gps_sn_entry;           /* Entry box for spotternetwork ID */
-
     /* range ring frame */
     GtkWidget *gps_rangering_checkbox;
 };
 
+struct gps_track_t {
+       /* track storage */
+       gboolean active;        /* Display track history */
+       gdouble (**points)[3];
+       GritsLine *line;
+       guint cur_point;
+       guint num_points;
+       guint cur_group;
+};
+
 /* GPS private data */
 struct _GritsPluginGPS {
        GObject parent_instance;
@@ -81,12 +84,12 @@ struct _GritsPluginGPS {
        GtkWidget *hbox;
        GritsMarker *marker;
 
-       struct gps_data_t *gps_data;
+       struct gps_data_t gps_data;
        gboolean follow_gps;
-       gboolean gps_sn_active;
        gboolean gps_rangering_active;  /* range rings are visible or not */
        guint gps_update_timeout_id;    /* id of timeout so we can delete it */
 
+       struct gps_track_t track;
        struct gps_ui_t ui;
 };