signalk-binnacle 0.1.0 → 0.1.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/README.md
CHANGED
|
@@ -6,59 +6,47 @@
|
|
|
6
6
|
[](https://nodejs.org)
|
|
7
7
|
[](https://www.buymeacoffee.com/nearlcrews)
|
|
8
8
|
|
|
9
|
-
A
|
|
9
|
+
A WebGL chart plotter for [Signal K](https://signalk.org).
|
|
10
10
|
|
|
11
11
|
> **0.1.0, the first release.** Binnacle 0.1.0 is a complete chart plotter: GPU charts and depth,
|
|
12
12
|
> route planning and following, weather, an active collision watch, voyage tracks, and points of
|
|
13
13
|
> interest all ship in this release.
|
|
14
14
|
>
|
|
15
|
-
> **It has not been field-tested at any scale.** It has been developed and verified against a
|
|
16
|
-
>
|
|
17
|
-
>
|
|
18
|
-
>
|
|
19
|
-
> advisory.
|
|
15
|
+
> **It has not been field-tested at any scale.** It has been developed and verified against a single
|
|
16
|
+
> Signal K server, never across a fleet or a range of real-world boats, hardware, and conditions. It
|
|
17
|
+
> is also not certified for safety-of-life navigation. Always carry redundant means of navigation,
|
|
18
|
+
> cross-check against your primary instruments, and treat every display as advisory.
|
|
20
19
|
|
|
21
20
|
## What it does
|
|
22
21
|
|
|
23
|
-
Signal K is an open marine data standard that streams a boat's navigation, environment, and
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
It is built for low-bandwidth
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
##
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<img src="https://raw.githubusercontent.com/NearlCrews/signalk-binnacle/main/static/screenshots/04-anchorage.png" alt="An anchorage point-of-interest detail panel"><br>
|
|
52
|
-
<sub>A native anchorage detail from ActiveCaptain, rendered in a side panel.</sub>
|
|
53
|
-
</td>
|
|
54
|
-
</tr>
|
|
55
|
-
<tr>
|
|
56
|
-
<td colspan="2" align="center">
|
|
57
|
-
<img src="https://raw.githubusercontent.com/NearlCrews/signalk-binnacle/main/static/screenshots/05-weather.png" alt="The weather mini-map" width="80%"><br>
|
|
58
|
-
<sub>The weather mini-map: animated wind, pressure isobars, radar, and a time scrubber.</sub>
|
|
59
|
-
</td>
|
|
60
|
-
</tr>
|
|
61
|
-
</table>
|
|
22
|
+
Signal K is an open marine data standard that streams a boat's navigation, environment, and AIS data
|
|
23
|
+
over a single API. Binnacle displays that data: a GPU-rendered, offline-capable chart plotter that
|
|
24
|
+
runs in a browser and is served by the boat's Signal K server.
|
|
25
|
+
|
|
26
|
+
It is built for low-bandwidth, offline use on modest hardware. It has night-readable themes, computes
|
|
27
|
+
collision and course data on the client when no server provider supplies them, and caches viewed
|
|
28
|
+
areas so they keep rendering without a connection. It runs on the same Raspberry Pi that hosts the
|
|
29
|
+
Signal K server.
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
|
|
33
|
+
Binnacle ships its full feature set as a Signal K webapp:
|
|
34
|
+
|
|
35
|
+
- **Charts and layers** — a GPU vector base map, server charts, four streaming bathymetry and ENC
|
|
36
|
+
sources, and your own imported PMTiles, in a toggle, fade, and drag-reorder Layers panel.
|
|
37
|
+
- **Routing** — draw and save routes as Signal K resources and follow one with a nav strip
|
|
38
|
+
(cross-track, distance, bearing, velocity made good, and time to go) over the v2 Course API, with
|
|
39
|
+
an arrival alarm.
|
|
40
|
+
- **Weather** — a zoom-capped mini-map with animated WebGL wind, pressure isobars, waves,
|
|
41
|
+
precipitation, cloud, and radar, a tap-for-value readout, and a conditions and warnings panel.
|
|
42
|
+
- **Lookout** — a collision watch with CPA and TCPA, chart-highlight rings, an audible alarm, and a
|
|
43
|
+
published Signal K notification.
|
|
44
|
+
- **Tracks** — record, save, show, and export your voyage track.
|
|
45
|
+
- **Points of interest** — Crow's Nest, ActiveCaptain, and other notes as themed markers with a
|
|
46
|
+
structured detail panel.
|
|
47
|
+
- **Themes and offline** — day, dusk, and night-red themes, offline caching, and self-hosted assets.
|
|
48
|
+
|
|
49
|
+
See the [changelog](CHANGELOG.md) for the full list.
|
|
62
50
|
|
|
63
51
|
## Architecture
|
|
64
52
|
|
|
@@ -67,168 +55,55 @@ Binnacle is built on a current web stack and engineered to run on modest helm ha
|
|
|
67
55
|
- **Front end.** Svelte 5 with runes, Vite, and TypeScript, linted and formatted with Biome, with
|
|
68
56
|
module boundaries enforced by the build (Feature-Sliced Design plus a dependency-cruiser gate).
|
|
69
57
|
- **GPU rendering.** MapLibre GL JS draws the vector base map and chart layers on the GPU. The own
|
|
70
|
-
vessel and every AIS target render as GPU symbol layers
|
|
71
|
-
|
|
72
|
-
graphics card.
|
|
58
|
+
vessel and every AIS target render as GPU symbol layers, and wind draws as a WebGL particle field
|
|
59
|
+
advected through the forecast on the graphics card.
|
|
73
60
|
- **Off-main-thread real-time pipeline.** A dedicated Web Worker hosts the Signal K WebSocket client;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
rates (own vessel fast, AIS slower), keeps everything in SI internally, and converts only at the
|
|
79
|
-
display edge.
|
|
61
|
+
deltas are coalesced to one flush per animation frame and fed into a path-keyed reactive store, so a
|
|
62
|
+
busy AIS anchorage updates the readouts without stalling the chart render.
|
|
63
|
+
- **Minimal network and render work.** Binnacle subscribes to exactly what it draws, keeps everything
|
|
64
|
+
in SI internally, and converts only at the display edge.
|
|
80
65
|
- **Offline caching.** Self-hosted fonts and assets (no CDN for app code), a service-worker runtime
|
|
81
|
-
cache for the base map and chart tiles, and an IndexedDB weather cache
|
|
82
|
-
keep rendering with no internet.
|
|
83
|
-
|
|
84
|
-
## What's new in 0.1.0
|
|
85
|
-
|
|
86
|
-
The first published release. Binnacle ships its full first feature set as a Signal K webapp:
|
|
87
|
-
|
|
88
|
-
- **Charts and layers.** A GPU vector base map, server charts, four free streaming bathymetry and
|
|
89
|
-
ENC sources, and your own imported PMTiles, all managed from a Layers panel that toggles, fades,
|
|
90
|
-
and drag-reorders the z-order.
|
|
91
|
-
- **Routing.** Draw and save routes as Signal K resources, then follow one with a nav strip (active
|
|
92
|
-
waypoint, cross-track steer side, distance and bearing, velocity made good, and time to go) over
|
|
93
|
-
the v2 Course API, with a client-side fallback and an arrival alarm.
|
|
94
|
-
- **Weather.** A zoom-capped weather mini-map with an animated WebGL wind field, isobars, wave,
|
|
95
|
-
precipitation, and cloud fields, animated radar, a tap readout, and a "Here" conditions and
|
|
96
|
-
warnings panel, preferring a configured Signal K weather provider for point data.
|
|
97
|
-
- **Lookout, tracks, and points of interest.** Collision danger with chart-highlight rings, an
|
|
98
|
-
audible alarm, and a published notification; voyage track recording; and native point-of-interest
|
|
99
|
-
detail panels.
|
|
100
|
-
- **Display and runtime.** Day, dusk, and night-red themes, offline caching, self-hosted assets,
|
|
101
|
-
and an off-main-thread real-time pipeline that runs on a Raspberry Pi.
|
|
102
|
-
|
|
103
|
-
This release also folds the per-component panel, button, and instrument-strip styling into shared
|
|
104
|
-
utilities, shares the Signal K resource clients and the IndexedDB stores behind single helpers, and
|
|
105
|
-
completes the App Store manifest (screenshots and a "Works well with" list). See the
|
|
106
|
-
[changelog](CHANGELOG.md) for the full list.
|
|
107
|
-
|
|
108
|
-
## Features
|
|
109
|
-
|
|
110
|
-
The 0.1.0 release ships Binnacle's full first feature set. The foundation (the build, the module
|
|
111
|
-
architecture, the verification gates, the real-time data layer, the map, chart layers, AIS targets,
|
|
112
|
-
day, dusk, and night-red theming, and the identity pass) and the differentiating features (charts
|
|
113
|
-
and layers, routing, weather, the Lookout collision safety feature, tracks, and points of interest)
|
|
114
|
-
are all in place.
|
|
115
|
-
|
|
116
|
-
Everything in this release:
|
|
117
|
-
|
|
118
|
-
- A Svelte 5, Vite, and TypeScript application that builds as a Signal K webapp.
|
|
119
|
-
- A Feature-Sliced Design layout (`app`, `views`, `widgets`, `features`, `entities`, and
|
|
120
|
-
`shared`) with machine-enforced module boundaries.
|
|
121
|
-
- A real-time data layer: a Web Worker Signal K client bridged with Comlink, a path-keyed
|
|
122
|
-
runes store with fine-grained reactivity, per-frame batching, a subscription registry, and
|
|
123
|
-
reconnection. The shell shows live connection state and own-vessel readouts.
|
|
124
|
-
- A MapLibre GL map with a vector base and an extensible layer manager, with the own vessel
|
|
125
|
-
drawn as a GPU symbol layer that rotates with heading. "Center on boat" recenters once, and a
|
|
126
|
-
"Follow boat" lock keeps the chart centered on the vessel as it moves until you pan away.
|
|
127
|
-
- Chart and depth layers: server charts from `/resources/charts`, four free streaming bathymetry
|
|
128
|
-
and ENC sources (GEBCO, EMODnet, NOAA ENC, and NOAA BlueTopo), and your own PMTiles archives
|
|
129
|
-
imported by URL or file and stored in the browser for offline use. Every layer is managed from a
|
|
130
|
-
Layers panel that toggles, fades, and drag-reorders the z-order.
|
|
131
|
-
- Weather: a dedicated weather mini-map opened by the Forecast button, so the navigation chart stays
|
|
132
|
-
clean and the weather stays within its data resolution (the mini-map caps at zoom 7, RainViewer's
|
|
133
|
-
real radar resolution, so it can never be zoomed past the data). Toggle wind, pressure, waves,
|
|
134
|
-
precipitation, cloud, or radar in the panel; wind draws as an animated WebGL particle field (thousands
|
|
135
|
-
of speed-colored particles streaming with fading trails, a custom MapLibre GPU layer with a
|
|
136
|
-
speed-colored arrow fallback when WebGL is unavailable), mean-sea-level pressure as labeled isobar
|
|
137
|
-
contours (marching squares), significant wave height, precipitation, and cloud as smooth color
|
|
138
|
-
fields, and RainViewer precipitation radar as an animated loop. The four area
|
|
139
|
-
fills are mutually exclusive (one at a time) while wind and pressure stay combinable; a time slider
|
|
140
|
-
scrubs the coming days, a legend shows a color ramp per active layer, a tap reads the value at any
|
|
141
|
-
point, and a "Here" panel shows the conditions, forecast, and any gale or storm warnings for the
|
|
142
|
-
vessel's position. Point data (the tap readout and the "Here" panel) prefers a configured Signal K
|
|
143
|
-
weather provider such as AccuWeather and falls back to the free browser-only sources when none is
|
|
144
|
-
set; the area fields and radar are always free (Open-Meteo and RainViewer, no key, no server).
|
|
145
|
-
Results are cached by viewport in memory, and the responses, radar index, and radar tiles are cached
|
|
146
|
-
for offline use. Themed for day, dusk, and night-red (a deep low-brightness red at night, no blue).
|
|
147
|
-
- AIS targets: other vessels render as GPU symbols in the traffic band, rotate with course, age
|
|
148
|
-
out when they go silent, and carry CPA and TCPA when a Signal K provider supplies them.
|
|
149
|
-
- The active-safety Lookout feature: a collision danger strip with chart-highlight rings, an audible
|
|
150
|
-
alarm, editable CPA and TCPA thresholds, and a published `notifications.navigation.collision` so
|
|
151
|
-
other Signal K clients share the alarm. It surfaces the most dangerous AIS contacts with closest
|
|
152
|
-
point of approach and time to closest approach, computing them on the client when no Signal K
|
|
153
|
-
provider supplies them, and stays dark when nothing is close.
|
|
154
|
-
- Tracks: the voyage is recorded behind the boat, colored by speed or solid, with breaks marking
|
|
155
|
-
GPS dropouts. The whole track persists across a refresh, and a Tracks menu shows live stats and
|
|
156
|
-
saves, lists, shows or hides, deletes, and exports tracks via the Signal K `/resources/tracks` API.
|
|
157
|
-
- Routes: plan a passage by drawing waypoints on the chart, with the leg count and total distance
|
|
158
|
-
updating live, then save it as a Signal K route resource that syncs across devices. Activate a
|
|
159
|
-
route to follow it: a nav strip shows the active waypoint, cross-track error with a steer side,
|
|
160
|
-
distance and bearing to the waypoint, velocity made good, and time to go, with an arrival alarm.
|
|
161
|
-
Following uses the Signal K v2 Course API, falling back to client-side course calculations when the
|
|
162
|
-
server's course-provider plugin is absent.
|
|
163
|
-
- Points of interest: notes from Crow's Nest, ActiveCaptain, the USCG Light List, and other Signal K
|
|
164
|
-
notes providers render as themed, clustered markers, and tapping one opens a slide-in detail panel.
|
|
165
|
-
Binnacle renders Crow's Nest's structured `properties.crowsNest` sections natively (measures,
|
|
166
|
-
availability, ratings, and more), and falls back to the plain-text description for any other
|
|
167
|
-
provider.
|
|
168
|
-
- Day, dusk, and night-red themes switched from a top-bar toggle, recoloring the chrome and the
|
|
169
|
-
map base; night-red is pure red on true black to preserve dark adaptation on a night watch.
|
|
170
|
-
- Identity: self-hosted Inter and JetBrains Mono typography (offline-first, with tabular numeric
|
|
171
|
-
readouts), Lucide chrome icons, own-ship and AIS symbols that recolor per theme so nothing
|
|
172
|
-
glows blue on a night watch, and the build version shown in the top bar.
|
|
173
|
-
- Offline and PWA support: an installable progressive web app that precaches its shell and
|
|
174
|
-
runtime-caches the base map and Signal K charts as you view them, so previously seen areas render
|
|
175
|
-
with no internet, while the live Signal K stream is never cached. Offline caching is optional and
|
|
176
|
-
requires HTTPS (browsers expose service workers only in a secure context); over plain HTTP the app
|
|
177
|
-
runs online-only with no loss of live function. See [Offline operation and SSL](#offline-operation-and-ssl-optional).
|
|
178
|
-
- An SI unit-conversion module in `shared`, built test-first.
|
|
179
|
-
- Lint and format with Biome, type-checking with svelte-check, unit tests with Vitest, an
|
|
180
|
-
end-to-end smoke test with Playwright, and architectural boundary checks with
|
|
181
|
-
dependency-cruiser, all wired into CI, plus verify-before-push git hooks.
|
|
66
|
+
cache for the base map and chart tiles, and an IndexedDB weather cache.
|
|
182
67
|
|
|
183
68
|
## Installation
|
|
184
69
|
|
|
185
|
-
Binnacle is
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
### From source (for development)
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
git clone https://github.com/NearlCrews/signalk-binnacle.git
|
|
192
|
-
cd signalk-binnacle
|
|
193
|
-
npm install
|
|
194
|
-
npm run build
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
Then link it into your Signal K server (see Development below).
|
|
70
|
+
Binnacle is a Signal K webapp. Install it from the Signal K server's **App Store** (Apps and Plugins,
|
|
71
|
+
then Store): search for Binnacle, install, and open it from the **Webapps** list. The production build
|
|
72
|
+
ships inside the package, so there is nothing to build.
|
|
198
73
|
|
|
199
74
|
## Requirements
|
|
200
75
|
|
|
201
76
|
- Signal K server 2.x.
|
|
202
|
-
- Node.js >= 22.
|
|
203
|
-
- A browser on the helm display, tablet, or phone
|
|
77
|
+
- Node.js >= 22 (for building from source).
|
|
78
|
+
- A browser on the helm display, tablet, or phone.
|
|
204
79
|
|
|
205
80
|
## Offline operation and SSL (optional)
|
|
206
81
|
|
|
207
|
-
SSL is not required. Binnacle runs fully over plain HTTP, which is how the Signal K server
|
|
208
|
-
|
|
209
|
-
|
|
82
|
+
SSL is not required. Binnacle runs fully over plain HTTP, which is how the Signal K server serves it
|
|
83
|
+
by default: the chart, AIS, weather, points of interest, tracks, and the Lookout alarms all work
|
|
84
|
+
without it.
|
|
210
85
|
|
|
211
|
-
What SSL enables is the service-worker layer of offline caching. Browsers expose the service
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
forecast rather than re-fetching.
|
|
86
|
+
What SSL enables is the service-worker layer of offline caching. Browsers expose the service worker
|
|
87
|
+
and cache-storage APIs only in a secure context (HTTPS or `http://localhost`), so caching the base
|
|
88
|
+
map and chart tiles for full offline map rendering activates only when the server is reached over
|
|
89
|
+
HTTPS. Over plain HTTP the app degrades cleanly to online-only with no loss of live function. The
|
|
90
|
+
weather forecast is cached separately in IndexedDB, which is not secure-context gated, so even over
|
|
91
|
+
plain HTTP a reload reuses the last forecast rather than re-fetching.
|
|
218
92
|
|
|
219
|
-
|
|
93
|
+
To add HTTPS to Signal K, the simplest way is the
|
|
220
94
|
[signalk-ssl](https://www.npmjs.com/package/signalk-ssl) plugin
|
|
221
|
-
([source](https://github.com/dirkwa/signalk-ssl)), which generates a local certificate
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
Settings, then SSL) are an alternative.
|
|
95
|
+
([source](https://github.com/dirkwa/signalk-ssl)), which generates a local certificate authority,
|
|
96
|
+
issues the server certificate, and distributes the root to your devices by QR code. The Signal K
|
|
97
|
+
server's built-in SSL settings (Server, then Settings, then SSL) are an alternative.
|
|
225
98
|
|
|
226
99
|
## Development
|
|
227
100
|
|
|
228
|
-
This project targets Node 22 or newer. Lint and format use the Biome binary, which must be
|
|
229
|
-
|
|
101
|
+
This project targets Node 22 or newer. Lint and format use the Biome binary, which must be installed
|
|
102
|
+
and on your `PATH` (CI installs it via the `biomejs/setup-biome` action).
|
|
230
103
|
|
|
231
104
|
```bash
|
|
105
|
+
git clone https://github.com/NearlCrews/signalk-binnacle.git
|
|
106
|
+
cd signalk-binnacle
|
|
232
107
|
npm install # install dependencies
|
|
233
108
|
npm run hooks # install the git pre-commit and pre-push gates (run once)
|
|
234
109
|
npm run dev # Vite dev server
|
|
@@ -241,13 +116,12 @@ npm run build # production build into public/
|
|
|
241
116
|
npm run test:e2e # Playwright end-to-end smoke test
|
|
242
117
|
```
|
|
243
118
|
|
|
244
|
-
After `npm run hooks`, git runs a fast format, lint, and boundary check before each
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
`.githooks/` and are opt-in via `core.hooksPath`, never a package lifecycle script.
|
|
119
|
+
After `npm run hooks`, git runs a fast format, lint, and boundary check before each commit, and the
|
|
120
|
+
full type-check, test, and build gate before each push. The hooks live in `.githooks/` and are opt-in
|
|
121
|
+
via `core.hooksPath`, never a package lifecycle script.
|
|
248
122
|
|
|
249
|
-
|
|
250
|
-
server config so it loads:
|
|
123
|
+
To run a local build inside your own Signal K server, link it into the server's module directory and
|
|
124
|
+
add it to the server config so it loads:
|
|
251
125
|
|
|
252
126
|
```bash
|
|
253
127
|
ln -sfn "$(pwd)" ~/.signalk/node_modules/signalk-binnacle
|
|
@@ -265,10 +139,9 @@ Restart Signal K, then open `http://your-sk-server:3000/signalk-binnacle/` in a
|
|
|
265
139
|
|
|
266
140
|
## License
|
|
267
141
|
|
|
268
|
-
Apache-2.0. See [LICENSE](LICENSE) for the full text. The software is provided "AS IS",
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
position-fixing.
|
|
142
|
+
Apache-2.0. See [LICENSE](LICENSE) for the full text. The software is provided "AS IS", without
|
|
143
|
+
warranty of any kind. It has not been field-tested at scale and is not certified for navigation.
|
|
144
|
+
Treat all on-screen information as advisory, and always carry independent means of position-fixing.
|
|
272
145
|
|
|
273
146
|
## Support
|
|
274
147
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signalk-binnacle",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "WebGL chart plotter for Signal K",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "Nearl Crews <23341701+NearlCrews@users.noreply.github.com>",
|