Skip to content

Commit f774747

Browse files
committed
feat(cherrypick): update ts type signatures
1 parent 412231e commit f774747

File tree

7 files changed

+55
-5
lines changed

7 files changed

+55
-5
lines changed

src/js/types/airport.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Coordinates, Feet, Knots } from "./math"
1+
import { Coordinates, Degrees, Feet, Knots } from "./math"
22

33
export enum IfrCapability {
44
Yes = "Y",
@@ -13,9 +13,16 @@ export enum RunwaySurfaceCode {
1313
}
1414

1515
export interface Airport {
16+
airport_type?: string
1617
area_code: string
1718
ident: string
1819
icao_code: string
20+
city?: string
21+
continent?: string
22+
country?: string
23+
country_3letter?: string
24+
state?: string
25+
state_2letter?: string
1926
location: Coordinates
2027
name: string
2128
ifr_capability: IfrCapability
@@ -26,4 +33,5 @@ export interface Airport {
2633
speed_limit?: Knots
2734
speed_limit_altitude?: Feet
2835
iata_ident?: string
36+
magnetic_variation?: Degrees
2937
}

src/js/types/communication.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@ export interface Communication {
6565
callsign?: string
6666
name?: string
6767
location: Coordinates
68+
remote_facility?: string
69+
remote_facility_icao_code?: string
70+
sector_facility?: string
71+
sector_facility_icao_code?: string
72+
sectorization?: string
6873
}

src/js/types/ndb_navaid.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import { Coordinates, KiloHertz } from "./math"
1+
import { Coordinates, KiloHertz, NauticalMiles } from "./math"
22

33
export interface NdbNavaid {
44
area_code: string
5+
continent?: string
6+
country?: string
7+
datum_code?: string
58
airport_ident?: string
69
icao_code: string
710
ident: string
811
name: string
912
frequency: KiloHertz
1013
location: Coordinates
14+
range?: NauticalMiles
1115
}

src/js/types/path_point.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface PathPoint {
1616
ident: string
1717
landing_threshold_location: Coordinates
1818
ltp_ellipsoid_height: Metres
19-
fpap_ellipsoid_height: Metres
19+
fpap_ellipsoid_height?: Metres
2020
ltp_orthometric_height?: Metres
2121
fpap_orthometric_height?: Metres
2222
glidepath_angle: Degrees

src/js/types/runway_threshold.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
11
import { Coordinates, Degrees, Feet } from "./math"
22

3+
// Im not sure why we chose an enum, but I think its because its Y/N in the DFDv2 Spec
4+
export enum RunwayLights {
5+
Yes = "Y",
6+
No = "N",
7+
}
8+
9+
export enum RunwaySurface {
10+
Asphalt = "ASPH",
11+
Turf = "TURF",
12+
Gravel = "GRVL",
13+
Concrete = "CONC",
14+
Water = "WATE",
15+
Bitumen = "BITU",
16+
Unpaved = "UNPV",
17+
}
18+
19+
export enum TrafficPattern {
20+
Left = "L",
21+
Right = "R",
22+
}
23+
324
export interface RunwayThreshold {
425
ident: string
526
icao_code: string
627
length: Feet
728
width: Feet
829
true_bearing: Degrees
930
magnetic_bearing: Degrees
31+
lights?: RunwayLights
1032
gradient: Degrees
1133
location: Coordinates
1234
elevation: Feet
35+
surface?: RunwaySurface
36+
traffic_pattern?: TrafficPattern
1337
}

src/js/types/vhfnavaid.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
import { Coordinates, Degrees, MegaHertz } from "./math"
1+
import { Coordinates, Degrees, MegaHertz, NauticalMiles } from "./math"
22

33
export interface VhfNavaid {
44
area_code: string
55
airport_ident?: string
6+
continent?: string
7+
country?: string
8+
datum_code?: string
69
icao_code: string
710
ident: string
811
name: string
912
frequency: MegaHertz
1013
location: Coordinates
14+
magnetic_variation?: Degrees
1115
station_declination?: Degrees
16+
range?: NauticalMiles
1217
}

src/js/types/waypoint.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
import { Coordinates } from "./math"
1+
import { Coordinates, Degrees } from "./math"
22

33
export interface Waypoint {
44
area_code: string
55
airport_ident?: string
6+
continent?: string
7+
country?: string
8+
datum_code?: string
69
icao_code: string
710
ident: string
811
name: string
912
location: Coordinates
13+
magnetic_variation?: Degrees
1014
}

0 commit comments

Comments
 (0)