89 lines
2 KiB
C
89 lines
2 KiB
C
![]() |
/*
|
||
|
* trackdata
|
||
|
*
|
||
|
* Copyright (C) 2006,2007 Nils Faerber <nils.faerber@kernelconcepts.de>
|
||
|
*
|
||
|
*
|
||
|
* This program is free software; you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU General Public License as published by
|
||
|
* the Free Software Foundation; either version 2 of the License, or
|
||
|
* (at your option) any later version.
|
||
|
*
|
||
|
* This program is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU General Public License
|
||
|
* along with this program; if not, write to the Free Software
|
||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#ifndef _TRACKDATA_H_
|
||
|
#define _TRACKDATA_H_
|
||
|
|
||
|
/* track element */
|
||
|
typedef struct {
|
||
|
// data
|
||
|
gint unitx;
|
||
|
gint unity;
|
||
|
gfloat elevation;
|
||
|
gchar *datetime;
|
||
|
gchar nrsat; // number of satellites in view
|
||
|
gfloat hdop; // horizontal delution
|
||
|
gfloat vdop; // vertital delution
|
||
|
gfloat pdop; // ??? other dilution
|
||
|
// attributes for UI
|
||
|
gboolean selected;
|
||
|
} trackdata;
|
||
|
|
||
|
/* track types, LANEs are no. of lanes per direction */
|
||
|
typedef enum {
|
||
|
UNKNOWN,
|
||
|
OUTLINE, // like borders
|
||
|
RIVER,
|
||
|
FOOTPATH,
|
||
|
AGRI,
|
||
|
CITY,
|
||
|
URBAN,
|
||
|
MOTORWAY,
|
||
|
HIGHWAY,
|
||
|
} tracktype;
|
||
|
|
||
|
|
||
|
/* tracklist element */
|
||
|
typedef struct {
|
||
|
GList *track; // list of trackdata trackpoints
|
||
|
gboolean show; // if this track is to be drawn
|
||
|
gchar *name; // visible name of this track
|
||
|
gint xmax, ymax; // bounding box of this track
|
||
|
gint xmin, ymin;
|
||
|
tracktype type;
|
||
|
} track_head;
|
||
|
|
||
|
|
||
|
/* waypoint / POI */
|
||
|
typedef struct {
|
||
|
gint unitx;
|
||
|
gint unity;
|
||
|
gfloat elevation;
|
||
|
gchar *name;
|
||
|
} waypoint;
|
||
|
|
||
|
|
||
|
/*
|
||
|
* cities
|
||
|
* Cities are stored in database, internal GList if cities only stores
|
||
|
* the cities inside the current view
|
||
|
*/
|
||
|
|
||
|
typedef struct {
|
||
|
gint unitx;
|
||
|
gint unity;
|
||
|
gchar *name;
|
||
|
guint population;
|
||
|
} city;
|
||
|
|
||
|
#endif
|