signalk-binnacle 0.1.0
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 +202 -0
- package/README.md +276 -0
- package/package.json +86 -0
- package/public/assets/index-BbEF1pu2.js +830 -0
- package/public/assets/index-Bt4vZ_Uh.css +1 -0
- package/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/public/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/public/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/public/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/public/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/public/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/public/assets/sk.worker-DfMZFJtX.js +7 -0
- package/public/assets/workbox-window.prod.es5-Bd17z0YL.js +2 -0
- package/public/binnacle-icon.svg +6 -0
- package/public/index.html +13 -0
- package/public/manifest.webmanifest +1 -0
- package/public/screenshots/01-chart.png +0 -0
- package/public/screenshots/02-routes.png +0 -0
- package/public/screenshots/03-charts.png +0 -0
- package/public/screenshots/04-anchorage.png +0 -0
- package/public/screenshots/05-weather.png +0 -0
- package/public/sw.js +1 -0
- package/public/workbox-a85f4708.js +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# Binnacle
|
|
2
|
+
|
|
3
|
+
[](https://github.com/NearlCrews/signalk-binnacle/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/NearlCrews/signalk-binnacle/actions/workflows/signalk-webapp-ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://nodejs.org)
|
|
7
|
+
[](https://www.buymeacoffee.com/nearlcrews)
|
|
8
|
+
|
|
9
|
+
A next-generation marine chart plotter for [Signal K](https://signalk.org).
|
|
10
|
+
|
|
11
|
+
> **0.1.0, the first release.** Binnacle 0.1.0 is a complete chart plotter: GPU charts and depth,
|
|
12
|
+
> route planning and following, weather, an active collision watch, voyage tracks, and points of
|
|
13
|
+
> interest all ship in this release.
|
|
14
|
+
>
|
|
15
|
+
> **It has not been field-tested at any scale.** It has been developed and verified against a
|
|
16
|
+
> single Signal K server, never across a fleet or a range of real-world boats, hardware, and
|
|
17
|
+
> conditions. It is also not certified for safety-of-life navigation. Always carry redundant
|
|
18
|
+
> means of navigation, cross-check against your primary instruments, and treat every display as
|
|
19
|
+
> advisory.
|
|
20
|
+
|
|
21
|
+
## What it does
|
|
22
|
+
|
|
23
|
+
Signal K is an open marine data standard that streams a boat's navigation, environment, and
|
|
24
|
+
AIS data over a single API. Binnacle displays that data: a GPU-rendered, offline-capable
|
|
25
|
+
chart plotter that runs in a browser and is served by the boat's Signal K server.
|
|
26
|
+
|
|
27
|
+
It is built for low-bandwidth and offline use on modest hardware. It has night-readable
|
|
28
|
+
themes, computes collision and course data on the client when no server provider supplies
|
|
29
|
+
them, and caches previously viewed areas so they keep rendering without a connection. It runs
|
|
30
|
+
on the same Raspberry Pi that hosts the Signal K server.
|
|
31
|
+
|
|
32
|
+
## Screenshots
|
|
33
|
+
|
|
34
|
+
<table>
|
|
35
|
+
<tr>
|
|
36
|
+
<td width="50%">
|
|
37
|
+
<img src="https://raw.githubusercontent.com/NearlCrews/signalk-binnacle/main/static/screenshots/01-chart.png" alt="The chart with AIS traffic and the app menu"><br>
|
|
38
|
+
<sub>The chart with AIS traffic, points of interest, and the app menu.</sub>
|
|
39
|
+
</td>
|
|
40
|
+
<td width="50%">
|
|
41
|
+
<img src="https://raw.githubusercontent.com/NearlCrews/signalk-binnacle/main/static/screenshots/02-routes.png" alt="Planning a route on the chart"><br>
|
|
42
|
+
<sub>Planning a route, with the leg count and total distance updating live.</sub>
|
|
43
|
+
</td>
|
|
44
|
+
</tr>
|
|
45
|
+
<tr>
|
|
46
|
+
<td width="50%">
|
|
47
|
+
<img src="https://raw.githubusercontent.com/NearlCrews/signalk-binnacle/main/static/screenshots/03-charts.png" alt="NOAA ENC charts and bathymetry layered from the Layers panel"><br>
|
|
48
|
+
<sub>NOAA ENC charts and bathymetry, layered and faded from the Layers panel.</sub>
|
|
49
|
+
</td>
|
|
50
|
+
<td width="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>
|
|
62
|
+
|
|
63
|
+
## Architecture
|
|
64
|
+
|
|
65
|
+
Binnacle is built on a current web stack and engineered to run on modest helm hardware:
|
|
66
|
+
|
|
67
|
+
- **Front end.** Svelte 5 with runes, Vite, and TypeScript, linted and formatted with Biome, with
|
|
68
|
+
module boundaries enforced by the build (Feature-Sliced Design plus a dependency-cruiser gate).
|
|
69
|
+
- **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 that rotate with heading and course, and
|
|
71
|
+
wind draws as a WebGL particle field of thousands of particles advected through the forecast on the
|
|
72
|
+
graphics card.
|
|
73
|
+
- **Off-main-thread real-time pipeline.** A dedicated Web Worker hosts the Signal K WebSocket client;
|
|
74
|
+
incoming deltas are coalesced to a single flush per animation frame and fed into a path-keyed,
|
|
75
|
+
fine-grained reactive store, so a busy AIS anchorage updates the readouts without stalling the
|
|
76
|
+
chart render.
|
|
77
|
+
- **Minimal network and render work.** Binnacle subscribes to exactly what it draws, at controlled
|
|
78
|
+
rates (own vessel fast, AIS slower), keeps everything in SI internally, and converts only at the
|
|
79
|
+
display edge.
|
|
80
|
+
- **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, so previously seen areas
|
|
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.
|
|
182
|
+
|
|
183
|
+
## Installation
|
|
184
|
+
|
|
185
|
+
Binnacle is delivered as a Signal K webapp: the production build writes static files into
|
|
186
|
+
`public/`, which the Signal K server serves same-origin at `/signalk-binnacle/`.
|
|
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).
|
|
198
|
+
|
|
199
|
+
## Requirements
|
|
200
|
+
|
|
201
|
+
- Signal K server 2.x.
|
|
202
|
+
- Node.js >= 22.
|
|
203
|
+
- A browser on the helm display, tablet, or phone you want to view the plotter on.
|
|
204
|
+
|
|
205
|
+
## Offline operation and SSL (optional)
|
|
206
|
+
|
|
207
|
+
SSL is not required. Binnacle runs fully over plain HTTP, which is how the Signal K server
|
|
208
|
+
serves it by default: the chart, AIS, weather, points of interest, tracks, and the Lookout
|
|
209
|
+
alarms all work without it.
|
|
210
|
+
|
|
211
|
+
What SSL enables is the service-worker layer of offline caching. Browsers expose the service
|
|
212
|
+
worker and cache-storage APIs only in a secure context (HTTPS or `http://localhost`), so caching
|
|
213
|
+
the base map and chart tiles for full offline map rendering activates only when the server is
|
|
214
|
+
reached over HTTPS. Over plain HTTP the app degrades cleanly to online-only with no errors and no
|
|
215
|
+
loss of live function. The weather forecast is cached separately in IndexedDB, which is not
|
|
216
|
+
secure-context gated, so even over plain HTTP a reload or a return to a recent view reuses the last
|
|
217
|
+
forecast rather than re-fetching.
|
|
218
|
+
|
|
219
|
+
If you want offline operation, the simplest way to add HTTPS to Signal K is the
|
|
220
|
+
[signalk-ssl](https://www.npmjs.com/package/signalk-ssl) plugin
|
|
221
|
+
([source](https://github.com/dirkwa/signalk-ssl)), which generates a local certificate
|
|
222
|
+
authority, issues the server certificate, and distributes the root to your phones and tablets
|
|
223
|
+
by QR code so they trust it. The Signal K server's built-in SSL settings (Server, then
|
|
224
|
+
Settings, then SSL) are an alternative.
|
|
225
|
+
|
|
226
|
+
## Development
|
|
227
|
+
|
|
228
|
+
This project targets Node 22 or newer. Lint and format use the Biome binary, which must be
|
|
229
|
+
installed and on your `PATH` (CI installs it via the `biomejs/setup-biome` action).
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
npm install # install dependencies
|
|
233
|
+
npm run hooks # install the git pre-commit and pre-push gates (run once)
|
|
234
|
+
npm run dev # Vite dev server
|
|
235
|
+
npm run check # type-check (svelte-check)
|
|
236
|
+
npm run lint # Biome lint
|
|
237
|
+
npm run format # Biome format (write)
|
|
238
|
+
npm run cruise # dependency-cruiser boundary check
|
|
239
|
+
npm test # Vitest unit tests
|
|
240
|
+
npm run build # production build into public/
|
|
241
|
+
npm run test:e2e # Playwright end-to-end smoke test
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
After `npm run hooks`, git runs a fast format, lint, and boundary check before each
|
|
245
|
+
commit, and the full type-check, test, and build gate before each push. A failing gate
|
|
246
|
+
blocks the action, so a broken tree cannot be committed or pushed. The hooks live in
|
|
247
|
+
`.githooks/` and are opt-in via `core.hooksPath`, never a package lifecycle script.
|
|
248
|
+
|
|
249
|
+
Link the built webapp into your Signal K server's module directory, then add it to the
|
|
250
|
+
server config so it loads:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
ln -sfn "$(pwd)" ~/.signalk/node_modules/signalk-binnacle
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
```json
|
|
257
|
+
{
|
|
258
|
+
"dependencies": {
|
|
259
|
+
"signalk-binnacle": "file:../path/to/signalk-binnacle"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Restart Signal K, then open `http://your-sk-server:3000/signalk-binnacle/` in a browser.
|
|
265
|
+
|
|
266
|
+
## License
|
|
267
|
+
|
|
268
|
+
Apache-2.0. See [LICENSE](LICENSE) for the full text. The software is provided "AS IS",
|
|
269
|
+
without warranty of any kind. It has not been field-tested at scale and is not certified for
|
|
270
|
+
navigation. Treat all on-screen information as advisory, and always carry independent means of
|
|
271
|
+
position-fixing.
|
|
272
|
+
|
|
273
|
+
## Support
|
|
274
|
+
|
|
275
|
+
Find this project useful? You can support its continued development by
|
|
276
|
+
[buying me a coffee](https://www.buymeacoffee.com/nearlcrews).
|
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "signalk-binnacle",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Next-generation marine chart plotter for Signal K",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"author": "Nearl Crews <23341701+NearlCrews@users.noreply.github.com>",
|
|
8
|
+
"funding": {
|
|
9
|
+
"type": "buymeacoffee",
|
|
10
|
+
"url": "https://www.buymeacoffee.com/nearlcrews"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/NearlCrews/signalk-binnacle#readme",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/NearlCrews/signalk-binnacle.git"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/NearlCrews/signalk-binnacle/issues"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"signalk-webapp",
|
|
22
|
+
"signalk-category-chart-plotters"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=22"
|
|
26
|
+
},
|
|
27
|
+
"signalk": {
|
|
28
|
+
"appIcon": "./binnacle-icon.svg",
|
|
29
|
+
"displayName": "Binnacle",
|
|
30
|
+
"screenshots": [
|
|
31
|
+
"./screenshots/01-chart.png",
|
|
32
|
+
"./screenshots/02-routes.png",
|
|
33
|
+
"./screenshots/03-charts.png",
|
|
34
|
+
"./screenshots/04-anchorage.png",
|
|
35
|
+
"./screenshots/05-weather.png"
|
|
36
|
+
],
|
|
37
|
+
"recommends": [
|
|
38
|
+
"signalk-crows-nest",
|
|
39
|
+
"signalk-ssl",
|
|
40
|
+
"signalk-virtual-weather-sensors"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"public/"
|
|
45
|
+
],
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@fontsource-variable/inter": "^5.2.8",
|
|
48
|
+
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
|
49
|
+
"@lucide/svelte": "^1.17.0",
|
|
50
|
+
"comlink": "^4.4.2",
|
|
51
|
+
"maplibre-gl": "^5.24.0",
|
|
52
|
+
"pmtiles": "^4.4.1",
|
|
53
|
+
"terra-draw": "^1.31.0",
|
|
54
|
+
"terra-draw-maplibre-gl-adapter": "^1.4.1"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"dev": "vite",
|
|
58
|
+
"build": "vite build",
|
|
59
|
+
"preview": "vite preview --port 4173",
|
|
60
|
+
"check": "svelte-check --tsconfig ./tsconfig.app.json",
|
|
61
|
+
"lint": "biome lint .",
|
|
62
|
+
"lint:fix": "biome lint --write .",
|
|
63
|
+
"ci:biome": "biome ci .",
|
|
64
|
+
"cruise": "depcruise src --config .dependency-cruiser.cjs",
|
|
65
|
+
"test": "vitest run",
|
|
66
|
+
"test:watch": "vitest",
|
|
67
|
+
"test:e2e": "playwright test",
|
|
68
|
+
"format": "biome format --write .",
|
|
69
|
+
"format:check": "biome format .",
|
|
70
|
+
"hooks": "git config core.hooksPath .githooks"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@playwright/test": "^1.60.0",
|
|
74
|
+
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
|
75
|
+
"@tsconfig/svelte": "^5.0.8",
|
|
76
|
+
"@vitest/web-worker": "^4.1.8",
|
|
77
|
+
"dependency-cruiser": "^17.4.3",
|
|
78
|
+
"svelte": "^5.56.2",
|
|
79
|
+
"svelte-check": "^4.6.0",
|
|
80
|
+
"typescript": "^6.0.3",
|
|
81
|
+
"vite": "^8.0.16",
|
|
82
|
+
"vite-plugin-pwa": "^1.3.0",
|
|
83
|
+
"vitest": "^4.1.8",
|
|
84
|
+
"workbox-window": "^7.4.1"
|
|
85
|
+
}
|
|
86
|
+
}
|