forked from mkmooltham/Trilateration-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsLearn.html
84 lines (73 loc) · 2.7 KB
/
jsLearn.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Examples</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
</head>
<body>
<h1>Positioning Algorithm</h1>
<p id="question">what are the circles?</p>
<table style="width:100%">
<tr>
<th>
<p>Circle A (
<input id="a_x" type="number" style="width: 35px;" value="150" onchange="inputCircle()">
<input id="a_y" type="number" style="width: 35px;" value="150" onchange="inputCircle()">
<input id="a_r" type="number" style="width: 35px;" value="150" onchange="inputCircle()">
)
</p>
</th>
<th>
<p>Circle B (
<input id="b_x" type="number" style="width: 35px;" value="300" onchange="inputCircle()">
<input id="b_y" type="number" style="width: 35px;"value="150" onchange="inputCircle()">
<input id="b_r" type="number" style="width: 35px;" value="150" onchange="inputCircle()">
)
</p>
</th>
<th>
<p>Circle C (
<input id="c_x" type="number" style="width: 35px;" value="225" onchange="inputCircle()">
<input id="c_y" type="number" style="width: 35px;" value="280" onchange="inputCircle()">
<input id="c_r" type="number" style="width: 35px;" value="150" onchange="inputCircle()">
)
</p>
</th>
</tr>
</table>
<table style="width:100%">
<tr>
<input type="submit" value="Draw Circle" onclick="inputCircle()"/>
<button type="button" onclick="randomCircle()">Random Circle</button>
<button type="button" onclick="enlargeRadius()">Enlarge Radius</button>
<button type="button" onclick="inputTangent()">Tangent</button>
<button type="button" onclick="inputIncentre()">Incentre</button>
<button type="button" onclick="inputCentroid()">Centroid</button>
<button type="button" onclick="inputOrthocentre()">Orthocentre</button>
<button type="button" onclick="clearDrawing()">Clear</button>
<form action="">
<input type="checkbox" id="autoClear" value="true" checked>auto clear<br>
</form>
</tr>
<tr>
<p> Sensor erro range
<input id="err_range" type="number" style="width: 35px;" value="20" onchange="updateErrorDis()">
</p>
<button type="button" onclick="randomLocation()">Random Location</button>
<button type="button" onclick="calLocation()">Calculate Location</button>
<button type="button" onclick="analysis()">Analysis</button>
</tr>
</table>
<p id="answer_circle">please input data</p>
<p id="answer_tangent"> </p>
<p id="answer_analysis"> </p>
<canvas id="myCanvas" width="1300" height="500" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<p id="answer_analysislist"> </p>
<script src="jsLearn.js"></script>
</body>
</html>