-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
141 lines (132 loc) · 6.48 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Abstandrechner</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel='stylesheet' href='styles/bootstrap/4.0.0-beta/css/bootstrap.min.css'
integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"/>
<link rel='stylesheet' type='text/css' href='styles/jsxgraph/0.99.7/jsxgraph.css'/>
<link rel='stylesheet' type='text/css' href='styles/main.css'/>
<script src='scripts/jsxgraph/0.99.7/jsxgraphcore.js'></script>
</head>
<body>
<div class="container-fluid">
<p><b>Alpha-Version / Baustelle: Nutze stattdessen <a href="https://wiki.fricklers.org/abstand.html">https://wiki.fricklers.org/abstand.html</a>.<br>
Known issue (especially in Chromium): If you cannot see the example photo, please <a href="">refresh</a> or
try a different browser.</b></p>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9">
<div id='jxgbox' class='jxgbox w-100'></div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 mt-2">
<form>
<div class="form-group row">
<label for="ref_size_in_cm" class="col-sm-5 col-form-label" data-toggle="tooltip"
data-placement="top" title="Markiere mit der blauen und der weißen Linie eine dir bekannte Breite, z.B. eine Fahrbahnmarkierung (12 cm), die Breite der Straße (häufig 300 cm), die Breite eines vorausfahrenden Autos etc.">Referenzbreite (in cm)</label>
<div class="col-sm-5">
<input class="form-control" id="ref_size_in_cm" type="number" min="1" max="1000" value="12" step="1">
</div>
</div>
<div class="form-group row">
<label for="offset_left_in_cm" class="col-sm-5 col-form-label" data-toggle="tooltip"
data-placement="top" title="Wie breit ist das Fahrrad (mit Anhänger oder Beladung) links von der Kamera?">Breite links (in cm)</label>
<div class="col-sm-5">
<input class="form-control" id="offset_left_in_cm" type="number" min="1" max="100" value="35" step="1">
</div>
</div>
<div class="form-group row">
<label for="offset_right_in_cm" class="col-sm-5 col-form-label" data-toggle="tooltip"
data-placement="top" title="Wie breit ist das Fahrrad (mit Anhänger oder Beladung) rechts von der Kamera?">Breite rechts (in cm)</label>
<div class="col-sm-5">
<input class="form-control" id="offset_right_in_cm" type="number" min="1" max="100" value="35" step="1">
</div>
</div>
<div class="form-group row">
<label for="measuring_error" class="col-sm-5 col-form-label" data-toggle="tooltip"
data-placement="top" title="Addiere x% des berechneten Abstands für eine konservative Schätzung (in dubio pro reo).">Messtoleranz in %</label>
<div class="col-sm-5">
<input type="number" class="form-control" id="measuring_error" min="1" max="100" value="10" step="1">
</div>
</div>
<div class="form-group row">
<div class="col-sm-10">
<input type="file" id="imgfiles" accept="image/jpeg, image/png" class="remove">
</div>
</div>
</form>
<h6>Abstände</h6>
<table class="table table-bordered table-striped">
<tr>
<td scope="row">Kamera : Fahrzeug</td>
<td>
<output id="cam_car_in_cm"></output>
</td>
</tr>
<tr>
<td scope="row">Kamera : Fahrzeug <br>(inkl Toleranz)</td>
<td>
<output id="cam_car_in_cm_with_error"></output>
</td>
</tr>
<tr>
<td scope="row">Fahrzeug : Fahrrad</td>
<td>
<output id="car_bike_in_cm"></output>
</td>
</tr>
<tr>
<td scope="row">Fahrzeug : Fahrrad<br>(inkl. Toleranz)</td>
<td>
<output id="car_bike_in_cm_with_error"></output>
</td>
</tr>
</table>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<p>
<b>Noch in Entwicklung: </b><a href="https://github.com/hollma/abstandrechner">Projekt auf
Github</a><br>
</p>
<h3>Kurzanleitung</h3>
<ul>
<li>Mit blauer und weißer Linie eine Referenzbreite markieren (z.B. Fahrbahnbegrenzung 12 cm)</li>
<li>Mit roter Linie das Auto markieren</li>
</ul>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="scripts/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="scripts/popper.js/1.11.0/umd/popper.min.js"
integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
crossorigin="anonymous"></script>
<script src="scripts/bootstrap/4.0.0-beta/js/bootstrap.min.js"
integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
crossorigin="anonymous"></script>
<script>
$(window).resize(function () {
console.log(window.document.board.canvasHeight);
console.log(window.document.board.canvasWidth);
window.document.board.update();
console.log(window.document.board.canvasHeight);
console.log(window.document.board.canvasWidth);
});
$(document).ready(function () {
// executes when complete page is fully loaded, including all frames, objects and images
window.document.board.update();
});
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<script src='scripts/abstand.js'></script>
</body>
</html>