signalk-tides 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/sources/noaa.js +4 -3
- package/.vscode/settings.json +0 -4
- package/extremes.json +0 -1
- package/heights.json +0 -1
- package/test/responses/stations.json +0 -114
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signalk-tides",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Tidal predictions for the vessel's position from various online sources.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
|
-
"url": "https://github.com/bkeepers/signalk-tides"
|
|
32
|
+
"url": "git+https://github.com/bkeepers/signalk-tides.git"
|
|
33
33
|
},
|
|
34
34
|
"signalk-plugin-enabled-by-default": true
|
|
35
35
|
}
|
package/src/sources/noaa.js
CHANGED
|
@@ -76,7 +76,7 @@ class NoaaProvider {
|
|
|
76
76
|
begin_date: moment(date).format("YYYYMMDD"),
|
|
77
77
|
end_date: moment(date).add(7, "days").format("YYYYMMDD"),
|
|
78
78
|
datum,
|
|
79
|
-
station: station.
|
|
79
|
+
station: station.id,
|
|
80
80
|
time_zone: "gmt",
|
|
81
81
|
units: "metric",
|
|
82
82
|
interval: "hilo",
|
|
@@ -96,7 +96,7 @@ class NoaaProvider {
|
|
|
96
96
|
|
|
97
97
|
let tides = {
|
|
98
98
|
name: station.name,
|
|
99
|
-
id: station.
|
|
99
|
+
id: station.id,
|
|
100
100
|
position: {
|
|
101
101
|
latitude: station.lat,
|
|
102
102
|
longitude: station.lng,
|
|
@@ -112,7 +112,8 @@ class NoaaProvider {
|
|
|
112
112
|
|
|
113
113
|
return tides;
|
|
114
114
|
} catch (err) {
|
|
115
|
-
|
|
115
|
+
this.app.setPluginError("Failed to fetch NOAA tides: " + err.message);
|
|
116
|
+
this.app.error(err);
|
|
116
117
|
res.status(404).send("error");
|
|
117
118
|
}
|
|
118
119
|
}
|
package/.vscode/settings.json
DELETED
package/extremes.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"status":200,"callCount":1,"copyright":"Tidal data retrieved from www.worldtides.info. Copyright (c) 2014-2021 Brainware LLC. Licensed for use of individual spatial coordinates on behalf of\/by an end-user. Copyright (c) Oregon State University. Licensed for individual spatial coordinates via ModEM-Geophysics Inc. NO GUARANTEES ARE MADE ABOUT THE CORRECTNESS OF THIS DATA. You may not use it if anyone or anything could come to harm as a result of using it (e.g. for navigational purposes).","requestLat":22.17295,"requestLon":-75.712486,"responseLat":22.1667,"responseLon":-75.6667,"atlas":"TPXO","extremes":[{"dt":1742201772,"date":"2025-03-17T08:56+0000","height":-0.229,"type":"Low"},{"dt":1742222471,"date":"2025-03-17T14:41+0000","height":0.186,"type":"High"},{"dt":1742244212,"date":"2025-03-17T20:43+0000","height":-0.3,"type":"Low"},{"dt":1742267982,"date":"2025-03-18T03:19+0000","height":0.319,"type":"High"},{"dt":1742290690,"date":"2025-03-18T09:38+0000","height":-0.206,"type":"Low"},{"dt":1742310779,"date":"2025-03-18T15:12+0000","height":0.14,"type":"High"},{"dt":1742332513,"date":"2025-03-18T21:15+0000","height":-0.3,"type":"Low"},{"dt":1742356824,"date":"2025-03-19T04:00+0000","height":0.306,"type":"High"}]}
|
package/heights.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"status":200,"callCount":1,"copyright":"Tidal data retrieved from www.worldtides.info. Copyright (c) 2014-2021 Brainware LLC. Licensed for use of individual spatial coordinates on behalf of\/by an end-user. Copyright (c) Oregon State University. Licensed for individual spatial coordinates via ModEM-Geophysics Inc. NO GUARANTEES ARE MADE ABOUT THE CORRECTNESS OF THIS DATA. You may not use it if anyone or anything could come to harm as a result of using it (e.g. for navigational purposes).","requestLat":22.17295,"requestLon":-75.712486,"responseLat":22.1667,"responseLon":-75.6667,"atlas":"TPXO","heights":[{"dt":1742193000,"date":"2025-03-17T06:30+0000","height":-0.049},{"dt":1742194800,"date":"2025-03-17T07:00+0000","height":-0.111},{"dt":1742196600,"date":"2025-03-17T07:30+0000","height":-0.162},{"dt":1742198400,"date":"2025-03-17T08:00+0000","height":-0.2},{"dt":1742200200,"date":"2025-03-17T08:30+0000","height":-0.223},{"dt":1742202000,"date":"2025-03-17T09:00+0000","height":-0.229},{"dt":1742203800,"date":"2025-03-17T09:30+0000","height":-0.219},{"dt":1742205600,"date":"2025-03-17T10:00+0000","height":-0.194},{"dt":1742207400,"date":"2025-03-17T10:30+0000","height":-0.156},{"dt":1742209200,"date":"2025-03-17T11:00+0000","height":-0.108},{"dt":1742211000,"date":"2025-03-17T11:30+0000","height":-0.054},{"dt":1742212800,"date":"2025-03-17T12:00+0000","height":0.002},{"dt":1742214600,"date":"2025-03-17T12:30+0000","height":0.056},{"dt":1742216400,"date":"2025-03-17T13:00+0000","height":0.105},{"dt":1742218200,"date":"2025-03-17T13:30+0000","height":0.144},{"dt":1742220000,"date":"2025-03-17T14:00+0000","height":0.172},{"dt":1742221800,"date":"2025-03-17T14:30+0000","height":0.185},{"dt":1742223600,"date":"2025-03-17T15:00+0000","height":0.183},{"dt":1742225400,"date":"2025-03-17T15:30+0000","height":0.166},{"dt":1742227200,"date":"2025-03-17T16:00+0000","height":0.134},{"dt":1742229000,"date":"2025-03-17T16:30+0000","height":0.089},{"dt":1742230800,"date":"2025-03-17T17:00+0000","height":0.035},{"dt":1742232600,"date":"2025-03-17T17:30+0000","height":-0.026},{"dt":1742234400,"date":"2025-03-17T18:00+0000","height":-0.089},{"dt":1742236200,"date":"2025-03-17T18:30+0000","height":-0.151},{"dt":1742238000,"date":"2025-03-17T19:00+0000","height":-0.206},{"dt":1742239800,"date":"2025-03-17T19:30+0000","height":-0.251},{"dt":1742241600,"date":"2025-03-17T20:00+0000","height":-0.282},{"dt":1742243400,"date":"2025-03-17T20:30+0000","height":-0.299},{"dt":1742245200,"date":"2025-03-17T21:00+0000","height":-0.298},{"dt":1742247000,"date":"2025-03-17T21:30+0000","height":-0.28},{"dt":1742248800,"date":"2025-03-17T22:00+0000","height":-0.245},{"dt":1742250600,"date":"2025-03-17T22:30+0000","height":-0.196},{"dt":1742252400,"date":"2025-03-17T23:00+0000","height":-0.136},{"dt":1742254200,"date":"2025-03-17T23:30+0000","height":-0.067},{"dt":1742256000,"date":"2025-03-18T00:00+0000","height":0.006},{"dt":1742257800,"date":"2025-03-18T00:30+0000","height":0.08},{"dt":1742259600,"date":"2025-03-18T01:00+0000","height":0.149},{"dt":1742261400,"date":"2025-03-18T01:30+0000","height":0.21},{"dt":1742263200,"date":"2025-03-18T02:00+0000","height":0.26},{"dt":1742265000,"date":"2025-03-18T02:30+0000","height":0.295},{"dt":1742266800,"date":"2025-03-18T03:00+0000","height":0.315},{"dt":1742268600,"date":"2025-03-18T03:30+0000","height":0.318},{"dt":1742270400,"date":"2025-03-18T04:00+0000","height":0.304},{"dt":1742272200,"date":"2025-03-18T04:30+0000","height":0.274},{"dt":1742274000,"date":"2025-03-18T05:00+0000","height":0.23},{"dt":1742275800,"date":"2025-03-18T05:30+0000","height":0.175},{"dt":1742277600,"date":"2025-03-18T06:00+0000","height":0.113},{"dt":1742279400,"date":"2025-03-18T06:30+0000","height":0.048},{"dt":1742281200,"date":"2025-03-18T07:00+0000","height":-0.017},{"dt":1742283000,"date":"2025-03-18T07:30+0000","height":-0.076},{"dt":1742284800,"date":"2025-03-18T08:00+0000","height":-0.128},{"dt":1742286600,"date":"2025-03-18T08:30+0000","height":-0.167},{"dt":1742288400,"date":"2025-03-18T09:00+0000","height":-0.194},{"dt":1742290200,"date":"2025-03-18T09:30+0000","height":-0.205},{"dt":1742292000,"date":"2025-03-18T10:00+0000","height":-0.202},{"dt":1742293800,"date":"2025-03-18T10:30+0000","height":-0.185},{"dt":1742295600,"date":"2025-03-18T11:00+0000","height":-0.155},{"dt":1742297400,"date":"2025-03-18T11:30+0000","height":-0.116},{"dt":1742299200,"date":"2025-03-18T12:00+0000","height":-0.071},{"dt":1742301000,"date":"2025-03-18T12:30+0000","height":-0.023},{"dt":1742302800,"date":"2025-03-18T13:00+0000","height":0.024},{"dt":1742304600,"date":"2025-03-18T13:30+0000","height":0.066},{"dt":1742306400,"date":"2025-03-18T14:00+0000","height":0.101},{"dt":1742308200,"date":"2025-03-18T14:30+0000","height":0.126},{"dt":1742310000,"date":"2025-03-18T15:00+0000","height":0.138},{"dt":1742311800,"date":"2025-03-18T15:30+0000","height":0.138},{"dt":1742313600,"date":"2025-03-18T16:00+0000","height":0.123},{"dt":1742315400,"date":"2025-03-18T16:30+0000","height":0.095},{"dt":1742317200,"date":"2025-03-18T17:00+0000","height":0.056},{"dt":1742319000,"date":"2025-03-18T17:30+0000","height":0.007},{"dt":1742320800,"date":"2025-03-18T18:00+0000","height":-0.047},{"dt":1742322600,"date":"2025-03-18T18:30+0000","height":-0.104},{"dt":1742324400,"date":"2025-03-18T19:00+0000","height":-0.16},{"dt":1742326200,"date":"2025-03-18T19:30+0000","height":-0.21},{"dt":1742328000,"date":"2025-03-18T20:00+0000","height":-0.252},{"dt":1742329800,"date":"2025-03-18T20:30+0000","height":-0.282},{"dt":1742331600,"date":"2025-03-18T21:00+0000","height":-0.298},{"dt":1742333400,"date":"2025-03-18T21:30+0000","height":-0.298},{"dt":1742335200,"date":"2025-03-18T22:00+0000","height":-0.282},{"dt":1742337000,"date":"2025-03-18T22:30+0000","height":-0.25},{"dt":1742338800,"date":"2025-03-18T23:00+0000","height":-0.205},{"dt":1742340600,"date":"2025-03-18T23:30+0000","height":-0.149},{"dt":1742342400,"date":"2025-03-19T00:00+0000","height":-0.084},{"dt":1742344200,"date":"2025-03-19T00:30+0000","height":-0.014},{"dt":1742346000,"date":"2025-03-19T01:00+0000","height":0.057},{"dt":1742347800,"date":"2025-03-19T01:30+0000","height":0.124},{"dt":1742349600,"date":"2025-03-19T02:00+0000","height":0.185},{"dt":1742351400,"date":"2025-03-19T02:30+0000","height":0.236},{"dt":1742353200,"date":"2025-03-19T03:00+0000","height":0.274},{"dt":1742355000,"date":"2025-03-19T03:30+0000","height":0.298},{"dt":1742356800,"date":"2025-03-19T04:00+0000","height":0.306},{"dt":1742358600,"date":"2025-03-19T04:30+0000","height":0.298},{"dt":1742360400,"date":"2025-03-19T05:00+0000","height":0.276},{"dt":1742362200,"date":"2025-03-19T05:30+0000","height":0.24},{"dt":1742364000,"date":"2025-03-19T06:00+0000","height":0.192},{"dt":1742365800,"date":"2025-03-19T06:30+0000","height":0.137}]}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"status": 200,
|
|
3
|
-
"callCount": 1,
|
|
4
|
-
"requestLat": 22.17295,
|
|
5
|
-
"requestLon": -75.712486,
|
|
6
|
-
"stationDistance": 400,
|
|
7
|
-
"stations": [
|
|
8
|
-
{
|
|
9
|
-
"id": "FES:2543",
|
|
10
|
-
"name": "Long Island",
|
|
11
|
-
"lat": "23.0000",
|
|
12
|
-
"lon": "-74.9500",
|
|
13
|
-
"timezone": "America\/Nassau"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"id": "FES:2519",
|
|
17
|
-
"name": "Puerto Gibara",
|
|
18
|
-
"lat": "21.1167",
|
|
19
|
-
"lon": "-76.1333",
|
|
20
|
-
"timezone": "America\/Havana"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"id": "FES:2536",
|
|
24
|
-
"name": "Datum Bay",
|
|
25
|
-
"lat": "22.1667",
|
|
26
|
-
"lon": "-74.3000",
|
|
27
|
-
"timezone": "America\/Nassau"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"id": "FES:2545a",
|
|
31
|
-
"name": "Steventon",
|
|
32
|
-
"lat": "23.6667",
|
|
33
|
-
"lon": "-75.9667",
|
|
34
|
-
"timezone": "America\/Nassau"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"id": "FES:2524",
|
|
38
|
-
"name": "Baracoa",
|
|
39
|
-
"lat": "20.3500",
|
|
40
|
-
"lon": "-74.5000",
|
|
41
|
-
"timezone": "America\/Havana"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"id": "FES:2531",
|
|
45
|
-
"name": "Matthew Town",
|
|
46
|
-
"lat": "20.9500",
|
|
47
|
-
"lon": "-73.6833",
|
|
48
|
-
"timezone": "America\/Nassau"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"id": "FES:2500",
|
|
52
|
-
"name": "Guantanamo Bay",
|
|
53
|
-
"lat": "19.9000",
|
|
54
|
-
"lon": "-75.1667",
|
|
55
|
-
"timezone": "America\/New_York"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"id": "FES:2534",
|
|
59
|
-
"name": "Start Point",
|
|
60
|
-
"lat": "22.3333",
|
|
61
|
-
"lon": "-73.0500",
|
|
62
|
-
"timezone": "America\/Nassau"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"id": "FES:2549a",
|
|
66
|
-
"name": "Bannerman Town",
|
|
67
|
-
"lat": "24.6333",
|
|
68
|
-
"lon": "-76.1833",
|
|
69
|
-
"timezone": "America\/Nassau"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"id": "FES:2532",
|
|
73
|
-
"name": "Little Inagua",
|
|
74
|
-
"lat": "21.4500",
|
|
75
|
-
"lon": "-73.0167",
|
|
76
|
-
"timezone": "America\/Nassau"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"id": "FES:2550",
|
|
80
|
-
"name": "Eleuthera Island",
|
|
81
|
-
"lat": "24.9333",
|
|
82
|
-
"lon": "-76.1500",
|
|
83
|
-
"timezone": "America\/Nassau"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"id": "FES:2554",
|
|
87
|
-
"name": "Fresh Creek",
|
|
88
|
-
"lat": "24.7000",
|
|
89
|
-
"lon": "-77.7667",
|
|
90
|
-
"timezone": "America\/Nassau"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"id": "FES:2553",
|
|
94
|
-
"name": "Nassau",
|
|
95
|
-
"lat": "25.0833",
|
|
96
|
-
"lon": "-77.3500",
|
|
97
|
-
"timezone": "America\/Nassau"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"id": "FES:2530",
|
|
101
|
-
"name": "Sandy Point",
|
|
102
|
-
"lat": "21.9333",
|
|
103
|
-
"lon": "-72.0500",
|
|
104
|
-
"timezone": "America\/Grand_Turk"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"id": "FES:2554a",
|
|
108
|
-
"name": "Mastic Point",
|
|
109
|
-
"lat": "25.0500",
|
|
110
|
-
"lon": "-77.9667",
|
|
111
|
-
"timezone": "America\/Nassau"
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
}
|