Merge branch 'master' of https://vcs.maemo.org/git/gpssportsniffer
[gpssportsniffer] / constants.h
1 /****************************************************************************
2 **
3 **  Copyright (C) 2011  Tito Eritja Real <jtitoo@gmail.com>
4 **
5 **  This program is free software: you can redistribute it and/or modify
6 **  it under the terms of the GNU General Public License as published by
7 **  the Free Software Foundation, either version 3 of the License, or
8 **  (at your option) any later version.
9 **
10 **  This program is distributed in the hope that it will be useful,
11 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 **  GNU General Public License for more details.
14 **
15 **  You should have received a copy of the GNU General Public License
16 **  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 **
18 ****************************************************************************/
19
20 #ifndef CONSTANTS_H
21 #define CONSTANTS_H
22
23 // tile size in pixels
24 const int tdim=256;
25
26 #ifndef APPLICATION_NAME
27 #define APPLICATION_NAME GPS Sport Sniffer
28 #endif
29
30 #ifndef ERROR_VERBOSITY
31 #define ERROR_VERBOSITY 3
32 #endif
33
34 #ifndef WARN_VERBOSITY
35 #define WARN_VERBOSITY 2
36 #endif
37
38 #ifndef INFO_VERBOSITY
39 #define INFO_VERBOSITY 1
40 #endif
41
42 #ifndef DEBUG_VERBOSITY
43 #define DEBUG_VERBOSITY 0
44 #endif
45
46 #ifndef NOLOG_VERBOSITY
47 #define NOLOG_VERBOSITY -1
48 #endif
49
50 #ifndef DATE_FORMAT
51 #define DATE_FORMAT "dd-MM-yyyy"
52 #endif
53
54 #ifndef XML_DATE_FORMAT
55 #define XML_DATE_FORMAT "yyyy-MM-ddThh:mm:ssZ"
56 #endif
57
58 #ifndef CONTINOUS_DATE_FORMAT
59 #define CONTINOUS_DATE_FORMAT "dd-MM-yyyy_hh-mm-ss"
60 #endif
61
62 #ifndef CLEAN_DATE_FORMAT
63 #define CLEAN_DATE_FORMAT "dd-MM-yyyy hh:mm:ss"
64 #endif
65
66 #ifndef APPLICATION_PATH
67 #define APPLICATION_PATH "/home/user/MyDocs/GPSSniffer/"
68 #endif
69
70 #ifndef MAPS_DIR
71 #define MAPS_DIR "maps"
72 #endif
73
74 #ifndef TCX_FILE
75 #define TCX_FILE ".tcx"
76 #endif
77
78 #ifndef GPX_FILE
79 #define GPX_FILE ".gpx"
80 #endif
81
82 #ifndef TCX_XSI_SCHEMALOCATION
83 #define TCX_XSI_SCHEMALOCATION "http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2 http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd"
84 #endif
85
86 #ifndef GPX_CREATOR
87 #define GPX_CREATOR "GPS Sport Sniffer v.1.1"
88 #endif
89
90 #ifndef GPX_VERSION
91 #define GPX_VERSION "1.1"
92 #endif
93
94 #ifndef GPX_XMLNS
95 #define GPX_XMLNS "http://www.topografix.com/GPX/1/1"
96 #endif
97
98
99 #ifndef TCX_XMLNS
100 #define TCX_XMLNS "http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2"
101 #endif
102
103 #ifndef TCX_XMLNS_XSI
104 #define TCX_XMLNS_XSI "http://www.w3.org/2001/XMLSchema-instance"
105 #endif
106
107 #ifndef EARTH_RADIUS
108 #define EARTH_RADIUS 6371
109 #endif
110
111 #ifndef PI
112 #define PI 3.1415926535897932386
113 #endif
114
115 #ifndef FIRST_LATITUDE
116 #define FIRST_LATITUDE 41.6105
117 #endif
118
119 #ifndef FIRST_LONGITUDE
120 #define FIRST_LONGITUDE 0.620667
121 #endif
122
123
124 #ifndef DEFAULT_ZOOM
125 #define DEFAULT_ZOOM 15
126 #endif
127
128 #ifndef MAX_ZOOM
129 #define MAX_ZOOM 18
130 #endif
131
132 #ifndef MIN_ICC_ZOOM
133 #define MIN_ICC_ZOOM 8
134 #endif
135
136 #ifndef MAX_ZOOM_DOWNL
137 #define MAX_ZOOM_DOWNL 16
138 #endif
139
140 #ifndef TIME_SECONDS_POSSITIONING_PAN
141 #define TIME_SECONDS_POSSITIONING_PAN 7
142 #endif
143
144 #ifndef TIME_MIN_TIMEAUTOSAVE
145 #define TIME_MIN_TIMEAUTOSAVE 5
146 #endif
147
148 #ifndef WIDTH_DEFAULT
149 #define WIDTH_DEFAULT 800
150 #endif
151
152 #ifndef HEIGHT_DEFAULT
153 #define HEIGHT_DEFAULT 480
154 #endif
155
156 #ifndef HTTP_TIMEOUT
157 #define HTTP_TIMEOUT 3600
158 #endif
159
160 #ifndef ACCURACY_V_MIN
161 #define ACCURACY_V_MIN 100
162 #endif
163
164 #ifndef ACCURACY_V_GAIN
165 #define ACCURACY_V_GAIN 20
166 #endif
167
168 #ifndef ACCURACY_H_MIN
169 #define ACCURACY_H_MIN 100
170 #endif
171
172 enum MapType {  MapTypeCloudMade=0,
173                 MapTypeGoogleMaps=1,
174                 MapTypeICC=2,
175                 MapTypeOpenCycleMaps=3,
176                 MapTypeOpenStreetMaps=4
177 };
178
179 enum XMLFileType{XMLFile_GPX=0,
180                  XMLFile_TCX=1
181 };
182
183 enum Mode {  Mode_NewActivityMode, Mode_LoadTracksWindow
184 };
185
186
187 #endif // CONSTANTS_H