signalk-livedepth-plugin 0.3.0 → 0.3.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 +58 -0
- package/dist/config.d.ts +85 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +60 -1
- package/dist/config.js.map +1 -1
- package/dist/plotterext/manifest.d.ts.map +1 -1
- package/dist/plotterext/manifest.js +4 -3
- package/dist/plotterext/manifest.js.map +1 -1
- package/dist/plugin.d.ts +15 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +21 -3
- package/dist/plugin.js.map +1 -1
- package/dist/streams/live.d.ts +15 -3
- package/dist/streams/live.d.ts.map +1 -1
- package/dist/streams/live.js +208 -42
- package/dist/streams/live.js.map +1 -1
- package/dist/tiles/core/tile-source.d.ts +9 -0
- package/dist/tiles/core/tile-source.d.ts.map +1 -1
- package/dist/tiles/core/tile-source.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/public/js/config.js +40 -2
- package/public/js/config.js.map +2 -2
- package/public/js/render-worker.js +225 -65
- package/public/js/render-worker.js.map +3 -3
- package/public/js/renderer.js +76 -190
- package/public/js/renderer.js.map +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,64 @@ All notable changes to this project are documented here, newest first. The
|
|
|
4
4
|
format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
5
5
|
versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.3.3] - 2026-10-20
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Ignore a nearby vessel's implausible depth.** A tender on its davits still
|
|
12
|
+
publishes a depth — its transducer is in air and the number often looks
|
|
13
|
+
plausible — and those soundings would otherwise be written next to the
|
|
14
|
+
mothership. A sounding is now skipped when its vessel is within
|
|
15
|
+
`coLocatedDepth.radiusM` (default 15 m) of us and its depth differs from ours
|
|
16
|
+
by more than `coLocatedDepth.depthM` (default 2 m). Our own soundings, and
|
|
17
|
+
those from vessels further away, are never filtered.
|
|
18
|
+
|
|
19
|
+
## [0.3.2] - 2026-10-19
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Depth from **other vessels**. The plugin now records any vessel on the server
|
|
24
|
+
that publishes a depth on the selected datum, so a tender or a second
|
|
25
|
+
sounder-equipped vessel (for example a dinghy) is folded into the bathymetry
|
|
26
|
+
automatically. AIS targets — which have a position but no depth — are ignored.
|
|
27
|
+
The transducer correction describes this vessel's hull, so it is applied to
|
|
28
|
+
this vessel's soundings only. `vessels.include` / `vessels.exclude` narrow the
|
|
29
|
+
set if needed.
|
|
30
|
+
- A **Render quality** setting: Auto, or High / Balanced / Low. It scales only
|
|
31
|
+
the shaded depth surface; soundings, circles and labels always render at full
|
|
32
|
+
resolution. Auto adapts the surface to the GPU, and a frame-rate readout is
|
|
33
|
+
logged to the console.
|
|
34
|
+
- A temporary `debug.vesselFootprint` option draws the vessel's LOA × beam on
|
|
35
|
+
the chart layer, for checking where a sounding lands relative to the hull.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- A transducer forward of midships is placed ahead of the reference, not behind
|
|
40
|
+
it. The offset sign was inverted, which drew every sounding astern.
|
|
41
|
+
- The chart layer accepts the host's object-shaped `navigation.position`
|
|
42
|
+
(`{ latitude, longitude }`), so live soundings are no longer silently dropped.
|
|
43
|
+
- Panning or zooming re-fetches the tiles for the new view; previously the layer
|
|
44
|
+
kept drawing the previous view's tile set.
|
|
45
|
+
- A vessel that goes quiet keeps its subscription, so the deltas it replays on
|
|
46
|
+
reconnect are recorded rather than lost. A GPS-only vessel with no compass
|
|
47
|
+
falls back to course over ground for its heading.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- The chart layer renders at the display's pixel ratio instead of oversampling
|
|
52
|
+
at 2×, caches the per-frame cluster aggregation, and patches the depth field
|
|
53
|
+
incrementally on a live flush instead of rebuilding the grid. This cuts the
|
|
54
|
+
browser's CPU/GPU cost substantially, especially on a lower-powered GPU.
|
|
55
|
+
|
|
56
|
+
## [0.3.1] - 2026-10-16
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- The chart layer no longer lags the vessel by 2–3 seconds. Live soundings were
|
|
61
|
+
batched for two seconds, and each batch re-fetched every tile for the view
|
|
62
|
+
over HTTP; they now fold into the frame every 300 ms without a network round
|
|
63
|
+
trip, so the surface fills in under the bow.
|
|
64
|
+
|
|
7
65
|
## [0.3.0] - 2026-10-15
|
|
8
66
|
|
|
9
67
|
The LiveDepth chart layer, and the merge that brings everything into one
|
package/dist/config.d.ts
CHANGED
|
@@ -13,10 +13,32 @@ export type Config = {
|
|
|
13
13
|
/** Shift soundings from the vessel reference point the server reports to the
|
|
14
14
|
* transducer. `off` leaves them where the server put them. */
|
|
15
15
|
transducerCorrection: "off" | "replace";
|
|
16
|
+
/** Which vessels to record soundings from. By default every vessel that
|
|
17
|
+
* publishes a depth on the selected datum is recorded — a tender or a second
|
|
18
|
+
* sounder-equipped vessel is picked up automatically, while AIS targets
|
|
19
|
+
* (position but no depth) are ignored. `include`/`exclude` narrow that set. */
|
|
20
|
+
vessels?: {
|
|
21
|
+
include?: string[];
|
|
22
|
+
exclude?: string[];
|
|
23
|
+
};
|
|
24
|
+
/** Skip a sounding from another vessel that is sitting next to us but
|
|
25
|
+
* reporting a depth that cannot be the water we are in — a tender on davits
|
|
26
|
+
* has its transducer in air and still reports a plausible-looking number.
|
|
27
|
+
* Compared against this vessel's own depth and position. */
|
|
28
|
+
coLocatedDepth?: {
|
|
29
|
+
enabled?: boolean;
|
|
30
|
+
radiusM?: number;
|
|
31
|
+
depthM?: number;
|
|
32
|
+
};
|
|
16
33
|
seed?: {
|
|
17
34
|
run?: boolean;
|
|
18
35
|
resolution?: number;
|
|
19
36
|
};
|
|
37
|
+
/** Temporary diagnostics, removed once the geometry is verified. */
|
|
38
|
+
debug?: {
|
|
39
|
+
/** Draw the vessel's footprint (LOA × beam) in the chart layer. */
|
|
40
|
+
vesselFootprint?: boolean;
|
|
41
|
+
};
|
|
20
42
|
};
|
|
21
43
|
export declare const DepthPaths: readonly ["belowSurface", "belowTransducer", "belowKeel"];
|
|
22
44
|
export declare function schema(app: ServerAPI): {
|
|
@@ -59,6 +81,56 @@ export declare function schema(app: ServerAPI): {
|
|
|
59
81
|
enumNames: string[];
|
|
60
82
|
default: string;
|
|
61
83
|
};
|
|
84
|
+
vessels: {
|
|
85
|
+
type: string;
|
|
86
|
+
title: string;
|
|
87
|
+
description: string;
|
|
88
|
+
properties: {
|
|
89
|
+
include: {
|
|
90
|
+
type: string;
|
|
91
|
+
title: string;
|
|
92
|
+
description: string;
|
|
93
|
+
items: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
exclude: {
|
|
98
|
+
type: string;
|
|
99
|
+
title: string;
|
|
100
|
+
description: string;
|
|
101
|
+
items: {
|
|
102
|
+
type: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
coLocatedDepth: {
|
|
108
|
+
type: string;
|
|
109
|
+
title: string;
|
|
110
|
+
description: string;
|
|
111
|
+
properties: {
|
|
112
|
+
enabled: {
|
|
113
|
+
type: string;
|
|
114
|
+
default: boolean;
|
|
115
|
+
title: string;
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
radiusM: {
|
|
119
|
+
type: string;
|
|
120
|
+
default: number;
|
|
121
|
+
minimum: number;
|
|
122
|
+
title: string;
|
|
123
|
+
description: string;
|
|
124
|
+
};
|
|
125
|
+
depthM: {
|
|
126
|
+
type: string;
|
|
127
|
+
default: number;
|
|
128
|
+
minimum: number;
|
|
129
|
+
title: string;
|
|
130
|
+
description: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
62
134
|
seed: {
|
|
63
135
|
type: string;
|
|
64
136
|
title: string;
|
|
@@ -78,6 +150,19 @@ export declare function schema(app: ServerAPI): {
|
|
|
78
150
|
};
|
|
79
151
|
};
|
|
80
152
|
};
|
|
153
|
+
debug: {
|
|
154
|
+
type: string;
|
|
155
|
+
title: string;
|
|
156
|
+
description: string;
|
|
157
|
+
properties: {
|
|
158
|
+
vesselFootprint: {
|
|
159
|
+
type: string;
|
|
160
|
+
default: boolean;
|
|
161
|
+
title: string;
|
|
162
|
+
description: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
81
166
|
};
|
|
82
167
|
};
|
|
83
168
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,MAAM,MAAM,GAAG;IACnB;0DACsD;IACtD,IAAI,EAAE,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;IAClC;;oEAEgE;IAChE,OAAO,EAAE;QACP,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;IACF;kEAC8D;IAC9D,oBAAoB,EAAE,KAAK,GAAG,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE;QACL,GAAG,CAAC,EAAE,OAAO,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,UAAU,YACrB,cAAc,EACd,iBAAiB,EACjB,WAAW,CACH,CAAC;AAEX,wBAAgB,MAAM,CAAC,GAAG,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAiD7B,IAAI;YACJ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gB,MAAM,CAAC,GAAG,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAiD7B,IAAI;YACJ,KAAK;YACL,WAAW;YAEX,IAAI;YACJ,SAAS;YACT,OAAO;;;YAGP,IAAI;YACJ,KAAK;YACL,WAAW;YAEX,UAAU;gBACR,OAAO;oBACL,IAAI;oBACJ,KAAK;oBACL,WAAW;oBAEX,KAAK;wBAAI,IAAI;;;gBAEf,OAAO;oBACL,IAAI;oBACJ,KAAK;oBACL,WAAW;oBACX,KAAK;wBAAI,IAAI;;;;;;YAKjB,IAAI;YACJ,KAAK;YACL,WAAW;YAEX,UAAU;gBACR,OAAO;oBACL,IAAI;oBACJ,OAAO;oBACP,KAAK;oBACL,WAAW;;gBAGb,OAAO;oBACL,IAAI;oBACJ,OAAO;oBACP,OAAO;oBACP,KAAK;oBACL,WAAW;;gBAGb,MAAM;oBACJ,IAAI;oBACJ,OAAO;oBACP,OAAO;oBACP,KAAK;oBACL,WAAW;;;;;YAMf,IAAI;YACJ,KAAK;YACL,WAAW;YAEX,UAAU;gBACR,GAAG;oBACD,IAAI;oBACJ,OAAO;oBACP,KAAK;oBACL,WAAW;;gBAGb,UAAU;oBACR,IAAI;oBACJ,OAAO;oBACP,KAAK;oBACL,WAAW;;;;;YAMf,IAAI;YACJ,KAAK;YACL,WAAW;YAEX,UAAU;gBACR,eAAe;oBACb,IAAI;oBACJ,OAAO;oBACP,KAAK;oBACL,WAAW;;;;;EAOtB"}
|
package/dist/config.js
CHANGED
|
@@ -12,7 +12,7 @@ export function schema(app) {
|
|
|
12
12
|
const fromCenter = app.getSelfPath("sensors.depth.fromCenter.value");
|
|
13
13
|
return {
|
|
14
14
|
type: "object",
|
|
15
|
-
description: "Build a gridded bathymetry tile store from
|
|
15
|
+
description: "Build a gridded bathymetry tile store from vessel soundings — your own and any other depth-equipped vessel on the server — and serve it to a chart client's LiveDepth layer.",
|
|
16
16
|
properties: {
|
|
17
17
|
path: {
|
|
18
18
|
type: "string",
|
|
@@ -54,6 +54,52 @@ export function schema(app) {
|
|
|
54
54
|
enumNames: ["Off", "Replace with the transducer's position"],
|
|
55
55
|
default: "off",
|
|
56
56
|
},
|
|
57
|
+
vessels: {
|
|
58
|
+
type: "object",
|
|
59
|
+
title: "Vessels",
|
|
60
|
+
description: "Which vessel contexts to record. By default every vessel that publishes a depth on the selected datum is recorded — a tender or a second depth-equipped vessel is picked up automatically, while AIS targets (position but no depth) are ignored. Use these lists to narrow that set.",
|
|
61
|
+
properties: {
|
|
62
|
+
include: {
|
|
63
|
+
type: "array",
|
|
64
|
+
title: "Only these vessels",
|
|
65
|
+
description: "Record only these Signal K contexts, e.g. vessels.urn:mrn:signalk:uuid:…. Empty records every vessel that publishes a depth.",
|
|
66
|
+
items: { type: "string" },
|
|
67
|
+
},
|
|
68
|
+
exclude: {
|
|
69
|
+
type: "array",
|
|
70
|
+
title: "Never these vessels",
|
|
71
|
+
description: "Contexts to ignore even when they publish a depth.",
|
|
72
|
+
items: { type: "string" },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
coLocatedDepth: {
|
|
77
|
+
type: "object",
|
|
78
|
+
title: "Ignore a nearby vessel's implausible depth",
|
|
79
|
+
description: "A tender on davits or in a cradle still reports a depth (its transducer is in air, and the number often looks plausible). While another vessel is within this distance of us and its depth differs from ours by more than the tolerance, its soundings are skipped. Our own soundings are never filtered.",
|
|
80
|
+
properties: {
|
|
81
|
+
enabled: {
|
|
82
|
+
type: "boolean",
|
|
83
|
+
default: true,
|
|
84
|
+
title: "Enabled",
|
|
85
|
+
description: "Compare another vessel's depth with ours while it is close to us.",
|
|
86
|
+
},
|
|
87
|
+
radiusM: {
|
|
88
|
+
type: "number",
|
|
89
|
+
default: 15,
|
|
90
|
+
minimum: 0,
|
|
91
|
+
title: "Nearby radius (meters)",
|
|
92
|
+
description: "Only a vessel this close to us is compared. Soundings further away are always kept.",
|
|
93
|
+
},
|
|
94
|
+
depthM: {
|
|
95
|
+
type: "number",
|
|
96
|
+
default: 2,
|
|
97
|
+
minimum: 0,
|
|
98
|
+
title: "Depth difference (meters)",
|
|
99
|
+
description: "A depth this far from ours, while the vessel is nearby, is treated as out of the water and skipped.",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
57
103
|
seed: {
|
|
58
104
|
type: "object",
|
|
59
105
|
title: "Rebuild from History",
|
|
@@ -73,6 +119,19 @@ export function schema(app) {
|
|
|
73
119
|
},
|
|
74
120
|
},
|
|
75
121
|
},
|
|
122
|
+
debug: {
|
|
123
|
+
type: "object",
|
|
124
|
+
title: "Debug",
|
|
125
|
+
description: "Temporary diagnostics, not for general use — they will be removed.",
|
|
126
|
+
properties: {
|
|
127
|
+
vesselFootprint: {
|
|
128
|
+
type: "boolean",
|
|
129
|
+
default: false,
|
|
130
|
+
title: "Draw the vessel footprint",
|
|
131
|
+
description: "Draw the vessel's footprint (design.length.overall × design.beam) on the chart layer, centred on navigation.position and rotated to the heading. Useful for checking where soundings land relative to the hull.",
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
76
135
|
},
|
|
77
136
|
};
|
|
78
137
|
}
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AA4CA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,cAAc;IACd,iBAAiB;IACjB,WAAW;CACH,CAAC;AAEX,MAAM,UAAU,MAAM,CAAC,GAAc;IACnC,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC3C,GAAG,CAAC,WAAW,CAAC,qBAAqB,IAAI,QAAQ,CAAC,CACnD,CAAC;IACF,8EAA8E;IAC9E,6EAA6E;IAC7E,8CAA8C;IAC9C,MAAM,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U,EAAE;oBACV,GAAG,EAAE;wBACH,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,KAAK;wBACd,KAAK,EAAE,+CAA+C;wBACtD,WAAW,EACT,wGAAwG;qBAC3G;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,GAAG;wBACZ,KAAK,EAAE,8BAA8B;wBACrC,WAAW,EACT,kGAAkG;qBACrG;iBACF;aACF;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,OAAO;gBACd,WAAW,EACT,oEAAoE;gBACtE,UAAU,EAAE;oBACV,eAAe,EAAE;wBACf,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,KAAK;wBACd,KAAK,EAAE,2BAA2B;wBAClC,WAAW,EACT,iNAAiN;qBACpN;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/plotterext/manifest.ts"],"names":[],"mappings":"AAIA,0EAA0E;AAC1E,eAAO,MAAM,SAAS,6BAA6B,CAAC;AACpD,iFAAiF;AACjF,eAAO,MAAM,UAAU,yCAA6B,CAAC;AAErD,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAeD;;;;uEAIuE;AACvE,wBAAgB,aAAa,CAAC,OAAO,SAAkB,GAAG,kBAAkB,
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/plotterext/manifest.ts"],"names":[],"mappings":"AAIA,0EAA0E;AAC1E,eAAO,MAAM,SAAS,6BAA6B,CAAC;AACpD,iFAAiF;AACjF,eAAO,MAAM,UAAU,yCAA6B,CAAC;AAErD,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAeD;;;;uEAIuE;AACvE,wBAAgB,aAAa,CAAC,OAAO,SAAkB,GAAG,kBAAkB,CAuD3E"}
|
|
@@ -68,9 +68,10 @@ export function buildManifest(version = pluginVersion()) {
|
|
|
68
68
|
// layer's settings sit with the layer, not only behind the toolbar
|
|
69
69
|
// button.
|
|
70
70
|
configPanel: "livedepth-settings",
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
|
|
71
|
+
// No `preferredPixelRatio`: the host then uses the display's own device
|
|
72
|
+
// pixel ratio, which is native and sharp. Asking for 2 oversampled on a
|
|
73
|
+
// 1×/1.33× display, and that cost is paid per frame in the transfer and
|
|
74
|
+
// composite — the render-quality setting scales further if needed.
|
|
74
75
|
},
|
|
75
76
|
],
|
|
76
77
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/plotterext/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IA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wEAAwE;gBACxE,wEAAwE;gBACxE,wEAAwE;gBACxE,mEAAmE;aACpE;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ServerAPI, Plugin } from "@signalk/server-api";
|
|
2
|
+
import { TransducerOffset } from "./tiles/core/index.js";
|
|
3
|
+
import { Config } from "./config.js";
|
|
2
4
|
/** The vessel's length overall, for locating the reference point the server
|
|
3
5
|
* reports (the CCRP is midships).
|
|
4
6
|
*
|
|
@@ -8,5 +10,18 @@ import { ServerAPI, Plugin } from "@signalk/server-api";
|
|
|
8
10
|
* take `.value.overall` (matching how the server's own GNSS corrector reads it).
|
|
9
11
|
* Handles `getSelfPath` returning either the value or its node. */
|
|
10
12
|
export declare function readLengthOverall(app: ServerAPI): number | undefined;
|
|
13
|
+
/** The vessel's beam, for the debug footprint overlay. `design.beam` is a leaf
|
|
14
|
+
* on most servers but read defensively in case it is a value node. */
|
|
15
|
+
export declare function readVesselBeam(app: ServerAPI): number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The body-frame offset from the reference point the server reports to the
|
|
18
|
+
* transducer, or undefined when correction is off (or can't be located).
|
|
19
|
+
*
|
|
20
|
+
* The server corrects `navigation.position` to the CCRP (midships on the
|
|
21
|
+
* centreline) only when its own `gnssCorrection` is on. When it is off the
|
|
22
|
+
* position is the GNSS antenna, whose body position we do not know — so the
|
|
23
|
+
* offset is meaningless. We still apply what the user configured, but flag it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveTransducerOffset(app: ServerAPI, config: Config): TransducerOffset | undefined;
|
|
11
26
|
export default function createPlugin(app: ServerAPI): Plugin;
|
|
12
27
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAgB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAgB,MAAM,qBAAqB,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAa,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAU,MAAM,EAAE,MAAM,aAAa,CAAC;AAa7C;;;;;;;mEAOmE;AACnE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAWpE;AAED;sEACsE;AACtE,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAOjE;AAQD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,MAAM,GACb,gBAAgB,GAAG,SAAS,CA2B9B;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CA4H3D"}
|
package/dist/plugin.js
CHANGED
|
@@ -24,6 +24,15 @@ export function readLengthOverall(app) {
|
|
|
24
24
|
? overall
|
|
25
25
|
: undefined;
|
|
26
26
|
}
|
|
27
|
+
/** The vessel's beam, for the debug footprint overlay. `design.beam` is a leaf
|
|
28
|
+
* on most servers but read defensively in case it is a value node. */
|
|
29
|
+
export function readVesselBeam(app) {
|
|
30
|
+
const node = app.getSelfPath("design.beam");
|
|
31
|
+
const value = typeof node === "number" ? node : node?.value;
|
|
32
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0
|
|
33
|
+
? value
|
|
34
|
+
: undefined;
|
|
35
|
+
}
|
|
27
36
|
/** The server's GNSS antenna correction mode; `off` unless configured. */
|
|
28
37
|
function readGnssCorrection(app) {
|
|
29
38
|
// @ts-expect-error: app.config is not a public API
|
|
@@ -38,7 +47,7 @@ function readGnssCorrection(app) {
|
|
|
38
47
|
* position is the GNSS antenna, whose body position we do not know — so the
|
|
39
48
|
* offset is meaningless. We still apply what the user configured, but flag it.
|
|
40
49
|
*/
|
|
41
|
-
function resolveTransducerOffset(app, config) {
|
|
50
|
+
export function resolveTransducerOffset(app, config) {
|
|
42
51
|
if (config.transducerCorrection !== "replace") {
|
|
43
52
|
return undefined;
|
|
44
53
|
}
|
|
@@ -56,7 +65,9 @@ function resolveTransducerOffset(app, config) {
|
|
|
56
65
|
return undefined;
|
|
57
66
|
}
|
|
58
67
|
return {
|
|
59
|
-
|
|
68
|
+
// `sounder.y` is the distance from the bow, so a transducer forward of
|
|
69
|
+
// midships sits at a smaller `y` and is a positive shift toward the bow.
|
|
70
|
+
forward: length / 2 - (config.sounder?.y ?? 0),
|
|
60
71
|
starboard: config.sounder?.x ?? 0,
|
|
61
72
|
};
|
|
62
73
|
}
|
|
@@ -104,7 +115,7 @@ export default function createPlugin(app) {
|
|
|
104
115
|
return {
|
|
105
116
|
id: "signalk-livedepth-plugin",
|
|
106
117
|
name: "LiveDepth",
|
|
107
|
-
description: "Serve a gridded bathymetry tile store built from
|
|
118
|
+
description: "Serve a gridded bathymetry tile store built from vessel soundings — your own and any other depth-equipped vessel on the server — for a chart plotter's LiveDepth layer.",
|
|
108
119
|
async start(startConfig, restart) {
|
|
109
120
|
config = startConfig;
|
|
110
121
|
app.debug("Starting signalk-livedepth-plugin");
|
|
@@ -127,6 +138,13 @@ export default function createPlugin(app) {
|
|
|
127
138
|
registerBathymetryRoutes(app, () => tileStore, () => ({
|
|
128
139
|
depthPath: config ? `environment.depth.${config.path}` : undefined,
|
|
129
140
|
transducer,
|
|
141
|
+
vessel: {
|
|
142
|
+
loa: readLengthOverall(app),
|
|
143
|
+
beam: readVesselBeam(app),
|
|
144
|
+
},
|
|
145
|
+
debug: {
|
|
146
|
+
vesselFootprint: config?.debug?.vesselFootprint === true,
|
|
147
|
+
},
|
|
130
148
|
}));
|
|
131
149
|
routesRegistered = true;
|
|
132
150
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,CAAC,qBAAqB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS;oBAClE,UAAU;oBACV,MAAM,EAAE;wBACN,GAAG,EAAE,iBAAiB,CAAC,GAAG,CAAC;wBAC3B,IAAI,EAAE,cAAc,CAAC,GAAG,CAAC;qBAC1B;oBACD,KAAK,EAAE;wBACL,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,KAAK,IAAI;qBACzD;iBACF,CAAC,CACH,CAAC;gBACF,gBAAgB,GAAG,IAAI,CAAC;YAC1B,CAAC;YAED,IAAI,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC;gBAC1B,wEAAwE;gBACxE,wEAAwE;gBACxE,0CAA0C;gBAC1C,KAAK,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAClD,OAAO,CAAC;oBACN,GAAG,WAAW;oBACd,IAAI,EAAE,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE;iBAC1C,CAAC,CACH,CAAC;YACJ,CAAC;QACH,CAAC;QAED,IAAI;YACF,OAAO,GAAG,KAAK,CAAC;YAChB,eAAe,EAAE,KAAK,CAAC,mCAAmC,CAAC,CAAC;YAC5D,SAAS,EAAE,KAAK,EAAE,CAAC;YACnB,SAAS,GAAG,SAAS,CAAC;QACxB,CAAC;QAED,MAAM;YACJ,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;QAED,kBAAkB,CAAC,MAAoB;YACrC,0EAA0E;YAC1E,0EAA0E;YAC1E,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/streams/live.d.ts
CHANGED
|
@@ -3,9 +3,21 @@ import { PassThrough } from "stream";
|
|
|
3
3
|
import { TransducerOffset } from "../tiles/core/index.js";
|
|
4
4
|
import { Config } from "../config.js";
|
|
5
5
|
/**
|
|
6
|
-
* Subscribe to
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Subscribe to every vessel that publishes a depth on the configured datum,
|
|
7
|
+
* pair each sounding with that vessel's own position fix, and emit
|
|
8
|
+
* `BathymetryData`. Vessels are discovered from the data model: one that
|
|
9
|
+
* publishes a depth is recorded, an AIS target (position but no depth) is not,
|
|
10
|
+
* so a tender or a second sounder-equipped vessel is picked up automatically.
|
|
11
|
+
*
|
|
12
|
+
* The vessel's position and heading are subscribed alongside the depth, so a
|
|
13
|
+
* sounding is paired with the fix it was recorded at — including a replayed
|
|
14
|
+
* (back-dated) sounding from a vessel that was offline, which the data model's
|
|
15
|
+
* current position would place wrongly. The model is the fallback before the
|
|
16
|
+
* stream has carried a fix. A vessel with no compass has only course over
|
|
17
|
+
* ground, so that is the heading fallback.
|
|
18
|
+
*
|
|
19
|
+
* The transducer `offset` describes this vessel's hull, so it is applied only
|
|
20
|
+
* to this vessel's own soundings.
|
|
9
21
|
*/
|
|
10
22
|
export declare function createLiveStream(app: ServerAPI, config: Config, offset?: TransducerOffset): PassThrough;
|
|
11
23
|
//# sourceMappingURL=live.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../src/streams/live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAuB,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../src/streams/live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAuB,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AA8CtC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,SAAS,EACd,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,gBAAgB,eAiN1B"}
|