-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
157 lines (148 loc) · 5.43 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Demo for Fuzzy System</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.1.0/math.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.1.2/js/ion.rangeSlider.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
<script type="text/javascript" src="js/Coordinate.js"></script>
<script type="text/javascript" src="js/Vehicle.js"></script>
<script type="text/javascript" src="js/Fuzzifier.js"></script>
<script type="text/javascript" src="js/FuzzySystem.js"></script>
<script type="text/javascript" src="js/Maze.js"></script>
<script type="text/javascript" src="js/Line.js"></script>
<script type="text/javascript" src="js/Wall.js"></script>
<script type="text/javascript" src="js/FootPrint.js"></script>
<script type="text/javascript" src="js/CanvasFrame.js"></script>
<script type="text/javascript" src="http://beneposto.pl/jqueryrotate/js/jQueryRotateCompressed.js"></script>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.1.2/css/ion.rangeSlider.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.1.2/css/ion.rangeSlider.skinFlat.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
</head>
<body>
<div id="toggle"></div>
<div class="menu closed">
<h1 style="margin-left: 20px">Setting</h1>
<ul>
<li>
Angle
<input type="text" id="range" value="" name="range" />
Rate
<input type="text" id="Rrange" value="" name="Rrange" />
<br/>
<input type="button" id="startBtn" value="Start" class="startBtn"/>
</br>
<b style="font-size: 18px;">Dist of Sensors</b><br>
<div class = "inite">
<b id="Rs"></b><br>
<b id="Ms"></b><br>
<b id="Ls"></b><br>
</div>
</li>
<ul>
</ul>
</div>
<!-- The Main Part-->
<div style="width: 100%; height:100%;">
<!-- Title bar-->
<div class="title">
<h1>Self-propelled vehicle • HW-1</h1>
</div>
<!-- Body part-->
<div style="width: 100%; height:100%; padding: 10px;">
<!--For canvas-->
<div class="container">
<canvas id="canvas" width="760" height="600"></canvas>
</div>
<!--For Data showing-->
<div class="showData" id="showData">
<div>
<h2 style="margin-left: 10px;">Result</h2>
</div>
<div class="dataPad">
<li><a><i class="fa fa-car"></i> Vehicle Position</li>
<div><b id="CPos"></b></div>
<li><a><i class="fa fa-undo"></i></i> Turn Angle</li>
<div><b id="CAng"></b></div>
<li><a><i class="fa fa-bullseye"></i> Dist of Sensors</li>
<div id="cSens">
<b id="CRs"></b><br>
<b id="CMs"></b><br>
<b id="CLs"></b><br>
</div>
</div>
</div>
</div>
<script>
var canvasF = new CFrame();
$(document).ready(function() {
var rate = 5;
var x = 0;
var y = 0;
var maze = new Maze();
maze.drawItem();
});
// Setting the initial angle
var $range = $("#range"),
$result = $("#angle");
var track = function (data) {
$result.html("Angle: " + data.from);
initState(data.from);
};
$range.ionRangeSlider({
hide_min_max: true,
keyboard: true,
min: -90,
max: 270,
from: 0,
grid: true,
onStart: track,
onChange: track,
onFinish: track,
onUpdate: track
});
$(function () {
var $Rrange = $("#Rrange");
rate = $("#rate");
var Rtrack = function (data) {
Crate = data.from;
};
$("#Rrange").ionRangeSlider({
hide_min_max: true,
keyboard: true,
min: 1,
max: 50,
from: 5,
grid: true,
onStart: Rtrack,
onChange: Rtrack,
onFinish: Rtrack,
onUpdate: Rtrack
});
});
$( "#toggle" ).click(function() {
$(".menu").toggleClass("closed");
$(this).toggleClass("closed");
$(".content").toggleClass("closed");
$("#wrapper").toggleClass("closed")
});
$("#startBtn").click(function() {
$(".menu").toggleClass("closed");
$("#toggle").toggleClass("closed");
$(".content").toggleClass("closed");
$("#wrapper").toggleClass("closed");
canvasF.setStart();
});
</script>
<div style="text-align: center;margin: 0px auto;">
<div class="footer text-center">
© 2016 • <a target="_blank" href="https://github.com/Piicksarn">
<i class="fa fa-github"></i>Piicksarn</a> - Created with JavaScript.
</div>
</div>
</body>
</html>