-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbodeplot.html
219 lines (179 loc) · 3.99 KB
/
bodeplot.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>
<meta charset='utf-8'>
<title>Bode Plot</title>
<link rel="stylesheet/less" type="text/css" href='ui.less'>
<script src='lib/coffee-script.js'></script>
<script src='lib/less.js'></script>
<script src='lib/jquery-1.7.1.min.js'></script>
<script src='lib/dsp.js'></script>
<script src='dataserver.coffee' type='text/coffeescript'></script>
<script src='human_units.coffee' type='text/coffeescript'></script>
<script src='livegraph.coffee' type='text/coffeescript'></script>
<script src='session_common.coffee' type='text/coffeescript'></script>
<script src='bodeplot.coffee' type='text/coffeescript'></script>
<style>
#wrap{
max-width: 1000px;
position: absolute;
top: 32px;
width: 100%;
height: 100%;
}
.livegraph{
width: 100%;
height: 100%;
position: relative;
}
.livegraph canvas{
position: absolute;
top: 0px;
left: 0px;
}
#response_graphs{
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 33%;
max-width: 450px;
}
#response_graphs > div{
width: 100%;
height: 300px;
}
.plot-wrap{
padding: 20px 0 0 10px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: relative;
}
.plot-wrap h2, #sample-status{
text-transform: uppercase;
font-size: 11px;
letter-spacing: 0.15em;
margin-left: 36px;
position: absolute;
top: 10px;
}
#sample-status{
position: absolute;
right: 10px;
text-align: right;
width: 100px;
}
#bode_graphs{
position: absolute;
left: 33%;
top: 0;
bottom: 0;
right: 0;
}
#bode_graphs > div{
width: 100%;
height: 300px;
}
#toolbar{
position: absolute;
top: 0;
width: 100%;
display: block;
background: linear-gradient(270deg, #555 0%, #585858 25%, #333 100%);
background: -webkit-linear-gradient(270deg, #555 0%, #585858 25%, #333 100%);
background: -moz-linear-gradient(270deg, #555 0%, #585858 25%, #333 100%);
color: white;
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
}
#toolbar p, #toolbar button{
display: inline-block;
height: 32px;
vertical-align: middle;
}
#toolbar p{
margin: -2px 10px 0 10px;
height: 32px;
}
#toolbar select, #toolbar input{
height: 33px;
font-size: 16px;
margin: 0;
padding: 0;
border: 0;
background: #666;
color: white;
padding: 0 5px 0 5px;
margin: 0 5px 0 5px;
}
#toolbar input::-webkit-inner-spin-button,
#toolbar input ::-webkit-outer-spin-button{
-webkit-appearance: none;
}
#toolbar select option{
color: black;
}
#v1, #v2{
width: 40px;
text-align: right;
}
#update-notify{
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
</style>
<body>
<div id='error-overlay'>
<div id='error-status'>Loading...</div>
<div id='connectError' style='display:none'>
<h1>Nonolith Connect not found</h1>
<p class='osspec windows'>
Click <strong>Start->Programs->Nonolith Labs->Nonolith Connect</strong> to start Nonolith Connect.
</p>
<p class='osspec linux'>
Run <code>sudo /etc/init.d/nonolith-connect start</code> in a terminal to start Nonolith Connect.
</p>
</div>
<div id='chooseDevices' style='display:none'>
<h1>Choose a device</h1><ul></ul>
</div>
</div>
<div id='wrap'>
<section id='response_graphs'>
<div class='plot-wrap'>
<h2>Step response</h2>
<div id='step_plot' class='livegraph'> </div>
</div>
<div class='plot-wrap'>
<h2>Impulse response</h2>
<div id='impulse_plot' class='livegraph'></div>
</div>
</section>
<section id='bode_graphs'>
<div class='plot-wrap'>
<h2>Gain</h2>
<div id='bode_magnitude_plot' class='livegraph'> </div>
</div>
<div class='plot-wrap'>
<h2>Phase</h2>
<div id='bode_phase_plot' class='livegraph'> </div>
</div>
</section>
<div id='sample-status'><span id='samplecount'>0</span> Samples</div>
</div>
<div id='toolbar'>
<p>
Step <select id='source_stream'></select>
from <input type='number' id='v1' /><span id='v1-unit'>V</span>
to <input type='number' id='v2' /><span id='v2-unit'>V</span>.
</p>
<p>
Measure <select id='sense_stream'></select>
</p>
<button id='startpause' title="Start" class='startbtn'></button>
</div>
<div id='update-notify'></div>
</body>
</html>