speedandcurrent 2.1.1 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +296 -294
- package/correctionTable.js +332 -332
- package/icon.png +0 -0
- package/index.js +843 -780
- package/package.json +50 -49
- package/public/TableRenderer.js +143 -143
- package/public/app.js +876 -843
- package/public/index.html +346 -345
- package/public/main.css +123 -123
package/public/main.css
CHANGED
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
/* ─── CSS Variables for instance colours (used by SVG strokes and table rows) ─ */
|
|
2
|
-
:root {
|
|
3
|
-
--heading-color: #000000;
|
|
4
|
-
--attitude-color-instance: #000000;
|
|
5
|
-
--current-color: #0d47a1;
|
|
6
|
-
--currentDamped-color: #0d47a1;
|
|
7
|
-
--boatSpeed-color: #388e3c;
|
|
8
|
-
--boatSpeedDamped-color: #388e3c;
|
|
9
|
-
--correctedBoatSpeed-color: #27632a;
|
|
10
|
-
--boatSpeedRefGround-color: #00575b;
|
|
11
|
-
--groundSpeed-color: #5d4037;
|
|
12
|
-
--groundSpeedDamped-color: #5d4037;
|
|
13
|
-
--speedCorrection-color: #ad1457;
|
|
14
|
-
--residual-color: #6a1b9a;
|
|
15
|
-
--correctionTable-color: #4e342e;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* ─── Instance ID colours ──────────────────────────────────────────────────── */
|
|
19
|
-
#heading { color: var(--heading-color); stroke: var(--heading-color); }
|
|
20
|
-
#attitude { color: var(--attitude-color-instance);stroke: var(--attitude-color-instance); }
|
|
21
|
-
#current,
|
|
22
|
-
#currentDamped { color: var(--current-color); stroke: var(--current-color); }
|
|
23
|
-
#boatSpeed,
|
|
24
|
-
#boatSpeedDamped { color: var(--boatSpeed-color); stroke: var(--boatSpeed-color); }
|
|
25
|
-
#correctedBoatSpeed { color: var(--correctedBoatSpeed-color); stroke: var(--correctedBoatSpeed-color); }
|
|
26
|
-
#boatSpeedRefGround { color: var(--boatSpeedRefGround-color); stroke: var(--boatSpeedRefGround-color); }
|
|
27
|
-
#groundSpeed,
|
|
28
|
-
#groundSpeedDamped { color: var(--groundSpeed-color); stroke: var(--groundSpeed-color); }
|
|
29
|
-
#speedCorrection { color: var(--speedCorrection-color); stroke: var(--speedCorrection-color); }
|
|
30
|
-
#residual { color: var(--residual-color); stroke: var(--residual-color); }
|
|
31
|
-
#correctionTable { color: var(--correctionTable-color); stroke: var(--correctionTable-color); }
|
|
32
|
-
|
|
33
|
-
/* ─── Correction table cell sizing ────────────────────────────────────────── */
|
|
34
|
-
.TableCell {
|
|
35
|
-
width: 60px;
|
|
36
|
-
height: 60px;
|
|
37
|
-
text-align: center;
|
|
38
|
-
vertical-align: middle;
|
|
39
|
-
font-size: 11px;
|
|
40
|
-
}
|
|
41
|
-
/* corner cell: show axis units */
|
|
42
|
-
.TableCorner { font-size: 10px; color: #888; font-weight: 400; text-align: center; }
|
|
43
|
-
/* cell states */
|
|
44
|
-
.cell--empty { background-color: #f0f0f0; }
|
|
45
|
-
.cell--neighbour { box-shadow: inset 0 0 0 1px #90a4ae; }
|
|
46
|
-
.cell-factor { font-weight: 600; font-size: 12px; }
|
|
47
|
-
.cell-leeway { font-weight: 600; font-size: 12px; margin-top: 2px; }
|
|
48
|
-
.cell--active .cell-factor,
|
|
49
|
-
.cell--active .cell-leeway { color: #1565c0; }
|
|
50
|
-
|
|
51
|
-
/* ─── Stable table column widths inside cards ──────────────────────────────── */
|
|
52
|
-
.card-body .table {
|
|
53
|
-
table-layout: fixed;
|
|
54
|
-
width: 100%;
|
|
55
|
-
}
|
|
56
|
-
.card-body .table td:first-child {
|
|
57
|
-
width: 55%;
|
|
58
|
-
white-space: nowrap;
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
text-overflow: ellipsis;
|
|
61
|
-
}
|
|
62
|
-
.card-body .table td:first-child small {
|
|
63
|
-
white-space: normal;
|
|
64
|
-
overflow: visible;
|
|
65
|
-
text-overflow: clip;
|
|
66
|
-
display: block;
|
|
67
|
-
}
|
|
68
|
-
.card-body .table td:last-child { width: 45%; }
|
|
69
|
-
|
|
70
|
-
/* ─── SVG stroke rules ─────────────────────────────────────────────────────── */
|
|
71
|
-
line { stroke-width: 2; }
|
|
72
|
-
#hull, #mast { stroke: purple; stroke-width: 1; stroke-linecap: round; }
|
|
73
|
-
|
|
74
|
-
/* ─── Surface plot ─────────────────────────────────────────────────────────── */
|
|
75
|
-
.surfacePlot { width: 100%; height: 100%; border: 1px solid black; padding: 0; margin: 0; position: relative; }
|
|
76
|
-
|
|
77
|
-
/* ─── SignalK navbar-brand suppression ─────────────────────────────────────── */
|
|
78
|
-
.app-header .navbar-brand {
|
|
79
|
-
background-image: none !important;
|
|
80
|
-
width: auto !important;
|
|
81
|
-
}
|
|
82
|
-
.app-header .navbar-brand::before,
|
|
83
|
-
.app-header .navbar-brand::after {
|
|
84
|
-
display: none !important;
|
|
85
|
-
content: none !important;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/* ─── App title ────────────────────────────────────────────────────────────── */
|
|
89
|
-
.app-title {
|
|
90
|
-
font-size: 1.1rem;
|
|
91
|
-
font-weight: 500;
|
|
92
|
-
color: #29363D;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* ─── Sidebar accent ───────────────────────────────────────────────────────── */
|
|
96
|
-
.sidebar .nav-link.active { border-left-color: #00bcd4 !important; }
|
|
97
|
-
|
|
98
|
-
/* ─── Stale data rows ──────────────────────────────────────────────────────── */
|
|
99
|
-
tr.stale td { color: #aaa; font-style: italic; }
|
|
100
|
-
|
|
101
|
-
/* ─── Correction table legend ─────────────────────────────────────────────── */
|
|
102
|
-
.table-legend { display: flex; flex-direction: column; gap: 3px; }
|
|
103
|
-
.table-legend-row { display: flex; align-items: center; gap: 6px; }
|
|
104
|
-
.legend-swatch {
|
|
105
|
-
flex-shrink: 0;
|
|
106
|
-
width: 28px;
|
|
107
|
-
height: 16px;
|
|
108
|
-
border: 1px solid #ccc;
|
|
109
|
-
border-radius: 2px;
|
|
110
|
-
display: inline-block;
|
|
111
|
-
}
|
|
112
|
-
.legend-swatch--green { background-color: rgb(0, 160, 80); }
|
|
113
|
-
.legend-swatch--orange { background-color: rgb(255, 165, 0); }
|
|
114
|
-
.legend-swatch--stripe {
|
|
115
|
-
background: repeating-linear-gradient(
|
|
116
|
-
120deg,
|
|
117
|
-
rgb(100, 180, 100) 0px, rgb(100, 180, 100) 4px,
|
|
118
|
-
#f0f0f0 4px, #f0f0f0 5px
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
.legend-swatch--active { background: transparent; border: none; width: auto; height: auto; font-weight: 600; color: #1565c0; font-size: 11px; white-space: nowrap; }
|
|
122
|
-
.legend-swatch--neighbour { background: #fff; box-shadow: inset 0 0 0 1px #90a4ae; }
|
|
123
|
-
.legend-label-wide { flex-shrink: 0; white-space: nowrap; font-weight: 600; }
|
|
1
|
+
/* ─── CSS Variables for instance colours (used by SVG strokes and table rows) ─ */
|
|
2
|
+
:root {
|
|
3
|
+
--heading-color: #000000;
|
|
4
|
+
--attitude-color-instance: #000000;
|
|
5
|
+
--current-color: #0d47a1;
|
|
6
|
+
--currentDamped-color: #0d47a1;
|
|
7
|
+
--boatSpeed-color: #388e3c;
|
|
8
|
+
--boatSpeedDamped-color: #388e3c;
|
|
9
|
+
--correctedBoatSpeed-color: #27632a;
|
|
10
|
+
--boatSpeedRefGround-color: #00575b;
|
|
11
|
+
--groundSpeed-color: #5d4037;
|
|
12
|
+
--groundSpeedDamped-color: #5d4037;
|
|
13
|
+
--speedCorrection-color: #ad1457;
|
|
14
|
+
--residual-color: #6a1b9a;
|
|
15
|
+
--correctionTable-color: #4e342e;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* ─── Instance ID colours ──────────────────────────────────────────────────── */
|
|
19
|
+
#heading { color: var(--heading-color); stroke: var(--heading-color); }
|
|
20
|
+
#attitude { color: var(--attitude-color-instance);stroke: var(--attitude-color-instance); }
|
|
21
|
+
#current,
|
|
22
|
+
#currentDamped { color: var(--current-color); stroke: var(--current-color); }
|
|
23
|
+
#boatSpeed,
|
|
24
|
+
#boatSpeedDamped { color: var(--boatSpeed-color); stroke: var(--boatSpeed-color); }
|
|
25
|
+
#correctedBoatSpeed { color: var(--correctedBoatSpeed-color); stroke: var(--correctedBoatSpeed-color); }
|
|
26
|
+
#boatSpeedRefGround { color: var(--boatSpeedRefGround-color); stroke: var(--boatSpeedRefGround-color); }
|
|
27
|
+
#groundSpeed,
|
|
28
|
+
#groundSpeedDamped { color: var(--groundSpeed-color); stroke: var(--groundSpeed-color); }
|
|
29
|
+
#speedCorrection { color: var(--speedCorrection-color); stroke: var(--speedCorrection-color); }
|
|
30
|
+
#residual { color: var(--residual-color); stroke: var(--residual-color); }
|
|
31
|
+
#correctionTable { color: var(--correctionTable-color); stroke: var(--correctionTable-color); }
|
|
32
|
+
|
|
33
|
+
/* ─── Correction table cell sizing ────────────────────────────────────────── */
|
|
34
|
+
.TableCell {
|
|
35
|
+
width: 60px;
|
|
36
|
+
height: 60px;
|
|
37
|
+
text-align: center;
|
|
38
|
+
vertical-align: middle;
|
|
39
|
+
font-size: 11px;
|
|
40
|
+
}
|
|
41
|
+
/* corner cell: show axis units */
|
|
42
|
+
.TableCorner { font-size: 10px; color: #888; font-weight: 400; text-align: center; }
|
|
43
|
+
/* cell states */
|
|
44
|
+
.cell--empty { background-color: #f0f0f0; }
|
|
45
|
+
.cell--neighbour { box-shadow: inset 0 0 0 1px #90a4ae; }
|
|
46
|
+
.cell-factor { font-weight: 600; font-size: 12px; }
|
|
47
|
+
.cell-leeway { font-weight: 600; font-size: 12px; margin-top: 2px; }
|
|
48
|
+
.cell--active .cell-factor,
|
|
49
|
+
.cell--active .cell-leeway { color: #1565c0; }
|
|
50
|
+
|
|
51
|
+
/* ─── Stable table column widths inside cards ──────────────────────────────── */
|
|
52
|
+
.card-body .table {
|
|
53
|
+
table-layout: fixed;
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
.card-body .table td:first-child {
|
|
57
|
+
width: 55%;
|
|
58
|
+
white-space: nowrap;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
}
|
|
62
|
+
.card-body .table td:first-child small {
|
|
63
|
+
white-space: normal;
|
|
64
|
+
overflow: visible;
|
|
65
|
+
text-overflow: clip;
|
|
66
|
+
display: block;
|
|
67
|
+
}
|
|
68
|
+
.card-body .table td:last-child { width: 45%; }
|
|
69
|
+
|
|
70
|
+
/* ─── SVG stroke rules ─────────────────────────────────────────────────────── */
|
|
71
|
+
line { stroke-width: 2; }
|
|
72
|
+
#hull, #mast { stroke: purple; stroke-width: 1; stroke-linecap: round; }
|
|
73
|
+
|
|
74
|
+
/* ─── Surface plot ─────────────────────────────────────────────────────────── */
|
|
75
|
+
.surfacePlot { width: 100%; height: 100%; border: 1px solid black; padding: 0; margin: 0; position: relative; }
|
|
76
|
+
|
|
77
|
+
/* ─── SignalK navbar-brand suppression ─────────────────────────────────────── */
|
|
78
|
+
.app-header .navbar-brand {
|
|
79
|
+
background-image: none !important;
|
|
80
|
+
width: auto !important;
|
|
81
|
+
}
|
|
82
|
+
.app-header .navbar-brand::before,
|
|
83
|
+
.app-header .navbar-brand::after {
|
|
84
|
+
display: none !important;
|
|
85
|
+
content: none !important;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ─── App title ────────────────────────────────────────────────────────────── */
|
|
89
|
+
.app-title {
|
|
90
|
+
font-size: 1.1rem;
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
color: #29363D;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* ─── Sidebar accent ───────────────────────────────────────────────────────── */
|
|
96
|
+
.sidebar .nav-link.active { border-left-color: #00bcd4 !important; }
|
|
97
|
+
|
|
98
|
+
/* ─── Stale data rows ──────────────────────────────────────────────────────── */
|
|
99
|
+
tr.stale td { color: #aaa; font-style: italic; }
|
|
100
|
+
|
|
101
|
+
/* ─── Correction table legend ─────────────────────────────────────────────── */
|
|
102
|
+
.table-legend { display: flex; flex-direction: column; gap: 3px; }
|
|
103
|
+
.table-legend-row { display: flex; align-items: center; gap: 6px; }
|
|
104
|
+
.legend-swatch {
|
|
105
|
+
flex-shrink: 0;
|
|
106
|
+
width: 28px;
|
|
107
|
+
height: 16px;
|
|
108
|
+
border: 1px solid #ccc;
|
|
109
|
+
border-radius: 2px;
|
|
110
|
+
display: inline-block;
|
|
111
|
+
}
|
|
112
|
+
.legend-swatch--green { background-color: rgb(0, 160, 80); }
|
|
113
|
+
.legend-swatch--orange { background-color: rgb(255, 165, 0); }
|
|
114
|
+
.legend-swatch--stripe {
|
|
115
|
+
background: repeating-linear-gradient(
|
|
116
|
+
120deg,
|
|
117
|
+
rgb(100, 180, 100) 0px, rgb(100, 180, 100) 4px,
|
|
118
|
+
#f0f0f0 4px, #f0f0f0 5px
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
.legend-swatch--active { background: transparent; border: none; width: auto; height: auto; font-weight: 600; color: #1565c0; font-size: 11px; white-space: nowrap; }
|
|
122
|
+
.legend-swatch--neighbour { background: #fff; box-shadow: inset 0 0 0 1px #90a4ae; }
|
|
123
|
+
.legend-label-wide { flex-shrink: 0; white-space: nowrap; font-weight: 600; }
|