aixm 1.1.0 → 1.2.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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +14 -0
- data/README.md +3 -1
- data/lib/aixm/a.rb +29 -15
- data/lib/aixm/association.rb +2 -1
- data/lib/aixm/classes.rb +4 -0
- data/lib/aixm/component/address.rb +15 -9
- data/lib/aixm/component/approach_lighting.rb +28 -25
- data/lib/aixm/component/fato.rb +38 -26
- data/lib/aixm/component/frequency.rb +32 -20
- data/lib/aixm/component/geometry/arc.rb +16 -3
- data/lib/aixm/component/geometry/border.rb +8 -1
- data/lib/aixm/component/geometry/circle.rb +14 -2
- data/lib/aixm/component/geometry/point.rb +8 -1
- data/lib/aixm/component/geometry/rhumb_line.rb +8 -1
- data/lib/aixm/component/geometry.rb +20 -10
- data/lib/aixm/component/helipad.rb +41 -20
- data/lib/aixm/component/layer.rb +31 -20
- data/lib/aixm/component/lighting.rb +22 -24
- data/lib/aixm/component/runway.rb +32 -25
- data/lib/aixm/component/service.rb +11 -17
- data/lib/aixm/component/surface.rb +47 -14
- data/lib/aixm/component/timesheet.rb +178 -0
- data/lib/aixm/component/timetable.rb +32 -13
- data/lib/aixm/component/vasis.rb +36 -6
- data/lib/aixm/component/vertical_limit.rb +26 -4
- data/lib/aixm/component.rb +4 -1
- data/lib/aixm/concerns/hash_equality.rb +21 -0
- data/lib/aixm/concerns/intensity.rb +30 -0
- data/lib/aixm/concerns/marking.rb +21 -0
- data/lib/aixm/concerns/remarks.rb +21 -0
- data/lib/aixm/concerns/timetable.rb +22 -0
- data/lib/aixm/d.rb +20 -14
- data/lib/aixm/document.rb +22 -5
- data/lib/aixm/f.rb +29 -17
- data/lib/aixm/feature/airport.rb +91 -45
- data/lib/aixm/feature/airspace.rb +28 -5
- data/lib/aixm/feature/navigational_aid/designated_point.rb +8 -1
- data/lib/aixm/feature/navigational_aid/dme.rb +12 -2
- data/lib/aixm/feature/navigational_aid/marker.rb +9 -2
- data/lib/aixm/feature/navigational_aid/ndb.rb +15 -3
- data/lib/aixm/feature/navigational_aid/vor.rb +20 -3
- data/lib/aixm/feature/navigational_aid.rb +29 -20
- data/lib/aixm/feature/obstacle.rb +105 -29
- data/lib/aixm/feature/obstacle_group.rb +3 -7
- data/lib/aixm/feature/organisation.rb +23 -14
- data/lib/aixm/feature/unit.rb +23 -11
- data/lib/aixm/feature.rb +23 -4
- data/lib/aixm/memoize.rb +3 -3
- data/lib/aixm/p.rb +20 -14
- data/lib/aixm/payload_hash.rb +5 -2
- data/lib/aixm/r.rb +15 -12
- data/lib/aixm/refinements.rb +42 -2
- data/lib/aixm/schedule/date.rb +181 -0
- data/lib/aixm/schedule/day.rb +114 -0
- data/lib/aixm/schedule/time.rb +255 -0
- data/lib/aixm/shortcuts.rb +3 -0
- data/lib/aixm/version.rb +1 -1
- data/lib/aixm/w.rb +20 -13
- data/lib/aixm/xy.rb +36 -25
- data/lib/aixm/z.rb +29 -17
- data/lib/aixm.rb +13 -0
- data.tar.gz.sig +0 -0
- metadata +22 -13
- metadata.gz.sig +0 -0
@@ -20,9 +20,16 @@ module AIXM
|
|
20
20
|
# @return [AIXM::Component::Geometry] geometry this segment belongs to
|
21
21
|
belongs_to :geometry, as: :segment
|
22
22
|
|
23
|
-
#
|
23
|
+
# (Starting) point
|
24
|
+
#
|
25
|
+
# @overload xy
|
26
|
+
# @return [AIXM::XY]
|
27
|
+
# @overload xy=(value)
|
28
|
+
# @param value [AIXM::XY]
|
24
29
|
attr_reader :xy
|
25
30
|
|
31
|
+
# See the {cheat sheet}[AIXM::Component::Geometry::RhumbLine] for
|
32
|
+
# examples on how to create instances of this class.
|
26
33
|
def initialize(xy:)
|
27
34
|
self.xy = xy
|
28
35
|
end
|
@@ -49,6 +49,8 @@ module AIXM
|
|
49
49
|
# @return [AIXM::Feature::Airspace] airspace the geometry defines
|
50
50
|
belongs_to :airspace
|
51
51
|
|
52
|
+
# See the {cheat sheet}[AIXM::Component::Geometry] for examples on how to
|
53
|
+
# create instances of this class.
|
52
54
|
def initialize(*segments)
|
53
55
|
segments.each { add_segment(_1) }
|
54
56
|
end
|
@@ -58,36 +60,44 @@ module AIXM
|
|
58
60
|
%Q(#<#{self.class} segments=#{segments.count.inspect}>)
|
59
61
|
end
|
60
62
|
|
61
|
-
#
|
63
|
+
# Whether the geometry is closed
|
64
|
+
#
|
65
|
+
# @return [Boolean]
|
62
66
|
def closed?
|
63
67
|
point? || circle? || polygon?
|
64
68
|
end
|
65
69
|
|
66
|
-
#
|
67
|
-
|
68
|
-
|
69
|
-
segments.map { _1.to_xml }.join
|
70
|
-
end
|
71
|
-
|
72
|
-
# @return [Boolean] Single point geometry?
|
70
|
+
# Whether a single point geometry
|
71
|
+
#
|
72
|
+
# @return [Boolean]
|
73
73
|
def point?
|
74
74
|
segments.size == 1 &&
|
75
75
|
segments.first.is_a?(AIXM::Component::Geometry::Point)
|
76
76
|
end
|
77
77
|
|
78
|
-
#
|
78
|
+
# Whether a circle shaped geometry
|
79
|
+
#
|
80
|
+
# @return [Boolean]
|
79
81
|
def circle?
|
80
82
|
segments.size == 1 &&
|
81
83
|
segments.first.is_a?(AIXM::Component::Geometry::Circle)
|
82
84
|
end
|
83
85
|
|
84
|
-
#
|
86
|
+
# Whether a polygon shaped geometry
|
87
|
+
#
|
88
|
+
# @return [Boolean]
|
85
89
|
def polygon?
|
86
90
|
segments.size >= 3 &&
|
87
91
|
!segments.any? { _1.is_a?(AIXM::Component::Geometry::Circle) } &&
|
88
92
|
segments.last.is_a?(AIXM::Component::Geometry::Point) &&
|
89
93
|
segments.first.xy == segments.last.xy
|
90
94
|
end
|
95
|
+
|
96
|
+
# @return [String] AIXM or OFMX markup
|
97
|
+
def to_xml
|
98
|
+
fail(GeometryError.new("geometry is not closed", self)) unless closed?
|
99
|
+
segments.map { _1.to_xml }.join
|
100
|
+
end
|
91
101
|
end
|
92
102
|
|
93
103
|
end
|
@@ -25,6 +25,8 @@ module AIXM
|
|
25
25
|
class Helipad < Component
|
26
26
|
include AIXM::Association
|
27
27
|
include AIXM::Memoize
|
28
|
+
include AIXM::Concerns::Marking
|
29
|
+
include AIXM::Concerns::Remarks
|
28
30
|
|
29
31
|
PERFORMANCE_CLASSES = {
|
30
32
|
'1': :'1',
|
@@ -68,30 +70,57 @@ module AIXM
|
|
68
70
|
# @return [AIXM::Feature::Airport] airport this helipad belongs to
|
69
71
|
belongs_to :airport
|
70
72
|
|
71
|
-
#
|
73
|
+
# Full name (e.g. "H1")
|
74
|
+
#
|
75
|
+
# @overload name
|
76
|
+
# @return [String]
|
77
|
+
# @overload name=(value)
|
78
|
+
# @param value [String]
|
72
79
|
attr_reader :name
|
73
80
|
|
74
|
-
#
|
81
|
+
# Center point
|
82
|
+
#
|
83
|
+
# @overload center_xy
|
84
|
+
# @return [AIXM::XY]
|
85
|
+
# @overload center_xy=(value)
|
86
|
+
# @param value [AIXM::XY]
|
75
87
|
attr_reader :xy
|
76
88
|
|
77
|
-
#
|
89
|
+
# Elevation in +:qnh+
|
90
|
+
#
|
91
|
+
# @overload z
|
92
|
+
# @return [AIXM::Z, nil]
|
93
|
+
# @overload z=(value)
|
94
|
+
# @param value [AIXM::Z, nil]
|
78
95
|
attr_reader :z
|
79
96
|
|
80
|
-
#
|
97
|
+
# Dimensions
|
98
|
+
#
|
99
|
+
# @overload dimensions
|
100
|
+
# @return [AIXM::R, nil]
|
101
|
+
# @overload dimensions=(value)
|
102
|
+
# @param value [AIXM::R, nil]
|
81
103
|
attr_reader :dimensions
|
82
104
|
|
83
|
-
#
|
84
|
-
|
85
|
-
|
86
|
-
#
|
105
|
+
# Suitable performance class
|
106
|
+
#
|
107
|
+
# @overload performance_class
|
108
|
+
# @return [Integer, Symbol, nil]
|
109
|
+
# @overload performance_class=(value)
|
110
|
+
# @param value [Integer, Symbol, nil]
|
87
111
|
attr_reader :performance_class
|
88
112
|
|
89
|
-
#
|
113
|
+
# Status of the helipad
|
114
|
+
#
|
115
|
+
# @overload status
|
116
|
+
# @return [Symbol, nil] any of {STATUSES} or +nil+ for normal operation
|
117
|
+
# @overload status=(value)
|
118
|
+
# @param value [Symbol, nil] any of {STATUSES} or +nil+ for normal
|
119
|
+
# operation
|
90
120
|
attr_reader :status
|
91
121
|
|
92
|
-
#
|
93
|
-
|
94
|
-
|
122
|
+
# See the {cheat sheet}[AIXM::Component::Helipad] for examples on how to
|
123
|
+
# create instances of this class.
|
95
124
|
def initialize(name:, xy:)
|
96
125
|
self.name, self.xy = name, xy
|
97
126
|
self.surface = AIXM.surface
|
@@ -122,10 +151,6 @@ module AIXM
|
|
122
151
|
@dimensions = value
|
123
152
|
end
|
124
153
|
|
125
|
-
def marking=(value)
|
126
|
-
@marking = value&.to_s
|
127
|
-
end
|
128
|
-
|
129
154
|
def performance_class=(value)
|
130
155
|
@performance_class = value.nil? ? nil : (PERFORMANCE_CLASSES.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid performance class"))
|
131
156
|
end
|
@@ -134,10 +159,6 @@ module AIXM
|
|
134
159
|
@status = value.nil? ? nil : (STATUSES.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid status"))
|
135
160
|
end
|
136
161
|
|
137
|
-
def remarks=(value)
|
138
|
-
@remarks = value&.to_s
|
139
|
-
end
|
140
|
-
|
141
162
|
# @return [String] UID markup
|
142
163
|
def to_uid
|
143
164
|
builder = Builder::XmlMarkup.new(indent: 2)
|
data/lib/aixm/component/layer.rb
CHANGED
@@ -21,6 +21,8 @@ module AIXM
|
|
21
21
|
# @see https://gitlab.com/openflightmaps/ofmx/wikis/Airspace
|
22
22
|
class Layer < Component
|
23
23
|
include AIXM::Association
|
24
|
+
include AIXM::Concerns::Timetable
|
25
|
+
include AIXM::Concerns::Remarks
|
24
26
|
|
25
27
|
CLASSES = (:A..:G).freeze
|
26
28
|
|
@@ -106,18 +108,24 @@ module AIXM
|
|
106
108
|
# @return [AIXM::Feature::Airspace] airspace the layer defines
|
107
109
|
belongs_to :airspace
|
108
110
|
|
109
|
-
#
|
111
|
+
# Four letter location identifier as published in the ICAO DOC 7910
|
112
|
+
#
|
113
|
+
# @overload location_indicator
|
114
|
+
# @return [String, nil]
|
115
|
+
# @overload location_indicator=(value)
|
116
|
+
# @param value [String, nil]
|
110
117
|
attr_reader :location_indicator
|
111
118
|
|
112
|
-
#
|
119
|
+
# Primary activity
|
120
|
+
#
|
121
|
+
# @overload activity
|
122
|
+
# @return [Symbol, nil] any of {ACTIVITIES}
|
123
|
+
# @overload activity=(value)
|
124
|
+
# @param value [Symbol, nil] any of {ACTIVITIES}
|
113
125
|
attr_reader :activity
|
114
126
|
|
115
|
-
#
|
116
|
-
|
117
|
-
|
118
|
-
# @return [String, nil] free text remarks
|
119
|
-
attr_reader :remarks
|
120
|
-
|
127
|
+
# See the {cheat sheet}[AIXM::Component::Layer] for examples on how to
|
128
|
+
# create instances of this class.
|
121
129
|
def initialize(class: nil, location_indicator: nil, vertical_limit:)
|
122
130
|
self.class = binding.local_variable_get(:class)
|
123
131
|
self.location_indicator, self.vertical_limit = location_indicator, vertical_limit
|
@@ -129,8 +137,15 @@ module AIXM
|
|
129
137
|
%Q(#<#{__class__} class=#{@klass.inspect}>)
|
130
138
|
end
|
131
139
|
|
140
|
+
# Class of layer.
|
141
|
+
#
|
142
|
+
# @note Use +Object#__class__+ alias to query the Ruby object class.
|
143
|
+
#
|
132
144
|
# @!attribute class
|
133
|
-
# @
|
145
|
+
# @overload class
|
146
|
+
# @return [Symbol] any of {CLASSES}
|
147
|
+
# @overload class=(value)
|
148
|
+
# @param value [Symbol] any of {CLASSES}
|
134
149
|
def class
|
135
150
|
@klass
|
136
151
|
end
|
@@ -149,13 +164,13 @@ module AIXM
|
|
149
164
|
@activity = value.nil? ? nil : ACTIVITIES.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid activity")
|
150
165
|
end
|
151
166
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
#
|
158
|
-
#
|
167
|
+
# Whether the layer may be activated selectively.
|
168
|
+
#
|
169
|
+
# @!attribute selective
|
170
|
+
# @overload selective?
|
171
|
+
# @return [Boolean]
|
172
|
+
# @overload selective=(value)
|
173
|
+
# @param value [Boolean]
|
159
174
|
def selective?
|
160
175
|
@selective
|
161
176
|
end
|
@@ -165,10 +180,6 @@ module AIXM
|
|
165
180
|
@selective = value
|
166
181
|
end
|
167
182
|
|
168
|
-
def remarks=(value)
|
169
|
-
@remarks = value&.to_s
|
170
|
-
end
|
171
|
-
|
172
183
|
# @return [String] AIXM or OFMX markup
|
173
184
|
def to_xml
|
174
185
|
builder = Builder::XmlMarkup.new(indent: 2)
|
@@ -20,6 +20,8 @@ module AIXM
|
|
20
20
|
class Lighting < Component
|
21
21
|
include AIXM::Association
|
22
22
|
include AIXM::Memoize
|
23
|
+
include AIXM::Concerns::Intensity
|
24
|
+
include AIXM::Concerns::Remarks
|
23
25
|
|
24
26
|
POSITIONS = {
|
25
27
|
TDZ: :touch_down_zone,
|
@@ -40,13 +42,6 @@ module AIXM
|
|
40
42
|
OTHER: :other # specify in remarks
|
41
43
|
}.freeze
|
42
44
|
|
43
|
-
INTENSITIES = {
|
44
|
-
LIL: :low,
|
45
|
-
LIM: :medium,
|
46
|
-
LIH: :high,
|
47
|
-
OTHER: :other # specify in remarks
|
48
|
-
}.freeze
|
49
|
-
|
50
45
|
COLORS = {
|
51
46
|
YEL: :yellow,
|
52
47
|
RED: :red,
|
@@ -61,21 +56,32 @@ module AIXM
|
|
61
56
|
# @return [AIXM::Component::Runway::Direction, AIXM::Component::FATO::Direction, AIXM::Component::Helipad] lighted entity
|
62
57
|
belongs_to :lightable
|
63
58
|
|
64
|
-
#
|
59
|
+
# Position of the lighting system
|
60
|
+
#
|
61
|
+
# @overload position
|
62
|
+
# @return [Symbol, nil] any of {POSITIONS}
|
63
|
+
# @overload position=(value)
|
64
|
+
# @param value [Symbol, nil] any of {POSITIONS}
|
65
65
|
attr_reader :position
|
66
66
|
|
67
|
-
#
|
67
|
+
# Detailed description
|
68
|
+
#
|
69
|
+
# @overload description
|
70
|
+
# @return [String, nil]
|
71
|
+
# @overload description=(value)
|
72
|
+
# @param value [String, nil]
|
68
73
|
attr_reader :description
|
69
74
|
|
70
|
-
#
|
71
|
-
|
72
|
-
|
73
|
-
#
|
75
|
+
# Color of lights
|
76
|
+
#
|
77
|
+
# @overload color
|
78
|
+
# @return [Symbol, nil] any of {COLORS}
|
79
|
+
# @overload color=(value)
|
80
|
+
# @param value [Symbol, nil] any of {COLORS}
|
74
81
|
attr_reader :color
|
75
82
|
|
76
|
-
#
|
77
|
-
|
78
|
-
|
83
|
+
# See the {cheat sheet}[AIXM::Component::Lighting] for examples on how to
|
84
|
+
# create instances of this class.
|
79
85
|
def initialize(position:)
|
80
86
|
self.position = position
|
81
87
|
end
|
@@ -93,18 +99,10 @@ module AIXM
|
|
93
99
|
@description = value&.to_s
|
94
100
|
end
|
95
101
|
|
96
|
-
def intensity=(value)
|
97
|
-
@intensity = value.nil? ? nil : INTENSITIES.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid intensity")
|
98
|
-
end
|
99
|
-
|
100
102
|
def color=(value)
|
101
103
|
@color = value.nil? ? nil : COLORS.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid color")
|
102
104
|
end
|
103
105
|
|
104
|
-
def remarks=(value)
|
105
|
-
@remarks = value&.to_s
|
106
|
-
end
|
107
|
-
|
108
106
|
# @return [String] UID markup
|
109
107
|
def to_uid(as:)
|
110
108
|
builder = Builder::XmlMarkup.new(indent: 2)
|
@@ -51,6 +51,8 @@ module AIXM
|
|
51
51
|
class Runway < Component
|
52
52
|
include AIXM::Association
|
53
53
|
include AIXM::Memoize
|
54
|
+
include AIXM::Concerns::Marking
|
55
|
+
include AIXM::Concerns::Remarks
|
54
56
|
|
55
57
|
STATUSES = {
|
56
58
|
CLSD: :closed,
|
@@ -86,21 +88,33 @@ module AIXM
|
|
86
88
|
# @return [AIXM::Feature::Airport] airport the runway belongs to
|
87
89
|
belongs_to :airport
|
88
90
|
|
89
|
-
#
|
91
|
+
# Full name of runway (e.g. "12/30" or "16L/34R")
|
92
|
+
#
|
93
|
+
# @overload name
|
94
|
+
# @return [String]
|
95
|
+
# @overload name=(value)
|
96
|
+
# @param value [String]
|
90
97
|
attr_reader :name
|
91
98
|
|
92
|
-
#
|
99
|
+
# Dimensions
|
100
|
+
#
|
101
|
+
# @overload dimensions
|
102
|
+
# @return [AIXM::R, nil]
|
103
|
+
# @overload dimensions=(value)
|
104
|
+
# @param value [AIXM::R, nil]
|
93
105
|
attr_reader :dimensions
|
94
106
|
|
95
|
-
#
|
96
|
-
|
97
|
-
|
98
|
-
#
|
107
|
+
# Status of the runway
|
108
|
+
#
|
109
|
+
# @overload status
|
110
|
+
# @return [Symbol, nil] any of {STATUSES} or +nil+ for normal operation
|
111
|
+
# @overload status=(value)
|
112
|
+
# @param value [Symbol, nil] any of {STATUSES} or +nil+ for normal
|
113
|
+
# operation
|
99
114
|
attr_reader :status
|
100
115
|
|
101
|
-
#
|
102
|
-
|
103
|
-
|
116
|
+
# See the {cheat sheet}[AIXM::Component::Runway] for examples on how to
|
117
|
+
# create instances of this class.
|
104
118
|
def initialize(name:)
|
105
119
|
self.name = name
|
106
120
|
@name.split("/").tap do |forth_name, back_name|
|
@@ -126,18 +140,10 @@ module AIXM
|
|
126
140
|
@dimensions = value
|
127
141
|
end
|
128
142
|
|
129
|
-
def marking=(value)
|
130
|
-
@marking = value&.to_s
|
131
|
-
end
|
132
|
-
|
133
143
|
def status=(value)
|
134
144
|
@status = value.nil? ? nil : (STATUSES.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid status"))
|
135
145
|
end
|
136
146
|
|
137
|
-
def remarks=(value)
|
138
|
-
@remarks = value&.to_s
|
139
|
-
end
|
140
|
-
|
141
147
|
# @return [String] UID markup
|
142
148
|
def to_uid
|
143
149
|
builder = Builder::XmlMarkup.new(indent: 2)
|
@@ -180,6 +186,7 @@ module AIXM
|
|
180
186
|
class Direction
|
181
187
|
include AIXM::Association
|
182
188
|
include AIXM::Memoize
|
189
|
+
include AIXM::Concerns::Remarks
|
183
190
|
|
184
191
|
VFR_PATTERNS = {
|
185
192
|
L: :left,
|
@@ -207,7 +214,12 @@ module AIXM
|
|
207
214
|
# @return [AIXM::Component::Runway] runway the runway direction is further describing
|
208
215
|
belongs_to :runway, readonly: true
|
209
216
|
|
210
|
-
#
|
217
|
+
# Partial name of runway (e.g. "12" or "16L")
|
218
|
+
#
|
219
|
+
# @overload name
|
220
|
+
# @return [AIXM::A]
|
221
|
+
# @overload name=(value)
|
222
|
+
# @param value [AIXM::A]
|
211
223
|
attr_reader :name
|
212
224
|
|
213
225
|
# @return [AIXM::A, nil] (true) geographic bearing in degrees
|
@@ -231,9 +243,8 @@ module AIXM
|
|
231
243
|
# @return [Symbol, nil] direction of the VFR flight pattern (see {VFR_PATTERNS})
|
232
244
|
attr_reader :vfr_pattern
|
233
245
|
|
234
|
-
#
|
235
|
-
|
236
|
-
|
246
|
+
# See the {cheat sheet}[AIXM::Component::Runway] for examples on how to
|
247
|
+
# create instances of this class.
|
237
248
|
def initialize(name:)
|
238
249
|
self.name = name
|
239
250
|
self.vasis = AIXM.vasis
|
@@ -288,10 +299,6 @@ module AIXM
|
|
288
299
|
@vfr_pattern = value.nil? ? nil : (VFR_PATTERNS.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid VFR pattern"))
|
289
300
|
end
|
290
301
|
|
291
|
-
def remarks=(value)
|
292
|
-
@remarks = value&.to_s
|
293
|
-
end
|
294
|
-
|
295
302
|
# @return [AIXM::A] magnetic bearing in degrees
|
296
303
|
def magnetic_bearing
|
297
304
|
if geographic_bearing && runway.airport.declination
|
@@ -17,6 +17,8 @@ module AIXM
|
|
17
17
|
class Service < Component
|
18
18
|
include AIXM::Association
|
19
19
|
include AIXM::Memoize
|
20
|
+
include AIXM::Concerns::Timetable
|
21
|
+
include AIXM::Concerns::Remarks
|
20
22
|
|
21
23
|
TYPES = {
|
22
24
|
ACS: :area_control_service,
|
@@ -122,7 +124,7 @@ module AIXM
|
|
122
124
|
:transcribed_weather_broadcast_service => :meteorological_office,
|
123
125
|
:uhf_direction_finding_service => :uhf_direction_finding_station,
|
124
126
|
:upper_area_control_service => :upper_area_control_centre,
|
125
|
-
:
|
127
|
+
:vdf_direction_finding_service => :vdf_direction_finding_station,
|
126
128
|
:volmet_service => :meteorological_office,
|
127
129
|
:other => :other
|
128
130
|
}.freeze
|
@@ -150,15 +152,16 @@ module AIXM
|
|
150
152
|
# @return [AIXM::Component::Layer] airspace layer this service is provided within
|
151
153
|
belongs_to :layer
|
152
154
|
|
153
|
-
#
|
155
|
+
# Type of service
|
156
|
+
#
|
157
|
+
# @overload type
|
158
|
+
# @return [Symbol] any of {TYPES}
|
159
|
+
# @overload type=(value)
|
160
|
+
# @param value [Symbol] any of {TYPES}
|
154
161
|
attr_reader :type
|
155
162
|
|
156
|
-
#
|
157
|
-
|
158
|
-
|
159
|
-
# @return [String, nil] free text remarks
|
160
|
-
attr_reader :remarks
|
161
|
-
|
163
|
+
# See the {cheat sheet}[AIXM::Component::Service] for examples on how to
|
164
|
+
# create instances of this class.
|
162
165
|
def initialize(type:)
|
163
166
|
self.type = type
|
164
167
|
@sequence = 1
|
@@ -173,15 +176,6 @@ module AIXM
|
|
173
176
|
@type = TYPES.lookup(value&.to_s&.to_sym, nil) || fail(ArgumentError, "invalid type")
|
174
177
|
end
|
175
178
|
|
176
|
-
def timetable=(value)
|
177
|
-
fail(ArgumentError, "invalid timetable") unless value.nil? || value.is_a?(AIXM::Component::Timetable)
|
178
|
-
@timetable = value
|
179
|
-
end
|
180
|
-
|
181
|
-
def remarks=(value)
|
182
|
-
@remarks = value&.to_s
|
183
|
-
end
|
184
|
-
|
185
179
|
# Guess the unit type for this service
|
186
180
|
#
|
187
181
|
# @return [Symbol, nil] guessed unit type or +nil+ if unmappable
|
@@ -23,6 +23,8 @@ module AIXM
|
|
23
23
|
# @see https://gitlab.com/openflightmaps/ofmx/wikis/Airport#tla-helipad-tlof
|
24
24
|
# @see https://gitlab.com/openflightmaps/ofmx/wikis/Airport#fto-fato
|
25
25
|
class Surface < Component
|
26
|
+
include AIXM::Concerns::Remarks
|
27
|
+
|
26
28
|
COMPOSITIONS = {
|
27
29
|
ASPH: :asphalt,
|
28
30
|
BITUM: :bitumen, # dug up, bound and rolled ground
|
@@ -59,27 +61,56 @@ module AIXM
|
|
59
61
|
OTHER: :other
|
60
62
|
}.freeze
|
61
63
|
|
62
|
-
#
|
64
|
+
# Composition of the surface.
|
65
|
+
#
|
66
|
+
# @overload composition
|
67
|
+
# @return [Symbol, nil] any of {COMPOSITIONS}
|
68
|
+
# @overload composition=(value)
|
69
|
+
# @param value [Symbol, nil] any of {COMPOSITIONS}
|
63
70
|
attr_reader :composition
|
64
71
|
|
65
|
-
#
|
72
|
+
# Preparation of the surface.
|
73
|
+
#
|
74
|
+
# @overload preparation
|
75
|
+
# @return [Symbol, nil] any of {PREPARATIONS}
|
76
|
+
# @overload preparation=(value)
|
77
|
+
# @param value [Symbol, nil] any of {PREPARATIONS}
|
66
78
|
attr_reader :preparation
|
67
79
|
|
68
|
-
#
|
80
|
+
# Condition of the surface.
|
81
|
+
#
|
82
|
+
# @overload condition
|
83
|
+
# @return [Symbol, nil] any of {CONDITIONS}
|
84
|
+
# @overload condition=(value)
|
85
|
+
# @param value [Symbol, nil] any of {CONDITIONS}
|
69
86
|
attr_reader :condition
|
70
87
|
|
71
|
-
#
|
88
|
+
# Single isolated wheel load weight
|
89
|
+
#
|
90
|
+
# @overload siwl_weight
|
91
|
+
# @return [AIXM::W, nil]
|
92
|
+
# @overload siwl_weight=(value)
|
93
|
+
# @param value [AIXM::W, nil]
|
72
94
|
attr_reader :siwl_weight
|
73
95
|
|
74
|
-
#
|
96
|
+
# Single isolated wheel load tire pressure
|
97
|
+
#
|
98
|
+
# @overload siwl_tire_pressure
|
99
|
+
# @return [AIXM::P, nil]
|
100
|
+
# @overload siwl_tire_pressure=(value)
|
101
|
+
# @param value [AIXM::P, nil]
|
75
102
|
attr_reader :siwl_tire_pressure
|
76
103
|
|
77
|
-
#
|
104
|
+
# All-up wheel weight
|
105
|
+
#
|
106
|
+
# @overload auw_weight
|
107
|
+
# @return [AIXM::W, nil]
|
108
|
+
# @overload auw_weight=(value)
|
109
|
+
# @param value [AIXM::W, nil]
|
78
110
|
attr_reader :auw_weight
|
79
111
|
|
80
|
-
#
|
81
|
-
|
82
|
-
|
112
|
+
# See the {cheat sheet}[AIXM::Component::Surface] for examples on how to
|
113
|
+
# create instances of this class.
|
83
114
|
def initialize
|
84
115
|
@pcn = {}
|
85
116
|
end
|
@@ -101,7 +132,13 @@ module AIXM
|
|
101
132
|
@condition = value.nil? ? nil : CONDITIONS.lookup(value.to_s.to_sym, nil) || fail(ArgumentError, "invalid condition")
|
102
133
|
end
|
103
134
|
|
104
|
-
#
|
135
|
+
# Pavement classification number (e.g. "59/F/A/W/T")
|
136
|
+
#
|
137
|
+
# @!attribute pcn
|
138
|
+
# @overload pcn
|
139
|
+
# @return [String, nil]
|
140
|
+
# @overload pcn=(value)
|
141
|
+
# @param value [String, nil]
|
105
142
|
def pcn
|
106
143
|
@pcn.none? ? nil : @pcn.values.join("/".freeze)
|
107
144
|
end
|
@@ -127,10 +164,6 @@ module AIXM
|
|
127
164
|
@auw_weight = value
|
128
165
|
end
|
129
166
|
|
130
|
-
def remarks=(value)
|
131
|
-
@remarks = value&.to_s
|
132
|
-
end
|
133
|
-
|
134
167
|
# @return [String] AIXM or OFMX markup
|
135
168
|
def to_xml
|
136
169
|
builder = Builder::XmlMarkup.new(indent: true)
|