aixm 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/lib/aixm/f.rb
CHANGED
@@ -7,6 +7,7 @@ module AIXM
|
|
7
7
|
# @example
|
8
8
|
# AIXM.f(123.35, :mhz)
|
9
9
|
class F
|
10
|
+
include AIXM::Concerns::HashEquality
|
10
11
|
extend Forwardable
|
11
12
|
|
12
13
|
UNITS = %i(ghz mhz khz).freeze
|
@@ -15,12 +16,23 @@ module AIXM
|
|
15
16
|
# @return [Boolean] whether frequency is zero
|
16
17
|
def_delegator :@freq, :zero?
|
17
18
|
|
18
|
-
#
|
19
|
+
# Frequency
|
20
|
+
#
|
21
|
+
# @overload freq
|
22
|
+
# @return [Float]
|
23
|
+
# @overload freq=(value)
|
24
|
+
# @param value [Float]
|
19
25
|
attr_reader :freq
|
20
26
|
|
21
|
-
#
|
27
|
+
# Unit
|
28
|
+
#
|
29
|
+
# @overload unit
|
30
|
+
# @return [Symbol] any of {UNITS}
|
31
|
+
# @overload unit=(value)
|
32
|
+
# @param value [Symbol] any of {UNITS}
|
22
33
|
attr_reader :unit
|
23
34
|
|
35
|
+
# See the {overview}[AIXM::F] for examples.
|
24
36
|
def initialize(freq, unit)
|
25
37
|
self.freq, self.unit = freq, unit
|
26
38
|
end
|
@@ -46,26 +58,22 @@ module AIXM
|
|
46
58
|
fail(ArgumentError, "invalid unit") unless UNITS.include? @unit
|
47
59
|
end
|
48
60
|
|
49
|
-
#
|
61
|
+
# Whether this frequency is part of a frequency band.
|
62
|
+
#
|
63
|
+
# @return [Boolean]
|
50
64
|
def between?(lower_freq, upper_freq, unit)
|
51
65
|
freq.between?(lower_freq, upper_freq) && self.unit == unit
|
52
66
|
end
|
53
67
|
|
54
68
|
# @see Object#==
|
55
|
-
# @return [Boolean]
|
56
69
|
def ==(other)
|
57
70
|
self.class === other && freq == other.freq && unit == other.unit
|
58
71
|
end
|
59
|
-
alias_method :eql?, :==
|
60
|
-
|
61
|
-
# @see Object#hash
|
62
|
-
# @return [Integer]
|
63
|
-
def hash
|
64
|
-
to_s.hash
|
65
|
-
end
|
66
72
|
|
67
|
-
#
|
68
|
-
#
|
73
|
+
# Whether this frequency is part of the voice airband for civil aviation
|
74
|
+
# using +AIXM.config.voice_channel_separation+.
|
75
|
+
#
|
76
|
+
# @return [Boolean]
|
69
77
|
def voice?
|
70
78
|
return false unless unit == :mhz
|
71
79
|
case AIXM.config.voice_channel_separation
|
@@ -78,15 +86,19 @@ module AIXM
|
|
78
86
|
|
79
87
|
private
|
80
88
|
|
81
|
-
#
|
82
|
-
#
|
89
|
+
# Whether this frequency is part of the voice airband for civil aviation
|
90
|
+
# using 25 kHz channel separation.
|
91
|
+
#
|
92
|
+
# @return [Boolean]
|
83
93
|
def voice_25?
|
84
94
|
return false unless unit == :mhz && freq == freq.round(3) && freq.between?(118, 136.975)
|
85
95
|
((freq * 1000).round % 25).zero?
|
86
96
|
end
|
87
97
|
|
88
|
-
#
|
89
|
-
#
|
98
|
+
# Whether this frequency is part of the voice airband for civil aviation
|
99
|
+
# using 8.33 kHz channel separation.
|
100
|
+
#
|
101
|
+
# @return [Boolean]
|
90
102
|
def voice_833?
|
91
103
|
return false unless unit == :mhz && freq == freq.round(3) && freq.between?(118, 136.99)
|
92
104
|
[0.005, 0.01, 0.015].any? { |d| (((freq - d) * 1000).round % 25).zero? }
|
data/lib/aixm/feature/airport.rb
CHANGED
@@ -38,6 +38,8 @@ module AIXM
|
|
38
38
|
class Airport < Feature
|
39
39
|
include AIXM::Association
|
40
40
|
include AIXM::Memoize
|
41
|
+
include AIXM::Concerns::Timetable
|
42
|
+
include AIXM::Concerns::Remarks
|
41
43
|
|
42
44
|
public_class_method :new
|
43
45
|
|
@@ -112,7 +114,7 @@ module AIXM
|
|
112
114
|
# @return [AIXM::Feature::Organisation] superior organisation
|
113
115
|
belongs_to :organisation, as: :member
|
114
116
|
|
115
|
-
# ICAO
|
117
|
+
# ICAO, IATA or generated airport indicator.
|
116
118
|
#
|
117
119
|
# * four letter ICAO indicator (e.g. "LFMV")
|
118
120
|
# * three letter IATA indicator (e.g. "AVN")
|
@@ -120,19 +122,42 @@ module AIXM
|
|
120
122
|
# * two letter ICAO country code + at least four letters/digits (e.g.
|
121
123
|
# "LFFOOBAR123" or "LF" + GPS code)
|
122
124
|
#
|
123
|
-
# @
|
125
|
+
# @overload id
|
126
|
+
# @return [String]
|
127
|
+
# @overload id=(value)
|
128
|
+
# @param value [String]
|
124
129
|
attr_reader :id
|
125
130
|
|
126
|
-
#
|
131
|
+
# Full name
|
132
|
+
#
|
133
|
+
# @overload name
|
134
|
+
# @return [String]
|
135
|
+
# @overload name=(value)
|
136
|
+
# @param value [String]
|
127
137
|
attr_reader :name
|
128
138
|
|
129
|
-
#
|
139
|
+
# Reference point
|
140
|
+
#
|
141
|
+
# @overload xy
|
142
|
+
# @return [AIXM::XY]
|
143
|
+
# @overload xy=(value)
|
144
|
+
# @param value [AIXM::XY]
|
130
145
|
attr_reader :xy
|
131
146
|
|
132
|
-
#
|
147
|
+
# GPS code
|
148
|
+
#
|
149
|
+
# @overload gps
|
150
|
+
# @return [String, nil]
|
151
|
+
# @overload gps=(value)
|
152
|
+
# @param value [String, nil]
|
133
153
|
attr_reader :gps
|
134
154
|
|
135
|
-
#
|
155
|
+
# Elevation in +:qnh+
|
156
|
+
#
|
157
|
+
# @overload z
|
158
|
+
# @return [AIXM::Z, nil]
|
159
|
+
# @overload z=(value)
|
160
|
+
# @param value [AIXM::Z, nil]
|
136
161
|
attr_reader :z
|
137
162
|
|
138
163
|
# When looking towards the geographic (aka: true) north, a positive
|
@@ -146,18 +171,24 @@ module AIXM
|
|
146
171
|
# @return [Float, nil] magnetic declination in degrees
|
147
172
|
attr_reader :declination
|
148
173
|
|
149
|
-
#
|
174
|
+
# Transition altitude in +:qnh+
|
175
|
+
#
|
176
|
+
# @overload transition_z
|
177
|
+
# @return [AIXM::Z, nil]
|
178
|
+
# @overload transition_z=(value)
|
179
|
+
# @param value [AIXM::Z, nil]
|
150
180
|
attr_reader :transition_z
|
151
181
|
|
152
|
-
#
|
153
|
-
|
154
|
-
|
155
|
-
#
|
182
|
+
# Operator of the airport
|
183
|
+
#
|
184
|
+
# @overload operator
|
185
|
+
# @return [String, nil]
|
186
|
+
# @overload operator=(value)
|
187
|
+
# @param value [String, nil]
|
156
188
|
attr_reader :operator
|
157
189
|
|
158
|
-
#
|
159
|
-
|
160
|
-
|
190
|
+
# See the {cheat sheet}[AIXM::Feature::Airport] for examples on how to
|
191
|
+
# create instances of this class.
|
161
192
|
def initialize(source: nil, region: nil, organisation:, id: nil, name:, xy:)
|
162
193
|
super(source: source, region: region)
|
163
194
|
self.organisation, self.name, self.id, self.xy = organisation, name, id, xy # name must be set before id
|
@@ -186,12 +217,17 @@ module AIXM
|
|
186
217
|
@gps = value&.upcase
|
187
218
|
end
|
188
219
|
|
220
|
+
# Type of airport.
|
221
|
+
#
|
189
222
|
# The type is usually derived from the presence of runways and helipads,
|
190
223
|
# however, this may be overridden by setting an alternative value, most
|
191
224
|
# notably +:landing_site+.
|
192
225
|
#
|
193
226
|
# @!attribute type
|
194
|
-
# @
|
227
|
+
# @overload type
|
228
|
+
# @return [Symbol] any of {TYPES}
|
229
|
+
# @overload type=(value)
|
230
|
+
# @param value [Symbol] any of {TYPES}
|
195
231
|
def type
|
196
232
|
@type = case
|
197
233
|
when @type then @type
|
@@ -228,20 +264,11 @@ module AIXM
|
|
228
264
|
@transition_z = value
|
229
265
|
end
|
230
266
|
|
231
|
-
def timetable=(value)
|
232
|
-
fail(ArgumentError, "invalid timetable") unless value.nil? || value.is_a?(AIXM::Component::Timetable)
|
233
|
-
@timetable = value
|
234
|
-
end
|
235
|
-
|
236
267
|
def operator=(value)
|
237
268
|
fail(ArgumentError, "invalid name") unless value.nil? || value.is_a?(String)
|
238
269
|
@operator = value&.uptrans
|
239
270
|
end
|
240
271
|
|
241
|
-
def remarks=(value)
|
242
|
-
@remarks = value&.to_s
|
243
|
-
end
|
244
|
-
|
245
272
|
# @return [String] UID markup
|
246
273
|
def to_uid(as: :AhpUid)
|
247
274
|
builder = Builder::XmlMarkup.new(indent: 2)
|
@@ -350,6 +377,8 @@ module AIXM
|
|
350
377
|
# @see https://gitlab.com/openflightmaps/ofmx/wikis/Airport#ahu-airport-usage
|
351
378
|
class UsageLimitation
|
352
379
|
include AIXM::Association
|
380
|
+
include AIXM::Concerns::Timetable
|
381
|
+
include AIXM::Concerns::Remarks
|
353
382
|
|
354
383
|
TYPES = {
|
355
384
|
PERMIT: :permitted,
|
@@ -370,15 +399,16 @@ module AIXM
|
|
370
399
|
# @return [AIXM::Feature::Airport] airport this usage limitation is assigned to
|
371
400
|
belongs_to :airport
|
372
401
|
|
373
|
-
#
|
402
|
+
# Type of limitation
|
403
|
+
#
|
404
|
+
# @overload type
|
405
|
+
# @return [Symbol] any of {TYPES}
|
406
|
+
# @overload type=(value)
|
407
|
+
# @param value [Symbol] any of {TYPES}
|
374
408
|
attr_reader :type
|
375
409
|
|
376
|
-
#
|
377
|
-
|
378
|
-
|
379
|
-
# @return [String, nil] free text remarks
|
380
|
-
attr_reader :remarks
|
381
|
-
|
410
|
+
# See the {cheat sheet}[AIXM::Feature::Airport::UsageLimitation] for
|
411
|
+
# examples on how to create instances of this class.
|
382
412
|
def initialize(type:)
|
383
413
|
self.type = type
|
384
414
|
end
|
@@ -392,15 +422,6 @@ module AIXM
|
|
392
422
|
@type = TYPES.lookup(value&.to_s&.to_sym, nil) || fail(ArgumentError, "invalid type")
|
393
423
|
end
|
394
424
|
|
395
|
-
def timetable=(value)
|
396
|
-
fail(ArgumentError, "invalid timetable") unless value.nil? || value.is_a?(AIXM::Component::Timetable)
|
397
|
-
@timetable = value
|
398
|
-
end
|
399
|
-
|
400
|
-
def remarks=(value)
|
401
|
-
@remarks = value&.to_s
|
402
|
-
end
|
403
|
-
|
404
425
|
# @return [String] AIXM or OFMX markup
|
405
426
|
def to_xml
|
406
427
|
builder = Builder::XmlMarkup.new(indent: 2)
|
@@ -471,19 +492,44 @@ module AIXM
|
|
471
492
|
# @return [AIXM::Feature::Airport::UsageLimitation] usage limitation the condition belongs to
|
472
493
|
belongs_to :usage_limitation
|
473
494
|
|
474
|
-
#
|
495
|
+
# Kind of aircraft.
|
496
|
+
#
|
497
|
+
# @overload aircraft
|
498
|
+
# @return [Symbol, nil] any of {AIRCRAFT}
|
499
|
+
# @overload aircraft=(value)
|
500
|
+
# @param value [Symbol, nil] any of {AIRCRAFT}
|
475
501
|
attr_reader :aircraft
|
476
502
|
|
477
|
-
#
|
503
|
+
# Flight rule.
|
504
|
+
#
|
505
|
+
# @overload rule
|
506
|
+
# @return [Symbol, nil] any of {RULES}
|
507
|
+
# @overload rule=(value)
|
508
|
+
# @param value [Symbol, nil] any of {RULES}
|
478
509
|
attr_reader :rule
|
479
510
|
|
480
|
-
#
|
511
|
+
# Military, civil etc.
|
512
|
+
#
|
513
|
+
# @overload realm
|
514
|
+
# @return [Symbol, nil] any of {REALMS}
|
515
|
+
# @overload realm=(value)
|
516
|
+
# @param value [Symbol, nil] any of {REALMS}
|
481
517
|
attr_reader :realm
|
482
518
|
|
483
|
-
#
|
519
|
+
# Geographic origin of the flight.
|
520
|
+
#
|
521
|
+
# @overload origin
|
522
|
+
# @return [Symbol, nil] any of {ORIGINS}
|
523
|
+
# @overload origin=(value)
|
524
|
+
# @param value [Symbol, nil] any of {ORIGINS}
|
484
525
|
attr_reader :origin
|
485
526
|
|
486
|
-
#
|
527
|
+
# Purpose of the flight.
|
528
|
+
#
|
529
|
+
# @overload purpose
|
530
|
+
# @return [Symbol, nil] any of {PURPOSES}
|
531
|
+
# @overload purpose=(value)
|
532
|
+
# @param value [Symbol, nil] any of {PURPOSES}
|
487
533
|
attr_reader :purpose
|
488
534
|
|
489
535
|
# @return [String]
|
@@ -92,23 +92,46 @@ module AIXM
|
|
92
92
|
# @param layer [AIXM::Compoment::Layer]
|
93
93
|
has_many :layers
|
94
94
|
|
95
|
+
# Published identifier (e.g. "LFP81").
|
96
|
+
#
|
95
97
|
# @note When assigning +nil+, a 4 byte hex derived from {#type}, {#name}
|
96
98
|
# and {#local_type} is written instead.
|
97
99
|
#
|
98
|
-
# @
|
100
|
+
# @overload id
|
101
|
+
# @return [String]
|
102
|
+
# @overload id=(value)
|
103
|
+
# @param value [String]
|
99
104
|
attr_reader :id
|
100
105
|
|
101
|
-
#
|
106
|
+
# Type of airspace (see {TYPES})
|
107
|
+
#
|
108
|
+
# @overload type
|
109
|
+
# @return [Symbol] any of {TYPES}
|
110
|
+
# @overload type=(value)
|
111
|
+
# @param value [Symbol] any of {TYPES}
|
102
112
|
attr_reader :type
|
103
113
|
|
104
|
-
#
|
114
|
+
# Local type.
|
105
115
|
#
|
106
|
-
#
|
116
|
+
# Some regions define additional local types such as "RMZ" or "TMZ". They
|
117
|
+
# are often further specifying type +:regulated_airspace+.
|
118
|
+
#
|
119
|
+
# @overload local_type
|
120
|
+
# @return [String, nil]
|
121
|
+
# @overload local_type=(value)
|
122
|
+
# @param value [String, nil]
|
107
123
|
attr_reader :local_type
|
108
124
|
|
109
|
-
#
|
125
|
+
# Full name (e.g. "LF P 81 CHERBOURG")
|
126
|
+
#
|
127
|
+
# @overload name
|
128
|
+
# @return [String, nil]
|
129
|
+
# @overload name=(value)
|
130
|
+
# @param value [String, nil]
|
110
131
|
attr_reader :name
|
111
132
|
|
133
|
+
# See the {cheat sheet}[AIXM::Feature::Airspace] for examples on how to
|
134
|
+
# create instances of this class.
|
112
135
|
def initialize(source: nil, region: nil, id: nil, type:, local_type: nil, name: nil)
|
113
136
|
super(source: source, region: region)
|
114
137
|
self.type, self.local_type, self.name = type, local_type, name
|
@@ -41,9 +41,16 @@ module AIXM
|
|
41
41
|
# associated with
|
42
42
|
belongs_to :airport
|
43
43
|
|
44
|
-
#
|
44
|
+
# Type of designated point
|
45
|
+
#
|
46
|
+
# @overload type
|
47
|
+
# @return [Symbol] any of {TYPES}
|
48
|
+
# @overload type=(value)
|
49
|
+
# @param value [Symbol] any of {TYPES}
|
45
50
|
attr_reader :type
|
46
51
|
|
52
|
+
# See the {cheat sheet}[AIXM::Feature::NavigationalAid::DesignatedPoint]
|
53
|
+
# for examples on how to create instances of this class.
|
47
54
|
def initialize(type:, **arguments)
|
48
55
|
super(organisation: nil, z: nil, **arguments)
|
49
56
|
self.type = type
|
@@ -43,9 +43,20 @@ module AIXM
|
|
43
43
|
# @return [AIXM::Feature::NavigationalAid::VOR, nil] associated VOR
|
44
44
|
belongs_to :vor, readonly: true
|
45
45
|
|
46
|
-
#
|
46
|
+
# Radio channel
|
47
|
+
#
|
48
|
+
# @overload channel
|
49
|
+
# @return [String]
|
50
|
+
# @overload channel=(value)
|
51
|
+
# @param value [String]
|
52
|
+
# @overload ghost_f
|
53
|
+
# @return [AIXM::F] ghost frequency matching the {#channel}
|
54
|
+
# @overload ghost_f=(value)
|
55
|
+
# @param value [AIXM::F] ghost frequency matching the {#channel}
|
47
56
|
attr_reader :channel
|
48
57
|
|
58
|
+
# See the {cheat sheet}[AIXM::Feature::NavigationalAid::DME] for examples
|
59
|
+
# on how to create instances of this class.
|
49
60
|
def initialize(channel: nil, ghost_f: nil, **arguments)
|
50
61
|
super(**arguments)
|
51
62
|
case
|
@@ -72,7 +83,6 @@ module AIXM
|
|
72
83
|
self.channel = "#{number}#{letter}"
|
73
84
|
end
|
74
85
|
|
75
|
-
# @return [AIXM::F] ghost frequency matching the channel
|
76
86
|
def ghost_f
|
77
87
|
if channel
|
78
88
|
number, letter = channel.split(/(?=[XY])/)
|
@@ -39,13 +39,20 @@ module AIXM
|
|
39
39
|
OTHER: :other # specify in remarks
|
40
40
|
}
|
41
41
|
|
42
|
-
#
|
42
|
+
# Type of marker
|
43
|
+
#
|
44
|
+
# @overload type
|
45
|
+
# @return [Symbol, nil] any of {TYPES}
|
46
|
+
# @overload type=(value)
|
47
|
+
# @param value [Symbol, nil] any of {TYPES}
|
43
48
|
attr_reader :type
|
44
49
|
|
45
|
-
#
|
50
|
+
# See the {cheat sheet}[AIXM::Feature::NavigationalAid::Marker] for
|
51
|
+
# examples on how to create instances of this class.
|
46
52
|
def initialize(type:, **arguments)
|
47
53
|
super(**arguments)
|
48
54
|
self.type = type
|
55
|
+
# TODO: Marker require an associated ILS (not yet implemented)
|
49
56
|
warn("WARNING: Marker is not fully implemented yet due to the lack of ILS")
|
50
57
|
end
|
51
58
|
|
@@ -25,7 +25,7 @@ module AIXM
|
|
25
25
|
# @see https://gitlab.com/openflightmaps/ofmx/wikis/Navigational-aid#ndb-ndb
|
26
26
|
class NDB < NavigationalAid
|
27
27
|
include AIXM::Memoize
|
28
|
-
|
28
|
+
|
29
29
|
public_class_method :new
|
30
30
|
|
31
31
|
TYPES = {
|
@@ -35,12 +35,24 @@ module AIXM
|
|
35
35
|
OTHER: :other # specify in remarks
|
36
36
|
}.freeze
|
37
37
|
|
38
|
-
#
|
38
|
+
# Type of NDB
|
39
|
+
#
|
40
|
+
# @overload type
|
41
|
+
# @return [Symbol, nil] any of {TYPES}
|
42
|
+
# @overload type=(value)
|
43
|
+
# @param value [Symbol, nil] any of {TYPES}
|
39
44
|
attr_reader :type
|
40
45
|
|
41
|
-
#
|
46
|
+
# Radio frequency
|
47
|
+
#
|
48
|
+
# @overload f
|
49
|
+
# @return [AIXM::F]
|
50
|
+
# @overload f=(value)
|
51
|
+
# @param value [AIXM::F]
|
42
52
|
attr_reader :f
|
43
53
|
|
54
|
+
# See the {cheat sheet}[AIXM::Feature::NavigationalAid::NDB] for examples
|
55
|
+
# on how to create instances of this class.
|
44
56
|
def initialize(type:, f:, **arguments)
|
45
57
|
super(**arguments)
|
46
58
|
self.type, self.f = type, f
|
@@ -59,15 +59,32 @@ module AIXM
|
|
59
59
|
# @param tacan [AIXM::Feature::NavigationalAid::TACAN, nil]
|
60
60
|
has_one :tacan, allow_nil: true
|
61
61
|
|
62
|
-
#
|
62
|
+
# Type of VOR
|
63
|
+
#
|
64
|
+
# @overload type
|
65
|
+
# @return [Symbol] any of {TYPES}
|
66
|
+
# @overload type=(value)
|
67
|
+
# @param value [Symbol] any of {TYPES}
|
63
68
|
attr_reader :type
|
64
69
|
|
65
|
-
#
|
70
|
+
# Radio requency
|
71
|
+
#
|
72
|
+
# @overload f
|
73
|
+
# @return [AIXM::F]
|
74
|
+
# @overload f=(value)
|
75
|
+
# @param value [AIXM::F]
|
66
76
|
attr_reader :f
|
67
77
|
|
68
|
-
#
|
78
|
+
# North indication
|
79
|
+
#
|
80
|
+
# @overload north
|
81
|
+
# @return [Symbol] any of {NORTHS}
|
82
|
+
# @overload north=(value)
|
83
|
+
# @param value [Symbol] any of {NORTHS}
|
69
84
|
attr_reader :north
|
70
85
|
|
86
|
+
# See the {cheat sheet}[AIXM::Feature::VOR] for examples on how to
|
87
|
+
# create instances of this class.
|
71
88
|
def initialize(type:, f:, north:, **arguments)
|
72
89
|
super(**arguments)
|
73
90
|
self.type, self.f, self.north = type, f, north
|
@@ -6,6 +6,8 @@ module AIXM
|
|
6
6
|
# @abstract
|
7
7
|
class NavigationalAid < Feature
|
8
8
|
include AIXM::Association
|
9
|
+
include AIXM::Concerns::Timetable
|
10
|
+
include AIXM::Concerns::Remarks
|
9
11
|
|
10
12
|
private_class_method :new
|
11
13
|
|
@@ -13,24 +15,38 @@ module AIXM
|
|
13
15
|
# @return [AIXM::Feature::Organisation] superior organisation
|
14
16
|
belongs_to :organisation, as: :member
|
15
17
|
|
16
|
-
#
|
18
|
+
# Published identifier
|
19
|
+
#
|
20
|
+
# @overload id
|
21
|
+
# @return [String]
|
22
|
+
# @overload id=(value)
|
23
|
+
# @param value [String]
|
17
24
|
attr_reader :id
|
18
25
|
|
19
|
-
#
|
26
|
+
# Name of the navigational aid.
|
27
|
+
#
|
28
|
+
# @overload name
|
29
|
+
# @return [String, nil]
|
30
|
+
# @overload name=(value)
|
31
|
+
# @param value [String, nil]
|
20
32
|
attr_reader :name
|
21
33
|
|
22
|
-
#
|
34
|
+
# Geographic position.
|
35
|
+
#
|
36
|
+
# @overload xy
|
37
|
+
# @return [AIXM::XY]
|
38
|
+
# @overload xy=(value)
|
39
|
+
# @param value [AIXM::XY]
|
23
40
|
attr_reader :xy
|
24
41
|
|
25
|
-
#
|
42
|
+
# Elevation in +:qnh+.
|
43
|
+
#
|
44
|
+
# @overload z
|
45
|
+
# @return [AIXM::Z, nil]
|
46
|
+
# @overload z=(value)
|
47
|
+
# @param value [AIXM::Z, nil]
|
26
48
|
attr_reader :z
|
27
49
|
|
28
|
-
# @return [AIXM::Component::Timetable, nil] operating hours
|
29
|
-
attr_reader :timetable
|
30
|
-
|
31
|
-
# @return [String, nil] free text remarks
|
32
|
-
attr_reader :remarks
|
33
|
-
|
34
50
|
def initialize(source: nil, region: nil, organisation:, id:, name: nil, xy:, z: nil)
|
35
51
|
super(source: source, region: region)
|
36
52
|
self.organisation, self.id, self.name, self.xy, self.z = organisation, id, name, xy, z
|
@@ -61,16 +77,9 @@ module AIXM
|
|
61
77
|
@z = value
|
62
78
|
end
|
63
79
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
end
|
68
|
-
|
69
|
-
def remarks=(value)
|
70
|
-
@remarks = value&.to_s
|
71
|
-
end
|
72
|
-
|
73
|
-
# @return [String] fully descriptive combination of {#class} and {#type} key
|
80
|
+
# Fully descriptive combination of {#class} and {#type} key.
|
81
|
+
#
|
82
|
+
# @return [String]
|
74
83
|
def kind
|
75
84
|
[self.class.name.split('::').last, type_key].compact.join(':'.freeze)
|
76
85
|
end
|