-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathav.go
74 lines (60 loc) · 1.14 KB
/
av.go
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
65
66
67
68
69
70
71
72
73
74
// av.go
// Copyright(c) Matt Pharr 2024
// SPDX: MIT-only
package main
type Point2LL [2]float32
type Airport struct {
Name string
Elevation int
Location Point2LL
Runways []Runway
}
type AltitudeRestriction struct {
// We treat 0 as "unset", which works naturally for the bottom but
// requires occasional care at the top.
Range [2]float32
}
type Navaid struct {
Type string
Name string
Location Point2LL
}
type Fix struct {
Location Point2LL
}
type Runway struct {
Id string
Heading float32
Threshold Point2LL
Elevation int
}
type AirwayLevel int
const (
AirwayLevelAll = iota
AirwayLevelLow
AirwayLevelHigh
)
type AirwayDirection int
const (
AirwayDirectionAny = iota
AirwayDirectionForward
AirwayDirectionBackward
)
type AirwayFix struct {
Fix string
Level AirwayLevel
Direction AirwayDirection
}
type Airway struct {
Fixes []AirwayFix
}
type Waypoint struct {
Fix string
Location Point2LL
AltitudeRestriction *AltitudeRestriction
Speed int
Heading int
FlyOver bool
Delete bool
IAF, IF, FAF bool
}