-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconstellationDiagram_no_BER_plot.html
More file actions
64 lines (42 loc) · 1.52 KB
/
Copy pathconstellationDiagram_no_BER_plot.html
File metadata and controls
64 lines (42 loc) · 1.52 KB
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
<!DOCTYPE html>
<html>
<title>Constellation Diagram</title>
<script src="https://d3js.org/d3.v4.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="hlsi.css">
<script src=signal.js></script>
<script src=common.js></script>
<script src=label.js></script>
<script src=sliders.js></script>
<script src=https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.3.0/math.min.js></script>
<script src=constellationDiagram_base.js></script>
<body>
<div id="modCodeSlider" style="margin-left: 1%; margin-top:3%; width: 100%;"></div>
<div id="noiseSlider" style="margin-left: 1%; margin-top:3%; width: 100%;"></div>
<button onclick="buttonPressedClearPoints()">clear message</button>
<div id="constellationParent" style="width: 100%; height: 100%;"></div>
<div id="rateSlider" style="margin-left: 1%; margin-top:2; width: 100%;"></div>
</body>
<script>
var sig = Signal(JSON.parse(JSON.stringify(conf.signal_multi)), '', {
gn_init: .1, // dB
gn_min: 0, // volts
gn_max: 10, // volts
mcs_init: 2, // array index int
});
var noise = Signal(JSON.parse(JSON.stringify(conf.signal_multi)), '', {
gn_init: 0, // dB
gn_min: -30,
gn_max: 30,
});
noise.gn = 0;
let BER_stats = new MessageStats();
let frozenFlag1 = false;
Slider(sig, 'mcs', null, "modCodeSlider");
constellationDiagram(300, 25,"constellationParent", frozenFlag1);
// }
// use the clear all circles button
function buttonPressedClearPoints(){
d3.select("#constellationParent").selectAll("circle").remove();
}
</script>
</html>