signalk-wmo-gust 0.4.1 → 0.4.3

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/CHANGELOG.md CHANGED
@@ -3,7 +3,27 @@
3
3
  All notable changes to this project are documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
- ## [0.4.1] - 2026-11-19
6
+ ## 0.4.3
7
+
8
+ _2026-11-22_
9
+
10
+ ### Added
11
+ - Under the WMO gust and 10-minute peak tiles, the wind history app shows the highest value of the chosen period (1, 3, 24 or 72 hours) and how long ago it was; older than 24 hours, the date and time instead.
12
+
13
+ ## 0.4.2
14
+
15
+ _2026-11-19_
16
+
17
+ ### Added
18
+ - Screenshots of the wind history app for the Signal K App Store.
19
+ - Signal K plugin CI (the shared `plugin-ci.yml` workflow), so the App Store shows test results for Linux, Raspberry Pi, macOS and Windows.
20
+
21
+ ### Changed
22
+ - Changelog headings use the plain `## x.y.z` form that the App Store reads.
23
+
24
+ ## 0.4.1
25
+
26
+ _2026-11-19_
7
27
 
8
28
  ### Added
9
29
  - The onboard time zone is published as `environment.time.timezoneOffset` and `environment.time.timezoneRegion` (setting **Onboard time zone**; empty uses the server's time zone, `none` turns it off).
@@ -12,7 +32,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
12
32
  - The wind history app shows local time on chartplotters whose browser runs on UTC, such as Garmin OneHelm: it uses the onboard time zone from Signal K.
13
33
  - The app no longer shows stale data on browsers that cache requests, and reloads the charts when it comes back to the foreground.
14
34
 
15
- ## [0.4.0] - 2026-11-19
35
+ ## 0.4.0
36
+
37
+ _2026-11-19_
16
38
 
17
39
  ### Added
18
40
  - **Wind history web app** (Signal K Web Apps → WMO Wind): charts of the last 1, 3, 24 or 72 hours with the 10-minute mean at 10 m and at sensor height, gusts as WMO 3-second gusts, absolute maxima or both, at 10 m or at sensor height, and arrows for the mean direction. Built for Garmin chartplotters (OneHelm) as well as browsers: touch controls, night mode, and no login needed, as it reads the Signal K History API.
@@ -23,18 +45,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
23
45
  ### Changed
24
46
  - The Web App and App Store name is now **WMO Wind**.
25
47
 
26
- ## [0.3.1] - 2026-11-05
48
+ ## 0.3.1
49
+
50
+ _2026-11-05_
27
51
 
28
52
  ### Added
29
53
  - App icon for the Signal K App Store: a three-cup anemometer and a stopwatch showing the WMO 10-minute averaging window.
30
54
 
31
- ## [0.3.0] - 2026-11-04
55
+ ## 0.3.0
56
+
57
+ _2026-11-04_
32
58
 
33
59
  ### Added
34
60
  - WMO 10-minute mean wind direction (`directionOverGroundMeanWMO`, or `directionTrueMeanWMO` for water-referenced wind), in radians from true north. It is a vector mean weighted by wind speed, so 350° and 10° average to 0°, and it is not published in a calm (mean below 0.5 m/s).
35
61
  - **Wind direction source path** setting, default `environment.wind.directionTrue`.
36
62
 
37
- ## [0.2.0] - 2026-11-04
63
+ ## 0.2.0
64
+
65
+ _2026-11-04_
38
66
 
39
67
  ### Added
40
68
  - Highest WMO gust of the last 1, 3 and 6 hours (`…Max1hWMO`, `…Max3hWMO`, `…Max6hWMO`), for comparison with forecast gusts, which are maxima since the model's previous output step.
@@ -49,7 +77,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
49
77
  ### Fixed
50
78
  - A delta timestamp of exactly 0 ms was taken as missing.
51
79
 
52
- ## [0.1.0] - 2026-11-03
80
+ ## 0.1.0
81
+
82
+ _2026-11-03_
53
83
 
54
84
  ### Added
55
85
  - First version: WMO 10-minute mean wind and 3-second running-mean gust, with power-law height correction from a configured height or `design.airHeight`.
package/README.md CHANGED
@@ -87,12 +87,16 @@ In a current the two differ by roughly the current's speed. In 2 kn of tide, the
87
87
 
88
88
  ## Wind history web app
89
89
 
90
+ ![Wind history app: 24 hours of mean wind at 10 m and at sensor height, WMO gusts and absolute maxima, with direction arrows](screenshots/wind-24h.png)
91
+
90
92
  The plugin includes a web app, **WMO Wind**, under **Web Apps** in the Signal K admin, at `/signalk-wmo-gust/`. It charts the last **1, 3, 24 or 72 hours**:
91
93
 
92
94
  - the 10-minute **mean wind at 10 m** and **at sensor height**;
93
95
  - **gusts**: the WMO 3-second gust, the absolute maximum (highest single sample), or both, at 10 m or at sensor height;
94
96
  - the 10-minute **mean direction**, as arrows pointing downwind, with the direction the wind comes from in degrees.
95
97
 
98
+ Under the WMO gust and 10-minute peak tiles, the app also shows the highest value of the chosen period and how long ago it was, for example `3 h max 29.2 · 2 h 20 min ago`. When it was more than 24 hours ago, the date and time are shown instead. That time is the middle of the history point, so it is accurate to within half a point: 30 seconds for 1 and 3 hours, 2.5 minutes for 24 hours, 7.5 minutes for 72 hours.
99
+
96
100
  Touch or click a chart to read the values at that moment. Units are knots or m/s, and a night mode keeps the screen dark.
97
101
 
98
102
  The app reads the **Signal K History API**, so a history provider must record this plugin's paths, for example **signalk-questdb**. It works without logging in, so it can run on Garmin chartplotters with OneHelm, for example through **signalk-garmin-onehelm**. It uses no external libraries or fonts, so it works offline.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-wmo-gust",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "WMO-standard 10-minute mean wind, mean direction and 3-second gust for Signal K, with 1/3/6-hour gust maxima, and a web app charting the last 1, 3, 24 and 72 hours",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -34,10 +34,15 @@
34
34
  "CHANGELOG.md",
35
35
  "LICENSE",
36
36
  "icon.svg",
37
- "public"
37
+ "public",
38
+ "screenshots"
38
39
  ],
39
40
  "signalk": {
40
41
  "displayName": "WMO Wind",
41
- "appIcon": "./icon.svg"
42
+ "appIcon": "./icon.svg",
43
+ "screenshots": [
44
+ "./screenshots/wind-24h.png",
45
+ "./screenshots/wind-24h-night.png"
46
+ ]
42
47
  }
43
48
  }
package/public/index.html CHANGED
@@ -35,6 +35,9 @@
35
35
  .now.gust .value { color: var(--gust); }
36
36
  .now.peak .value { color: var(--peak); }
37
37
  .now.dir .value { color: var(--dir); }
38
+ .now .since { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; margin-top: 0.125rem; }
39
+ .now .since b { font-weight: 500; color: var(--ink); }
40
+ .now .since .ago-s { display: none; }
38
41
  nav { display: flex; flex-wrap: wrap; align-items: center; padding: 0 0.75rem; }
39
42
  .group { display: flex; align-items: center; margin: 0 1rem 0.5rem 0; }
40
43
  .group span { font-size: 0.875rem; color: var(--muted); margin-right: 0.5rem; }
@@ -70,6 +73,10 @@
70
73
  .now .label { font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
71
74
  .now .value { font-size: 1.3125rem; }
72
75
  .now .value small { font-size: 0.75rem; }
76
+ .now .since { font-size: 0.6875rem; overflow: hidden; text-overflow: ellipsis; }
77
+ .now .since .per, .now .since .dot { display: none; }
78
+ .now .since .ago { display: none; }
79
+ .now .since .ago-s { display: block; white-space: normal; }
73
80
  nav { padding: 0 0.5rem; }
74
81
  .group { margin: 0 0.5rem 0.375rem 0; }
75
82
  .group span { font-size: 0.75rem; margin-right: 0.25rem; }
@@ -84,8 +91,8 @@
84
91
  <header>
85
92
  <div class="now mean"><div class="label">Mean at 10 m</div><div class="value" id="nMean">–</div></div>
86
93
  <div class="now means"><div class="label">Mean at sensor</div><div class="value" id="nMeanS">–</div></div>
87
- <div class="now gust"><div class="label" id="nGustLabel">WMO gust</div><div class="value" id="nGust">–</div></div>
88
- <div class="now peak"><div class="label" id="nPeakLabel">Peak, 10 min</div><div class="value" id="nPeak">–</div></div>
94
+ <div class="now gust"><div class="label" id="nGustLabel">WMO gust</div><div class="value" id="nGust">–</div><div class="since" id="nGustMax"></div></div>
95
+ <div class="now peak"><div class="label" id="nPeakLabel">Peak, 10 min</div><div class="value" id="nPeak">–</div><div class="since" id="nPeakMax"></div></div>
89
96
  <div class="now dir"><div class="label">From</div><div class="value" id="nDir">–</div></div>
90
97
  </header>
91
98
  <nav>
@@ -239,6 +246,42 @@
239
246
  $('nGust').innerHTML = fmt(gust === null ? null : gust * s, true)
240
247
  $('nPeak').innerHTML = fmt(peak === null ? null : peak * s, true)
241
248
  $('nDir').innerHTML = dir === null ? '–' : pad3(deg(dir)) + '°<small>' + compass(dir) + '</small>' + arrowSvg(dir)
249
+ showMaxima()
250
+ }
251
+
252
+ // Under the gust and peak tiles: the highest value of the chart period and how long ago
253
+ // it was; older than 24 h, the date and time instead. A point's time is the middle of its
254
+ // history bucket (1 min for 1 and 3 h, 5 min for 24 h, 15 min for 72 h).
255
+ function showMaxima () {
256
+ var start = Date.now() - Number(state.range) * 3600000
257
+ var s = state.gustH === 'sensor'
258
+ if (!points.length) { $('nGustMax').innerHTML = ''; $('nPeakMax').innerHTML = ''; return }
259
+ ;[['gust', 'nGustMax'], ['peak', 'nPeakMax']].forEach(function (k) {
260
+ var best = null
261
+ points.forEach(function (p) {
262
+ if (p.t < start || p[k[0]] === null) return
263
+ var f = p.f || liveFactor
264
+ var v = s ? (f ? p[k[0]] / f : null) : p[k[0]]
265
+ if (v !== null && (!best || v > best.v)) best = { v: v, t: p.t }
266
+ })
267
+ // The live 10-minute value can be newer than the last history point.
268
+ var lv = live[k[0]]
269
+ if (num(lv)) {
270
+ if (s) lv = liveFactor ? lv / liveFactor : null
271
+ if (lv !== null && (!best || lv > best.v)) best = { v: lv, t: null }
272
+ }
273
+ $(k[1]).innerHTML = best ? '<span class="per">' + state.range + ' h </span>max <b>' + fmt(best.v) + '</b><span class="dot"> · </span><span class="ago">' + since(best.t) + '</span><span class="ago-s">' + since(best.t, true) + '</span>' : ''
274
+ })
275
+ }
276
+
277
+ // short: the compact form for narrow screens.
278
+ function since (t, short) {
279
+ if (t === null) return short ? '10 min' : 'last 10 min'
280
+ var min = Math.max(0, Math.round((Date.now() - t) / 60000))
281
+ if (min < 1) return 'just now'
282
+ if (min < 60) return min + (short ? ' min' : ' min ago')
283
+ if (min < 1440) return Math.floor(min / 60) + ' h ' + two(min % 60) + (short ? '' : ' min ago')
284
+ return dm(t) + ' ' + hm(t)
242
285
  }
243
286
 
244
287
  // ---- formatting ---------------------------------------------------------
@@ -396,6 +439,7 @@
396
439
  if (selected >= 0 && points[selected]) cross(c, d, list, X, Y, S, D, ink)
397
440
  legend(list)
398
441
  summary(list)
442
+ showMaxima()
399
443
  }
400
444
 
401
445
  function timeAxis (c, r, start, end, X, yTop, yBottom, rule, muted, labels) {
Binary file
Binary file