signalk-wind-flow
v0.1.0
Published
Animated wind flow over the chart for Signal K chartplotters that support plotter extensions, drawn from the Signal K Weather API
Maintainers
Readme
Wind Flow
Animated wind particles over the chart, in the style of Windy, for Signal K chartplotters that support plotter extensions. The wind comes from the boat's own Signal K Weather API.

Requirements
- A chartplotter that supports image overlays (
overlays.image), such as Freeboard-SK 3.4 or later. A plotter that also supportsoverlays.animatedanimates the layer smoothly; without it the particles move at the plotter's normal live-frame rate. - A weather provider plugin for the Signal K Weather API, such as
@signalk/open-meteo-provider.
Install
Install Wind Flow from the Signal K App Store and enable it. There is nothing to configure on the server.
In the chartplotter, Wind flow appears in the layer controls, where you show, hide and fade it like any other layer. Its settings are on the same row.
| Setting | | |---|---| | Shade the chart by wind speed | Colours the chart by wind speed and turns the particles white. Off by default, because shading dims soundings and nav-aid symbols. | | Particles | Fewer, Normal or More. Fewer costs less on a slow display. |
A Wind flow legend widget shows the colour scale in your speed unit and the time of the wind shown. Add it from the plotter's widget areas.

How it works
The extension declares an image overlay drawn by a background runtime. The runtime never touches the plotter's page:
- It asks the Weather API for the wind on a small grid over the view, about 50 positions, which sit on fixed multiples of the grid step. After a pan or zoom most of them are already cached, in the runtime and in the server's weather provider, which every display on the boat shares.
- A Web Worker interpolates the grid (Catmull-Rom, held within each cell's
corners), moves the particles and draws them into an
OffscreenCanvas. Only the finished image is handed to the plotter. - It draws at the frame rate the plotter grants, one frame at a time, and stops, letting go of its canvases, while the layer is hidden.
Particles are kept in map coordinates with a short history of where each has been, so the flow carries on through pans, zooms and the rotation of a heading-up chart instead of starting over.
Development
npm install
npm test # unit tests
npm run typecheck
npm run dev # a stand-in plotter at http://localhost:3388/dev/npm run dev serves the extension with a small stand-in plotter that talks
to it over the real extension bus, and a stand-in Weather API whose wind is a
depression west of Brittany. Add ?shading=1 to the URL to see the shading,
or ?interval=200 for the frame rate of a plotter without
overlays.animated.
To try it in a real plotter, link the package into a Signal K server
(npm link here, then npm link signalk-wind-flow in ~/.signalk), restart
the server and enable the plugin.
Releasing
Set the version in package.json and CHANGELOG.md, commit, then push a tag
for it:
npm version 0.2.0 --no-git-tag-version # or edit package.json
git commit -am "chore: release 0.2.0"
git tag v0.2.0 && git push && git push --tagsThe Release workflow publishes that version to npm, where the Signal K App
Store picks it up, and creates the GitHub Release. It needs an npm token in
the repository's NPM_TOKEN secret.
License
Apache-2.0
