signalk-chiplog 2.0.0 → 2.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/CHANGELOG.md +158 -37
- package/README.md +302 -133
- package/index.js +54 -40
- package/lib/api.js +94 -1
- package/lib/crew.js +185 -0
- package/lib/database.js +59 -1
- package/lib/departure-forecast.js +150 -0
- package/lib/detection.js +45 -14
- package/lib/entries.js +89 -46
- package/lib/events.js +27 -14
- package/lib/export.js +12 -1
- package/lib/forecast-schedule.js +67 -0
- package/lib/logbook-pdf.js +326 -13
- package/lib/observation-recorder.js +11 -5
- package/lib/tide-forecaster.js +23 -116
- package/lib/weather-forecaster.js +147 -0
- package/package.json +1 -1
- package/public/app.css +91 -2
- package/public/entry/entry.css +71 -0
- package/public/entry/js/components/CrewDialog.mjs +200 -0
- package/public/entry/js/main.mjs +114 -0
- package/public/entry/sw.js +1 -0
- package/public/js/components/CrewCard.mjs +22 -0
- package/public/js/components/PassageView.mjs +21 -12
- package/public/js/components/WeatherCard.mjs +134 -0
- package/public/js/format.mjs +4 -0
- package/public/js/i18n.mjs +117 -0
- package/public/js/weather.mjs +193 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,62 +1,169 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to Chiplog are documented here. The format follows
|
|
3
|
+
All notable changes to Chiplog are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
4
6
|
|
|
5
7
|
## [Unreleased]
|
|
6
8
|
|
|
9
|
+
## [2.1.0] - 2026-09-17
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Crew list: a per-passage roster of who is aboard, shown as a compact list on the tablet's main screen and editable
|
|
14
|
+
from a dialog that picks from — and can extend — a global crew roster (name + optional role, e.g. skipper/crew),
|
|
15
|
+
without an admin login the same way a place name can be corrected. A name typed there is added to the roster and
|
|
16
|
+
picked at once, immediately correctable or permanently removable with its own icons, right alongside every other name.
|
|
17
|
+
A new passage starts with the same crew as the one before it, still adjustable. Shown read-only, one member per line,
|
|
18
|
+
in its own card on the webapp's passage page, and in the PDF logbook's departure line; included in the JSON export
|
|
19
|
+
(`GET /entries/:id`'s `crew`, `GET /crew`, `PATCH`/`DELETE /crew/:id`, `PUT /entries/:id/crew`).
|
|
20
|
+
- Marine weather forecast: fetched near the departure position for the next 24 hours when a passage opens (Open-Meteo
|
|
21
|
+
Forecast and Marine, free and keyless, can be turned off with its own setting), shown — titled with the departure
|
|
22
|
+
place — on the passage page as a table every 3 hours (sky and rain, wind as a Beaufort force with direction, speed and
|
|
23
|
+
gusts, waves, swell, pressure, visibility, air and sea temperature, and current), in a full-width block of its own
|
|
24
|
+
above the day's table in the PDF logbook, and in the JSON export (`GET /entries/:id/weather`). Far from the sea, the
|
|
25
|
+
atmospheric part is kept on its own.
|
|
26
|
+
- PDF logbook: the tide forecast's high and low times and heights, and the tanks and batteries noted as the passage
|
|
27
|
+
opened, now print side by side in a block of their own, below the weather forecast and above the day's table.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- A passage now closes as soon as the boat stops, instead of 30 minutes later: its arrival is named, its arrival reading
|
|
32
|
+
taken and the USB copy written straight away. Leaving again within that tolerance reopens the same passage, the stop
|
|
33
|
+
being kept on its timeline as a stopover line naming the place, as a merge does, followed by a departure line at the
|
|
34
|
+
time the boat set off again — with its instrument reading, and in the PDF as "Departure from" the stopover's place. A
|
|
35
|
+
passage closed from the webapp is never reopened. Casting off from the tablet within the tolerance of an arrival goes
|
|
36
|
+
to the passage that just ended, which carries on once the boat moves. The "Stop duration that ends a passage" setting
|
|
37
|
+
(`stopClosureMinutes`, unchanged) is now titled "Stop duration within which a new departure continues the passage".
|
|
38
|
+
- The "Tide service" setting is now titled "Marine service", since the weather forecast also reads the sea state and
|
|
39
|
+
current from it. The setting itself (`tideUrl`) is unchanged.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- A new passage's tide and weather forecasts are fetched as soon as it opens, instead of up to a minute later — or up to
|
|
44
|
+
an hour later when an earlier passage's fetch had kept failing while offline, since the retry delay carried over from
|
|
45
|
+
one passage to the next.
|
|
46
|
+
- On a phone, the webapp no longer scrolls sideways: the top navigation wraps onto a second line when it does not fit,
|
|
47
|
+
and the cards shown side by side on a wide screen (tide, engine and sail, boat status) now shrink to the screen width
|
|
48
|
+
instead of staying 420 px wide.
|
|
49
|
+
|
|
7
50
|
## [2.0.0] - 2026-09-16
|
|
8
51
|
|
|
9
52
|
### Added
|
|
10
53
|
|
|
11
|
-
- The passage page has a **Boat status** card: each engine's hour counter, at departure and arrival, and every tank's
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
54
|
+
- The passage page has a **Boat status** card: each engine's hour counter, at departure and arrival, and every tank's
|
|
55
|
+
level (and volume) and every battery's charge, voltage and current as noted at departure. Tanks and batteries are
|
|
56
|
+
noted once on the passage as it opens (`startTanks`, `startBatteries`), whether detection or the crew opens it, and
|
|
57
|
+
included in the JSON export.
|
|
58
|
+
- Merging two entries now keeps a record of the stop between them: a `stopover` line on the surviving passage's
|
|
59
|
+
timeline, naming the place and its position — previously that information was silently lost once the merge took the
|
|
60
|
+
later entry's arrival as its own.
|
|
61
|
+
- The passage page's track map now shows a small boat marker at the selected point, pointing along its heading, and a
|
|
62
|
+
scrubber under the map to step back and forth through the track's history — it defaults to the latest point, doubling
|
|
63
|
+
as the current position on a passage in progress. A band below it shows that point's time, SOG, COG, STW, TWS, TWD,
|
|
64
|
+
TWA and AWA. Speed through water now rides along with every track point like wind and heading already did, not just
|
|
65
|
+
the hourly instrument snapshot.
|
|
66
|
+
- Retrospective analysis: a new **Retrospective** page reconstructs past passages for a date range from a
|
|
67
|
+
[signalk-to-influxdb](https://github.com/tkurki/signalk-to-influxdb) history (InfluxDB 1.x, local or remote — a new
|
|
68
|
+
recommended companion plugin), through the exact same detection pipeline used live rather than a separate
|
|
69
|
+
implementation. Runs in the background with a progress bar, refuses a range that overlaps a passage already on record,
|
|
70
|
+
refuses to run at all while a passage is under way (it would be driving that same live passage through the replay's
|
|
71
|
+
detector at the same time), and can be cancelled mid-way without losing what it already reconstructed. Data is matched
|
|
72
|
+
to this server's own vessel identity by default, overridable (`influxSelfContext`) for running it from a different
|
|
73
|
+
Signal K server than the one that wrote the history; a mismatch fails with the vessel contexts actually found, rather
|
|
74
|
+
than reconstructing nothing with no explanation. An InfluxDB that never answers — unreachable, or overloaded — fails
|
|
75
|
+
after 30 seconds with the actual connection problem, rather than hanging indefinitely on a generic "fetch failed". A
|
|
76
|
+
quick first pass reads one mean speed per minute to find when the boat moved, and only those stretches are then
|
|
77
|
+
fetched — one value per track interval — and replayed, committing once per ten simulated minutes, and the page sums up
|
|
78
|
+
what a run added (passages, distance, engine and sail time, track points, events): a month now takes seconds rather
|
|
79
|
+
than the best part of an hour, and no longer holds every raw reading of the range in memory. Requests stay bounded (a
|
|
80
|
+
week for the scan, six hours for a stretch) with a short pause between them, so a multi-week reconstruction cannot
|
|
81
|
+
overwhelm a database sharing a resource-constrained host (a Raspberry Pi) with Signal K itself; cancelling works at
|
|
82
|
+
any stage. A replay wakes the place-naming lookup immediately once it finishes, rather than leaving
|
|
83
|
+
newly-reconstructed departures and arrivals waiting out whatever backoff that chain was already in. Signal K alarms
|
|
84
|
+
are not reconstructed, since a typical InfluxDB history does not archive notifications the way it does a numeric
|
|
85
|
+
reading, nor are weather events while the boat lay still between passages, nor the extra track points live recording
|
|
86
|
+
adds on turns and speed changes.
|
|
15
87
|
|
|
16
88
|
### Fixed
|
|
17
89
|
|
|
18
|
-
- The arrival instrument snapshot (`entry_end`) is now dated from the moment the passage actually ended, not from the
|
|
90
|
+
- The arrival instrument snapshot (`entry_end`) is now dated from the moment the passage actually ended, not from the
|
|
91
|
+
later tick that found out about it once the stop had held past the closure threshold (up to `stopClosureMinutes`) — it
|
|
92
|
+
could otherwise sort after an hourly reading taken during that wait, even though the passage had already ended before
|
|
93
|
+
that reading was taken.
|
|
19
94
|
|
|
20
95
|
## [1.2.0] - 2026-09-15
|
|
21
96
|
|
|
22
97
|
### Added
|
|
23
98
|
|
|
24
|
-
- The tablet app's handwriting pad now fills the whole screen and has a toolbar: fine pen, thick pen, highlighter,
|
|
99
|
+
- The tablet app's handwriting pad now fills the whole screen and has a toolbar: fine pen, thick pen, highlighter,
|
|
100
|
+
eraser, undo and a choice of colour (kept to the theme's colour in night mode). The eraser removes only the points it
|
|
101
|
+
touches, splitting a stroke instead of deleting all of it; undo now steps back through erasing too, not just strokes.
|
|
102
|
+
A stroke's colour and tool travel with it to the webapp's timeline and the PDF export, not just the tablet.
|
|
25
103
|
|
|
26
104
|
### Fixed
|
|
27
105
|
|
|
28
|
-
- The tablet app's stylus canvas now prevents the default action on every contact, not just the pen's — a resting palm's
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
106
|
+
- The tablet app's stylus canvas now prevents the default action on every contact, not just the pen's — a resting palm's
|
|
107
|
+
touch was left to the browser, which could hijack it as a gesture and cancel the pen's in-progress stroke, or show a
|
|
108
|
+
native text-selection highlight over the canvas. iOS Safari's long-press selection callout on the canvas needed the
|
|
109
|
+
whole entry app, not just the canvas, to opt out of selection to reliably stay away, plus blocking
|
|
110
|
+
`selectstart`/`contextmenu`/`dragstart` directly since the CSS alone is unreliable on some iOS versions.
|
|
111
|
+
- Quickly lifting and reapplying the pen could have its next stroke silently dropped: the previous contact's pointerup
|
|
112
|
+
can arrive after the next one's pointerdown, which read as "still drawing" and refused to start the new stroke.
|
|
113
|
+
- Worked around an iPadOS Safari/Scribble bug that could swallow a pen's pointer events mid-stroke, dropping strokes or
|
|
114
|
+
having them mistakenly typed into the comment field, by also preventing the canvas's underlying touch events directly,
|
|
115
|
+
not just the pointer ones.
|
|
116
|
+
- An autopilot engagement, disengagement or mode change now takes an instrument snapshot like every other automatic
|
|
117
|
+
event, instead of logging the change with no conditions attached.
|
|
32
118
|
|
|
33
119
|
## [1.1.0] - 2026-09-15
|
|
34
120
|
|
|
35
121
|
### Added
|
|
36
122
|
|
|
37
|
-
- A summary above the logbook's day-grouped list: number of passages, total distance and total time, across every
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
123
|
+
- A summary above the logbook's day-grouped list: number of passages, total distance and total time, across every
|
|
124
|
+
passage logged rather than just the pages currently loaded (`GET /entries/stats`).
|
|
125
|
+
- Tide forecast: fetched near the departure position for the next 24 hours when a passage opens (Open-Meteo Marine, free
|
|
126
|
+
and keyless, configurable and can be turned off), shown on the passage page with the departure's place, the date, time
|
|
127
|
+
and height of each high/low tide, and the water height curve. Sits next to the engine/sail card, each taking about
|
|
128
|
+
half the width on a wide screen instead of the full width. Heights are relative to mean sea level, not the chart datum
|
|
129
|
+
nautical tide tables use, and the app says so (`datum: "msl"` in the API).
|
|
130
|
+
- Editing and deleting logbook lines from the webapp's passage page: any line's comment can be corrected, and a
|
|
131
|
+
manoeuvre or note the crew logged themselves can be deleted (automatic lines — alarms, autopilot, weather, corrections
|
|
132
|
+
— can only be annotated).
|
|
133
|
+
- Highest speed and wind seen on a passage, shown alongside the average speed on the passage page
|
|
134
|
+
(`maxSpeed`/`maxWindSpeed` in the API). Wind (true and apparent) and heading now ride along with every track point,
|
|
135
|
+
not just the hourly instrument snapshot, so a gust between snapshots is no longer missed.
|
|
136
|
+
- Automatic engine/sail switches now show as a line in the passage log, not just on the engine/sail strip, with the
|
|
137
|
+
conditions at that moment (`propulsion_change` event).
|
|
138
|
+
- Facsimile PDF logbook: A4 landscape, a page per day in ship's time, with time, position, course, speed, wind,
|
|
139
|
+
barometer, depth, engine or sail and remarks; departure and arrival lines with passage totals, day totals, handwritten
|
|
140
|
+
notes drawn. Downloadable from the export page in the webapp's language and the device's time zone.
|
|
141
|
+
- Engine hours of every engine: each engine's hour counter is recorded in readings, shown at departure and arrival with
|
|
142
|
+
the hours run on the passage page and in the PDF, and exported as one CSV column per engine and in the JSON
|
|
143
|
+
(`engineRuntimes`).
|
|
144
|
+
- One PDF per passage in the USB copy, in the new logbook language and ship's time zone settings. Existing copies gain
|
|
145
|
+
their PDFs at the next copy.
|
|
45
146
|
- Screenshots for the Signal K App Store listing (`signalk.screenshots` in `package.json`).
|
|
46
147
|
|
|
47
148
|
### Changed
|
|
48
149
|
|
|
49
|
-
- The tablet app's comment and delete actions on a recent entry are now icon buttons, keeping the same touch target
|
|
150
|
+
- The tablet app's comment and delete actions on a recent entry are now icon buttons, keeping the same touch target
|
|
151
|
+
size.
|
|
50
152
|
- Times are shown on the 24-hour clock in English too.
|
|
51
153
|
|
|
52
154
|
### Fixed
|
|
53
155
|
|
|
54
|
-
- The log reading in instrument snapshots now comes from `navigation.log` (the total, non-resettable distance log), not
|
|
55
|
-
|
|
156
|
+
- The log reading in instrument snapshots now comes from `navigation.log` (the total, non-resettable distance log), not
|
|
157
|
+
`navigation.trip.log`, which a crew resetting the trip counter could zero out mid-passage.
|
|
158
|
+
- Renaming a departure or arrival now also renames that place on every later passage that already reused it, as
|
|
159
|
+
documented; an earlier passage keeps the name it recorded.
|
|
56
160
|
- An alarm's message is no longer repeated as its comment in the passage log.
|
|
57
|
-
- The arrival correction field no longer appears, and is refused by the API (`409 entry_active`), on a passage still in
|
|
58
|
-
|
|
59
|
-
-
|
|
161
|
+
- The arrival correction field no longer appears, and is refused by the API (`409 entry_active`), on a passage still in
|
|
162
|
+
progress — it has no arrival yet, only a moving last-seen position.
|
|
163
|
+
- A note or handwritten sketch logged live now takes an instrument snapshot too, like a manoeuvre already did, so the
|
|
164
|
+
conditions it was written in show in the log.
|
|
165
|
+
- The App Store icon (`signalk.appIcon`) pointed at a non-existent `icon.svg` at the package root; the icon has always
|
|
166
|
+
lived at `public/icon.svg`.
|
|
60
167
|
|
|
61
168
|
## [1.0.0] - 2026-09-13
|
|
62
169
|
|
|
@@ -66,19 +173,29 @@ First release.
|
|
|
66
173
|
|
|
67
174
|
#### Logbook
|
|
68
175
|
|
|
69
|
-
- One logbook entry per passage, opened when the boat gets under way and closed when it arrives, with a configurable
|
|
70
|
-
|
|
71
|
-
-
|
|
176
|
+
- One logbook entry per passage, opened when the boat gets under way and closed when it arrives, with a configurable
|
|
177
|
+
tolerance for short stops (30 minutes by default).
|
|
178
|
+
- Under way or stopped decided from `navigation.state` published by
|
|
179
|
+
[signalk-autostate](https://github.com/meri-imperiumi/signalk-autostate), or from speed over ground averaged over 3
|
|
180
|
+
minutes when it is absent. Departures and arrivals are dated from raw speed, so the passage starts where the boat
|
|
181
|
+
actually left.
|
|
182
|
+
- signalk-autostate's value is preferred when another source, such as the boat's own AIS transponder, also publishes
|
|
183
|
+
`navigation.state`. When detection works from speed alone, the apps say why.
|
|
72
184
|
- Passages closed at their last movement after a power cut; passages split by a long stop can be merged back.
|
|
73
|
-
- GPS track at a configurable interval (15 s by default), with extra points on turns and speed changes; distance from
|
|
74
|
-
|
|
185
|
+
- GPS track at a configurable interval (15 s by default), with extra points on turns and speed changes; distance from
|
|
186
|
+
the track.
|
|
187
|
+
- Engine and sail periods from engine revolutions, engine state, `navigation.state` or a configurable default, with
|
|
188
|
+
manual correction.
|
|
75
189
|
- Instrument readings at departure, every hour on the hour (configurable), at arrival and with each live manoeuvre.
|
|
76
|
-
- Automatic events: Signal K alarms and emergencies, autopilot changes, true wind crossing configurable thresholds,
|
|
77
|
-
|
|
190
|
+
- Automatic events: Signal K alarms and emergencies, autopilot changes, true wind crossing configurable thresholds,
|
|
191
|
+
barometer falling over 3 hours.
|
|
192
|
+
- Departure and arrival names from known places, then online geocoding (any Nominatim-compatible service, can be turned
|
|
193
|
+
off); a renamed place is remembered for later passages.
|
|
78
194
|
|
|
79
195
|
#### Logbook webapp
|
|
80
196
|
|
|
81
|
-
- Status bar, passages grouped by day, passage page with map (OpenStreetMap and OpenSeaMap), engine and sail periods,
|
|
197
|
+
- Status bar, passages grouped by day, passage page with map (OpenStreetMap and OpenSeaMap), engine and sail periods,
|
|
198
|
+
and the log of readings and events, handwritten notes included.
|
|
82
199
|
- Corrections: rename departure or arrival, switch an engine or sail period, close, merge and delete passages.
|
|
83
200
|
- Export of the whole logbook or a date range as JSON, CSV (nautical units) or GPX.
|
|
84
201
|
- English and French.
|
|
@@ -86,7 +203,8 @@ First release.
|
|
|
86
203
|
#### Tablet entry app
|
|
87
204
|
|
|
88
205
|
- Installable app at `/signalk-chiplog/entry/`, designed for gloves and wet fingers, with a red night mode.
|
|
89
|
-
- Manoeuvre shortcuts, with the sail picked on a sail change; casting off or weighing anchor opens the passage before
|
|
206
|
+
- Manoeuvre shortcuts, with the sail picked on a sail change; casting off or weighing anchor opens the passage before
|
|
207
|
+
the boat moves.
|
|
90
208
|
- Keyboard notes and stylus handwriting with pressure and palm rejection.
|
|
91
209
|
- Undo and comment right after each entry; latest entries with edit and delete.
|
|
92
210
|
- Entries kept on the tablet while the Wi-Fi is down and sent in order when it is back, never twice.
|
|
@@ -94,15 +212,18 @@ First release.
|
|
|
94
212
|
|
|
95
213
|
#### Abandon-ship copy
|
|
96
214
|
|
|
97
|
-
- One JSON, CSV and GPX file per passage on a USB drive, named to sort by date, written only when new or changed, with
|
|
98
|
-
|
|
215
|
+
- One JSON, CSV and GPX file per passage on a USB drive, named to sort by date, written only when new or changed, with
|
|
216
|
+
obsolete files removed.
|
|
217
|
+
- Copied automatically every 15 minutes and at each arrival (both configurable), or on demand; a missing drive is
|
|
218
|
+
reported in the plugin status and on the export page.
|
|
99
219
|
|
|
100
220
|
#### API and data
|
|
101
221
|
|
|
102
222
|
- REST API under `/plugins/signalk-chiplog/api`, documented in [docs/API.md](docs/API.md).
|
|
103
223
|
- Single SQLite database through Node's built-in `node:sqlite`: no native module to build.
|
|
104
224
|
|
|
105
|
-
[Unreleased]: https://github.com/ricard33/signalk-chiplog/compare/v2.
|
|
225
|
+
[Unreleased]: https://github.com/ricard33/signalk-chiplog/compare/v2.1.0...HEAD
|
|
226
|
+
[2.1.0]: https://github.com/ricard33/signalk-chiplog/compare/v2.0.0...v2.1.0
|
|
106
227
|
[2.0.0]: https://github.com/ricard33/signalk-chiplog/compare/v1.2.0...v2.0.0
|
|
107
228
|
[1.2.0]: https://github.com/ricard33/signalk-chiplog/compare/v1.1.0...v1.2.0
|
|
108
229
|
[1.1.0]: https://github.com/ricard33/signalk-chiplog/compare/v1.0.0...v1.1.0
|