@azohra/meteo.station 0.3.1 → 0.5.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 (138) hide show
  1. package/dist/client/climatology.d.ts +27 -0
  2. package/dist/client/climatology.js +83 -0
  3. package/dist/client/history.d.ts +47 -0
  4. package/dist/client/history.js +112 -0
  5. package/dist/client/index.d.ts +3 -1
  6. package/dist/client/index.js +3 -1
  7. package/dist/client/live.js +15 -0
  8. package/dist/climatology.d.ts +66 -0
  9. package/dist/climatology.js +230 -0
  10. package/dist/contract-climatology.d.ts +73 -0
  11. package/dist/contract-climatology.js +52 -0
  12. package/dist/contract.d.ts +234 -1
  13. package/dist/contract.js +52 -4
  14. package/dist/derive.d.ts +23 -1
  15. package/dist/derive.js +43 -4
  16. package/dist/display.d.ts +4 -0
  17. package/dist/display.js +2 -1
  18. package/dist/elements/elements/AirExtremesElement.d.ts +8 -0
  19. package/dist/elements/elements/AirExtremesElement.js +33 -0
  20. package/dist/elements/elements/ClimatologyDailyPatternElement.d.ts +15 -0
  21. package/dist/elements/elements/ClimatologyDailyPatternElement.js +84 -0
  22. package/dist/elements/elements/ClimatologyRoseElement.d.ts +14 -0
  23. package/dist/elements/elements/ClimatologyRoseElement.js +51 -0
  24. package/dist/elements/elements/CompassFanElement.d.ts +14 -0
  25. package/dist/elements/elements/CompassFanElement.js +92 -0
  26. package/dist/elements/elements/DailyPatternElement.d.ts +1 -0
  27. package/dist/elements/elements/DailyPatternElement.js +24 -16
  28. package/dist/elements/elements/DialElement.js +14 -3
  29. package/dist/elements/elements/FavorableShareElement.d.ts +14 -0
  30. package/dist/elements/elements/FavorableShareElement.js +47 -0
  31. package/dist/elements/elements/RecentSummariesElement.d.ts +14 -0
  32. package/dist/elements/elements/RecentSummariesElement.js +54 -0
  33. package/dist/elements/elements/StationFeedElement.d.ts +3 -0
  34. package/dist/elements/elements/StationFeedElement.js +13 -2
  35. package/dist/elements/elements/WindHistoryChartElement.js +20 -7
  36. package/dist/elements/elements/WindRoseElement.d.ts +1 -3
  37. package/dist/elements/elements/WindRoseElement.js +60 -62
  38. package/dist/elements/elements/atoms.js +3 -3
  39. package/dist/elements/index.d.ts +13 -1
  40. package/dist/elements/index.js +15 -3
  41. package/dist/elements/lib/ambient.d.ts +2 -0
  42. package/dist/elements/lib/attributes.js +24 -1
  43. package/dist/elements/lib/base.d.ts +3 -0
  44. package/dist/elements/lib/base.js +14 -2
  45. package/dist/endpoints.d.ts +7 -1
  46. package/dist/endpoints.js +13 -1
  47. package/dist/geometry.d.ts +23 -4
  48. package/dist/geometry.js +44 -13
  49. package/dist/index.d.ts +8 -6
  50. package/dist/index.js +8 -6
  51. package/dist/instruments.d.ts +7 -5
  52. package/dist/instruments.js +20 -7
  53. package/dist/merge-current.js +2 -1
  54. package/dist/react/components/AirExtremes.d.ts +16 -0
  55. package/dist/react/components/AirExtremes.js +38 -0
  56. package/dist/react/components/ClimatologyDailyPattern.d.ts +20 -0
  57. package/dist/react/components/ClimatologyDailyPattern.js +59 -0
  58. package/dist/react/components/ClimatologyRose.d.ts +18 -0
  59. package/dist/react/components/ClimatologyRose.js +45 -0
  60. package/dist/react/components/CompassFan.d.ts +17 -0
  61. package/dist/react/components/CompassFan.js +93 -0
  62. package/dist/react/components/DailyPattern.d.ts +4 -1
  63. package/dist/react/components/DailyPattern.js +15 -8
  64. package/dist/react/components/Dial.d.ts +3 -1
  65. package/dist/react/components/Dial.js +13 -2
  66. package/dist/react/components/FavorableShare.d.ts +14 -0
  67. package/dist/react/components/FavorableShare.js +43 -0
  68. package/dist/react/components/RecentSummaries.d.ts +18 -0
  69. package/dist/react/components/RecentSummaries.js +64 -0
  70. package/dist/react/components/StationFeedProvider.d.ts +4 -1
  71. package/dist/react/components/StationFeedProvider.js +5 -3
  72. package/dist/react/components/WindHistoryChart.d.ts +6 -1
  73. package/dist/react/components/WindHistoryChart.js +20 -5
  74. package/dist/react/components/WindRose.d.ts +4 -2
  75. package/dist/react/components/WindRose.js +80 -71
  76. package/dist/react/components/WindSampleStrip.d.ts +3 -1
  77. package/dist/react/components/WindSampleStrip.js +8 -5
  78. package/dist/react/components/atoms.d.ts +4 -1
  79. package/dist/react/components/atoms.js +6 -3
  80. package/dist/react/hooks/useStationClimatology.d.ts +18 -0
  81. package/dist/react/hooks/useStationClimatology.js +25 -0
  82. package/dist/react/index.d.ts +10 -3
  83. package/dist/react/index.js +9 -2
  84. package/dist/scene/air-extremes.d.ts +2 -0
  85. package/dist/scene/air-extremes.js +42 -0
  86. package/dist/scene/atoms.d.ts +2 -1
  87. package/dist/scene/atoms.js +6 -4
  88. package/dist/scene/climatology-pattern.d.ts +6 -0
  89. package/dist/scene/climatology-pattern.js +35 -0
  90. package/dist/scene/climatology-rose.d.ts +5 -0
  91. package/dist/scene/climatology-rose.js +49 -0
  92. package/dist/scene/compass-fan.d.ts +3 -0
  93. package/dist/scene/compass-fan.js +115 -0
  94. package/dist/scene/daily-pattern.d.ts +1 -0
  95. package/dist/scene/daily-pattern.js +21 -7
  96. package/dist/scene/dial.d.ts +1 -0
  97. package/dist/scene/dial.js +16 -3
  98. package/dist/scene/favorable-share.d.ts +3 -0
  99. package/dist/scene/favorable-share.js +41 -0
  100. package/dist/scene/index.d.ts +9 -3
  101. package/dist/scene/recent-summaries.d.ts +4 -0
  102. package/dist/scene/recent-summaries.js +75 -0
  103. package/dist/scene/rose.d.ts +2 -1
  104. package/dist/scene/rose.js +18 -3
  105. package/dist/scene/sample-strip.d.ts +1 -0
  106. package/dist/scene/sample-strip.js +1 -1
  107. package/dist/scene/trend.js +2 -7
  108. package/dist/scene/wind-history.d.ts +1 -0
  109. package/dist/scene/wind-history.js +4 -3
  110. package/dist/scene/wind-plot.d.ts +1 -0
  111. package/dist/scene/wind-plot.js +44 -9
  112. package/dist/server/adapter.d.ts +2 -1
  113. package/dist/server/adapter.js +2 -1
  114. package/dist/server/adapters/windnerd-climatology.d.ts +30 -0
  115. package/dist/server/adapters/windnerd-climatology.js +82 -0
  116. package/dist/server/adapters/windnerd-live.d.ts +5 -8
  117. package/dist/server/adapters/windnerd-live.js +26 -21
  118. package/dist/server/adapters/windnerd.d.ts +31 -4
  119. package/dist/server/adapters/windnerd.js +196 -19
  120. package/dist/server/environment.d.ts +4 -10
  121. package/dist/server/environment.js +4 -10
  122. package/dist/server/feed.d.ts +44 -2
  123. package/dist/server/feed.js +63 -2
  124. package/dist/server/handler.d.ts +11 -1
  125. package/dist/server/handler.js +83 -2
  126. package/dist/server/index.d.ts +4 -3
  127. package/dist/server/index.js +4 -3
  128. package/dist/strings.d.ts +13 -1
  129. package/dist/strings.js +13 -1
  130. package/package.json +2 -2
  131. package/schema/example-climatology.json +86 -0
  132. package/schema/example-history.json +38 -0
  133. package/schema/stationclimatology.schema.json +221 -0
  134. package/schema/stationcurrent.schema.json +173 -0
  135. package/schema/stationfeed.schema.json +173 -0
  136. package/schema/stationhistory.schema.json +186 -0
  137. package/schema/stationlive.schema.json +202 -0
  138. package/styles.css +232 -19
@@ -0,0 +1,186 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://meteo.azohra.com/schema/stationhistory.schema.json",
4
+ "title": "StationHistory",
5
+ "description": "One requested archive window served at /history — the pan/zoom road. Reuses the history shape; periodMinutes echoes what the source actually supplied.",
6
+ "type": "object",
7
+ "properties": {
8
+ "schemaVersion": {
9
+ "type": "number",
10
+ "const": 2
11
+ },
12
+ "servedAt": {
13
+ "type": "string",
14
+ "format": "date-time"
15
+ },
16
+ "stationId": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "history": {
21
+ "description": "The window's records at the served resolution; periodMinutes echoes what the source actually supplied, which may differ from the request when the vendor snapped it.",
22
+ "$ref": "#/$defs/History"
23
+ }
24
+ },
25
+ "required": [
26
+ "schemaVersion",
27
+ "servedAt",
28
+ "stationId",
29
+ "history"
30
+ ],
31
+ "$defs": {
32
+ "HistoryPoint": {
33
+ "type": "object",
34
+ "properties": {
35
+ "observedAt": {
36
+ "type": "string",
37
+ "format": "date-time"
38
+ },
39
+ "windAvgMps": {
40
+ "type": "number",
41
+ "minimum": 0,
42
+ "description": "Mean m/s over the record's period."
43
+ },
44
+ "windGustMps": {
45
+ "anyOf": [
46
+ {
47
+ "type": "number",
48
+ "minimum": 0
49
+ },
50
+ {
51
+ "type": "null"
52
+ }
53
+ ]
54
+ },
55
+ "windLullMps": {
56
+ "anyOf": [
57
+ {
58
+ "type": "number",
59
+ "minimum": 0
60
+ },
61
+ {
62
+ "type": "null"
63
+ }
64
+ ]
65
+ },
66
+ "windDirectionDeg": {
67
+ "anyOf": [
68
+ {
69
+ "type": "number",
70
+ "minimum": 0,
71
+ "exclusiveMaximum": 360
72
+ },
73
+ {
74
+ "type": "null"
75
+ }
76
+ ],
77
+ "description": "Degrees FROM; null exactly when the period was calm (below 0.5 m/s)."
78
+ },
79
+ "temperatureC": {
80
+ "anyOf": [
81
+ {
82
+ "type": "number"
83
+ },
84
+ {
85
+ "type": "null"
86
+ }
87
+ ]
88
+ },
89
+ "seaLevelPressureHpa": {
90
+ "anyOf": [
91
+ {
92
+ "type": "number",
93
+ "exclusiveMinimum": 0
94
+ },
95
+ {
96
+ "type": "null"
97
+ }
98
+ ]
99
+ },
100
+ "windVectorAvgMps": {
101
+ "description": "Vector-mean m/s over the period — the honest input for further vector re-aggregation; at most windAvgMps. Absent or null reads as 'not published here'.",
102
+ "anyOf": [
103
+ {
104
+ "type": "number",
105
+ "minimum": 0
106
+ },
107
+ {
108
+ "type": "null"
109
+ }
110
+ ]
111
+ },
112
+ "temperatureMinC": {
113
+ "anyOf": [
114
+ {
115
+ "type": "number"
116
+ },
117
+ {
118
+ "type": "null"
119
+ }
120
+ ]
121
+ },
122
+ "temperatureMaxC": {
123
+ "anyOf": [
124
+ {
125
+ "type": "number"
126
+ },
127
+ {
128
+ "type": "null"
129
+ }
130
+ ]
131
+ },
132
+ "seaLevelPressureMinHpa": {
133
+ "anyOf": [
134
+ {
135
+ "type": "number",
136
+ "exclusiveMinimum": 0
137
+ },
138
+ {
139
+ "type": "null"
140
+ }
141
+ ]
142
+ },
143
+ "seaLevelPressureMaxHpa": {
144
+ "anyOf": [
145
+ {
146
+ "type": "number",
147
+ "exclusiveMinimum": 0
148
+ },
149
+ {
150
+ "type": "null"
151
+ }
152
+ ]
153
+ }
154
+ },
155
+ "required": [
156
+ "observedAt",
157
+ "windAvgMps",
158
+ "windGustMps",
159
+ "windLullMps",
160
+ "windDirectionDeg",
161
+ "temperatureC"
162
+ ]
163
+ },
164
+ "History": {
165
+ "type": "object",
166
+ "properties": {
167
+ "periodMinutes": {
168
+ "type": "number",
169
+ "exclusiveMinimum": 0,
170
+ "description": "Minutes each point covers. Wind run, vane thinning, and dropout detection are functions of it."
171
+ },
172
+ "points": {
173
+ "type": "array",
174
+ "items": {
175
+ "$ref": "#/$defs/HistoryPoint"
176
+ },
177
+ "description": "A dropout is an ABSENT record, never a zeroed one — gaps carry no points."
178
+ }
179
+ },
180
+ "required": [
181
+ "periodMinutes",
182
+ "points"
183
+ ]
184
+ }
185
+ }
186
+ }
@@ -88,6 +88,35 @@
88
88
  "telemetry"
89
89
  ]
90
90
  },
91
+ {
92
+ "type": "object",
93
+ "properties": {
94
+ "type": {
95
+ "type": "string",
96
+ "const": "summaries"
97
+ },
98
+ "stationId": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ },
102
+ "servedAt": {
103
+ "type": "string",
104
+ "format": "date-time"
105
+ },
106
+ "summaries": {
107
+ "type": "array",
108
+ "items": {
109
+ "$ref": "#/$defs/RecentSummary"
110
+ }
111
+ }
112
+ },
113
+ "required": [
114
+ "type",
115
+ "stationId",
116
+ "servedAt",
117
+ "summaries"
118
+ ]
119
+ },
91
120
  {
92
121
  "type": "object",
93
122
  "properties": {
@@ -206,6 +235,31 @@
206
235
  }
207
236
  ]
208
237
  },
238
+ "declaredFavorableDirections": {
239
+ "anyOf": [
240
+ {
241
+ "type": "array",
242
+ "items": {
243
+ "$ref": "#/$defs/DirectionArc"
244
+ }
245
+ },
246
+ {
247
+ "type": "null"
248
+ }
249
+ ]
250
+ },
251
+ "broadcastDelaySeconds": {
252
+ "description": "The source's own live-playback delay, seconds; absent or null when the vendor states none.",
253
+ "anyOf": [
254
+ {
255
+ "type": "number",
256
+ "minimum": 0
257
+ },
258
+ {
259
+ "type": "null"
260
+ }
261
+ ]
262
+ },
209
263
  "capabilities": {
210
264
  "$ref": "#/$defs/StationCapabilities"
211
265
  },
@@ -260,6 +314,19 @@
260
314
  "type": "null"
261
315
  }
262
316
  ]
317
+ },
318
+ "recentSummaries": {
319
+ "anyOf": [
320
+ {
321
+ "type": "array",
322
+ "items": {
323
+ "$ref": "#/$defs/RecentSummary"
324
+ }
325
+ },
326
+ {
327
+ "type": "null"
328
+ }
329
+ ]
263
330
  }
264
331
  },
265
332
  "required": [
@@ -348,6 +415,31 @@
348
415
  }
349
416
  ]
350
417
  },
418
+ "declaredFavorableDirections": {
419
+ "anyOf": [
420
+ {
421
+ "type": "array",
422
+ "items": {
423
+ "$ref": "#/$defs/DirectionArc"
424
+ }
425
+ },
426
+ {
427
+ "type": "null"
428
+ }
429
+ ]
430
+ },
431
+ "broadcastDelaySeconds": {
432
+ "description": "The source's own live-playback delay, seconds; absent or null when the vendor states none.",
433
+ "anyOf": [
434
+ {
435
+ "type": "number",
436
+ "minimum": 0
437
+ },
438
+ {
439
+ "type": "null"
440
+ }
441
+ ]
442
+ },
351
443
  "capabilities": {
352
444
  "$ref": "#/$defs/StationCapabilities"
353
445
  },
@@ -407,6 +499,24 @@
407
499
  }
408
500
  ]
409
501
  },
502
+ "DirectionArc": {
503
+ "type": "object",
504
+ "properties": {
505
+ "fromDeg": {
506
+ "type": "number",
507
+ "description": "Degrees FROM, clockwise from north."
508
+ },
509
+ "toDeg": {
510
+ "type": "number",
511
+ "description": "Degrees FROM; fromDeg > toDeg wraps through north, boundaries inclusive."
512
+ }
513
+ },
514
+ "required": [
515
+ "fromDeg",
516
+ "toDeg"
517
+ ],
518
+ "description": "One arc of favorable FROM bearings — core's DirectionArc shape on the wire."
519
+ },
410
520
  "StationCapabilities": {
411
521
  "type": "object",
412
522
  "properties": {
@@ -443,6 +553,17 @@
443
553
  "type": "null"
444
554
  }
445
555
  ]
556
+ },
557
+ "recentSummaries": {
558
+ "description": "The source maintains pre-digested rolling step summaries; absent or null reads as false.",
559
+ "anyOf": [
560
+ {
561
+ "type": "boolean"
562
+ },
563
+ {
564
+ "type": "null"
565
+ }
566
+ ]
446
567
  }
447
568
  },
448
569
  "required": [
@@ -780,6 +901,60 @@
780
901
  "type": "null"
781
902
  }
782
903
  ]
904
+ },
905
+ "windVectorAvgMps": {
906
+ "description": "Vector-mean m/s over the period — the honest input for further vector re-aggregation; at most windAvgMps. Absent or null reads as 'not published here'.",
907
+ "anyOf": [
908
+ {
909
+ "type": "number",
910
+ "minimum": 0
911
+ },
912
+ {
913
+ "type": "null"
914
+ }
915
+ ]
916
+ },
917
+ "temperatureMinC": {
918
+ "anyOf": [
919
+ {
920
+ "type": "number"
921
+ },
922
+ {
923
+ "type": "null"
924
+ }
925
+ ]
926
+ },
927
+ "temperatureMaxC": {
928
+ "anyOf": [
929
+ {
930
+ "type": "number"
931
+ },
932
+ {
933
+ "type": "null"
934
+ }
935
+ ]
936
+ },
937
+ "seaLevelPressureMinHpa": {
938
+ "anyOf": [
939
+ {
940
+ "type": "number",
941
+ "exclusiveMinimum": 0
942
+ },
943
+ {
944
+ "type": "null"
945
+ }
946
+ ]
947
+ },
948
+ "seaLevelPressureMaxHpa": {
949
+ "anyOf": [
950
+ {
951
+ "type": "number",
952
+ "exclusiveMinimum": 0
953
+ },
954
+ {
955
+ "type": "null"
956
+ }
957
+ ]
783
958
  }
784
959
  },
785
960
  "required": [
@@ -863,6 +1038,33 @@
863
1038
  "windMps",
864
1039
  "windDirectionDeg"
865
1040
  ]
1041
+ },
1042
+ "RecentSummary": {
1043
+ "type": "object",
1044
+ "properties": {
1045
+ "windowMinutes": {
1046
+ "type": "number",
1047
+ "exclusiveMinimum": 0,
1048
+ "description": "The rolling window this summarises."
1049
+ },
1050
+ "stepMinutes": {
1051
+ "type": "number",
1052
+ "exclusiveMinimum": 0,
1053
+ "description": "Minutes each point covers."
1054
+ },
1055
+ "points": {
1056
+ "type": "array",
1057
+ "items": {
1058
+ "$ref": "#/$defs/HistoryPoint"
1059
+ },
1060
+ "description": "Oldest first, one per filled step; a step the source left empty is ABSENT."
1061
+ }
1062
+ },
1063
+ "required": [
1064
+ "windowMinutes",
1065
+ "stepMinutes",
1066
+ "points"
1067
+ ]
866
1068
  }
867
1069
  }
868
1070
  }