@signalk/freeboard-sk 2.15.0 → 2.16.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/package.json +1 -2
  3. package/plugin/alarms/alarms.js +1 -1
  4. package/plugin/index.js +244 -0
  5. package/plugin/weather/openweather.js +3 -1
  6. package/plugin/weather/weather-service.js +81 -303
  7. package/public/assets/help/img/autopilot.png +0 -0
  8. package/public/assets/help/index.html +85 -115
  9. package/public/assets/img/waypoints/start-boat.svg +18 -8
  10. package/public/assets/img/waypoints/start-pin.svg +4 -4
  11. package/public/index.html +7 -16
  12. package/public/main.bd41317e2682e2bc.js +1 -0
  13. package/public/manifest.json +0 -35
  14. package/public/assets/help/img/ais_popover.png +0 -0
  15. package/public/assets/help/img/build_route.png +0 -0
  16. package/public/assets/help/img/chart_list.png +0 -0
  17. package/public/assets/help/img/context_menu.png +0 -0
  18. package/public/assets/help/img/course_data.png +0 -0
  19. package/public/assets/help/img/draw_menu.png +0 -0
  20. package/public/assets/help/img/gpx_load.png +0 -0
  21. package/public/assets/help/img/gpx_save.png +0 -0
  22. package/public/assets/help/img/note_list.png +0 -0
  23. package/public/assets/help/img/route_list.png +0 -0
  24. package/public/assets/help/img/route_points_active.png +0 -0
  25. package/public/assets/help/img/route_popover.png +0 -0
  26. package/public/assets/help/img/settings_charts.png +0 -0
  27. package/public/assets/help/img/settings_course.png +0 -0
  28. package/public/assets/help/img/settings_display.png +0 -0
  29. package/public/assets/help/img/settings_map.png +0 -0
  30. package/public/assets/help/img/settings_other_vessels.png +0 -0
  31. package/public/assets/help/img/settings_resources_notes.png +0 -0
  32. package/public/assets/help/img/settings_units.png +0 -0
  33. package/public/assets/help/img/settings_vessels_1.png +0 -0
  34. package/public/assets/help/img/settings_vessels_2.png +0 -0
  35. package/public/assets/help/img/vessel_popover.png +0 -0
  36. package/public/assets/help/img/waypoint_list.png +0 -0
  37. package/public/assets/help/img/wpt_popover.png +0 -0
  38. package/public/assets/icons/android-icon-36x36.png +0 -0
  39. package/public/assets/icons/android-icon-48x48.png +0 -0
  40. package/public/assets/icons/android-icon-72x72.png +0 -0
  41. package/public/assets/icons/apple-icon-114x114.png +0 -0
  42. package/public/assets/icons/apple-icon-57x57.png +0 -0
  43. package/public/assets/icons/apple-icon-60x60.png +0 -0
  44. package/public/assets/icons/apple-icon-76x76.png +0 -0
  45. package/public/assets/icons/apple-icon-precomposed.png +0 -0
  46. package/public/assets/icons/apple-icon.png +0 -0
  47. package/public/assets/icons/favicon-16x16.png +0 -0
  48. package/public/assets/icons/favicon-32x32.png +0 -0
  49. package/public/assets/icons/favicon-96x96.png +0 -0
  50. package/public/assets/icons/help-icon-150x150.png +0 -0
  51. package/public/assets/icons/icon-128x128.png +0 -0
  52. package/public/assets/icons/icon-144x144.png +0 -0
  53. package/public/assets/icons/icon-152x152.png +0 -0
  54. package/public/assets/icons/icon-384x384.png +0 -0
  55. package/public/assets/icons/icon-512x512.png +0 -0
  56. package/public/assets/icons/icon-96x96.png +0 -0
  57. package/public/assets/icons/ms-icon-70x70.png +0 -0
  58. package/public/assets/img/startup_ip5.png +0 -0
  59. package/public/assets/img/startup_ls_1496x2048.png +0 -0
  60. package/public/assets/img/startup_pt_1536x2008.png +0 -0
  61. package/public/main.b8fc66dbdf2d2371.js +0 -1
  62. /package/public/assets/{img → icons}/startup.png +0 -0
  63. /package/public/assets/{img → icons}/startup_ls.png +0 -0
  64. /package/public/assets/{img → icons}/startup_small.png +0 -0
  65. /package/public/assets/img/{ship_red.png → vessels/self.png} +0 -0
  66. /package/public/assets/img/{ship_blur.png → vessels/self_blur.png} +0 -0
  67. /package/public/assets/img/{fixed_location.png → vessels/self_fixed.png} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,9 +1,25 @@
1
1
  # CHANGELOG: Freeboard
2
2
 
3
+
4
+ ### v2.16.0
5
+
6
+ - **New**: Resource Groups: Add Routes and Waypoints to groups. Use groups to easily switch on / off resources to display on the map.
7
+ - **New**: Added options to change the size of the vessel icon on the map. (#270)
8
+ - **Updated**: Start-boat & start-pin waypoint icons
9
+ - **Updated**: Always send metas for "weather service " `environment` paths at start-up (previously was just when weather service is enabled).
10
+ - **Updated**: Weather service polling logic improved.
11
+
12
+
13
+ ### v2.15.1
14
+
15
+ - **Updated**: Waypoint icon size alignment
16
+ - **Removed**: Unused packages.
17
+
18
+
3
19
  ### v2.15.0
4
20
 
5
21
  - **New**: Night mode which is auto-set using the value of `environment.mode`. _Note: Enable this in settings by checking **Auto-set Night Mode**._ (#239)
6
- - **Updated**: Waypoint icons and types.
22
+ - **Updated**: Waypoint icons and types. (#275)
7
23
  - **Fixed**: Temperature unit typo.
8
24
 
9
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalk/freeboard-sk",
3
- "version": "2.15.0",
3
+ "version": "2.16.0",
4
4
  "description": "Openlayers chart plotter implementation for Signal K",
5
5
  "keywords": [
6
6
  "signalk-webapp",
@@ -40,7 +40,6 @@
40
40
  "license": "Apache-v2",
41
41
  "dependencies": {
42
42
  "@signalk/server-api": "^2.3.0",
43
- "socket.io-client": "^4.6.0",
44
43
  "tslib": "^2.0.0",
45
44
  "uuid": "^11.1.0"
46
45
  },
@@ -77,7 +77,7 @@ const initAlarmEndpoints = () => {
77
77
  server.debug('Alarm value....');
78
78
  if (al.value.method && al.value.method.includes('sound')) {
79
79
  server.debug('Alarm has sound... silence!!!');
80
- al.value.method = al.value.method.filter(i => i !== 'sound');
80
+ al.value.method = al.value.method.filter((i) => i !== 'sound');
81
81
  const r = handleAlarm('vessels.self', `notifications.${req.params.alarmType}.${req.params.id}`, al.value);
82
82
  res.status(r.statusCode).json(r);
83
83
  }
package/plugin/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const server_api_1 = require("@signalk/server-api");
3
4
  const alarms_1 = require("./alarms/alarms");
4
5
  const weather_service_1 = require("./weather/weather-service");
5
6
  const openapi = require("./openApi.json");
@@ -101,6 +102,11 @@ module.exports = (server) => {
101
102
  if (typeof options !== 'undefined') {
102
103
  settings = options;
103
104
  }
105
+ /**
106
+ * emit metas for environment paths
107
+ * @todo remove after merge of https://github.com/SignalK/specification/pull/662
108
+ */
109
+ emitMeteoMetas();
104
110
  settings.weather = options.weather ?? {
105
111
  enable: false,
106
112
  apiVersion: 3,
@@ -151,5 +157,243 @@ module.exports = (server) => {
151
157
  });
152
158
  });
153
159
  };
160
+ // ensure meteo path metas are emitted
161
+ const emitMeteoMetas = () => {
162
+ const pathRoot = 'environment';
163
+ const metas = [];
164
+ server.debug('**** Building METEO metas *****');
165
+ metas.push({
166
+ path: `${pathRoot}.date`,
167
+ value: {
168
+ description: 'Time of measurement.'
169
+ }
170
+ });
171
+ metas.push({
172
+ path: `${pathRoot}.sun.sunrise`,
173
+ value: {
174
+ description: 'Time of sunrise at the related position.'
175
+ }
176
+ });
177
+ metas.push({
178
+ path: `${pathRoot}.sun.sunset`,
179
+ value: {
180
+ description: 'Time of sunset at the related position.'
181
+ }
182
+ });
183
+ metas.push({
184
+ path: `${pathRoot}.outside.uvIndex`,
185
+ value: {
186
+ description: 'Level of UV radiation. 1 UVI = 25mW/sqm',
187
+ units: 'UVI'
188
+ }
189
+ });
190
+ metas.push({
191
+ path: `${pathRoot}.outside.cloudCover`,
192
+ value: {
193
+ description: 'Cloud clover.',
194
+ units: 'ratio'
195
+ }
196
+ });
197
+ metas.push({
198
+ path: `${pathRoot}.outside.temperature`,
199
+ value: {
200
+ description: 'Outside air temperature.',
201
+ units: 'K'
202
+ }
203
+ });
204
+ metas.push({
205
+ path: `${pathRoot}.outside.dewPointTemperature`,
206
+ value: {
207
+ description: 'Dew point.',
208
+ units: 'K'
209
+ }
210
+ });
211
+ metas.push({
212
+ path: `${pathRoot}.outside.feelsLikeTemperature`,
213
+ value: {
214
+ description: 'Feels like temperature.',
215
+ units: 'K'
216
+ }
217
+ });
218
+ metas.push({
219
+ path: `${pathRoot}.outside.horizontalVisibility`,
220
+ value: {
221
+ description: 'Horizontal visibility.',
222
+ units: 'm'
223
+ }
224
+ });
225
+ metas.push({
226
+ path: `${pathRoot}.outside.horizontalVisibilityOverRange`,
227
+ value: {
228
+ description: 'Visibilty distance is greater than the range of the measuring equipment.'
229
+ }
230
+ });
231
+ metas.push({
232
+ path: `${pathRoot}.outside.pressure`,
233
+ value: {
234
+ description: 'Barometric pressure.',
235
+ units: 'Pa'
236
+ }
237
+ });
238
+ metas.push({
239
+ path: `${pathRoot}.outside.pressureTendency`,
240
+ value: {
241
+ description: 'Integer value indicating barometric pressure value tendency e.g. 0 = steady, etc.'
242
+ }
243
+ });
244
+ metas.push({
245
+ path: `${pathRoot}.outside.pressureTendencyType`,
246
+ value: {
247
+ description: 'Description for the value of pressureTendency e.g. steady, increasing, decreasing.'
248
+ }
249
+ });
250
+ metas.push({
251
+ path: `${pathRoot}.outside.relativeHumidity`,
252
+ value: {
253
+ description: 'Relative humidity.',
254
+ units: 'ratio'
255
+ }
256
+ });
257
+ metas.push({
258
+ path: `${pathRoot}.outside.absoluteHumidity`,
259
+ value: {
260
+ description: 'Absolute humidity.',
261
+ units: 'ratio'
262
+ }
263
+ });
264
+ metas.push({
265
+ path: `${pathRoot}.wind.averageSpeed`,
266
+ value: {
267
+ description: 'Average wind speed.',
268
+ units: 'm/s'
269
+ }
270
+ });
271
+ metas.push({
272
+ path: `${pathRoot}.wind.speedTrue`,
273
+ value: {
274
+ description: 'True wind speed.',
275
+ units: 'm/s'
276
+ }
277
+ });
278
+ metas.push({
279
+ path: `${pathRoot}.wind.directionTrue`,
280
+ value: {
281
+ description: 'The wind direction relative to true north.',
282
+ units: 'rad'
283
+ }
284
+ });
285
+ metas.push({
286
+ path: `${pathRoot}.wind.gust`,
287
+ value: {
288
+ description: 'Maximum wind gust.',
289
+ units: 'm/s'
290
+ }
291
+ });
292
+ metas.push({
293
+ path: `${pathRoot}.wind.gustDirectionTrue`,
294
+ value: {
295
+ description: 'Maximum wind gust direction.',
296
+ units: 'rad'
297
+ }
298
+ });
299
+ metas.push({
300
+ path: `${pathRoot}.wind.gust`,
301
+ value: {
302
+ description: 'Maximum wind gust.',
303
+ units: 'm/s'
304
+ }
305
+ });
306
+ metas.push({
307
+ path: `${pathRoot}.water.level`,
308
+ value: {
309
+ description: 'Water level.',
310
+ units: 'm'
311
+ }
312
+ });
313
+ metas.push({
314
+ path: `${pathRoot}.water.temperature`,
315
+ value: {
316
+ description: 'Water temperature.',
317
+ units: 'K'
318
+ }
319
+ });
320
+ metas.push({
321
+ path: `${pathRoot}.water.levelTendency`,
322
+ value: {
323
+ description: 'Integer value indicating water level tendency e.g. 0 = steady, etc.'
324
+ }
325
+ });
326
+ metas.push({
327
+ path: `${pathRoot}.water.levelTendencyType`,
328
+ value: {
329
+ description: 'Description for the value of levelTendency e.g. steady, increasing, decreasing.'
330
+ }
331
+ });
332
+ metas.push({
333
+ path: `${pathRoot}.water.current.set`,
334
+ value: {
335
+ description: 'Water current direction.',
336
+ units: 'rad'
337
+ }
338
+ });
339
+ metas.push({
340
+ path: `${pathRoot}.water.current.drift`,
341
+ value: {
342
+ description: 'Water current speed.',
343
+ units: 'm/s'
344
+ }
345
+ });
346
+ metas.push({
347
+ path: `${pathRoot}.water.waves.significantHeight`,
348
+ value: {
349
+ description: 'Significant wave height.',
350
+ units: 'm'
351
+ }
352
+ });
353
+ metas.push({
354
+ path: `${pathRoot}.water.waves.period`,
355
+ value: {
356
+ description: 'Wave period.',
357
+ units: 'ms'
358
+ }
359
+ });
360
+ metas.push({
361
+ path: `${pathRoot}.water.waves.direction`,
362
+ value: {
363
+ description: 'Wave direction.',
364
+ units: 'rad'
365
+ }
366
+ });
367
+ metas.push({
368
+ path: `${pathRoot}.water.swell.significantHeight`,
369
+ value: {
370
+ description: 'Significant swell height.',
371
+ units: 'm'
372
+ }
373
+ });
374
+ metas.push({
375
+ path: `${pathRoot}.water.swell.period`,
376
+ value: {
377
+ description: 'Swell period.',
378
+ units: 'ms'
379
+ }
380
+ });
381
+ metas.push({
382
+ path: `${pathRoot}.water.swell.directionTrue`,
383
+ value: {
384
+ description: 'Swell direction.',
385
+ units: 'rad'
386
+ }
387
+ });
388
+ server.debug('**** Sending METEO metas *****');
389
+ server.handleMessage(plugin.id, {
390
+ context: `meteo`,
391
+ updates: [
392
+ {
393
+ meta: metas
394
+ }
395
+ ]
396
+ }, server_api_1.SKVersion.v1);
397
+ };
154
398
  return plugin;
155
399
  };
@@ -127,7 +127,9 @@ class OpenWeather {
127
127
  forecast.outside.cloudCover = f.clouds ? f.clouds / 100 : null;
128
128
  forecast.outside.pressure =
129
129
  typeof f.pressure !== 'undefined' ? f.pressure * 100 : null;
130
- forecast.outside.absoluteHumidity = f.humidity ? (f.humidity / 100) : null;
130
+ forecast.outside.absoluteHumidity = f.humidity
131
+ ? f.humidity / 100
132
+ : null;
131
133
  forecast.wind.speedTrue = f.wind_speed ?? null;
132
134
  forecast.wind.directionTrue =
133
135
  typeof f.wind_deg !== 'undefined'