From: Kaj-Michael Lang Date: Wed, 12 Mar 2008 12:54:04 +0000 (+0200) Subject: Add path metadata fields, names from GPX metadata. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8224a01dad949079d0006c6fb809b3e1f9c40b1;p=mapper Add path metadata fields, names from GPX metadata. Add some extra data fields to Position struct. --- diff --git a/src/path.h b/src/path.h index 65e19c1..ac9da80 100644 --- a/src/path.h +++ b/src/path.h @@ -41,6 +41,9 @@ struct _Position { gdouble lon; gfloat altitude; gboolean valid; + gchar *desc; + time_t time; + guint type; }; /** A general definition of a point in the Mapper unit system. */ @@ -62,20 +65,37 @@ struct _WayPoint { /** A Path is a set of PathPoints and WayPoints. */ typedef struct _Path Path; struct _Path { + /* Path points */ Point *head; /* points to first element in array; NULL if empty. */ Point *tail; /* points to last element in array. */ - Point *cap; /* points after last slot in array. */ + Point *cap; /* points after last slot in array. */ + + /* Path waypoints */ WayPoint *whead; /* points to first element in array; NULL if empty. */ WayPoint *wtail; /* points to last element in array. */ WayPoint *wcap; /* points after last slot in array. */ + + /* Path statistics */ guint32 points; gdouble length; gdouble tspeed; gdouble avgspeed; gfloat maxspeed; + + /* GPX metadata fields */ + gchar *name; + gchar *desc; + gchar *author; + gchar *keywords; + time_t time; + gchar *copyright; + gchar *src; }; +/* Null point */ Point _point_null; + +/* Special positions */ Position _home; Position _dest;