forked from larrrssss/metar-decoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
64 lines (59 loc) · 1.11 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
interface Cloud {
cumulonimbus: boolean,
name: string,
code: string,
density: string,
altitude: number,
}
export interface Weather {
abbreviation: string,
meaning: string,
}
export interface Airport {
icao: string,
iata: string,
name: string,
city: string,
state: string,
country: string,
elevation: number,
lat: number,
lon: number,
tz: string,
}
export interface Wind {
direction: string,
guest: number | null,
unit: string,
speed: number,
variation: {
min: number,
max: number,
} | null,
}
export interface Rvr {
runway: string,
visibility: { min: string, max: string } | string,
trend: string,
}
export interface DecodedMetar {
airport: Airport | string,
recorded_at: Date,
wind: Wind,
cavok: boolean,
auto: boolean,
visibility: number,
min_visibility: { visibility: number, direction: string } | undefined,
rvr: Rvr[],
clouds: Cloud[],
weather: Weather[],
dewpoint: number,
temperature: number,
qnh: number,
trend: {
type: string,
full: string,
},
vertical_visibility: string,
fetchAirport: () => Promise<Airport | null>,
}