-
Notifications
You must be signed in to change notification settings - Fork 4
/
ecef_path_generator.html
executable file
·278 lines (253 loc) · 10 KB
/
ecef_path_generator.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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<!DOCTYPE html>
<html>
<!--
/* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details. */
-->
<head> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>ECEF Path Generator</title>
<link rel="stylesheet" href="ecef.css" type="text/css" media="screen">
<script type="text/javascript" src="raphael.min.js"></script>
<!-- -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" dintegrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js" dintegrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script>
<!-- -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<!-- ####################################################-->
<div id="dim"></div>
<div id="pop_wrapper">
<div id="pop_up">
<div id="pop_up_header">
<span id="popup_title"></span>
<span id="closePopUp">×</span>
<div style="clear:both;"></div>
</div>
<div id="popup_content">
<div id="ecef">
<table class="abcr">
<tr>
<td class="tleft">Frequency:</td>
<td class="tright">
<input type="text" id="frequency" maxlength="4" size="4">Hz
</td>
</tr>
<tr>
<td class="tleft">Save as:</td>
<td><input type="text" id="fileName"></td>
</tr>
</table>
<button id="ecefButton">Download</button>
</div>
<div id="wait22">
<img src="waiting.gif" alt="Processing data, please wait..."/>
</div>
<div id="rawData">
<div id="form2">
Save as: <input type="text" id="fileNameR"><br/>
<button id="rawDataButton">Download</button>
</div>
</div>
<div id="configuration">
<fieldset>
<legend>Location:</legend>
<table class="abcr">
<tr>
<td class="tleft">Latitude:</td>
<td><input type="text" id="latitude" maxlength="10" size="10" value="53.2672"></td>
</tr>
<tr>
<td class="tleft">Longitude:</td>
<td><input type="text" id="longitude" maxlength="10" size="10" value="-1.63"></td>
</tr>
<tr>
<td colspan="2" style="text-align:right;">
<button id="locationButton">Set location</button>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>Colour:</legend>
<table class="abcr">
<tr>
<td class="tleft">Trail:</td>
<td><input type="text" id="trail_colour" maxlength="7" size="7"></td>
</tr>
<td class="tleft">Mover:</td>
<td><input type="text" id="mover_colour" maxlength="7" size="7"></td>
</tr>
<tr>
<td></td>
<td><button id="coloursButton">Change</button></td>
</tr>
</table>
</fieldset>
</div>
<div id="description" style="width:800px; padding:10px;text-align:justify; font-size:1em;overflow-y:scroll; max-height:300px">
<p>
This is an application that generates ECEF coordinates from a drawn path on a map.
The data generated can be used to generate GPS signal files for applications that
simulate GPS signal <a href="https://github.com/osqzss/gps-sdr-sim" target="_blank">gps-sdr-sim</a>
</p>
<br/>
<h4>Quick start:</h4>
<ul id="squareList">
<li>
Click "More Actions", select Settings, input the desire latitude, longitude and altitude
where the map will be centered and adjust the Zoom.
</li>
<li>
Over the map, draw a path using the mouse while pressing the left button, if it is needed
you can delete the last points drawn with the button Remove.
</li>
<li>
Adjust the initial speed using the bar below the map.
</li>
<li>
Adjust the initial time elapsed. At x1 this means that the mover will take 15 seconds
on a 1 kilometre path at 240 km/hr, at x2 it will take 7.5 (of real time),
at x4 3.75 sec (of real time) and so on. This will not affect the recording.
</li>
<li>
Click "Recorder / Player", click Record, a blue point will start moving along the
drawn path. You can modify the speed as you wish.
</li>
<li>
After finishes the recording, you can see the result by pressing the Play button.
</li>
</ul><br/>
<h4>Documentation</h4>
<ul id="docList">
<li>Recorder / Player
<ul>
<li><i>Record</i> starts to record the position and speed of the mover. Once the recording
has finished, speed can not be change. However it can be reset.</li>
<li><i>Reset</i> reset the path ready to be recorded again from the beginning. Speed is override.</li>
<li><i>Delete</i> delete the current path.</li>
<li><i>Remove</i> as far as the path have not been recorded, clicking remove will remove
the last point of the path, click it as needed to remove the many point.</li>
</ul>
</li>
<li>More Actions
<ul>
<li><i>Settings</i> here you can set the latitude, longitude, altitude, zoom and colour for the path and mover.</li>
<li><i>Export to ECEF</i> after recording, you can download the path in ECEF
coordinates, you will need to input the frequency in Hertz for the
sample data. To use with <a href="https://github.com/osqzss/gps-sdr-sim" target="_blank">gps-sdr-sim</a> the sampling rate of the user motion has to be 10Hz.</li>
<li><i>Download data</i> this allows you to download the raw data a path was recorded, so you can import it later to play it, reset and change the speed and generate a different ECEF coordinate file.</li>
</ul>
</li>
</ul>
<br/>
<h4>Download</h4>
<p>
You can download this application from <a href="https://github.com/fpdf-easytable/ECEF_path_generator">here</a>.
</p>
</div>
</div>
</div>
</div>
<!-- ####################################################-->
<div class="row">
<div class="col-2 col-s-2 rightBlock">
<div id="left_pannel" style="overflow-x: hidden;overflow-y: auto; padding-right: 10px;">
<ul id="gadgets">
<li>
<div>Speed</div>
<div class="font1" id="speed" style="display:inline;">0.00</div>
<div style="display:inline;">km/h</div>
</li>
<li>
<div>Total Distance</div>
<div class="font1" id="Tdistance" style="display:inline;">0.00</div>
<div style="display:inline;">km</div>
</li>
<li>
<div>Distance</div>
<div class="font1" id="distance" style="display:inline;">0.00</div>
<div style="display:inline;">km</div>
</li>
<li>
<div>Altitude</div>
<div class="font1" id="altitude" style="display:inline;">0.00</div>
<div style="display:inline;">mt</div>
</li>
<li>
<div>Time</div>
<div class="font1" id="elapsedtime" style="display:inline;">0.00</div>
<div style="display:inline;">secs</div>
</li>
</ul>
<!-- ############################################ -->
<div style="display:table;padding:1px; dborder:1px solid; width:100%;">
<div style="display:table-row;">
<div style="margin-top:0px;">
<input id="recordButton" type="button" style="width:100%;" value="Record">
<input id="recordingButton" type="button" disabled="disable" style="width:100%;display:none;" value="Recording">
<input id="playButton" type="button" style="width:100%;display:none;" value="Play">
<input id="pauseButton" type="button" style="width:100%;display:none;margin-right: 3px;" value="Pause">
</div>
</div>
<div style="display:table-row;">
<div style="margin-top:6px;">
<input id="resetButton" type="button" style="width:45%;display:table-cell;margin-right:3px;" value="Reset">
<input id="eraseButton" type="button" style="float:right;width:45%;display:table-cell;margin-right:3px;" value="Remove">
</div>
</div>
<div style="display:table-row;">
<div style="margin-top:6px;">
<input id="deletButton" type="button" style="float:right;display:table-cell;margin-right: 3px;" value="Delete">
</div>
</div>
<div style="display:table-row;">
<div style="display: inline-block;">
<div style="font-size: 12px;margin-top:6px;">Zoom</div>
<input id="zoom_less" type="button" style="margin-right: 5px;" value="-"/>
<input id="zoom_more" type="button" style="margin-right: 10px;" value="+"/>
</div>
<div style="display: inline-block;">
<div style="font-size: 12px;margin-top:6px;">Speed Step</div>
<div id="speed_step" style="font-size: 12px;margin-top:6px;text-align: center;">1km</div>
</div>
</div>
<div style="display:table-row;">
<div style="font-size: 12px;margin-top:6px;">Time Elapsed</div>
<input id="time_speed_less" type="button" style="margin-right: 1px;" value="-"/>
<div id="x_time" style="font-size:12px; display:inline;padding: 10px;">x1</div>
<input id="time_speed_more" type="button" style="margin-right: 10px;" value="+"/>
</div>
<div style="display:table-row;">
<div style="margin-top:6px;">
<input id="export" type="button" style="width:100%;" value="Export to ECEF"/>
<input id="exportData" type="button" style="width:100%;margin-top: 5px;" value="Download data"/>
<button style="width:100%;margin-top: 5px;">
<label for="upload">
<div >Import data</div>
</label>
<input id="upload" type="file"/>
</button>
<input id="settings" type="button" style="width:100%;margin-top: 5px;" value="Settings"/>
<input id="whatisit" type="button" style="width:100%;margin-top: 5px;" value="What is it?"/>
</div>
</div>
</div>
<!-- ############################################ -->
</div>
</div>
<div id="container" class="col-s-10" style="padding:0px;">
<div id="canvasContainer">
<div id="canvas"></div>
<div id="map"></div>
</div>
<div id="speed-panel">
</div>
</div>
</div>
</body>
<script type="text/javascript" src="ecef_path_generator.js"></script>
</html>