speedandcurrent 1.7.7 → 1.7.8

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/README.md CHANGED
@@ -148,8 +148,8 @@ Each populated cell shows:
148
148
  - **Leeway** (°): the estimated sideways drift angle; also encoded visually as the stripe direction in the cell background.
149
149
 
150
150
  Cell highlighting:
151
- - **Blue outline**: the most recently updated table cell.
152
- - **Dashed outline**: cells contributing to the current interpolation.
151
+ - **Blue values**: the most recently updated table cell (factor and leeway text rendered in blue).
152
+ - **Thin border**: cells contributing to the current interpolation.
153
153
  - **No content**: not yet populated by learning.
154
154
 
155
155
  ### Correction Table Health Checklist
@@ -261,7 +261,6 @@ class CorrectionEstimator {
261
261
  groundCov[1][1] + currentCov[1][1] + boatCov[1][1]],
262
262
  ];
263
263
  this.filterState = this.filter.filter({ previousCorrected: this.filterState, observation, observationCovariance });
264
- //console.log("Filterstate:", this.filterState, "Covariance:", observationCovariance);
265
264
  return true;
266
265
  }
267
266
 
package/index.js CHANGED
@@ -606,7 +606,7 @@ module.exports = function (app) {
606
606
  */
607
607
  function updateTable() {
608
608
  lrnBoatSpeed.setVectorValue({ x: smoothedBoatSpeed.value, y: 0 }, { x: smoothedBoatSpeed.variance ?? 0, y: 0 });
609
- if (!smoothedAttitude.ready || !smoothedBoatSpeed.ready || !smoothedHeading.ready || !smoothedGroundSpeed.ready || (options.assumeCurrent ? !smoothedCurrent.ready : !noCurrent.ready)) return;
609
+ if (!smoothedAttitude.ready || !smoothedBoatSpeed.ready || !smoothedHeading.ready || !smoothedGroundSpeed.ready || (options.assumeCurrent && !smoothedCurrent.ready)) return;
610
610
 
611
611
  // update correction table
612
612
  if (smoothedBoatSpeed.value > minSpeed) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speedandcurrent",
3
- "version": "1.7.7",
3
+ "version": "1.7.8",
4
4
  "description": "A plugin that automatically corrects boat speed and calculates current and leeway using sensor fusion.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/public/index.html CHANGED
@@ -175,6 +175,32 @@
175
175
  </div>
176
176
  </div>
177
177
  <div class="card-body">
178
+ <div class="table-legend small text-muted mb-3">
179
+ <div class="table-legend-row">
180
+ <span class="legend-swatch legend-swatch--green"></span>
181
+ <span><strong>Green</strong> — paddlewheel reads slow (factor &gt; 1, speed is corrected up)</span>
182
+ </div>
183
+ <div class="table-legend-row">
184
+ <span class="legend-swatch legend-swatch--orange"></span>
185
+ <span><strong>Orange</strong> — paddlewheel reads fast (factor &lt; 1, speed is corrected down)</span>
186
+ </div>
187
+ <div class="table-legend-row">
188
+ <span class="legend-swatch legend-swatch--stripe"></span>
189
+ <span><strong>Stripe angle</strong> — encodes leeway direction; stripes are tilted proportionally to the leeway correction (°)</span>
190
+ </div>
191
+ <div class="table-legend-row">
192
+ <span class="legend-swatch legend-swatch--active">+1.2%</span>
193
+ <span><strong>Blue text</strong> — most recently updated cell</span>
194
+ </div>
195
+ <div class="table-legend-row">
196
+ <span class="legend-swatch legend-swatch--neighbour"></span>
197
+ <span><strong>Faint tint</strong> — interpolation neighbours used in the current estimate</span>
198
+ </div>
199
+ <div class="table-legend-row mt-1">
200
+ <span class="legend-label-wide">Cell values:</span>
201
+ <span>top = speed-correction factor (±%), bottom = leeway correction (±°)</span>
202
+ </div>
203
+ </div>
178
204
  <div id="table-container"></div>
179
205
  </div>
180
206
  </div>
package/public/main.css CHANGED
@@ -42,10 +42,11 @@
42
42
  .TableCorner { font-size: 10px; color: #888; font-weight: 400; text-align: center; }
43
43
  /* cell states */
44
44
  .cell--empty { background-color: #f0f0f0; }
45
- .cell--active { outline: 3px solid #1565c0; outline-offset: -3px; }
46
- .cell--neighbour { outline: 1px dashed #90a4ae; outline-offset: -2px; }
45
+ .cell--neighbour { box-shadow: inset 0 0 0 1px #90a4ae; }
47
46
  .cell-factor { font-weight: 600; font-size: 12px; }
48
47
  .cell-leeway { font-weight: 600; font-size: 12px; margin-top: 2px; }
48
+ .cell--active .cell-factor,
49
+ .cell--active .cell-leeway { color: #1565c0; }
49
50
 
50
51
  /* ─── Stable table column widths inside cards ──────────────────────────────── */
51
52
  .card-body .table {
@@ -96,3 +97,27 @@ line { stroke-width: 2; }
96
97
 
97
98
  /* ─── Stale data rows ──────────────────────────────────────────────────────── */
98
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; }