metar-taf-parser 3.1.2 → 4.0.2

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 (136) hide show
  1. package/README.md +1 -1
  2. package/{dist/locale → locale}/de.d.ts +0 -0
  3. package/{dist/locale → locale}/de.js +3 -3
  4. package/{dist/locale → locale}/en.d.ts +0 -0
  5. package/{dist/locale → locale}/en.js +3 -3
  6. package/{dist/locale → locale}/fr.d.ts +0 -0
  7. package/{dist/locale → locale}/fr.js +3 -3
  8. package/{dist/locale → locale}/it.d.ts +0 -0
  9. package/{dist/locale → locale}/it.js +3 -3
  10. package/{dist/locale → locale}/pl.d.ts +0 -0
  11. package/{dist/locale → locale}/pl.js +3 -3
  12. package/{dist/locale → locale}/zh-CN.d.ts +0 -0
  13. package/{dist/locale → locale}/zh-CN.js +3 -3
  14. package/metar-taf-parser.d.ts +1325 -0
  15. package/metar-taf-parser.js +2703 -0
  16. package/package.json +23 -16
  17. package/dist/command/common.d.ts +0 -54
  18. package/dist/command/common.js +0 -243
  19. package/dist/command/metar/AltimeterCommand.d.ts +0 -7
  20. package/dist/command/metar/AltimeterCommand.js +0 -26
  21. package/dist/command/metar/AltimeterMercuryCommand.d.ts +0 -7
  22. package/dist/command/metar/AltimeterMercuryCommand.js +0 -51
  23. package/dist/command/metar/RunwayCommand.d.ts +0 -7
  24. package/dist/command/metar/RunwayCommand.js +0 -60
  25. package/dist/command/metar/TemperatureCommand.d.ts +0 -7
  26. package/dist/command/metar/TemperatureCommand.js +0 -51
  27. package/dist/command/metar.d.ts +0 -9
  28. package/dist/command/metar.js +0 -31
  29. package/dist/command/remark/CeilingHeightCommand.d.ts +0 -18
  30. package/dist/command/remark/CeilingHeightCommand.js +0 -40
  31. package/dist/command/remark/CeilingSecondLocationCommand.d.ts +0 -12
  32. package/dist/command/remark/CeilingSecondLocationCommand.js +0 -40
  33. package/dist/command/remark/Command.d.ts +0 -8
  34. package/dist/command/remark/Command.js +0 -9
  35. package/dist/command/remark/DefaultCommand.d.ts +0 -11
  36. package/dist/command/remark/DefaultCommand.js +0 -38
  37. package/dist/command/remark/HailSizeCommand.d.ts +0 -11
  38. package/dist/command/remark/HailSizeCommand.js +0 -38
  39. package/dist/command/remark/HourlyMaximumMinimumTemperatureCommand.d.ts +0 -18
  40. package/dist/command/remark/HourlyMaximumMinimumTemperatureCommand.js +0 -39
  41. package/dist/command/remark/HourlyMaximumTemperatureCommand.d.ts +0 -14
  42. package/dist/command/remark/HourlyMaximumTemperatureCommand.js +0 -38
  43. package/dist/command/remark/HourlyMinimumTemperatureCommand.d.ts +0 -14
  44. package/dist/command/remark/HourlyMinimumTemperatureCommand.js +0 -38
  45. package/dist/command/remark/HourlyPrecipitationAmountCommand.d.ts +0 -14
  46. package/dist/command/remark/HourlyPrecipitationAmountCommand.js +0 -38
  47. package/dist/command/remark/HourlyPressureCommand.d.ts +0 -32
  48. package/dist/command/remark/HourlyPressureCommand.js +0 -40
  49. package/dist/command/remark/HourlyTemperatureDewPointCommand.d.ts +0 -18
  50. package/dist/command/remark/HourlyTemperatureDewPointCommand.js +0 -52
  51. package/dist/command/remark/IceAccretionCommand.d.ts +0 -15
  52. package/dist/command/remark/IceAccretionCommand.js +0 -38
  53. package/dist/command/remark/ObscurationCommand.d.ts +0 -14
  54. package/dist/command/remark/ObscurationCommand.js +0 -44
  55. package/dist/command/remark/PrecipitationAmount24HourCommand.d.ts +0 -14
  56. package/dist/command/remark/PrecipitationAmount24HourCommand.js +0 -39
  57. package/dist/command/remark/PrecipitationAmount36HourCommand.d.ts +0 -15
  58. package/dist/command/remark/PrecipitationAmount36HourCommand.js +0 -41
  59. package/dist/command/remark/PrecipitationBegCommand.d.ts +0 -15
  60. package/dist/command/remark/PrecipitationBegCommand.js +0 -45
  61. package/dist/command/remark/PrecipitationBegEndCommand.d.ts +0 -17
  62. package/dist/command/remark/PrecipitationBegEndCommand.js +0 -46
  63. package/dist/command/remark/PrecipitationEndCommand.d.ts +0 -15
  64. package/dist/command/remark/PrecipitationEndCommand.js +0 -45
  65. package/dist/command/remark/PrevailingVisibilityCommand.d.ts +0 -12
  66. package/dist/command/remark/PrevailingVisibilityCommand.js +0 -41
  67. package/dist/command/remark/SeaLevelPressureCommand.d.ts +0 -11
  68. package/dist/command/remark/SeaLevelPressureCommand.js +0 -39
  69. package/dist/command/remark/SecondLocationVisibilityCommand.d.ts +0 -12
  70. package/dist/command/remark/SecondLocationVisibilityCommand.js +0 -41
  71. package/dist/command/remark/SectorVisibilityCommand.d.ts +0 -13
  72. package/dist/command/remark/SectorVisibilityCommand.js +0 -42
  73. package/dist/command/remark/SmallHailSizeCommand.d.ts +0 -11
  74. package/dist/command/remark/SmallHailSizeCommand.js +0 -38
  75. package/dist/command/remark/SnowDepthCommand.d.ts +0 -11
  76. package/dist/command/remark/SnowDepthCommand.js +0 -38
  77. package/dist/command/remark/SnowIncreaseCommand.d.ts +0 -12
  78. package/dist/command/remark/SnowIncreaseCommand.js +0 -40
  79. package/dist/command/remark/SnowPelletsCommand.d.ts +0 -11
  80. package/dist/command/remark/SnowPelletsCommand.js +0 -37
  81. package/dist/command/remark/SunshineDurationCommand.d.ts +0 -11
  82. package/dist/command/remark/SunshineDurationCommand.js +0 -38
  83. package/dist/command/remark/SurfaceVisibilityCommand.d.ts +0 -11
  84. package/dist/command/remark/SurfaceVisibilityCommand.js +0 -39
  85. package/dist/command/remark/ThunderStormLocationCommand.d.ts +0 -12
  86. package/dist/command/remark/ThunderStormLocationCommand.js +0 -40
  87. package/dist/command/remark/ThunderStormLocationMovingCommand.d.ts +0 -19
  88. package/dist/command/remark/ThunderStormLocationMovingCommand.js +0 -42
  89. package/dist/command/remark/TornadicActivityBegCommand.d.ts +0 -16
  90. package/dist/command/remark/TornadicActivityBegCommand.js +0 -44
  91. package/dist/command/remark/TornadicActivityBegEndCommand.d.ts +0 -18
  92. package/dist/command/remark/TornadicActivityBegEndCommand.js +0 -46
  93. package/dist/command/remark/TornadicActivityEndCommand.d.ts +0 -16
  94. package/dist/command/remark/TornadicActivityEndCommand.js +0 -44
  95. package/dist/command/remark/TowerVisibilityCommand.d.ts +0 -11
  96. package/dist/command/remark/TowerVisibilityCommand.js +0 -39
  97. package/dist/command/remark/VariableSkyCommand.d.ts +0 -12
  98. package/dist/command/remark/VariableSkyCommand.js +0 -41
  99. package/dist/command/remark/VariableSkyHeightCommand.d.ts +0 -13
  100. package/dist/command/remark/VariableSkyHeightCommand.js +0 -43
  101. package/dist/command/remark/VirgaDirectionCommand.d.ts +0 -12
  102. package/dist/command/remark/VirgaDirectionCommand.js +0 -40
  103. package/dist/command/remark/WaterEquivalentSnowCommand.d.ts +0 -11
  104. package/dist/command/remark/WaterEquivalentSnowCommand.js +0 -38
  105. package/dist/command/remark/WindPeakCommandCommand.d.ts +0 -17
  106. package/dist/command/remark/WindPeakCommandCommand.js +0 -42
  107. package/dist/command/remark/WindShiftCommand.d.ts +0 -12
  108. package/dist/command/remark/WindShiftCommand.js +0 -38
  109. package/dist/command/remark/WindShiftFropaCommand.d.ts +0 -12
  110. package/dist/command/remark/WindShiftFropaCommand.js +0 -38
  111. package/dist/command/remark.d.ts +0 -109
  112. package/dist/command/remark.js +0 -152
  113. package/dist/commons/converter.d.ts +0 -21
  114. package/dist/commons/converter.js +0 -108
  115. package/dist/commons/errors.d.ts +0 -24
  116. package/dist/commons/errors.js +0 -46
  117. package/dist/commons/i18n.d.ts +0 -12
  118. package/dist/commons/i18n.js +0 -30
  119. package/dist/dates/metar.d.ts +0 -5
  120. package/dist/dates/metar.js +0 -8
  121. package/dist/dates/taf.d.ts +0 -28
  122. package/dist/dates/taf.js +0 -17
  123. package/dist/forecast/forecast.d.ts +0 -36
  124. package/dist/forecast/forecast.js +0 -72
  125. package/dist/helpers/date.d.ts +0 -11
  126. package/dist/helpers/date.js +0 -56
  127. package/dist/helpers/helpers.d.ts +0 -17
  128. package/dist/helpers/helpers.js +0 -46
  129. package/dist/index.d.ts +0 -32
  130. package/dist/index.js +0 -62
  131. package/dist/model/enum.d.ts +0 -265
  132. package/dist/model/enum.js +0 -280
  133. package/dist/model/model.d.ts +0 -188
  134. package/dist/model/model.js +0 -11
  135. package/dist/parser/parser.d.ts +0 -111
  136. package/dist/parser/parser.js +0 -480
@@ -0,0 +1,1325 @@
1
+ declare enum CloudQuantity {
2
+ /**
3
+ * Sky clear
4
+ */
5
+ SKC = "SKC",
6
+ /**
7
+ * Few
8
+ */
9
+ FEW = "FEW",
10
+ /**
11
+ * Broken
12
+ */
13
+ BKN = "BKN",
14
+ /**
15
+ * Scattered
16
+ */
17
+ SCT = "SCT",
18
+ /**
19
+ * Overcast
20
+ */
21
+ OVC = "OVC",
22
+ /**
23
+ * No significant cloud
24
+ */
25
+ NSC = "NSC"
26
+ }
27
+ declare enum CloudType {
28
+ /**
29
+ * Cumulonimbus
30
+ */
31
+ CB = "CB",
32
+ /**
33
+ * Towering cumulus, cumulus congestus
34
+ */
35
+ TCU = "TCU",
36
+ /**
37
+ * Cirrus
38
+ */
39
+ CI = "CI",
40
+ /**
41
+ * Cirrocumulus
42
+ */
43
+ CC = "CC",
44
+ /**
45
+ * Cirrostratus
46
+ */
47
+ CS = "CS",
48
+ /**
49
+ * Altocumulus
50
+ */
51
+ AC = "AC",
52
+ /**
53
+ * Stratus
54
+ */
55
+ ST = "ST",
56
+ /**
57
+ * Cumulus
58
+ */
59
+ CU = "CU",
60
+ /**
61
+ * Astrostratus
62
+ */
63
+ AS = "AS",
64
+ /**
65
+ * Nimbostratus
66
+ */
67
+ NS = "NS",
68
+ /**
69
+ * Stratocumulus
70
+ */
71
+ SC = "SC"
72
+ }
73
+ /**
74
+ * Moderate has no qualifier.
75
+ */
76
+ declare enum Intensity {
77
+ LIGHT = "-",
78
+ /**
79
+ * Heavy or well-developed
80
+ */
81
+ HEAVY = "+",
82
+ IN_VICINITY = "VC"
83
+ }
84
+ declare enum Descriptive {
85
+ SHOWERS = "SH",
86
+ SHALLOW = "MI",
87
+ PATCHES = "BC",
88
+ PARTIAL = "PR",
89
+ DRIFTING = "DR",
90
+ THUNDERSTORM = "TS",
91
+ BLOWING = "BL",
92
+ FREEZING = "FZ"
93
+ }
94
+ declare enum Phenomenon {
95
+ RAIN = "RA",
96
+ DRIZZLE = "DZ",
97
+ SNOW = "SN",
98
+ SNOW_GRAINS = "SG",
99
+ ICE_PELLETS = "PL",
100
+ ICE_CRYSTALS = "IC",
101
+ HAIL = "GR",
102
+ SMALL_HAIL = "GS",
103
+ UNKNOW_PRECIPITATION = "UP",
104
+ FOG = "FG",
105
+ VOLCANIC_ASH = "VA",
106
+ MIST = "BR",
107
+ HAZE = "HZ",
108
+ WIDESPREAD_DUST = "DU",
109
+ SMOKE = "FU",
110
+ SAND = "SA",
111
+ SPRAY = "PY",
112
+ SQUALL = "SQ",
113
+ SAND_WHIRLS = "PO",
114
+ THUNDERSTORM = "TS",
115
+ DUSTSTORM = "DS",
116
+ SANDSTORM = "SS",
117
+ FUNNEL_CLOUD = "FC"
118
+ }
119
+ declare enum TimeIndicator {
120
+ AT = "AT",
121
+ FM = "FM",
122
+ TL = "TL"
123
+ }
124
+ /**
125
+ * https://www.aviationweather.gov/taf/decoder
126
+ */
127
+ declare enum WeatherChangeType {
128
+ /**
129
+ * FROM Group
130
+ *
131
+ * ie. `FM1600`
132
+ *
133
+ * The FM group is used when a rapid change, usually occuring in less than one
134
+ * hour, in prevailing conditions is expected. Typically, a rapid change of
135
+ * prevailing conditions to more or less a completely new set of prevailing
136
+ * conditions is associated with a synoptic feature passing through the
137
+ * terminal area (cold or warm frontal passage). Appended to the FM indicator
138
+ * is the four-digit hour and minute the change is expected to begin and
139
+ * continues until the next change group or until the end of the current
140
+ * forecast.
141
+ *
142
+ * A FM group will mark the beginning of a new line in a TAF report. Each FM
143
+ * group contains all the required elements -- wind, visibility, weather, and
144
+ * sky condition. Weather will be omitted in FM groups when it is not
145
+ * significant to aviation. FM groups will not include the contraction NSW.
146
+ *
147
+ * Examples:
148
+ *
149
+ * 1. `FM0100 SKC` - After 0100Z sky clear
150
+ * 2. `FM1430 OVC020` - After 1430Z ceiling two thousand overcast
151
+ */
152
+ FM = "FM",
153
+ /**
154
+ * BECOMING Group
155
+ *
156
+ * ie. `BECMG 2224`
157
+ *
158
+ * The BECMG group is used when a gradual change in conditions is expected
159
+ * over a longer time period, usually two hours. The time period when the
160
+ * change is expected is a four-digit group with the beginning hour and ending
161
+ * hour of the change period which follows the BECMG indicator. The gradual
162
+ * change will occur at an unspecified time within this time period. Only the
163
+ * conditions are carried over from the previous time group.
164
+ *
165
+ * Example:
166
+ *
167
+ * 1. `OVC012 BECMG 1416 BKN020` - Ceiling one thousand two hundred overcast.
168
+ * Then a gradual change to ceiling two thousand broken between 1400Z and
169
+ * 1600Z.
170
+ */
171
+ BECMG = "BECMG",
172
+ /**
173
+ * TEMPORARY Group
174
+ *
175
+ * ie. `TEMPO 1316`
176
+ *
177
+ * The TEMPO group is used for any conditions in wind, visibility, weather, or
178
+ * sky condition which are expected to last for generally less than an hour at
179
+ * a time (occasional), and are expected to occur during less than half the
180
+ * time period. The TEMPO indicator is followed by a four-digit group giving
181
+ * the beginning hour and ending hour of the time period during which the
182
+ * temporary conditions are expected. Only the changing forecast
183
+ * meteorological conditions are included in TEMPO groups. The omitted
184
+ * conditions are carried over from the previous time group.
185
+ *
186
+ * Examples:
187
+ *
188
+ * 1. `SCT030 TEMPO 1923 BKN030` - Three thousand scattered with occasional
189
+ * ceilings three thousand broken between 1900Z and 2300Z.
190
+ * 2. `4SM HZ TEMPO 0006 2SM BR HZ` - Visibility four in haze with occasional
191
+ * visibility two in mist and haze between 0000Z and 0600Z.
192
+ */
193
+ TEMPO = "TEMPO",
194
+ /**
195
+ * Probability Forecast
196
+ *
197
+ * ie. `PROB40 0006`
198
+ *
199
+ * The probability or chance of thunderstorms or other precipitation events
200
+ * occuring, along with associated weather conditions (wind, visibility, and
201
+ * sky conditions).
202
+ *
203
+ * The PROB40 group is used when the occurrence of thunderstorms or
204
+ * precipitation is in the 30% to less than 50% range, thus the probability
205
+ * value 40 is appended to the PROB contraction. This is followed by a
206
+ * four-digit group giving the beginning hour and ending hour of the time
207
+ * period during which the thunderstorms or precipitation is expected.
208
+ *
209
+ * Note: PROB40 will not be shown during the first six hours of a forecast.
210
+ *
211
+ * Examples:
212
+ *
213
+ * 1. `PROB40 2102 1/2SM +TSRA` - Chance between 2100Z and 0200Z of
214
+ * visibility one-half thunderstorm, heavy rain.
215
+ * 2. `PROB40 1014 1SM RASN` - Chance between 1000Z and 1400Z of visibility
216
+ * one rain and snow.
217
+ * 3. `PROB40 2024 2SM FZRA` - Chance between 2000Z and 0000Z of visibility
218
+ * two freezing rain.
219
+
220
+ */
221
+ PROB = "PROB"
222
+ }
223
+ declare enum Direction {
224
+ E = "E",
225
+ ENE = "ENE",
226
+ ESE = "ESE",
227
+ N = "N",
228
+ NE = "NE",
229
+ NNE = "NNE",
230
+ NNW = "NNW",
231
+ NW = "NW",
232
+ S = "S",
233
+ SE = "SE",
234
+ SSE = "SSE",
235
+ SSW = "SSW",
236
+ SW = "SW",
237
+ W = "W",
238
+ WNW = "WNW",
239
+ WSW = "WSW"
240
+ }
241
+ declare enum DistanceUnit {
242
+ Meters = "m",
243
+ StatuteMiles = "SM"
244
+ }
245
+ /**
246
+ * Used to indicate the actual value is greater than or less than the value written
247
+ *
248
+ * For example,
249
+ *
250
+ * 1. `P6SM` = visibility greater than 6 statute miles
251
+ * 2. `M1/4SM` = visibility less than 1/4 statute mile
252
+ */
253
+ declare enum ValueIndicator {
254
+ GreaterThan = "P",
255
+ LessThan = "M"
256
+ }
257
+ declare enum RunwayInfoTrend {
258
+ Uprising = "U",
259
+ Decreasing = "D",
260
+ NoSignificantChange = "N"
261
+ }
262
+ declare enum RunwayInfoUnit {
263
+ Feet = "FT",
264
+ Meters = "m"
265
+ }
266
+
267
+ declare const _default: {
268
+ CloudQuantity: {
269
+ BKN: string;
270
+ FEW: string;
271
+ NSC: string;
272
+ OVC: string;
273
+ SCT: string;
274
+ SKC: string;
275
+ };
276
+ CloudType: {
277
+ AC: string;
278
+ AS: string;
279
+ CB: string;
280
+ CC: string;
281
+ CI: string;
282
+ CS: string;
283
+ CU: string;
284
+ NS: string;
285
+ SC: string;
286
+ ST: string;
287
+ TCU: string;
288
+ };
289
+ Converter: {
290
+ D: string;
291
+ E: string;
292
+ ENE: string;
293
+ ESE: string;
294
+ N: string;
295
+ NE: string;
296
+ NNE: string;
297
+ NNW: string;
298
+ NSC: string;
299
+ NW: string;
300
+ S: string;
301
+ SE: string;
302
+ SSE: string;
303
+ SSW: string;
304
+ SW: string;
305
+ U: string;
306
+ VRB: string;
307
+ W: string;
308
+ WNW: string;
309
+ WSW: string;
310
+ };
311
+ DepositBrakingCapacity: {
312
+ GOOD: string;
313
+ MEDIUM: string;
314
+ MEDIUM_GOOD: string;
315
+ MEDIUM_POOR: string;
316
+ NOT_REPORTED: string;
317
+ POOR: string;
318
+ UNRELIABLE: string;
319
+ };
320
+ DepositCoverage: {
321
+ FROM_11_TO_25: string;
322
+ FROM_26_TO_50: string;
323
+ FROM_51_TO_100: string;
324
+ LESS_10: string;
325
+ NOT_REPORTED: string;
326
+ };
327
+ DepositThickness: {
328
+ CLOSED: string;
329
+ LESS_1_MM: string;
330
+ NOT_REPORTED: string;
331
+ THICKNESS_10: string;
332
+ THICKNESS_15: string;
333
+ THICKNESS_20: string;
334
+ THICKNESS_25: string;
335
+ THICKNESS_30: string;
336
+ THICKNESS_35: string;
337
+ THICKNESS_40: string;
338
+ };
339
+ DepositType: {
340
+ CLEAR_DRY: string;
341
+ COMPACTED_SNOW: string;
342
+ DAMP: string;
343
+ DRY_SNOW: string;
344
+ FROZEN_RIDGES: string;
345
+ ICE: string;
346
+ NOT_REPORTED: string;
347
+ RIME_FROST_COVERED: string;
348
+ SLUSH: string;
349
+ WET_SNOW: string;
350
+ WET_WATER_PATCHES: string;
351
+ };
352
+ Descriptive: {
353
+ BC: string;
354
+ BL: string;
355
+ DR: string;
356
+ FZ: string;
357
+ MI: string;
358
+ PR: string;
359
+ SH: string;
360
+ TS: string;
361
+ };
362
+ Error: {
363
+ prefix: string;
364
+ };
365
+ ErrorCode: {
366
+ AirportNotFound: string;
367
+ InvalidMessage: string;
368
+ };
369
+ Indicator: {
370
+ M: string;
371
+ P: string;
372
+ };
373
+ "intensity-plus": string;
374
+ Intensity: {
375
+ "-": string;
376
+ VC: string;
377
+ };
378
+ MetarFacade: {
379
+ InvalidIcao: string;
380
+ };
381
+ Phenomenon: {
382
+ BR: string;
383
+ DS: string;
384
+ DU: string;
385
+ DZ: string;
386
+ FC: string;
387
+ FG: string;
388
+ FU: string;
389
+ GR: string;
390
+ GS: string;
391
+ HZ: string;
392
+ IC: string;
393
+ PL: string;
394
+ PO: string;
395
+ PY: string;
396
+ RA: string;
397
+ SA: string;
398
+ SG: string;
399
+ SN: string;
400
+ SQ: string;
401
+ SS: string;
402
+ TS: string;
403
+ UP: string;
404
+ VA: string;
405
+ };
406
+ Remark: {
407
+ ALQDS: string;
408
+ AO1: string;
409
+ AO2: string;
410
+ BASED: string;
411
+ Barometer: string[];
412
+ Ceiling: {
413
+ Height: string;
414
+ Second: {
415
+ Location: string;
416
+ };
417
+ };
418
+ DSNT: string;
419
+ FCST: string;
420
+ FUNNELCLOUD: string;
421
+ HVY: string;
422
+ Hail: {
423
+ "0": string;
424
+ LesserThan: string;
425
+ };
426
+ Hourly: {
427
+ Maximum: {
428
+ Minimum: {
429
+ Temperature: string;
430
+ };
431
+ Temperature: string;
432
+ };
433
+ Minimum: {
434
+ Temperature: string;
435
+ };
436
+ Temperature: {
437
+ "0": string;
438
+ Dew: {
439
+ Point: string;
440
+ };
441
+ };
442
+ };
443
+ Ice: {
444
+ Accretion: {
445
+ Amount: string;
446
+ };
447
+ };
448
+ LGT: string;
449
+ LTG: string;
450
+ MOD: string;
451
+ NXT: string;
452
+ ON: string;
453
+ Obscuration: string;
454
+ PRESFR: string;
455
+ PRESRR: string;
456
+ PeakWind: string;
457
+ Precipitation: {
458
+ Amount: {
459
+ "24": string;
460
+ "3": {
461
+ "6": string;
462
+ };
463
+ Hourly: string;
464
+ };
465
+ Beg: {
466
+ "0": string;
467
+ End: string;
468
+ };
469
+ End: string;
470
+ };
471
+ Pressure: {
472
+ Tendency: string;
473
+ };
474
+ SLPNO: string;
475
+ Sea: {
476
+ Level: {
477
+ Pressure: string;
478
+ };
479
+ };
480
+ Second: {
481
+ Location: {
482
+ Visibility: string;
483
+ };
484
+ };
485
+ Sector: {
486
+ Visibility: string;
487
+ };
488
+ Snow: {
489
+ Depth: string;
490
+ Increasing: {
491
+ Rapidly: string;
492
+ };
493
+ Pellets: string;
494
+ };
495
+ Sunshine: {
496
+ Duration: string;
497
+ };
498
+ Surface: {
499
+ Visibility: string;
500
+ };
501
+ TORNADO: string;
502
+ Thunderstorm: {
503
+ Location: {
504
+ "0": string;
505
+ Moving: string;
506
+ };
507
+ };
508
+ Tornadic: {
509
+ Activity: {
510
+ BegEnd: string;
511
+ Beginning: string;
512
+ Ending: string;
513
+ };
514
+ };
515
+ Tower: {
516
+ Visibility: string;
517
+ };
518
+ VIRGA: string;
519
+ Variable: {
520
+ Prevailing: {
521
+ Visibility: string;
522
+ };
523
+ Sky: {
524
+ Condition: {
525
+ "0": string;
526
+ Height: string;
527
+ };
528
+ };
529
+ };
530
+ Virga: {
531
+ Direction: string;
532
+ };
533
+ WATERSPOUT: string;
534
+ Water: {
535
+ Equivalent: {
536
+ Snow: {
537
+ Ground: string;
538
+ };
539
+ };
540
+ };
541
+ WindShift: {
542
+ "0": string;
543
+ FROPA: string;
544
+ };
545
+ };
546
+ TimeIndicator: {
547
+ AT: string;
548
+ FM: string;
549
+ TL: string;
550
+ };
551
+ ToString: {
552
+ airport: string;
553
+ altimeter: string;
554
+ amendment: string;
555
+ auto: string;
556
+ cavok: string;
557
+ clouds: string;
558
+ day: {
559
+ hour: string;
560
+ month: string;
561
+ };
562
+ deposit: {
563
+ braking: string;
564
+ coverage: string;
565
+ thickness: string;
566
+ type: string;
567
+ };
568
+ descriptive: string;
569
+ dew: {
570
+ point: string;
571
+ };
572
+ end: {
573
+ day: {
574
+ month: string;
575
+ };
576
+ hour: {
577
+ day: string;
578
+ };
579
+ };
580
+ height: {
581
+ feet: string;
582
+ meter: string;
583
+ };
584
+ indicator: string;
585
+ intensity: string;
586
+ message: string;
587
+ name: string;
588
+ nosig: string;
589
+ phenomenons: string;
590
+ probability: string;
591
+ quantity: string;
592
+ remark: string;
593
+ report: {
594
+ time: string;
595
+ };
596
+ runway: {
597
+ info: string;
598
+ };
599
+ start: {
600
+ day: {
601
+ month: string;
602
+ };
603
+ hour: {
604
+ day: string;
605
+ };
606
+ minute: string;
607
+ };
608
+ temperature: {
609
+ "0": string;
610
+ max: string;
611
+ min: string;
612
+ };
613
+ trend: string;
614
+ trends: string;
615
+ type: string;
616
+ vertical: {
617
+ visibility: string;
618
+ };
619
+ visibility: {
620
+ main: string;
621
+ max: string;
622
+ min: {
623
+ "0": string;
624
+ direction: string;
625
+ };
626
+ };
627
+ weather: {
628
+ conditions: string;
629
+ };
630
+ wind: {
631
+ direction: {
632
+ "0": string;
633
+ degrees: string;
634
+ };
635
+ gusts: string;
636
+ max: {
637
+ variation: string;
638
+ };
639
+ min: {
640
+ variation: string;
641
+ };
642
+ speed: string;
643
+ unit: string;
644
+ };
645
+ };
646
+ WeatherChangeType: {
647
+ BECMG: string;
648
+ FM: string;
649
+ PROB: string;
650
+ TEMPO: string;
651
+ };
652
+ };
653
+
654
+ declare type DeepPartial<T> = T extends object ? {
655
+ [P in keyof T]?: DeepPartial<T[P]>;
656
+ } : T;
657
+ declare type Locale = DeepPartial<typeof _default>;
658
+
659
+ interface ICeilingHeightRemark extends IBaseRemark {
660
+ type: RemarkType.CeilingHeight;
661
+ /**
662
+ * Ceiling min height (varying between min and max) above ground level
663
+ */
664
+ min: number;
665
+ /**
666
+ * Ceiling max height (varying between min and max) above ground level
667
+ */
668
+ max: number;
669
+ }
670
+
671
+ interface ICeilingSecondLocationRemark extends IBaseRemark {
672
+ type: RemarkType.CeilingSecondLocation;
673
+ height: number;
674
+ location: string;
675
+ }
676
+
677
+ interface IHailSizeRemark extends IBaseRemark {
678
+ type: RemarkType.HailSize;
679
+ size: number;
680
+ }
681
+
682
+ interface IHourlyMaximumMinimumTemperatureRemark extends IBaseRemark {
683
+ type: RemarkType.HourlyMaximumMinimumTemperature;
684
+ /**
685
+ * Maximum temperature in C
686
+ */
687
+ max: number;
688
+ /**
689
+ * Minimum temperature in C
690
+ */
691
+ min: number;
692
+ }
693
+
694
+ interface IHourlyMaximumTemperatureRemark extends IBaseRemark {
695
+ type: RemarkType.HourlyMaximumTemperature;
696
+ /**
697
+ * Maximum temperature in C
698
+ */
699
+ max: number;
700
+ }
701
+
702
+ interface IHourlyMinimumTemperatureRemark extends IBaseRemark {
703
+ type: RemarkType.HourlyMinimumTemperature;
704
+ /**
705
+ * Minimum temperature in C
706
+ */
707
+ min: number;
708
+ }
709
+
710
+ interface IHourlyPrecipitationAmountRemark extends IBaseRemark {
711
+ type: RemarkType.HourlyPrecipitationAmount;
712
+ /**
713
+ * In inches
714
+ */
715
+ amount: number;
716
+ }
717
+
718
+ interface IHourlyPressureRemark extends IBaseRemark {
719
+ type: RemarkType.HourlyPressure;
720
+ /**
721
+ * https://www.e-education.psu.edu/files/meteo101/image/Section13/metar_decoding1203.html
722
+ *
723
+ * | Code Figure | Description | Primary Requirement |
724
+ * |:-----------:|:----------------------------------------------------------------------------------:|:-----------------------------------------------------------------:|
725
+ * | 0 | Increasing, then decreasing. | Atmospheric pressure now higher than 3 hours ago. (x3 rows below) |
726
+ * | 1 | Increasing, then steady, or increasing then increasing more slowly. | |
727
+ * | 2 | Increasing steadily or unsteadily. | |
728
+ * | 3 | Decreasing or steady, then increasing; or increasing then increasing more rapidly. | |
729
+ * | 0 | Increasing, then decreasing. | Atmospheric pressure now same as 3 hours ago. (x3 rows below) |
730
+ * | 4 | Steady | |
731
+ * | 5 | Decreasing then increasing. | |
732
+ * | 5 | Decreasing, then increasing. | Atmospheric pressure now lower than 3 hours ago. (x3 rows below) |
733
+ * | 6 | Decreasing, then steady, or decreasing then decreasing more slowly. | |
734
+ * | 7 | Decreasing steadily or unsteadily. | |
735
+ * | 8 | Steady or increasing, then decreasing; or decreasing then decreasing more rapidly. | |
736
+ */
737
+ code: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
738
+ /**
739
+ * In hectopascals
740
+ */
741
+ pressureChange: number;
742
+ }
743
+
744
+ interface IHourlyTemperatureDewPointRemark extends IBaseRemark {
745
+ type: RemarkType.HourlyTemperatureDewPoint;
746
+ /**
747
+ * In C
748
+ */
749
+ temperature: number;
750
+ /**
751
+ * In C
752
+ */
753
+ dewPoint?: number;
754
+ }
755
+
756
+ interface IIceAccretionRemark extends IBaseRemark {
757
+ type: RemarkType.IceAccretion;
758
+ /**
759
+ * In inches
760
+ */
761
+ amount: number;
762
+ periodInHours: number;
763
+ }
764
+
765
+ interface IObscurationRemark extends IBaseRemark {
766
+ type: RemarkType.Obscuration;
767
+ quantity: CloudQuantity;
768
+ height: number;
769
+ phenomenon: Phenomenon;
770
+ }
771
+
772
+ interface IPrecipitationAmount24HourRemark extends IBaseRemark {
773
+ type: RemarkType.PrecipitationAmount24Hour;
774
+ /**
775
+ * In inches
776
+ */
777
+ amount: number;
778
+ }
779
+
780
+ interface IPrecipitationAmount36HourRemark extends IBaseRemark {
781
+ type: RemarkType.PrecipitationAmount36Hour;
782
+ periodInHours: 3 | 6;
783
+ /**
784
+ * In inches
785
+ */
786
+ amount: number;
787
+ }
788
+
789
+ interface IPrecipitationBegEndRemark extends IBaseRemark {
790
+ type: RemarkType.PrecipitationBegEnd;
791
+ descriptive?: Descriptive;
792
+ phenomenon: Phenomenon;
793
+ startHour?: number;
794
+ startMin: number;
795
+ endHour?: number;
796
+ endMin: number;
797
+ }
798
+
799
+ interface IPrevailingVisibilityRemark extends IBaseRemark {
800
+ type: RemarkType.PrevailingVisibility;
801
+ minVisibility: number;
802
+ maxVisibility: number;
803
+ }
804
+
805
+ interface ISeaLevelPressureRemark extends IBaseRemark {
806
+ type: RemarkType.SeaLevelPressure;
807
+ pressure: number;
808
+ }
809
+
810
+ interface ISecondLocationVisibilityRemark extends IBaseRemark {
811
+ type: RemarkType.SecondLocationVisibility;
812
+ distance: number;
813
+ location: string;
814
+ }
815
+
816
+ interface ISectorVisibilityRemark extends IBaseRemark {
817
+ type: RemarkType.SectorVisibility;
818
+ direction: Direction;
819
+ distance: number;
820
+ }
821
+
822
+ interface ISmallHailSizeRemark extends IBaseRemark {
823
+ type: RemarkType.SmallHailSize;
824
+ size: number;
825
+ }
826
+
827
+ interface ISnowDepthRemark extends IBaseRemark {
828
+ type: RemarkType.SnowDepth;
829
+ depth: number;
830
+ }
831
+
832
+ interface ISnowIncreaseRemark extends IBaseRemark {
833
+ type: RemarkType.SnowIncrease;
834
+ inchesLastHour: number;
835
+ totalDepth: number;
836
+ }
837
+
838
+ interface ISnowPelletsRemark extends IBaseRemark {
839
+ type: RemarkType.SnowPellets;
840
+ amount: "LGT" | "MOD" | "HVY";
841
+ }
842
+
843
+ interface ISunshineDurationRemark extends IBaseRemark {
844
+ type: RemarkType.SunshineDuration;
845
+ duration: number;
846
+ }
847
+
848
+ interface ISurfaceVisibilityRemark extends IBaseRemark {
849
+ type: RemarkType.SurfaceVisibility;
850
+ distance: number;
851
+ }
852
+
853
+ interface IThunderStormLocationRemark extends IBaseRemark {
854
+ type: RemarkType.ThunderStormLocation;
855
+ location: Direction;
856
+ }
857
+
858
+ interface IThunderStormLocationMovingRemark extends IBaseRemark {
859
+ type: RemarkType.ThunderStormLocationMoving;
860
+ /**
861
+ * Current location is relative of the station
862
+ */
863
+ location: Direction;
864
+ /**
865
+ * Direction moving (eg. "SW")
866
+ */
867
+ moving: Direction;
868
+ }
869
+
870
+ interface ITornadicActivityBegRemark extends IBaseRemark {
871
+ type: RemarkType.TornadicActivityBeg;
872
+ tornadicType: "TORNADO" | "FUNNEL CLOUD" | "WATERSPOUT";
873
+ startHour?: number;
874
+ startMinute: number;
875
+ distance: number;
876
+ direction: Direction;
877
+ }
878
+
879
+ interface ITornadicActivityBegEndRemark extends IBaseRemark {
880
+ type: RemarkType.TornadicActivityBegEnd;
881
+ tornadicType: "TORNADO" | "FUNNEL CLOUD" | "WATERSPOUT";
882
+ startHour?: number;
883
+ startMinute: number;
884
+ endHour?: number;
885
+ endMinute: number;
886
+ distance: number;
887
+ direction: Direction;
888
+ }
889
+
890
+ interface ITornadicActivityEndRemark extends IBaseRemark {
891
+ type: RemarkType.TornadicActivityEnd;
892
+ tornadicType: "TORNADO" | "FUNNEL CLOUD" | "WATERSPOUT";
893
+ endHour?: number;
894
+ endMinute: number;
895
+ distance: number;
896
+ direction: Direction;
897
+ }
898
+
899
+ interface ITowerVisibilityRemark extends IBaseRemark {
900
+ type: RemarkType.TowerVisibility;
901
+ distance: number;
902
+ }
903
+
904
+ interface IVariableSkyRemark extends IBaseRemark {
905
+ type: RemarkType.VariableSky;
906
+ cloudQuantityRange: [CloudQuantity, CloudQuantity];
907
+ }
908
+
909
+ interface IVariableSkyHeightRemark extends IBaseRemark {
910
+ type: RemarkType.VariableSkyHeight;
911
+ height: number;
912
+ cloudQuantityRange: [CloudQuantity, CloudQuantity];
913
+ }
914
+
915
+ interface IVirgaDirectionRemark extends IBaseRemark {
916
+ type: RemarkType.VirgaDirection;
917
+ direction: Direction;
918
+ }
919
+
920
+ interface IWaterEquivalentSnowRemark extends IBaseRemark {
921
+ type: RemarkType.WaterEquivalentSnow;
922
+ amount: number;
923
+ }
924
+
925
+ interface IWindPeakCommandRemark extends IBaseRemark {
926
+ type: RemarkType.WindPeak;
927
+ /**
928
+ * In knots
929
+ */
930
+ speed: number;
931
+ degrees: number;
932
+ startHour?: number;
933
+ startMinute: number;
934
+ }
935
+
936
+ interface IWindShiftRemark extends IBaseRemark {
937
+ type: RemarkType.WindShift;
938
+ startHour?: number;
939
+ startMinute: number;
940
+ }
941
+
942
+ interface IWindShiftFropaRemark extends IBaseRemark {
943
+ type: RemarkType.WindShiftFropa;
944
+ startHour?: number;
945
+ startMinute: number;
946
+ }
947
+
948
+ declare type DefaultRemarkTypes = RemarkType.AO1 | RemarkType.AO2 | RemarkType.PRESFR | RemarkType.PRESRR | RemarkType.TORNADO | RemarkType.FUNNELCLOUD | RemarkType.WATERSPOUT | RemarkType.VIRGA;
949
+ interface IDefaultCommandRemark extends IBaseRemark {
950
+ type: DefaultRemarkTypes;
951
+ }
952
+
953
+ interface IPrecipitationBegRemark extends IBaseRemark {
954
+ type: RemarkType.PrecipitationBeg;
955
+ descriptive?: Descriptive;
956
+ phenomenon: Phenomenon;
957
+ startHour?: number;
958
+ startMin: number;
959
+ }
960
+
961
+ interface IPrecipitationEndRemark extends IBaseRemark {
962
+ type: RemarkType.PrecipitationEnd;
963
+ descriptive?: Descriptive;
964
+ phenomenon: Phenomenon;
965
+ endHour?: number;
966
+ endMin: number;
967
+ }
968
+
969
+ interface IBaseRemark {
970
+ type: RemarkType;
971
+ description?: string;
972
+ raw: string;
973
+ }
974
+ interface IUnknownRemark extends IBaseRemark {
975
+ type: RemarkType.Unknown;
976
+ }
977
+ declare enum RemarkType {
978
+ Unknown = "Unknown",
979
+ AO1 = "AO1",
980
+ AO2 = "AO2",
981
+ PRESFR = "PRESFR",
982
+ PRESRR = "PRESRR",
983
+ TORNADO = "TORNADO",
984
+ FUNNELCLOUD = "FUNNELCLOUD",
985
+ WATERSPOUT = "WATERSPOUT",
986
+ VIRGA = "VIRGA",
987
+ WindPeak = "WindPeak",
988
+ WindShiftFropa = "WindShiftFropa",
989
+ WindShift = "WindShift",
990
+ TowerVisibility = "TowerVisibility",
991
+ SurfaceVisibility = "SurfaceVisibility",
992
+ PrevailingVisibility = "PrevailingVisibility",
993
+ SecondLocationVisibility = "SecondLocationVisibility",
994
+ SectorVisibility = "SectorVisibility",
995
+ TornadicActivityBegEnd = "TornadicActivityBegEnd",
996
+ TornadicActivityBeg = "TornadicActivityBeg",
997
+ TornadicActivityEnd = "TornadicActivityEnd",
998
+ PrecipitationBeg = "PrecipitationBeg",
999
+ PrecipitationBegEnd = "PrecipitationBegEnd",
1000
+ PrecipitationEnd = "PrecipitationEnd",
1001
+ ThunderStormLocationMoving = "ThunderStormLocationMoving",
1002
+ ThunderStormLocation = "ThunderStormLocation",
1003
+ SmallHailSize = "SmallHailSize",
1004
+ HailSize = "HailSize",
1005
+ SnowPellets = "SnowPellets",
1006
+ VirgaDirection = "VirgaDirection",
1007
+ CeilingHeight = "CeilingHeight",
1008
+ Obscuration = "Obscuration",
1009
+ VariableSkyHeight = "VariableSkyHeight",
1010
+ VariableSky = "VariableSky",
1011
+ CeilingSecondLocation = "CeilingSecondLocation",
1012
+ SeaLevelPressure = "SeaLevelPressure",
1013
+ SnowIncrease = "SnowIncrease",
1014
+ HourlyMaximumMinimumTemperature = "HourlyMaximumMinimumTemperature",
1015
+ HourlyMaximumTemperature = "HourlyMaximumTemperature",
1016
+ HourlyMinimumTemperature = "HourlyMinimumTemperature",
1017
+ HourlyPrecipitationAmount = "HourlyPrecipitationAmount",
1018
+ HourlyTemperatureDewPoint = "HourlyTemperatureDewPoint",
1019
+ HourlyPressure = "HourlyPressure",
1020
+ IceAccretion = "IceAccretion",
1021
+ PrecipitationAmount36Hour = "PrecipitationAmount36Hour",
1022
+ PrecipitationAmount24Hour = "PrecipitationAmount24Hour",
1023
+ SnowDepth = "SnowDepth",
1024
+ SunshineDuration = "SunshineDuration",
1025
+ WaterEquivalentSnow = "WaterEquivalentSnow"
1026
+ }
1027
+ declare type Remark = IUnknownRemark | IDefaultCommandRemark | ICeilingHeightRemark | ICeilingSecondLocationRemark | IHailSizeRemark | IHourlyMaximumMinimumTemperatureRemark | IHourlyMaximumTemperatureRemark | IHourlyMinimumTemperatureRemark | IHourlyPrecipitationAmountRemark | IHourlyPressureRemark | IHourlyTemperatureDewPointRemark | IIceAccretionRemark | IObscurationRemark | IPrecipitationAmount24HourRemark | IPrecipitationAmount36HourRemark | IPrecipitationAmount36HourRemark | IPrecipitationBegRemark | IPrecipitationBegEndRemark | IPrecipitationEndRemark | IPrevailingVisibilityRemark | ISeaLevelPressureRemark | ISecondLocationVisibilityRemark | ISectorVisibilityRemark | ISmallHailSizeRemark | ISnowDepthRemark | ISnowIncreaseRemark | ISnowPelletsRemark | ISunshineDurationRemark | ISurfaceVisibilityRemark | IThunderStormLocationRemark | IThunderStormLocationMovingRemark | ITornadicActivityBegRemark | ITornadicActivityBegEndRemark | ITornadicActivityEndRemark | ITowerVisibilityRemark | IVariableSkyRemark | IVariableSkyHeightRemark | IVirgaDirectionRemark | IWaterEquivalentSnowRemark | IWindPeakCommandRemark | IWindShiftRemark | IWindShiftFropaRemark;
1028
+
1029
+ interface ICountry {
1030
+ name: string;
1031
+ }
1032
+ interface IAirport {
1033
+ name: string;
1034
+ city: string;
1035
+ country: string;
1036
+ iata: string;
1037
+ icao: string;
1038
+ latitude: string;
1039
+ longitude: string;
1040
+ altitude: string;
1041
+ timezone: string;
1042
+ dst: boolean;
1043
+ tzDatabase: unknown;
1044
+ }
1045
+ interface IWind {
1046
+ speed: number;
1047
+ direction: string;
1048
+ degrees?: number;
1049
+ gust?: number;
1050
+ minVariation?: number;
1051
+ maxVariation?: number;
1052
+ unit: string;
1053
+ }
1054
+ interface IWindShear extends IWind {
1055
+ height: number;
1056
+ }
1057
+ interface Distance {
1058
+ indicator?: ValueIndicator;
1059
+ value: number;
1060
+ unit: DistanceUnit;
1061
+ /** No Directional Visibility */
1062
+ ndv?: true;
1063
+ }
1064
+ declare type Visibility = Distance & {
1065
+ /**
1066
+ * Never in North American METARs
1067
+ */
1068
+ min?: {
1069
+ /** Always in meters */
1070
+ value: number;
1071
+ direction: string;
1072
+ };
1073
+ };
1074
+ interface IWeatherCondition {
1075
+ intensity?: Intensity;
1076
+ descriptive?: Descriptive;
1077
+ phenomenons: Phenomenon[];
1078
+ }
1079
+ declare function isWeatherConditionValid(weather: IWeatherCondition): boolean;
1080
+ interface ITemperatureDated {
1081
+ temperature: number;
1082
+ day: number;
1083
+ hour: number;
1084
+ }
1085
+ interface IRunwayInfo {
1086
+ name: string;
1087
+ minRange: number;
1088
+ maxRange?: number;
1089
+ /**
1090
+ * Only used in North American runway ranges (feet unit of measurement)
1091
+ */
1092
+ indicator?: ValueIndicator;
1093
+ /**
1094
+ * Only used in IACO runway ranges (meters unit of measurement)
1095
+ */
1096
+ trend?: RunwayInfoTrend;
1097
+ unit: RunwayInfoUnit;
1098
+ }
1099
+ interface ICloud {
1100
+ height?: number;
1101
+ quantity: CloudQuantity;
1102
+ type?: CloudType;
1103
+ }
1104
+ interface IAbstractWeatherContainer {
1105
+ wind?: IWind;
1106
+ visibility?: Visibility;
1107
+ verticalVisibility?: number;
1108
+ windShear?: IWindShear;
1109
+ cavok?: true;
1110
+ remark?: string;
1111
+ remarks: Remark[];
1112
+ clouds: ICloud[];
1113
+ weatherConditions: IWeatherCondition[];
1114
+ }
1115
+ interface IAbstractValidity {
1116
+ startDay: number;
1117
+ startHour: number;
1118
+ }
1119
+ /**
1120
+ * Exclusive for the TS port (because python has `time()` and js does not)
1121
+ */
1122
+ interface ITime {
1123
+ hour: number;
1124
+ minute: number;
1125
+ }
1126
+ interface IAbstractWeatherCode extends IAbstractWeatherContainer, ITime {
1127
+ day: number;
1128
+ airport?: IAirport;
1129
+ message: string;
1130
+ station: string;
1131
+ trends: IAbstractTrend[];
1132
+ }
1133
+ interface IAbstractWeatherCodeDated extends IAbstractWeatherCode {
1134
+ issued: Date;
1135
+ }
1136
+ interface IMetar extends IAbstractWeatherCode {
1137
+ temperature?: number;
1138
+ dewPoint?: number;
1139
+ altimeter?: number;
1140
+ nosig?: true;
1141
+ auto?: true;
1142
+ runwaysInfo: IRunwayInfo[];
1143
+ /**
1144
+ * Not used in North America
1145
+ */
1146
+ trends: IMetarTrend[];
1147
+ }
1148
+ interface ITAF extends IAbstractWeatherCode {
1149
+ validity: IValidity;
1150
+ maxTemperature?: ITemperatureDated;
1151
+ minTemperature?: ITemperatureDated;
1152
+ amendment?: true;
1153
+ trends: TAFTrend[];
1154
+ }
1155
+ interface IAbstractTrend extends IAbstractWeatherContainer {
1156
+ type: WeatherChangeType;
1157
+ }
1158
+ interface IMetarTrendTime extends ITime {
1159
+ type: TimeIndicator;
1160
+ }
1161
+ interface IMetarTrend extends IAbstractTrend {
1162
+ times: IMetarTrendTime[];
1163
+ }
1164
+ interface IBaseTAFTrend extends IAbstractTrend {
1165
+ /**
1166
+ * Will not be found on FM trends. May exist on others.
1167
+ *
1168
+ * If does not exist, probability is > 40%
1169
+ */
1170
+ probability?: number;
1171
+ /**
1172
+ * All trends have `startDay` and `startHour` defined. Additionally:
1173
+ *
1174
+ * - FM trends also have `startMinutes`. They **DO NOT** have an explicit end
1175
+ * validity (it is implied by the following FM).
1176
+ * - All others (PROB, TEMPO, BECMG) have `endDay` and `endHour`.
1177
+ *
1178
+ * All properties are allowed to be accessed (as optionals), but if you want
1179
+ * type guarantees, you can check the trend type. For example:
1180
+ *
1181
+ * ```ts
1182
+ * switch (trend.type) {
1183
+ * case WeatherChangeType.FM:
1184
+ * // trend.validity now has startMinutes defined
1185
+ * break;
1186
+ * case WeatherChangeType.PROB:
1187
+ * case WeatherChangeType.BECMG:
1188
+ * case WeatherChangeType.TEMPO:
1189
+ * // trend.validity now has endHour, endDay defined
1190
+ * }
1191
+ * ```
1192
+ */
1193
+ validity: IAbstractValidity & Partial<IFMValidity> & Partial<IValidity>;
1194
+ }
1195
+ declare type TAFTrend = IBaseTAFTrend & ({
1196
+ type: WeatherChangeType.FM;
1197
+ validity: IFMValidity;
1198
+ } | {
1199
+ type: WeatherChangeType;
1200
+ validity: IValidity;
1201
+ });
1202
+ interface IEndValidity {
1203
+ endHour: number;
1204
+ endDay: number;
1205
+ }
1206
+ interface IValidity extends IAbstractValidity, IEndValidity {
1207
+ }
1208
+ interface IValidityDated extends IAbstractValidity, IEndValidity {
1209
+ start: Date;
1210
+ end: Date;
1211
+ }
1212
+ interface IFMValidity extends IAbstractValidity {
1213
+ startMinutes: number;
1214
+ }
1215
+
1216
+ interface IMetarDated extends IMetar {
1217
+ issued: Date;
1218
+ }
1219
+
1220
+ declare type TAFTrendDated = IAbstractTrend & IBaseTAFTrend & {
1221
+ validity: IBaseTAFTrend["validity"] & {
1222
+ start: Date;
1223
+ end?: Date;
1224
+ };
1225
+ } & ({
1226
+ type: WeatherChangeType.FM;
1227
+ validity: IFMValidity & {
1228
+ start: Date;
1229
+ };
1230
+ } | {
1231
+ type: WeatherChangeType;
1232
+ validity: IValidity & {
1233
+ start: Date;
1234
+ end: Date;
1235
+ };
1236
+ });
1237
+ interface ITAFDated extends ITAF {
1238
+ issued: Date;
1239
+ validity: ITAF["validity"] & {
1240
+ start: Date;
1241
+ end: Date;
1242
+ };
1243
+ trends: TAFTrendDated[];
1244
+ }
1245
+
1246
+ declare abstract class ParseError extends Error {
1247
+ name: string;
1248
+ constructor(message?: string);
1249
+ }
1250
+ declare class InvalidWeatherStatementError extends ParseError {
1251
+ name: string;
1252
+ cause?: unknown;
1253
+ constructor(cause?: unknown);
1254
+ }
1255
+ /**
1256
+ * Thrown when command marked as canParse, but couldn't parse when
1257
+ * executing (for example, an invalid CloudQuantity)
1258
+ */
1259
+ declare class CommandExecutionError extends ParseError {
1260
+ name: string;
1261
+ constructor(message: string);
1262
+ }
1263
+ /**
1264
+ * Should never occur
1265
+ */
1266
+ declare class UnexpectedParseError extends ParseError {
1267
+ name: string;
1268
+ constructor(message?: string);
1269
+ }
1270
+
1271
+ /**
1272
+ * The initial forecast, extracted from the first line of the TAF, does not have
1273
+ * a trend type (FM, BECMG, etc)
1274
+ */
1275
+ declare type Forecast = Omit<TAFTrendDated, "type"> & Partial<Pick<TAFTrendDated, "type">>;
1276
+ interface IForecastContainer {
1277
+ station: string;
1278
+ issued: Date;
1279
+ start: Date;
1280
+ end: Date;
1281
+ message: string;
1282
+ forecast: Forecast[];
1283
+ }
1284
+ interface ICompositeForecast {
1285
+ /**
1286
+ * The base forecast (type is `FM` or initial group)
1287
+ */
1288
+ base: Forecast;
1289
+ /**
1290
+ * Any forecast here should pre-empt the base forecast. These forecasts may
1291
+ * have probabilities of occuring, be temporary, or otherwise notable
1292
+ * precipitation events
1293
+ *
1294
+ * `type` is (`BECMG`, `TEMPO` or `PROB`)
1295
+ */
1296
+ additional: Forecast[];
1297
+ }
1298
+ declare class TimestampOutOfBoundsError extends ParseError {
1299
+ name: string;
1300
+ constructor(message?: string);
1301
+ }
1302
+ declare function getCompositeForecastForDate(date: Date, forecastContainer: IForecastContainer): ICompositeForecast;
1303
+
1304
+ interface IMetarTAFParserOptions {
1305
+ locale?: Locale;
1306
+ }
1307
+ interface IMetarTAFParserOptionsDated extends IMetarTAFParserOptions {
1308
+ /**
1309
+ * This date should ideally be the date the report was issued. Otherwise, it
1310
+ * can be be +/- one week of the actual report date and work properly.
1311
+ *
1312
+ * So if you know the report was recently issued, you can pass `new Date()`
1313
+ *
1314
+ * This date is needed to create actual timestamps since the report only has
1315
+ * day of month, hour, and minute.
1316
+ */
1317
+ date: Date;
1318
+ }
1319
+ declare function parseMetar(rawMetar: string, options?: IMetarTAFParserOptions): IMetar;
1320
+ declare function parseMetar(rawMetar: string, options?: IMetarTAFParserOptionsDated): IMetarDated;
1321
+ declare function parseTAF(rawTAF: string, options?: IMetarTAFParserOptions): ITAF;
1322
+ declare function parseTAF(rawTAF: string, options?: IMetarTAFParserOptionsDated): ITAFDated;
1323
+ declare function parseTAFAsForecast(rawTAF: string, options: IMetarTAFParserOptionsDated): IForecastContainer;
1324
+
1325
+ export { CloudQuantity, CloudType, CommandExecutionError, Descriptive, Direction, Distance, DistanceUnit, Forecast, IAbstractTrend, IAbstractValidity, IAbstractWeatherCode, IAbstractWeatherCodeDated, IAbstractWeatherContainer, IAirport, IBaseRemark, IBaseTAFTrend, ICeilingHeightRemark, ICeilingSecondLocationRemark, ICloud, ICompositeForecast, ICountry, IEndValidity, IFMValidity, IForecastContainer, IHourlyMaximumMinimumTemperatureRemark, IHourlyMaximumTemperatureRemark, IHourlyMinimumTemperatureRemark, IHourlyPrecipitationAmountRemark, IHourlyPressureRemark, IHourlyTemperatureDewPointRemark, IIceAccretionRemark, IMetar, IMetarTAFParserOptions, IMetarTAFParserOptionsDated, IMetarTrend, IMetarTrendTime, IObscurationRemark, IPrecipitationAmount24HourRemark, IPrecipitationAmount36HourRemark, IPrecipitationBegEndRemark, IPrevailingVisibilityRemark, IRunwayInfo, ISeaLevelPressureRemark, ISecondLocationVisibilityRemark, ISectorVisibilityRemark, ISmallHailSizeRemark, ISnowIncreaseRemark, ISnowPelletsRemark, ISunshineDurationRemark, ISurfaceVisibilityRemark, ITAF, ITAFDated, ITemperatureDated, IThunderStormLocationMovingRemark, IThunderStormLocationRemark, ITime, ITornadicActivityBegEndRemark, ITornadicActivityBegRemark, ITornadicActivityEndRemark, ITowerVisibilityRemark, IUnknownRemark, IValidity, IValidityDated, IVariableSkyHeightRemark, IVariableSkyRemark, IVirgaDirectionRemark, IWaterEquivalentSnowRemark, IWeatherCondition, IWind, IWindPeakCommandRemark, IWindShear, IWindShiftFropaRemark, Intensity, InvalidWeatherStatementError, Locale, ParseError, Phenomenon, Remark, RemarkType, RunwayInfoTrend, RunwayInfoUnit, TAFTrend, TAFTrendDated, TimeIndicator, TimestampOutOfBoundsError, UnexpectedParseError, ValueIndicator, Visibility, WeatherChangeType, getCompositeForecastForDate, isWeatherConditionValid, parseMetar, parseTAF, parseTAFAsForecast };