From: Kaj-Michael Lang Date: Fri, 21 Mar 2008 12:41:38 +0000 (+0200) Subject: Misc X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d3dc645be4a5ed328a337389f23e8defbf627f7;p=mapper Misc --- diff --git a/src/path.c b/src/path.c index 66ac836..f0b454f 100644 --- a/src/path.c +++ b/src/path.c @@ -191,3 +191,22 @@ while (wcurr!=path->wtail) { return store; } + +void +position_set(Position *pos, gboolean valid, gdouble lat, gdouble lon) +{ +pos->valid=valid; +if (valid) { + pos->lat=lat; + pos->lon=lon; +} else { + pos->lat=NAN; + pos->lon=NAN; +} +} + +void +position_update(Position *pos, GpsData *data) +{ + +} diff --git a/src/path.h b/src/path.h index f5cc4e0..fcacf89 100644 --- a/src/path.h +++ b/src/path.h @@ -36,13 +36,14 @@ /** A lat/lon/alt position */ typedef struct _Position Position; struct _Position { + gchar *desc; + gboolean valid; gdouble lat; gdouble lon; gfloat altitude; - gboolean valid; - gchar *desc; + gfloat angle; /* Course from current position to this one */ time_t time; - guint type; + guint type; /* Type of position */ }; /** A general definition of a point in the Mapper unit system. */ @@ -101,6 +102,8 @@ Position _dest; Path *path_new(void); void path_free(Path *p); +void path_insert_mark_text(Path *path, gchar *text); + void path_resize(Path *path, guint size); void path_wresize(Path *path, guint wsize);