X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/ddc2372eb9273ed0f37fce2c2b143f3f90f3f4d2..8f661d805260d5e9540afe6111a86d1e1afc0d90:/src/viktrack.h?ds=inline diff --git a/src/viktrack.h b/src/viktrack.h index efd62934..06a1c913 100644 --- a/src/viktrack.h +++ b/src/viktrack.h @@ -24,6 +24,7 @@ #include #include +#include #include "vikcoord.h" @@ -38,7 +39,17 @@ struct _VikTrackpoint { gboolean newsegment; gboolean has_timestamp; time_t timestamp; - gdouble altitude; + gdouble altitude; /* only in 3D fixes */ + /* Most GPSs provide this in realtime mode (NMEA) but not in data mode */ + gboolean extended; + gdouble speed; /* only in 3D fixes */ + gdouble course; + guint nsats; /* number of satellites used */ +#define VIK_GPS_MODE_NOT_SEEN 0 /* mode update not seen yet */ +#define VIK_GPS_MODE_NO_FIX 1 /* none */ +#define VIK_GPS_MODE_2D 2 /* good for latitude/longitude */ +#define VIK_GPS_MODE_3D 3 /* good for altitude/climb too */ + gint fix_mode; }; typedef struct _VikTrack VikTrack; @@ -47,6 +58,7 @@ struct _VikTrack { gboolean visible; gchar *comment; guint8 ref_count; + GtkWidget *property_dialog; }; VikTrack *vik_track_new(); @@ -86,5 +98,14 @@ void vik_track_apply_dem_data ( VikTrack *tr); /* appends t2 to t1, leaving t2 with no trackpoints */ void vik_track_steal_and_append_trackpoints ( VikTrack *t1, VikTrack *t2 ); +/* starting at the end, looks backwards for the last "double point", a duplicate trackpoint. + * this is indicative of magic scissors continued use. If there is no double point, + * deletes all the trackpoints. returns new end of the track (or the start if + * there are no double points) + */ +VikCoord *vik_track_cut_back_to_double_point ( VikTrack *tr ); + +void vik_track_set_property_dialog(VikTrack *tr, GtkWidget *dialog); +void vik_track_clear_property_dialog(VikTrack *tr); #endif