aixm 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +91 -11
- data/lib/aixm.rb +10 -0
- data/lib/aixm/base.rb +10 -0
- data/lib/aixm/component/base.rb +1 -1
- data/lib/aixm/component/class_layer.rb +0 -3
- data/lib/aixm/component/geometry.rb +0 -3
- data/lib/aixm/component/geometry/arc.rb +4 -8
- data/lib/aixm/component/geometry/base.rb +8 -0
- data/lib/aixm/component/geometry/border.rb +3 -8
- data/lib/aixm/component/geometry/circle.rb +5 -9
- data/lib/aixm/component/geometry/point.rb +6 -13
- data/lib/aixm/component/schedule.rb +8 -10
- data/lib/aixm/component/vertical_limits.rb +1 -4
- data/lib/aixm/document.rb +9 -6
- data/lib/aixm/f.rb +41 -0
- data/lib/aixm/feature/airspace.rb +5 -9
- data/lib/aixm/feature/base.rb +6 -0
- data/lib/aixm/feature/navigational_aid/base.rb +46 -0
- data/lib/aixm/feature/navigational_aid/designated_point.rb +69 -0
- data/lib/aixm/feature/navigational_aid/dme.rb +54 -0
- data/lib/aixm/feature/navigational_aid/marker.rb +41 -0
- data/lib/aixm/feature/navigational_aid/ndb.rb +56 -0
- data/lib/aixm/feature/navigational_aid/tacan.rb +54 -0
- data/lib/aixm/feature/navigational_aid/vor.rb +92 -0
- data/lib/aixm/refinements.rb +23 -2
- data/lib/aixm/shortcuts.rb +12 -5
- data/lib/aixm/version.rb +1 -1
- data/lib/aixm/xy.rb +9 -6
- data/lib/aixm/z.rb +22 -11
- data/spec/factory.rb +87 -4
- data/spec/lib/aixm/component/class_layer_spec.rb +6 -6
- data/spec/lib/aixm/component/geometry/arc_spec.rb +16 -16
- data/spec/lib/aixm/component/geometry/border_spec.rb +4 -4
- data/spec/lib/aixm/component/geometry/circle_spec.rb +10 -10
- data/spec/lib/aixm/component/geometry/point_spec.rb +4 -4
- data/spec/lib/aixm/component/geometry_spec.rb +21 -21
- data/spec/lib/aixm/component/schedule_spec.rb +6 -6
- data/spec/lib/aixm/component/vertical_limits_spec.rb +18 -18
- data/spec/lib/aixm/document_spec.rb +220 -30
- data/spec/lib/aixm/f_spec.rb +58 -0
- data/spec/lib/aixm/feature/airspace_spec.rb +5 -5
- data/spec/lib/aixm/feature/navigational_aid/base_spec.rb +37 -0
- data/spec/lib/aixm/feature/navigational_aid/designated_point_spec.rb +43 -0
- data/spec/lib/aixm/feature/navigational_aid/dme_spec.rb +43 -0
- data/spec/lib/aixm/feature/navigational_aid/marker_spec.rb +44 -0
- data/spec/lib/aixm/feature/navigational_aid/ndb_spec.rb +54 -0
- data/spec/lib/aixm/feature/navigational_aid/tacan_spec.rb +43 -0
- data/spec/lib/aixm/feature/navigational_aid/vor_spec.rb +58 -0
- data/spec/lib/aixm/refinements_spec.rb +27 -0
- data/spec/lib/aixm/xy_spec.rb +29 -23
- data/spec/lib/aixm/z_spec.rb +33 -17
- metadata +29 -2
@@ -3,8 +3,8 @@ require_relative '../../../../spec_helper'
|
|
3
3
|
describe AIXM::Component::Geometry::Border do
|
4
4
|
describe :to_digest do
|
5
5
|
it "must return digest of payload" do
|
6
|
-
subject = AIXM
|
7
|
-
xy: AIXM
|
6
|
+
subject = AIXM.border(
|
7
|
+
xy: AIXM.xy(lat: 11.1, long: 22.2),
|
8
8
|
name: 'foobar'
|
9
9
|
)
|
10
10
|
subject.to_digest.must_equal 813052011
|
@@ -13,8 +13,8 @@ describe AIXM::Component::Geometry::Border do
|
|
13
13
|
|
14
14
|
describe :to_xml do
|
15
15
|
it "must build correct XML" do
|
16
|
-
subject = AIXM
|
17
|
-
xy: AIXM
|
16
|
+
subject = AIXM.border(
|
17
|
+
xy: AIXM.xy(lat: 11.1, long: 22.2),
|
18
18
|
name: 'foobar'
|
19
19
|
)
|
20
20
|
subject.to_xml.must_equal <<~END
|
@@ -3,24 +3,24 @@ require_relative '../../../../spec_helper'
|
|
3
3
|
describe AIXM::Component::Geometry::Circle do
|
4
4
|
describe :initialize do
|
5
5
|
it "won't accept invalid arguments" do
|
6
|
-
-> { AIXM
|
6
|
+
-> { AIXM.circle(center_xy: 0, radius: 0) }.must_raise ArgumentError
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
10
|
describe :north_xy do
|
11
11
|
it "must calculate approximation of northmost point on the circumference" do
|
12
|
-
subject = AIXM
|
13
|
-
center_xy: AIXM
|
12
|
+
subject = AIXM.circle(
|
13
|
+
center_xy: AIXM.xy(lat: 12.12345678, long: -23.12345678),
|
14
14
|
radius: 15
|
15
15
|
)
|
16
|
-
subject.send(:north_xy).must_equal AIXM
|
16
|
+
subject.send(:north_xy).must_equal AIXM.xy(lat: 12.25835502, long: -23.12345678)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
describe :to_digest do
|
21
21
|
it "must return digest of payload" do
|
22
|
-
subject = AIXM
|
23
|
-
center_xy: AIXM
|
22
|
+
subject = AIXM.circle(
|
23
|
+
center_xy: AIXM.xy(lat: 12.12345678, long: -23.12345678),
|
24
24
|
radius: 15
|
25
25
|
)
|
26
26
|
subject.to_digest.must_equal 386055945
|
@@ -29,8 +29,8 @@ describe AIXM::Component::Geometry::Circle do
|
|
29
29
|
|
30
30
|
describe :to_xml do
|
31
31
|
it "must build correct XML for circles not near the equator" do
|
32
|
-
subject = AIXM
|
33
|
-
center_xy: AIXM
|
32
|
+
subject = AIXM.circle(
|
33
|
+
center_xy: AIXM.xy(lat: 11.1, long: 22.2),
|
34
34
|
radius: 25
|
35
35
|
)
|
36
36
|
subject.to_xml.must_equal <<~END
|
@@ -46,8 +46,8 @@ describe AIXM::Component::Geometry::Circle do
|
|
46
46
|
end
|
47
47
|
|
48
48
|
it "must build correct XML for circles near the equator" do
|
49
|
-
subject = AIXM
|
50
|
-
center_xy: AIXM
|
49
|
+
subject = AIXM.circle(
|
50
|
+
center_xy: AIXM.xy(lat: -0.0005, long: -22.2),
|
51
51
|
radius: 50
|
52
52
|
)
|
53
53
|
subject.to_xml.must_equal <<~END
|
@@ -3,20 +3,20 @@ require_relative '../../../../spec_helper'
|
|
3
3
|
describe AIXM::Component::Geometry::Point do
|
4
4
|
describe :initialize do
|
5
5
|
it "won't accept invalid arguments" do
|
6
|
-
-> { AIXM
|
6
|
+
-> { AIXM.point(xy: 0) }.must_raise ArgumentError
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
10
|
describe :to_digest do
|
11
11
|
it "must return digest of payload" do
|
12
|
-
subject = AIXM
|
12
|
+
subject = AIXM.point(xy: AIXM.xy(lat: 11.1, long: 22.2))
|
13
13
|
subject.to_digest.must_equal 167706171
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
describe :to_xml do
|
18
18
|
it "must build correct XML for N/E points" do
|
19
|
-
subject = AIXM
|
19
|
+
subject = AIXM.point(xy: AIXM.xy(lat: 11.1, long: 22.2))
|
20
20
|
subject.to_xml.must_equal <<~END
|
21
21
|
<Avx>
|
22
22
|
<codeType>GRC</codeType>
|
@@ -28,7 +28,7 @@ describe AIXM::Component::Geometry::Point do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it "must build correct XML for S/W points" do
|
31
|
-
subject = AIXM
|
31
|
+
subject = AIXM.point(xy: AIXM.xy(lat: -11.1, long: -22.2))
|
32
32
|
subject.to_xml.must_equal <<~END
|
33
33
|
<Avx>
|
34
34
|
<codeType>GRC</codeType>
|
@@ -3,7 +3,7 @@ require_relative '../../../spec_helper'
|
|
3
3
|
describe AIXM::Component::Geometry do
|
4
4
|
context "singularity" do
|
5
5
|
subject do
|
6
|
-
AIXM
|
6
|
+
AIXM.geometry
|
7
7
|
end
|
8
8
|
|
9
9
|
it "must fail validation" do
|
@@ -15,8 +15,8 @@ describe AIXM::Component::Geometry do
|
|
15
15
|
|
16
16
|
context "point" do
|
17
17
|
subject do
|
18
|
-
AIXM
|
19
|
-
geometry << AIXM
|
18
|
+
AIXM.geometry.tap do |geometry|
|
19
|
+
geometry << AIXM.point(xy: AIXM.xy(lat: 11, long: 22))
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -29,9 +29,9 @@ describe AIXM::Component::Geometry do
|
|
29
29
|
|
30
30
|
context "line" do
|
31
31
|
subject do
|
32
|
-
AIXM
|
33
|
-
geometry << AIXM
|
34
|
-
geometry << AIXM
|
32
|
+
AIXM.geometry.tap do |geometry|
|
33
|
+
geometry << AIXM.point(xy: AIXM.xy(lat: 11, long: 22))
|
34
|
+
geometry << AIXM.point(xy: AIXM.xy(lat: 22, long: 33))
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -44,9 +44,9 @@ describe AIXM::Component::Geometry do
|
|
44
44
|
|
45
45
|
context "polygon" do
|
46
46
|
subject do
|
47
|
-
AIXM
|
48
|
-
geometry << AIXM
|
49
|
-
geometry << AIXM
|
47
|
+
AIXM.geometry.tap do |geometry|
|
48
|
+
geometry << AIXM.point(xy: AIXM.xy(lat: 11, long: 22))
|
49
|
+
geometry << AIXM.point(xy: AIXM.xy(lat: 22, long: 33))
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
@@ -57,7 +57,7 @@ describe AIXM::Component::Geometry do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
it "must recognize closed" do
|
60
|
-
subject << AIXM
|
60
|
+
subject << AIXM.point(xy: AIXM.xy(lat: 11, long: 22))
|
61
61
|
subject.wont_be :circle?
|
62
62
|
subject.must_be :closed_shape?
|
63
63
|
subject.must_be :complete?
|
@@ -91,9 +91,9 @@ describe AIXM::Component::Geometry do
|
|
91
91
|
|
92
92
|
context "arc" do
|
93
93
|
subject do
|
94
|
-
AIXM
|
95
|
-
geometry << AIXM
|
96
|
-
geometry << AIXM
|
94
|
+
AIXM.geometry.tap do |geometry|
|
95
|
+
geometry << AIXM.arc(xy: AIXM.xy(lat: 11, long: 22), center_xy: AIXM.xy(lat: 10, long: 20), clockwise: true)
|
96
|
+
geometry << AIXM.point(xy: AIXM.xy(lat: 22, long: 33))
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
@@ -104,7 +104,7 @@ describe AIXM::Component::Geometry do
|
|
104
104
|
end
|
105
105
|
|
106
106
|
it "must recognize closed" do
|
107
|
-
subject << AIXM
|
107
|
+
subject << AIXM.point(xy: AIXM.xy(lat: 11, long: 22))
|
108
108
|
subject.wont_be :circle?
|
109
109
|
subject.must_be :closed_shape?
|
110
110
|
subject.must_be :complete?
|
@@ -136,9 +136,9 @@ describe AIXM::Component::Geometry do
|
|
136
136
|
|
137
137
|
context "border" do
|
138
138
|
subject do
|
139
|
-
AIXM
|
140
|
-
geometry << AIXM
|
141
|
-
geometry << AIXM
|
139
|
+
AIXM.geometry.tap do |geometry|
|
140
|
+
geometry << AIXM.border(xy: AIXM.xy(lat: 11, long: 22), name: 'foobar')
|
141
|
+
geometry << AIXM.point(xy: AIXM.xy(lat: 22, long: 33))
|
142
142
|
end
|
143
143
|
end
|
144
144
|
|
@@ -149,7 +149,7 @@ describe AIXM::Component::Geometry do
|
|
149
149
|
end
|
150
150
|
|
151
151
|
it "must recognize closed" do
|
152
|
-
subject << AIXM
|
152
|
+
subject << AIXM.point(xy: AIXM.xy(lat: 11, long: 22))
|
153
153
|
subject.wont_be :circle?
|
154
154
|
subject.must_be :closed_shape?
|
155
155
|
subject.must_be :complete?
|
@@ -179,8 +179,8 @@ describe AIXM::Component::Geometry do
|
|
179
179
|
|
180
180
|
context "circle" do
|
181
181
|
subject do
|
182
|
-
AIXM
|
183
|
-
geometry << AIXM
|
182
|
+
AIXM.geometry.tap do |geometry|
|
183
|
+
geometry << AIXM.circle(center_xy: AIXM.xy(lat: 11, long: 22), radius: 10)
|
184
184
|
end
|
185
185
|
end
|
186
186
|
|
@@ -191,7 +191,7 @@ describe AIXM::Component::Geometry do
|
|
191
191
|
end
|
192
192
|
|
193
193
|
it "must fail validation when additional elements are present" do
|
194
|
-
subject << AIXM
|
194
|
+
subject << AIXM.point(xy: AIXM.xy(lat: 11, long: 22))
|
195
195
|
subject.wont_be :circle?
|
196
196
|
subject.wont_be :closed_shape?
|
197
197
|
subject.wont_be :complete?
|
@@ -3,28 +3,28 @@ require_relative '../../../spec_helper'
|
|
3
3
|
describe AIXM::Component::Schedule do
|
4
4
|
describe :initialize do
|
5
5
|
it "won't accept invalid arguments" do
|
6
|
-
-> { AIXM
|
6
|
+
-> { AIXM.schedule(code: 'foobar') }.must_raise ArgumentError
|
7
7
|
end
|
8
8
|
|
9
9
|
it "must accept explicit codes" do
|
10
|
-
AIXM
|
10
|
+
AIXM.schedule(code: :sunrise_to_sunset).code.must_equal :sunrise_to_sunset
|
11
11
|
end
|
12
12
|
|
13
13
|
it "must accept short codes" do
|
14
|
-
AIXM
|
14
|
+
AIXM.schedule(code: :H24).code.must_equal :continuous
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
describe :to_digest do
|
19
19
|
it "must return digest of payload" do
|
20
|
-
subject = AIXM
|
21
|
-
subject.to_digest.must_equal
|
20
|
+
subject = AIXM.schedule(code: :continuous)
|
21
|
+
subject.to_digest.must_equal 349179367
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
describe :to_xml do
|
26
26
|
it "must build correct XML" do
|
27
|
-
subject = AIXM
|
27
|
+
subject = AIXM.schedule(code: :continuous)
|
28
28
|
subject.to_xml.must_equal <<~END
|
29
29
|
<codeWorkHr>H24</codeWorkHr>
|
30
30
|
END
|
@@ -3,28 +3,28 @@ require_relative '../../../spec_helper'
|
|
3
3
|
describe AIXM::Component::VerticalLimits do
|
4
4
|
describe :initialize do
|
5
5
|
it "won't accept invalid arguments" do
|
6
|
-
z = AIXM
|
7
|
-
-> { AIXM
|
8
|
-
-> { AIXM
|
9
|
-
-> { AIXM
|
10
|
-
-> { AIXM
|
6
|
+
z = AIXM.z(1000, :qnh)
|
7
|
+
-> { AIXM.vertical_limits(upper_z: 0, lower_z: z, max_z: z, min_z: z) }.must_raise ArgumentError
|
8
|
+
-> { AIXM.vertical_limits(upper_z: z, lower_z: 0, max_z: z, min_z: z) }.must_raise ArgumentError
|
9
|
+
-> { AIXM.vertical_limits(upper_z: z, lower_z: z, max_z: 0, min_z: z) }.must_raise ArgumentError
|
10
|
+
-> { AIXM.vertical_limits(upper_z: z, lower_z: z, max_z: z, min_z: 0) }.must_raise ArgumentError
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
describe :to_digest do
|
15
15
|
it "must return digest of payload" do
|
16
|
-
subject = AIXM
|
17
|
-
upper_z: AIXM
|
16
|
+
subject = AIXM.vertical_limits(
|
17
|
+
upper_z: AIXM.z(2000, :qnh),
|
18
18
|
lower_z: AIXM::GROUND
|
19
19
|
)
|
20
|
-
subject.to_digest.must_equal
|
20
|
+
subject.to_digest.must_equal 867600845
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
describe :to_xml do
|
25
25
|
it "must build correct XML with only upper_z and lower_z" do
|
26
|
-
subject = AIXM
|
27
|
-
upper_z: AIXM
|
26
|
+
subject = AIXM.vertical_limits(
|
27
|
+
upper_z: AIXM.z(2000, :qnh),
|
28
28
|
lower_z: AIXM::GROUND
|
29
29
|
)
|
30
30
|
subject.to_xml.must_equal <<~END
|
@@ -38,10 +38,10 @@ describe AIXM::Component::VerticalLimits do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
it "must build correct XML with additional max_z" do
|
41
|
-
subject = AIXM
|
42
|
-
upper_z: AIXM
|
43
|
-
lower_z: AIXM
|
44
|
-
max_z: AIXM
|
41
|
+
subject = AIXM.vertical_limits(
|
42
|
+
upper_z: AIXM.z(65, :qne),
|
43
|
+
lower_z: AIXM.z(1000, :qfe),
|
44
|
+
max_z: AIXM.z(6000, :qnh)
|
45
45
|
)
|
46
46
|
subject.to_xml.must_equal <<~END
|
47
47
|
<codeDistVerUpper>STD</codeDistVerUpper>
|
@@ -57,10 +57,10 @@ describe AIXM::Component::VerticalLimits do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
it "must build correct XML with additional min_z" do
|
60
|
-
subject = AIXM
|
61
|
-
upper_z: AIXM
|
62
|
-
lower_z: AIXM
|
63
|
-
min_z: AIXM
|
60
|
+
subject = AIXM.vertical_limits(
|
61
|
+
upper_z: AIXM.z(65, :qne),
|
62
|
+
lower_z: AIXM.z(45, :qne),
|
63
|
+
min_z: AIXM.z(3000, :qnh)
|
64
64
|
)
|
65
65
|
subject.to_xml.must_equal <<~END
|
66
66
|
<codeDistVerUpper>STD</codeDistVerUpper>
|
@@ -3,39 +3,39 @@ require_relative '../../spec_helper'
|
|
3
3
|
describe AIXM::Document do
|
4
4
|
describe :initialize do
|
5
5
|
it "won't accept invalid arguments" do
|
6
|
-
-> { AIXM
|
7
|
-
-> { AIXM
|
8
|
-
-> { AIXM
|
9
|
-
-> { AIXM
|
6
|
+
-> { AIXM.document(created_at: 0) }.must_raise ArgumentError
|
7
|
+
-> { AIXM.document(created_at: 'foobar') }.must_raise ArgumentError
|
8
|
+
-> { AIXM.document(effective_at: 0) }.must_raise ArgumentError
|
9
|
+
-> { AIXM.document(effective_at: 'foobar') }.must_raise ArgumentError
|
10
10
|
end
|
11
11
|
|
12
12
|
it "must accept strings" do
|
13
13
|
string = '2018-01-01 12:00:00 +0100'
|
14
|
-
AIXM
|
15
|
-
AIXM
|
14
|
+
AIXM.document(created_at: string).created_at.must_equal Time.parse(string)
|
15
|
+
AIXM.document(effective_at: string).effective_at.must_equal Time.parse(string)
|
16
16
|
end
|
17
17
|
|
18
18
|
it "must accept dates" do
|
19
19
|
date = Date.parse('2018-01-01')
|
20
|
-
AIXM
|
21
|
-
AIXM
|
20
|
+
AIXM.document(created_at: date).created_at.must_equal date.to_time
|
21
|
+
AIXM.document(effective_at: date).effective_at.must_equal date.to_time
|
22
22
|
end
|
23
23
|
|
24
24
|
it "must accept times" do
|
25
25
|
time = Time.parse('2018-01-01 12:00:00 +0100')
|
26
|
-
AIXM
|
27
|
-
AIXM
|
26
|
+
AIXM.document(created_at: time).created_at.must_equal time
|
27
|
+
AIXM.document(effective_at: time).effective_at.must_equal time
|
28
28
|
end
|
29
29
|
|
30
30
|
it "must accept nils" do
|
31
|
-
AIXM
|
32
|
-
AIXM
|
31
|
+
AIXM.document(created_at: nil).created_at.must_be :nil?
|
32
|
+
AIXM.document(effective_at: nil).effective_at.must_be :nil?
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
context "incomplete" do
|
37
37
|
subject do
|
38
|
-
AIXM
|
38
|
+
AIXM.document
|
39
39
|
end
|
40
40
|
|
41
41
|
it "must fail validation" do
|
@@ -62,9 +62,9 @@ describe AIXM::Document do
|
|
62
62
|
<AIXM-Snapshot xmlns:xsi="http://www.aixm.aero/schema/4.5/AIXM-Snapshot.xsd" version="4.5" origin="AIXM #{AIXM::VERSION} Ruby gem" created="2018-01-18T12:00:00+01:00" effective="2018-01-18T12:00:00+01:00">
|
63
63
|
<!-- Airspace: [D] POLYGON AIRSPACE -->
|
64
64
|
<Ase>
|
65
|
-
<AseUid mid="
|
65
|
+
<AseUid mid="367297292">
|
66
66
|
<codeType>D</codeType>
|
67
|
-
<codeId>
|
67
|
+
<codeId>367297292</codeId>
|
68
68
|
</AseUid>
|
69
69
|
<txtLocalType>POLYGON</txtLocalType>
|
70
70
|
<txtName>POLYGON AIRSPACE</txtName>
|
@@ -88,9 +88,9 @@ describe AIXM::Document do
|
|
88
88
|
</Ase>
|
89
89
|
<Abd>
|
90
90
|
<AbdUid>
|
91
|
-
<AseUid mid="
|
91
|
+
<AseUid mid="367297292">
|
92
92
|
<codeType>D</codeType>
|
93
|
-
<codeId>
|
93
|
+
<codeId>367297292</codeId>
|
94
94
|
</AseUid>
|
95
95
|
</AbdUid>
|
96
96
|
<Avx>
|
@@ -116,9 +116,9 @@ describe AIXM::Document do
|
|
116
116
|
</Abd>
|
117
117
|
<!-- Airspace: [D] CIRCLE AIRSPACE -->
|
118
118
|
<Ase>
|
119
|
-
<AseUid mid="
|
119
|
+
<AseUid mid="332058082">
|
120
120
|
<codeType>D</codeType>
|
121
|
-
<codeId>
|
121
|
+
<codeId>332058082</codeId>
|
122
122
|
</AseUid>
|
123
123
|
<txtLocalType>CIRCLE</txtLocalType>
|
124
124
|
<txtName>CIRCLE AIRSPACE</txtName>
|
@@ -142,9 +142,9 @@ describe AIXM::Document do
|
|
142
142
|
</Ase>
|
143
143
|
<Abd>
|
144
144
|
<AbdUid>
|
145
|
-
<AseUid mid="
|
145
|
+
<AseUid mid="332058082">
|
146
146
|
<codeType>D</codeType>
|
147
|
-
<codeId>
|
147
|
+
<codeId>332058082</codeId>
|
148
148
|
</AseUid>
|
149
149
|
</AbdUid>
|
150
150
|
<Avx>
|
@@ -156,19 +156,114 @@ describe AIXM::Document do
|
|
156
156
|
<geoLongArc>0045300.00E</geoLongArc>
|
157
157
|
</Avx>
|
158
158
|
</Abd>
|
159
|
+
<!-- Navigational aid: [ICAO] DESIGNATED POINT NAVAID -->
|
160
|
+
<Dpn>
|
161
|
+
<DpnUid>
|
162
|
+
<codeId>DPN</codeId>
|
163
|
+
<geoLat>475133.00N</geoLat>
|
164
|
+
<geoLong>0073336.00E</geoLong>
|
165
|
+
</DpnUid>
|
166
|
+
<OrgUid/>
|
167
|
+
<txtName>DESIGNATED POINT NAVAID</txtName>
|
168
|
+
<codeDatum>WGE</codeDatum>
|
169
|
+
<codeType>ICAO</codeType>
|
170
|
+
<valElev>500</valElev>
|
171
|
+
<uomDistVer>FT</uomDistVer>
|
172
|
+
<txtRmk>designated point navaid</txtRmk>
|
173
|
+
</Dpn>
|
174
|
+
<!-- Navigational aid: [DME] DME NAVAID -->
|
175
|
+
<Dme>
|
176
|
+
<DmeUid>
|
177
|
+
<codeId>DME</codeId>
|
178
|
+
<geoLat>475133.00N</geoLat>
|
179
|
+
<geoLong>0073336.00E</geoLong>
|
180
|
+
</DmeUid>
|
181
|
+
<OrgUid/>
|
182
|
+
<txtName>DME NAVAID</txtName>
|
183
|
+
<codeChannel>95X</codeChannel>
|
184
|
+
<codeDatum>WGE</codeDatum>
|
185
|
+
<valElev>500</valElev>
|
186
|
+
<uomDistVer>FT</uomDistVer>
|
187
|
+
<txtRmk>dme navaid</txtRmk>
|
188
|
+
</Dme>
|
189
|
+
<!-- Navigational aid: [Marker] MARKER NAVAID -->
|
190
|
+
<Mkr>
|
191
|
+
<MkrUid>
|
192
|
+
<codeId>---</codeId>
|
193
|
+
<geoLat>475133.00N</geoLat>
|
194
|
+
<geoLong>0073336.00E</geoLong>
|
195
|
+
</MkrUid>
|
196
|
+
<OrgUid/>
|
197
|
+
<valFreq>75</valFreq>
|
198
|
+
<uomFreq>MHZ</uomFreq>
|
199
|
+
<txtName>MARKER NAVAID</txtName>
|
200
|
+
<codeDatum>WGE</codeDatum>
|
201
|
+
<valElev>500</valElev>
|
202
|
+
<uomDistVer>FT</uomDistVer>
|
203
|
+
<txtRmk>marker navaid</txtRmk>
|
204
|
+
</Mkr>
|
205
|
+
<!-- Navigational aid: [NDB] NDB NAVAID -->
|
206
|
+
<Ndb>
|
207
|
+
<NdbUid>
|
208
|
+
<codeId>NDB</codeId>
|
209
|
+
<geoLat>475133.00N</geoLat>
|
210
|
+
<geoLong>0073336.00E</geoLong>
|
211
|
+
</NdbUid>
|
212
|
+
<OrgUid/>
|
213
|
+
<txtName>NDB NAVAID</txtName>
|
214
|
+
<valFreq>555</valFreq>
|
215
|
+
<uomFreq>KHZ</uomFreq>
|
216
|
+
<codeDatum>WGE</codeDatum>
|
217
|
+
<valElev>500</valElev>
|
218
|
+
<uomDistVer>FT</uomDistVer>
|
219
|
+
<txtRmk>ndb navaid</txtRmk>
|
220
|
+
</Ndb>
|
221
|
+
<!-- Navigational aid: [VOR] VOR NAVAID -->
|
222
|
+
<Vor>
|
223
|
+
<VorUid>
|
224
|
+
<codeId>VOR</codeId>
|
225
|
+
<geoLat>475133.00N</geoLat>
|
226
|
+
<geoLong>0073336.00E</geoLong>
|
227
|
+
</VorUid>
|
228
|
+
<OrgUid/>
|
229
|
+
<txtName>VOR NAVAID</txtName>
|
230
|
+
<codeType>VOR</codeType>
|
231
|
+
<valFreq>111</valFreq>
|
232
|
+
<uomFreq>MHZ</uomFreq>
|
233
|
+
<codeTypeNorth>TRUE</codeTypeNorth>
|
234
|
+
<codeDatum>WGE</codeDatum>
|
235
|
+
<valElev>500</valElev>
|
236
|
+
<uomDistVer>FT</uomDistVer>
|
237
|
+
<txtRmk>vor navaid</txtRmk>
|
238
|
+
</Vor>
|
239
|
+
<!-- Navigational aid: [TACAN] TACAN NAVAID -->
|
240
|
+
<Tcn>
|
241
|
+
<TcnUid>
|
242
|
+
<codeId>TCN</codeId>
|
243
|
+
<geoLat>475133.00N</geoLat>
|
244
|
+
<geoLong>0073336.00E</geoLong>
|
245
|
+
</TcnUid>
|
246
|
+
<OrgUid/>
|
247
|
+
<txtName>TACAN NAVAID</txtName>
|
248
|
+
<codeChannel>29X</codeChannel>
|
249
|
+
<codeDatum>WGE</codeDatum>
|
250
|
+
<valElev>500</valElev>
|
251
|
+
<uomDistVer>FT</uomDistVer>
|
252
|
+
<txtRmk>tacan navaid</txtRmk>
|
253
|
+
</Tcn>
|
159
254
|
</AIXM-Snapshot>
|
160
255
|
END
|
161
256
|
end
|
162
257
|
|
163
258
|
it "must build correct XML with OFM extensions" do
|
164
|
-
subject.to_xml(:
|
259
|
+
subject.to_xml(:ofm).must_equal <<~"END"
|
165
260
|
<?xml version="1.0" encoding="UTF-8"?>
|
166
261
|
<AIXM-Snapshot xmlns:xsi="http://www.aixm.aero/schema/4.5/AIXM-Snapshot.xsd" version="4.5 + OFM extensions of version 0.1" origin="AIXM #{AIXM::VERSION} Ruby gem" created="2018-01-18T12:00:00+01:00" effective="2018-01-18T12:00:00+01:00">
|
167
262
|
<!-- Airspace: [D] POLYGON AIRSPACE -->
|
168
263
|
<Ase xt_classLayersAvail="false">
|
169
|
-
<AseUid mid="
|
264
|
+
<AseUid mid="367297292" newEntity="true">
|
170
265
|
<codeType>D</codeType>
|
171
|
-
<codeId>
|
266
|
+
<codeId>367297292</codeId>
|
172
267
|
</AseUid>
|
173
268
|
<txtLocalType>POLYGON</txtLocalType>
|
174
269
|
<txtName>POLYGON AIRSPACE</txtName>
|
@@ -193,9 +288,9 @@ describe AIXM::Document do
|
|
193
288
|
</Ase>
|
194
289
|
<Abd>
|
195
290
|
<AbdUid>
|
196
|
-
<AseUid mid="
|
291
|
+
<AseUid mid="367297292" newEntity="true">
|
197
292
|
<codeType>D</codeType>
|
198
|
-
<codeId>
|
293
|
+
<codeId>367297292</codeId>
|
199
294
|
</AseUid>
|
200
295
|
</AbdUid>
|
201
296
|
<Avx>
|
@@ -224,9 +319,9 @@ describe AIXM::Document do
|
|
224
319
|
</Abd>
|
225
320
|
<!-- Airspace: [D] CIRCLE AIRSPACE -->
|
226
321
|
<Ase xt_classLayersAvail="false">
|
227
|
-
<AseUid mid="
|
322
|
+
<AseUid mid="332058082" newEntity="true">
|
228
323
|
<codeType>D</codeType>
|
229
|
-
<codeId>
|
324
|
+
<codeId>332058082</codeId>
|
230
325
|
</AseUid>
|
231
326
|
<txtLocalType>CIRCLE</txtLocalType>
|
232
327
|
<txtName>CIRCLE AIRSPACE</txtName>
|
@@ -251,9 +346,9 @@ describe AIXM::Document do
|
|
251
346
|
</Ase>
|
252
347
|
<Abd>
|
253
348
|
<AbdUid>
|
254
|
-
<AseUid mid="
|
349
|
+
<AseUid mid="332058082" newEntity="true">
|
255
350
|
<codeType>D</codeType>
|
256
|
-
<codeId>
|
351
|
+
<codeId>332058082</codeId>
|
257
352
|
</AseUid>
|
258
353
|
</AbdUid>
|
259
354
|
<Avx>
|
@@ -265,6 +360,101 @@ describe AIXM::Document do
|
|
265
360
|
<geoLongArc>4.88333333E</geoLongArc>
|
266
361
|
</Avx>
|
267
362
|
</Abd>
|
363
|
+
<!-- Navigational aid: [ICAO] DESIGNATED POINT NAVAID -->
|
364
|
+
<Dpn>
|
365
|
+
<DpnUid newEntity="true">
|
366
|
+
<codeId>DPN</codeId>
|
367
|
+
<geoLat>47.85916667N</geoLat>
|
368
|
+
<geoLong>7.56000000E</geoLong>
|
369
|
+
</DpnUid>
|
370
|
+
<OrgUid/>
|
371
|
+
<txtName>DESIGNATED POINT NAVAID</txtName>
|
372
|
+
<codeDatum>WGE</codeDatum>
|
373
|
+
<codeType>ICAO</codeType>
|
374
|
+
<valElev>500</valElev>
|
375
|
+
<uomDistVer>FT</uomDistVer>
|
376
|
+
<txtRmk>designated point navaid</txtRmk>
|
377
|
+
</Dpn>
|
378
|
+
<!-- Navigational aid: [DME] DME NAVAID -->
|
379
|
+
<Dme>
|
380
|
+
<DmeUid newEntity="true">
|
381
|
+
<codeId>DME</codeId>
|
382
|
+
<geoLat>47.85916667N</geoLat>
|
383
|
+
<geoLong>7.56000000E</geoLong>
|
384
|
+
</DmeUid>
|
385
|
+
<OrgUid/>
|
386
|
+
<txtName>DME NAVAID</txtName>
|
387
|
+
<codeChannel>95X</codeChannel>
|
388
|
+
<codeDatum>WGE</codeDatum>
|
389
|
+
<valElev>500</valElev>
|
390
|
+
<uomDistVer>FT</uomDistVer>
|
391
|
+
<txtRmk>dme navaid</txtRmk>
|
392
|
+
</Dme>
|
393
|
+
<!-- Navigational aid: [Marker] MARKER NAVAID -->
|
394
|
+
<Mkr>
|
395
|
+
<MkrUid newEntity="true">
|
396
|
+
<codeId>---</codeId>
|
397
|
+
<geoLat>47.85916667N</geoLat>
|
398
|
+
<geoLong>7.56000000E</geoLong>
|
399
|
+
</MkrUid>
|
400
|
+
<OrgUid/>
|
401
|
+
<valFreq>75</valFreq>
|
402
|
+
<uomFreq>MHZ</uomFreq>
|
403
|
+
<txtName>MARKER NAVAID</txtName>
|
404
|
+
<codeDatum>WGE</codeDatum>
|
405
|
+
<valElev>500</valElev>
|
406
|
+
<uomDistVer>FT</uomDistVer>
|
407
|
+
<txtRmk>marker navaid</txtRmk>
|
408
|
+
</Mkr>
|
409
|
+
<!-- Navigational aid: [NDB] NDB NAVAID -->
|
410
|
+
<Ndb>
|
411
|
+
<NdbUid newEntity="true">
|
412
|
+
<codeId>NDB</codeId>
|
413
|
+
<geoLat>47.85916667N</geoLat>
|
414
|
+
<geoLong>7.56000000E</geoLong>
|
415
|
+
</NdbUid>
|
416
|
+
<OrgUid/>
|
417
|
+
<txtName>NDB NAVAID</txtName>
|
418
|
+
<valFreq>555</valFreq>
|
419
|
+
<uomFreq>KHZ</uomFreq>
|
420
|
+
<codeDatum>WGE</codeDatum>
|
421
|
+
<valElev>500</valElev>
|
422
|
+
<uomDistVer>FT</uomDistVer>
|
423
|
+
<txtRmk>ndb navaid</txtRmk>
|
424
|
+
</Ndb>
|
425
|
+
<!-- Navigational aid: [VOR] VOR NAVAID -->
|
426
|
+
<Vor>
|
427
|
+
<VorUid newEntity="true">
|
428
|
+
<codeId>VOR</codeId>
|
429
|
+
<geoLat>47.85916667N</geoLat>
|
430
|
+
<geoLong>7.56000000E</geoLong>
|
431
|
+
</VorUid>
|
432
|
+
<OrgUid/>
|
433
|
+
<txtName>VOR NAVAID</txtName>
|
434
|
+
<codeType>VOR</codeType>
|
435
|
+
<valFreq>111</valFreq>
|
436
|
+
<uomFreq>MHZ</uomFreq>
|
437
|
+
<codeTypeNorth>TRUE</codeTypeNorth>
|
438
|
+
<codeDatum>WGE</codeDatum>
|
439
|
+
<valElev>500</valElev>
|
440
|
+
<uomDistVer>FT</uomDistVer>
|
441
|
+
<txtRmk>vor navaid</txtRmk>
|
442
|
+
</Vor>
|
443
|
+
<!-- Navigational aid: [TACAN] TACAN NAVAID -->
|
444
|
+
<Tcn>
|
445
|
+
<TcnUid newEntity="true">
|
446
|
+
<codeId>TCN</codeId>
|
447
|
+
<geoLat>47.85916667N</geoLat>
|
448
|
+
<geoLong>7.56000000E</geoLong>
|
449
|
+
</TcnUid>
|
450
|
+
<OrgUid/>
|
451
|
+
<txtName>TACAN NAVAID</txtName>
|
452
|
+
<codeChannel>29X</codeChannel>
|
453
|
+
<codeDatum>WGE</codeDatum>
|
454
|
+
<valElev>500</valElev>
|
455
|
+
<uomDistVer>FT</uomDistVer>
|
456
|
+
<txtRmk>tacan navaid</txtRmk>
|
457
|
+
</Tcn>
|
268
458
|
</AIXM-Snapshot>
|
269
459
|
END
|
270
460
|
end
|