aixm 1.0.0 → 1.1.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 +43 -13
- data/README.md +31 -20
- data/lib/aixm/a.rb +89 -71
- data/lib/aixm/association.rb +37 -27
- data/lib/aixm/classes.rb +5 -2
- data/lib/aixm/{feature → component}/address.rb +12 -9
- data/lib/aixm/component/approach_lighting.rb +136 -0
- data/lib/aixm/component/fato.rb +58 -42
- data/lib/aixm/component/frequency.rb +2 -2
- data/lib/aixm/component/geometry/arc.rb +1 -1
- data/lib/aixm/component/geometry/border.rb +1 -1
- data/lib/aixm/component/geometry/circle.rb +3 -3
- data/lib/aixm/component/geometry/point.rb +1 -1
- data/lib/aixm/component/geometry/rhumb_line.rb +1 -1
- data/lib/aixm/component/geometry.rb +3 -2
- data/lib/aixm/component/helipad.rb +26 -36
- data/lib/aixm/component/layer.rb +5 -3
- data/lib/aixm/component/lighting.rb +5 -5
- data/lib/aixm/component/runway.rb +81 -52
- data/lib/aixm/component/service.rb +12 -3
- data/lib/aixm/component/surface.rb +12 -12
- data/lib/aixm/component/timetable.rb +2 -2
- data/lib/aixm/component/vasis.rb +105 -0
- data/lib/aixm/component/vertical_limit.rb +3 -3
- data/lib/aixm/component.rb +10 -0
- data/lib/aixm/config.rb +2 -0
- data/lib/aixm/d.rb +16 -15
- data/lib/aixm/document.rb +10 -1
- data/lib/aixm/f.rb +1 -1
- data/lib/aixm/feature/airport.rb +34 -10
- data/lib/aixm/feature/airspace.rb +3 -0
- data/lib/aixm/feature/navigational_aid/dme.rb +29 -10
- data/lib/aixm/feature/navigational_aid/marker.rb +2 -2
- data/lib/aixm/feature/navigational_aid/tacan.rb +3 -2
- data/lib/aixm/feature/navigational_aid/vor.rb +32 -13
- data/lib/aixm/feature/navigational_aid.rb +1 -1
- data/lib/aixm/feature/obstacle.rb +6 -6
- data/lib/aixm/feature/obstacle_group.rb +6 -2
- data/lib/aixm/feature/organisation.rb +1 -0
- data/lib/aixm/feature/unit.rb +2 -1
- data/lib/aixm/feature.rb +3 -0
- data/lib/aixm/memoize.rb +27 -11
- data/lib/aixm/p.rb +3 -2
- data/lib/aixm/payload_hash.rb +1 -1
- data/lib/aixm/r.rb +62 -0
- data/lib/aixm/refinements.rb +4 -4
- data/lib/aixm/version.rb +1 -1
- data/lib/aixm/w.rb +2 -1
- data/lib/aixm/xy.rb +1 -1
- data/lib/aixm/z.rb +5 -4
- data/lib/aixm.rb +10 -5
- data/schemas/ofmx/0.1/OFMX-DataTypes.xsd +6 -0
- data/schemas/ofmx/0.1/OFMX-Snapshot.xsd +5 -0
- data.tar.gz.sig +0 -0
- metadata +8 -4
- metadata.gz.sig +0 -0
data/lib/aixm/refinements.rb
CHANGED
@@ -26,7 +26,7 @@ module AIXM
|
|
26
26
|
# @return [String] 4 byte hex
|
27
27
|
refine Array do
|
28
28
|
def to_digest
|
29
|
-
::Digest::SHA512.hexdigest(flatten.map(&:to_s).join('|'))[0, 8]
|
29
|
+
::Digest::SHA512.hexdigest(flatten.map(&:to_s).join('|'.freeze))[0, 8]
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -128,8 +128,8 @@ module AIXM
|
|
128
128
|
# @note This is a refinement for +Object+
|
129
129
|
# @return [Object]
|
130
130
|
refine Object do
|
131
|
-
def then_if(condition, &
|
132
|
-
condition ? self.then(&
|
131
|
+
def then_if(condition, &)
|
132
|
+
condition ? self.then(&) : self
|
133
133
|
end
|
134
134
|
end
|
135
135
|
|
@@ -263,7 +263,7 @@ module AIXM
|
|
263
263
|
def uptrans
|
264
264
|
self.dup.tap do |string|
|
265
265
|
string.upcase!
|
266
|
-
string.gsub!(/(#{UPTRANS_MAP.keys.join('|')})/, UPTRANS_MAP)
|
266
|
+
string.gsub!(/(#{UPTRANS_MAP.keys.join('|'.freeze)})/, UPTRANS_MAP)
|
267
267
|
string.unicode_normalize!(:nfd)
|
268
268
|
string.gsub!(UPTRANS_FILTER, '')
|
269
269
|
end
|
data/lib/aixm/version.rb
CHANGED
data/lib/aixm/w.rb
CHANGED
@@ -38,7 +38,7 @@ module AIXM
|
|
38
38
|
|
39
39
|
# @return [String] human readable representation (e.g. "123 t")
|
40
40
|
def to_s
|
41
|
-
[wgt, unit].join(' ')
|
41
|
+
[wgt, unit].join(' '.freeze)
|
42
42
|
end
|
43
43
|
|
44
44
|
def wgt=(value)
|
@@ -56,6 +56,7 @@ module AIXM
|
|
56
56
|
# @!method to_t
|
57
57
|
# @!method to_lb
|
58
58
|
# @!method to_ton
|
59
|
+
#
|
59
60
|
# @return [AIXM::W] convert weight
|
60
61
|
UNITS.each_key do |target_unit|
|
61
62
|
define_method "to_#{target_unit}" do
|
data/lib/aixm/xy.rb
CHANGED
data/lib/aixm/z.rb
CHANGED
@@ -38,7 +38,7 @@ module AIXM
|
|
38
38
|
|
39
39
|
# @return [String] human readable representation (e.g. "FL045" or "1350 ft QNH")
|
40
40
|
def to_s
|
41
|
-
qne? ? "FL%03i" % alt : [alt, unit, code.upcase].join(' ')
|
41
|
+
qne? ? "FL%03i" % alt : [alt, unit, code.upcase].join(' '.freeze)
|
42
42
|
end
|
43
43
|
|
44
44
|
def alt=(value)
|
@@ -52,14 +52,15 @@ module AIXM
|
|
52
52
|
fail(ArgumentError, "invalid code") unless CODES.include? @code
|
53
53
|
end
|
54
54
|
|
55
|
+
# @!method qfe?
|
56
|
+
# @!method qnh?
|
57
|
+
# @!method qne?
|
58
|
+
#
|
55
59
|
# @example
|
56
60
|
# z = AIXM.z(123, :qnh)
|
57
61
|
# z.qnh? # => true
|
58
62
|
# z.qfe? # => false
|
59
63
|
#
|
60
|
-
# @!method qfe?
|
61
|
-
# @!method qnh?
|
62
|
-
# @!method qne?
|
63
64
|
# @return [Boolean]
|
64
65
|
CODES.each do |code|
|
65
66
|
define_method(:"#{code}?") { @code == code }
|
data/lib/aixm.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
+
require 'bigdecimal'
|
1
2
|
require 'ostruct'
|
3
|
+
require 'time'
|
4
|
+
require 'pathname'
|
2
5
|
require 'securerandom'
|
3
6
|
require 'forwardable'
|
4
7
|
require 'digest'
|
5
|
-
require 'time'
|
6
|
-
require 'pathname'
|
7
8
|
require 'optparse'
|
8
9
|
|
9
10
|
require 'builder'
|
@@ -27,11 +28,14 @@ require_relative 'aixm/document'
|
|
27
28
|
require_relative 'aixm/xy'
|
28
29
|
require_relative 'aixm/z'
|
29
30
|
require_relative 'aixm/d'
|
31
|
+
require_relative 'aixm/r'
|
30
32
|
require_relative 'aixm/f'
|
31
33
|
require_relative 'aixm/a'
|
32
34
|
require_relative 'aixm/w'
|
33
35
|
require_relative 'aixm/p'
|
34
36
|
|
37
|
+
require_relative 'aixm/component'
|
38
|
+
require_relative 'aixm/component/address'
|
35
39
|
require_relative 'aixm/component/service'
|
36
40
|
require_relative 'aixm/component/frequency'
|
37
41
|
require_relative 'aixm/component/geometry'
|
@@ -47,12 +51,11 @@ require_relative 'aixm/component/runway'
|
|
47
51
|
require_relative 'aixm/component/fato'
|
48
52
|
require_relative 'aixm/component/helipad'
|
49
53
|
require_relative 'aixm/component/surface'
|
54
|
+
require_relative 'aixm/component/vasis'
|
50
55
|
require_relative 'aixm/component/lighting'
|
56
|
+
require_relative 'aixm/component/approach_lighting'
|
51
57
|
|
52
58
|
require_relative 'aixm/feature'
|
53
|
-
require_relative 'aixm/feature/address'
|
54
|
-
require_relative 'aixm/feature/organisation'
|
55
|
-
require_relative 'aixm/feature/unit'
|
56
59
|
require_relative 'aixm/feature/airspace'
|
57
60
|
require_relative 'aixm/feature/airport'
|
58
61
|
require_relative 'aixm/feature/navigational_aid'
|
@@ -64,6 +67,8 @@ require_relative 'aixm/feature/navigational_aid/tacan'
|
|
64
67
|
require_relative 'aixm/feature/navigational_aid/vor'
|
65
68
|
require_relative 'aixm/feature/obstacle'
|
66
69
|
require_relative 'aixm/feature/obstacle_group'
|
70
|
+
require_relative 'aixm/feature/organisation'
|
71
|
+
require_relative 'aixm/feature/unit'
|
67
72
|
|
68
73
|
require_relative 'aixm/shortcuts'
|
69
74
|
require_relative 'aixm/executables'
|
@@ -82,6 +82,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
82
82
|
<xsd:maxLength value="4"/>
|
83
83
|
</xsd:restriction>
|
84
84
|
</xsd:simpleType>
|
85
|
+
<xsd:simpleType name="listRegions">
|
86
|
+
<xsd:annotation>
|
87
|
+
<xsd:documentation>White space separated list of two to four letter coded regions.</xsd:documentation>
|
88
|
+
</xsd:annotation>
|
89
|
+
<xsd:list itemType='codeRegion'/>
|
90
|
+
</xsd:simpleType>
|
85
91
|
<xsd:simpleType name="codeSource">
|
86
92
|
<xsd:annotation>
|
87
93
|
<xsd:documentation>Reference to the source AIP document.</xsd:documentation>
|
@@ -203,6 +203,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
203
203
|
<xsd:documentation>The originator (source) namespace of the message</xsd:documentation>
|
204
204
|
</xsd:annotation>
|
205
205
|
</xsd:attribute>
|
206
|
+
<xsd:attribute name="regions" type="listRegions">
|
207
|
+
<xsd:annotation>
|
208
|
+
<xsd:documentation>Regions used throughout this document</xsd:documentation>
|
209
|
+
</xsd:annotation>
|
210
|
+
</xsd:attribute>
|
206
211
|
<xsd:attribute name="created" type="xsd:dateTime" use="required">
|
207
212
|
<xsd:annotation>
|
208
213
|
<xsd:documentation>The date and time when the message was created</xsd:documentation>
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aixm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Schwyn
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
1+2Y1+i+4jd1B7qxIgOLxQTNIJiwE0sqU1itFfuesfgUACS7M0IV9u9Bp4hBGNEw
|
31
31
|
5JcY2h7owdMxXIvgk1oakgldFJc=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
33
|
+
date: 2022-03-05 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: builder
|
@@ -224,6 +224,9 @@ files:
|
|
224
224
|
- lib/aixm/a.rb
|
225
225
|
- lib/aixm/association.rb
|
226
226
|
- lib/aixm/classes.rb
|
227
|
+
- lib/aixm/component.rb
|
228
|
+
- lib/aixm/component/address.rb
|
229
|
+
- lib/aixm/component/approach_lighting.rb
|
227
230
|
- lib/aixm/component/fato.rb
|
228
231
|
- lib/aixm/component/frequency.rb
|
229
232
|
- lib/aixm/component/geometry.rb
|
@@ -239,6 +242,7 @@ files:
|
|
239
242
|
- lib/aixm/component/service.rb
|
240
243
|
- lib/aixm/component/surface.rb
|
241
244
|
- lib/aixm/component/timetable.rb
|
245
|
+
- lib/aixm/component/vasis.rb
|
242
246
|
- lib/aixm/component/vertical_limit.rb
|
243
247
|
- lib/aixm/config.rb
|
244
248
|
- lib/aixm/constants.rb
|
@@ -248,7 +252,6 @@ files:
|
|
248
252
|
- lib/aixm/executables.rb
|
249
253
|
- lib/aixm/f.rb
|
250
254
|
- lib/aixm/feature.rb
|
251
|
-
- lib/aixm/feature/address.rb
|
252
255
|
- lib/aixm/feature/airport.rb
|
253
256
|
- lib/aixm/feature/airspace.rb
|
254
257
|
- lib/aixm/feature/navigational_aid.rb
|
@@ -266,6 +269,7 @@ files:
|
|
266
269
|
- lib/aixm/object.rb
|
267
270
|
- lib/aixm/p.rb
|
268
271
|
- lib/aixm/payload_hash.rb
|
272
|
+
- lib/aixm/r.rb
|
269
273
|
- lib/aixm/refinements.rb
|
270
274
|
- lib/aixm/shortcuts.rb
|
271
275
|
- lib/aixm/version.rb
|
@@ -311,7 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
315
|
- !ruby/object:Gem::Version
|
312
316
|
version: '0'
|
313
317
|
requirements: []
|
314
|
-
rubygems_version: 3.
|
318
|
+
rubygems_version: 3.3.8
|
315
319
|
signing_key:
|
316
320
|
specification_version: 4
|
317
321
|
summary: Builder for AIXM/OFMX aeronautical information
|
metadata.gz.sig
CHANGED
Binary file
|