-
Notifications
You must be signed in to change notification settings - Fork 25
/
activities.html
219 lines (201 loc) · 8.09 KB
/
activities.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" href="img/favicon.ico" />
<meta charset='utf-8'>
<meta http-equiv="x-ua-compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,height=device-height, user-scalable=no" />
<META name="keywords" content="Leaflet, OpenStreetMap, GPX, GPS, speed, regression, GIS, outdoor">
<link rel="manifest" href="./manifest.json">
<!-- Google Material design fontss -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
<title>Speed profile editor</title>
<script defer src= "js/jquery.min.js"></script>
<script defer src= "js/jquery.flot.min.js"></script>
<script defer src= "js/regression.js"></script>
<script defer src= "js/leaflet.js"></script>
<script defer src= "js/leaflet.polystats.js"></script>
<!-- File upload -->
<script defer src= "js/togeojson.js"></script>
<script defer src= "js/leaflet.filelayer.js"></script>
<link rel="stylesheet" href="css/activities.css" />
<script defer src="js/dataset.js"></script>
<script defer src="js/config.js"></script>
<script defer src="js/utils.js"></script>
<script defer src="js/no-ie.js"></script>
<script defer src="js/wtracks-commons.js"></script>
<script defer src="js/activities.js"></script>
</head>
<body>
<div class="container">
<div class="text">
<h1>Activity Editor</h1>
<p>
Here you can edit the activities associated to your tracks.
<span id="intro" class="help-b material-icons" title="Help">help_outline</span>
</p>
<div id="intro-help" class="help-p">Activities have two characteristics:
<ul>
<li>'vehicle' configures the routing engine when editing tracks in this mode, which ultimately will define which kind of road you can follow;</li>
<li>'speed profile' is used to evaluate the time you'll need to physically travel through your track. Speed is computed based on the track slope between each segment of the track. It is either the result of a formula (usually polynomial of 2nd degree), a lookup within a set of reference speeds for a selection of slope values.</li>
</ul>
</div>
</div>
<!-- Prompt box -->
<div id="prompt" class="modal">
<!-- Modal content -->
<div class="prompt-content">
<a href="#" id="prompt-close" class="btn-link">×</a>
<p id="prompt-text"></p>
<input id="prompt-val" type="text" size="50" value="" />
<p id="import-error" class="status-error">Invalid input! Value must be a previously exported activity value.</p>
<button id="prompt-ok">Ok</button>
</div>
</div>
<div id="listdiv">
<h2>Saved activities:</h2>
<select id="activities"></select>
<a href="#" id="activityup" class="btn-link movea" title="Move up"><span class="material-icons">expand_less</span></a>
<a href="#" id="activitydown" class="btn-link movea" title="Move down"><span class="material-icons">expand_more</span></a>
<div id="activities-btns">
<button id="activitydel">Delete</button>
<button id="activityreset">Reset Defaults</button>
<button id="activityexportall">Export All</button>
<button id="activityimport">Import</button>
<span id="savingtxt" class="help-b material-icons" title="Help">help_outline</span>
</div>
<div class="text">
<p id="savingtxt-help" class="help-p">
The activities modifications you save are stored in your browser's local storage.
This way you will find them every time you visit WTracks with that same browser.
If you visit WTracks from a different device it will not have access to this storage.
To your activities between devices or browsers, use the import and export buttons.
</p>
</div>
</div>
<div id="editordiv">
<h2>Edit activity:</h2>
<div id="editor-btns">
<button id="activitynew">New</button>
<button id="activitysave">Save</button>
<button id="activityexport">Export</button>
</div>
<table class="form">
<tr>
<td>Name:</td>
<td><input type="text" id="activityname" placeholder="Activity's name" /></td>
</tr>
<tr>
<td>Routing vehicule:</td>
<td><select id="activityvehicle"></select></td>
</tr>
<tr>
<td>Speed profile:</td>
<td>
<select id="method">
<option value="refspeeds">refspeeds</option>
<option value="linear">linear</option>
<option value="power">power</option>
<option selected="selected" value="polynomial">polynomial</option>
</select>
</td>
</tr>
</table>
<div class="text">
<p>
Speed will be computed using the following formula:
</p>
</div>
<div id="spformula">
</div>
<div class="graphdiv">
<div class="graph"></div>
</div>
<h2>Compute speed profile:</h2>
<div class="text">
<p>
<span id="computetxt" class="help-b material-icons" title="Help">help_outline</span>
</p>
<p id="computetxt-help" class="help-p">
Use our engine to compute a speed profile based on a recorded GPS track. This track should have elevation and timing data. Select the activity's speed profile type in the activity edition form above, upload your track below, optionally change the engine, and click "Compute" button. Don't forget to save your activity if you want to reuse it later.
</p>
</div>
<table class="form">
<tr>
<td>Input data:</td>
<td>
<p>Ref. speeds:
<select id="data">
</select></p>or
<p>
Track file:
<input type="file" id="trackfile"></p>
</td>
</tr>
<tr>
<td>Polynomial degree:</td>
<td>
<select id="degree">
<option value="1">1</option>
<option value="2" selected="selected">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</td>
</tr>
<tr>
<td>Iterations:</td>
<td>
<select id="iterations">
<option value="1" selected="selected">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</td>
</tr>
<tr>
<td>Pruning:</td>
<td>
<select id="pruning">
<option value="0">0</option>
<option value="0.1">0.1</option>
<option value="0.2">0.2</option>
<option value="0.3" selected="selected">0.3</option>
<option value="0.4">0.4</option>
<option value="0.5">0.5</option>
<option value="0.6">0.6</option>
<option value="0.7">0.7</option>
<option value="0.8">0.8</option>
<option value="0.9">0.9</option>
<option value="1">1</option>
</select>
</td>
</tr>
<tr>
<td></td>
<td><button id="resetcompute">Reset parameters</button></td>
</tr>
</table>
<p>
<button id="compute">Compute</button>
</p>
</div>
<div id="footer">
<a href="." class="btn-link link-home"><< Back to WTracks editor</a>
</div>
</div>
</body>
</html>