forked from vtwireless/HLSI
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdonStart.html
113 lines (83 loc) · 2.42 KB
/
donStart.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
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Don Test</title>
<meta charset="UTF-8"/>
<link rel=stylesheet type=text/css href=hlsi.css>
<link rel=stylesheet type=text/css href=codemirror.min.css />
<link rel=stylesheet type=text/css href=blackboard.min.css />
<script src=codemirror.min.js></script>
<script src=codeMirror_javascript.js></script>
<script src=scriptController.js></script>
<script src=signal.js></script>
<script src=powerSpectrumPlot.js></script>
<script src=common.js></script>
<script src=fft.js></script>
<script src=d3.v5.min.js></script>
<script src=sliders.js></script>
<script src=spectralEfficiencyPlot.js></script>
</head>
<body>
<h2>CodeMirror Editor Text</h2>
<p><a href="devel_index.html">[Index]</a></p>
<p>
This is a starter/primer for Don Roberts.
Don can edit this text.
</p>
</body>
<script>
'use strict';
// We are making two signals that have the same initial state but they
// change values 'freq', 'bw', 'gn', 'mcs' separately.
var num_channels = 8;
var epsilon = 1;
var decaying_constant = 0.9;
var sig1 = new Signal(conf.sig0, '1');
var sig2 = new Signal(conf.sigIC_05, '2');
var qfunc = new Array(num_channels).fill(0);
var userData = {}
userData['qfunc'] = qfunc;
userData['num_channels'] = num_channels;
userData['epsilon'] = epsilon;
userData['decaying_constant'] = decaying_constant;
// Change the initial freq value for sig1, so we see it is different from
// sig2.
sig1.freq = 1810.0e+6;
//sig1.bw_min = 4.0e6;
//sig1.bw_max = 40.0e6;
//
// This adds javaScript code that controls sig1 while seeing sig2.
//
new ScriptController([sig1, sig2], {
functionFiles: "functions/dons_wambatML2000_1_2.js",
postfix: [ '1', '2' ]
});
//
// This adds javaScript code that controls sig1 while seeing sig2.
//
new ScriptController([sig1,sig2], {
functionFiles: "functions/dons_freqHopper_1_2.js",
postfix: [ '1','2' ]
});
//
// You may remove sliders by removing the Slider() function call.
//
// You may add sliders by adding another Slider() function call.
//
Slider(sig1, 'freq');
Slider(sig1, 'bw');
Slider(sig1, 'gn');
Slider(sig1, 'mcs');
Slider(sig2, 'freq');
Slider(sig2, 'bw');
Slider(sig2, 'gn');
Slider(sig2, 'mcs');
PowerSpectrumPlot([sig1, sig2]);
// This is the Spectral Efficiency Plot for sig1 with sig2 being the
// interferer signal.
//
// We'll add a noise floor signal later, really.
//
SpectralEfficiencyPlot(sig1);
</script>
</html>