aixm 0.3.0 → 0.3.1
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
- data/.ruby-version +1 -1
- data/CHANGELOG.md +96 -72
- data/README.md +0 -1
- data/lib/aixm/component/geometry.rb +8 -2
- data/lib/aixm/component/layer.rb +83 -2
- data/lib/aixm/document.rb +11 -2
- data/lib/aixm/errors.rb +14 -2
- data/lib/aixm/feature.rb +2 -14
- data/lib/aixm/feature/airport.rb +19 -18
- data/lib/aixm/feature/airspace.rb +19 -21
- data/lib/aixm/feature/navigational_aid.rb +2 -2
- data/lib/aixm/feature/navigational_aid/designated_point.rb +1 -2
- data/lib/aixm/feature/navigational_aid/dme.rb +25 -4
- data/lib/aixm/feature/navigational_aid/marker.rb +1 -2
- data/lib/aixm/feature/navigational_aid/ndb.rb +1 -2
- data/lib/aixm/feature/navigational_aid/tacan.rb +5 -2
- data/lib/aixm/feature/navigational_aid/vor.rb +3 -4
- data/lib/aixm/feature/organisation.rb +3 -4
- data/lib/aixm/feature/unit.rb +3 -4
- data/lib/aixm/version.rb +1 -1
- data/schemas/ofmx/0/OFMX-CSV-Obstacle.json +209 -0
- data/schemas/ofmx/0/OFMX-CSV.json +12 -0
- data/schemas/ofmx/0/OFMX-DataTypes.xsd +64 -5
- data/schemas/ofmx/0/OFMX-Features.xsd +73 -23
- data/schemas/ofmx/0/OFMX-Snapshot.xsd +7 -2
- data/spec/factory.rb +8 -18
- data/spec/lib/aixm/component/geometry_spec.rb +27 -4
- data/spec/lib/aixm/component/helipad_spec.rb +2 -2
- data/spec/lib/aixm/component/layer_spec.rb +27 -0
- data/spec/lib/aixm/component/runway_spec.rb +13 -13
- data/spec/lib/aixm/document_spec.rb +56 -42
- data/spec/lib/aixm/feature/airport_spec.rb +15 -15
- data/spec/lib/aixm/feature/airspace_spec.rb +38 -30
- data/spec/lib/aixm/feature/navigational_aid/designated_point_spec.rb +2 -2
- data/spec/lib/aixm/feature/navigational_aid/dme_spec.rb +24 -7
- data/spec/lib/aixm/feature/navigational_aid/marker_spec.rb +4 -4
- data/spec/lib/aixm/feature/navigational_aid/ndb_spec.rb +4 -4
- data/spec/lib/aixm/feature/navigational_aid/tacan_spec.rb +24 -7
- data/spec/lib/aixm/feature/navigational_aid/vor_spec.rb +14 -14
- data/spec/lib/aixm/feature/organisation_spec.rb +2 -2
- data/spec/lib/aixm/feature/unit_spec.rb +11 -11
- data/spec/lib/aixm/feature_spec.rb +0 -20
- metadata +4 -2
@@ -7,11 +7,24 @@ describe AIXM::Feature::NavigationalAid::TACAN do
|
|
7
7
|
|
8
8
|
describe :channel= do
|
9
9
|
it "fails on invalid values" do
|
10
|
-
[nil, :foobar, 123].wont_be_written_to subject, :channel
|
10
|
+
[nil, :foobar, 123, '0X', '127Y', '12Z'].wont_be_written_to subject, :channel
|
11
11
|
end
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
14
|
+
describe :ghost_f do
|
15
|
+
it "must be derived from the channel" do
|
16
|
+
subject.tap { |s| s.channel = '1X' }.ghost_f.freq.must_equal 134.4
|
17
|
+
subject.tap { |s| s.channel = '12Y' }.ghost_f.freq.must_equal 135.55
|
18
|
+
subject.tap { |s| s.channel = '16Y' }.ghost_f.freq.must_equal 135.95
|
19
|
+
subject.tap { |s| s.channel = '17X' }.ghost_f.freq.must_equal 108
|
20
|
+
subject.tap { |s| s.channel = '30X' }.ghost_f.freq.must_equal 109.3
|
21
|
+
subject.tap { |s| s.channel = '59Y' }.ghost_f.freq.must_equal 112.25
|
22
|
+
subject.tap { |s| s.channel = '60X' }.ghost_f.freq.must_equal 133.3
|
23
|
+
subject.tap { |s| s.channel = '64Y' }.ghost_f.freq.must_equal 133.75
|
24
|
+
subject.tap { |s| s.channel = '69Y' }.ghost_f.freq.must_equal 134.25
|
25
|
+
subject.tap { |s| s.channel = '70X' }.ghost_f.freq.must_equal 112.30
|
26
|
+
subject.tap { |s| s.channel = '100X' }.ghost_f.freq.must_equal 115.3
|
27
|
+
subject.tap { |s| s.channel = '126Y' }.ghost_f.freq.must_equal 117.95
|
15
28
|
end
|
16
29
|
end
|
17
30
|
|
@@ -27,16 +40,18 @@ describe AIXM::Feature::NavigationalAid::TACAN do
|
|
27
40
|
subject.to_xml.must_equal <<~END
|
28
41
|
<!-- NavigationalAid: [TACAN] TACAN NAVAID -->
|
29
42
|
<Tcn source="LF|GEN|0.0 FACTORY|0|0">
|
30
|
-
<TcnUid
|
43
|
+
<TcnUid>
|
31
44
|
<codeId>TTT</codeId>
|
32
45
|
<geoLat>47.85916667N</geoLat>
|
33
46
|
<geoLong>007.56000000E</geoLong>
|
34
47
|
</TcnUid>
|
35
|
-
<OrgUid
|
48
|
+
<OrgUid>
|
36
49
|
<txtName>FRANCE</txtName>
|
37
50
|
</OrgUid>
|
38
51
|
<txtName>TACAN NAVAID</txtName>
|
39
52
|
<codeChannel>29X</codeChannel>
|
53
|
+
<valGhostFreq>109.2</valGhostFreq>
|
54
|
+
<uomGhostFreq>MHZ</uomGhostFreq>
|
40
55
|
<codeDatum>WGE</codeDatum>
|
41
56
|
<valElev>500</valElev>
|
42
57
|
<uomDistVer>FT</uomDistVer>
|
@@ -54,15 +69,17 @@ describe AIXM::Feature::NavigationalAid::TACAN do
|
|
54
69
|
subject.to_xml.must_equal <<~END
|
55
70
|
<!-- NavigationalAid: [TACAN] UNNAMED -->
|
56
71
|
<Tcn source="LF|GEN|0.0 FACTORY|0|0">
|
57
|
-
<TcnUid
|
72
|
+
<TcnUid>
|
58
73
|
<codeId>TTT</codeId>
|
59
74
|
<geoLat>47.85916667N</geoLat>
|
60
75
|
<geoLong>007.56000000E</geoLong>
|
61
76
|
</TcnUid>
|
62
|
-
<OrgUid
|
77
|
+
<OrgUid>
|
63
78
|
<txtName>FRANCE</txtName>
|
64
79
|
</OrgUid>
|
65
80
|
<codeChannel>29X</codeChannel>
|
81
|
+
<valGhostFreq>109.2</valGhostFreq>
|
82
|
+
<uomGhostFreq>MHZ</uomGhostFreq>
|
66
83
|
<codeDatum>WGE</codeDatum>
|
67
84
|
</Tcn>
|
68
85
|
END
|
@@ -50,12 +50,12 @@ describe AIXM::Feature::NavigationalAid::VOR do
|
|
50
50
|
subject.to_xml.must_equal <<~END
|
51
51
|
<!-- NavigationalAid: [VOR:VOR] VOR NAVAID -->
|
52
52
|
<Vor source="LF|GEN|0.0 FACTORY|0|0">
|
53
|
-
<VorUid
|
53
|
+
<VorUid>
|
54
54
|
<codeId>VVV</codeId>
|
55
55
|
<geoLat>47.85916667N</geoLat>
|
56
56
|
<geoLong>007.56000000E</geoLong>
|
57
57
|
</VorUid>
|
58
|
-
<OrgUid
|
58
|
+
<OrgUid>
|
59
59
|
<txtName>FRANCE</txtName>
|
60
60
|
</OrgUid>
|
61
61
|
<txtName>VOR NAVAID</txtName>
|
@@ -80,12 +80,12 @@ describe AIXM::Feature::NavigationalAid::VOR do
|
|
80
80
|
subject.to_xml.must_equal <<~END
|
81
81
|
<!-- NavigationalAid: [VOR:VOR] UNNAMED -->
|
82
82
|
<Vor source="LF|GEN|0.0 FACTORY|0|0">
|
83
|
-
<VorUid
|
83
|
+
<VorUid>
|
84
84
|
<codeId>VVV</codeId>
|
85
85
|
<geoLat>47.85916667N</geoLat>
|
86
86
|
<geoLong>007.56000000E</geoLong>
|
87
87
|
</VorUid>
|
88
|
-
<OrgUid
|
88
|
+
<OrgUid>
|
89
89
|
<txtName>FRANCE</txtName>
|
90
90
|
</OrgUid>
|
91
91
|
<codeType>VOR</codeType>
|
@@ -120,12 +120,12 @@ describe AIXM::Feature::NavigationalAid::VOR do
|
|
120
120
|
subject.to_xml.must_equal <<~END
|
121
121
|
<!-- NavigationalAid: [VOR:VOR] VOR/DME NAVAID -->
|
122
122
|
<Vor source="LF|GEN|0.0 FACTORY|0|0">
|
123
|
-
<VorUid
|
123
|
+
<VorUid>
|
124
124
|
<codeId>VVV</codeId>
|
125
125
|
<geoLat>47.85916667N</geoLat>
|
126
126
|
<geoLong>007.56000000E</geoLong>
|
127
127
|
</VorUid>
|
128
|
-
<OrgUid
|
128
|
+
<OrgUid>
|
129
129
|
<txtName>FRANCE</txtName>
|
130
130
|
</OrgUid>
|
131
131
|
<txtName>VOR/DME NAVAID</txtName>
|
@@ -143,15 +143,15 @@ describe AIXM::Feature::NavigationalAid::VOR do
|
|
143
143
|
</Vor>
|
144
144
|
<!-- NavigationalAid: [DME] VOR/DME NAVAID -->
|
145
145
|
<Dme>
|
146
|
-
<DmeUid
|
146
|
+
<DmeUid>
|
147
147
|
<codeId>VVV</codeId>
|
148
148
|
<geoLat>47.85916667N</geoLat>
|
149
149
|
<geoLong>007.56000000E</geoLong>
|
150
150
|
</DmeUid>
|
151
|
-
<OrgUid
|
151
|
+
<OrgUid>
|
152
152
|
<txtName>FRANCE</txtName>
|
153
153
|
</OrgUid>
|
154
|
-
<VorUid
|
154
|
+
<VorUid>
|
155
155
|
<codeId>VVV</codeId>
|
156
156
|
<geoLat>47.85916667N</geoLat>
|
157
157
|
<geoLong>007.56000000E</geoLong>
|
@@ -192,12 +192,12 @@ describe AIXM::Feature::NavigationalAid::VOR do
|
|
192
192
|
subject.to_xml.must_equal <<~END
|
193
193
|
<!-- NavigationalAid: [VOR:VOR] VORTAC NAVAID -->
|
194
194
|
<Vor source="LF|GEN|0.0 FACTORY|0|0">
|
195
|
-
<VorUid
|
195
|
+
<VorUid>
|
196
196
|
<codeId>VVV</codeId>
|
197
197
|
<geoLat>47.85916667N</geoLat>
|
198
198
|
<geoLong>007.56000000E</geoLong>
|
199
199
|
</VorUid>
|
200
|
-
<OrgUid
|
200
|
+
<OrgUid>
|
201
201
|
<txtName>FRANCE</txtName>
|
202
202
|
</OrgUid>
|
203
203
|
<txtName>VORTAC NAVAID</txtName>
|
@@ -215,15 +215,15 @@ describe AIXM::Feature::NavigationalAid::VOR do
|
|
215
215
|
</Vor>
|
216
216
|
<!-- NavigationalAid: [TACAN] VORTAC NAVAID -->
|
217
217
|
<Tcn>
|
218
|
-
<TcnUid
|
218
|
+
<TcnUid>
|
219
219
|
<codeId>VVV</codeId>
|
220
220
|
<geoLat>47.85916667N</geoLat>
|
221
221
|
<geoLong>007.56000000E</geoLong>
|
222
222
|
</TcnUid>
|
223
|
-
<OrgUid
|
223
|
+
<OrgUid>
|
224
224
|
<txtName>FRANCE</txtName>
|
225
225
|
</OrgUid>
|
226
|
-
<VorUid
|
226
|
+
<VorUid>
|
227
227
|
<codeId>VVV</codeId>
|
228
228
|
<geoLat>47.85916667N</geoLat>
|
229
229
|
<geoLong>007.56000000E</geoLong>
|
@@ -50,7 +50,7 @@ describe AIXM::Feature::Organisation do
|
|
50
50
|
subject.to_xml.must_equal <<~END
|
51
51
|
<!-- Organisation: FRANCE -->
|
52
52
|
<Org source="LF|GEN|0.0 FACTORY|0|0">
|
53
|
-
<OrgUid
|
53
|
+
<OrgUid>
|
54
54
|
<txtName>FRANCE</txtName>
|
55
55
|
</OrgUid>
|
56
56
|
<codeId>LF</codeId>
|
@@ -66,7 +66,7 @@ describe AIXM::Feature::Organisation do
|
|
66
66
|
subject.to_xml.must_equal <<~END
|
67
67
|
<!-- Organisation: FRANCE -->
|
68
68
|
<Org source="LF|GEN|0.0 FACTORY|0|0">
|
69
|
-
<OrgUid
|
69
|
+
<OrgUid>
|
70
70
|
<txtName>FRANCE</txtName>
|
71
71
|
</OrgUid>
|
72
72
|
<codeType>S</codeType>
|
@@ -72,13 +72,13 @@ describe AIXM::Feature::Unit do
|
|
72
72
|
subject.to_xml.must_equal <<~END
|
73
73
|
<!-- Unit: PUJAUT TWR -->
|
74
74
|
<Uni source="LF|GEN|0.0 FACTORY|0|0">
|
75
|
-
<UniUid
|
75
|
+
<UniUid>
|
76
76
|
<txtName>PUJAUT TWR</txtName>
|
77
77
|
</UniUid>
|
78
|
-
<OrgUid
|
78
|
+
<OrgUid>
|
79
79
|
<txtName>FRANCE</txtName>
|
80
80
|
</OrgUid>
|
81
|
-
<AhpUid
|
81
|
+
<AhpUid>
|
82
82
|
<codeId>LFNT</codeId>
|
83
83
|
</AhpUid>
|
84
84
|
<codeType>TWR</codeType>
|
@@ -87,7 +87,7 @@ describe AIXM::Feature::Unit do
|
|
87
87
|
</Uni>
|
88
88
|
<Ser>
|
89
89
|
<SerUid>
|
90
|
-
<UniUid
|
90
|
+
<UniUid>
|
91
91
|
<txtName>PUJAUT TWR</txtName>
|
92
92
|
</UniUid>
|
93
93
|
<codeType>AFIS</codeType>
|
@@ -101,7 +101,7 @@ describe AIXM::Feature::Unit do
|
|
101
101
|
<Fqy>
|
102
102
|
<FqyUid>
|
103
103
|
<SerUid>
|
104
|
-
<UniUid
|
104
|
+
<UniUid>
|
105
105
|
<txtName>PUJAUT TWR</txtName>
|
106
106
|
</UniUid>
|
107
107
|
<codeType>AFIS</codeType>
|
@@ -126,7 +126,7 @@ describe AIXM::Feature::Unit do
|
|
126
126
|
</Fqy>
|
127
127
|
<Ser>
|
128
128
|
<SerUid>
|
129
|
-
<UniUid
|
129
|
+
<UniUid>
|
130
130
|
<txtName>PUJAUT TWR</txtName>
|
131
131
|
</UniUid>
|
132
132
|
<codeType>AFIS</codeType>
|
@@ -140,7 +140,7 @@ describe AIXM::Feature::Unit do
|
|
140
140
|
<Fqy>
|
141
141
|
<FqyUid>
|
142
142
|
<SerUid>
|
143
|
-
<UniUid
|
143
|
+
<UniUid>
|
144
144
|
<txtName>PUJAUT TWR</txtName>
|
145
145
|
</UniUid>
|
146
146
|
<codeType>AFIS</codeType>
|
@@ -165,7 +165,7 @@ describe AIXM::Feature::Unit do
|
|
165
165
|
</Fqy>
|
166
166
|
<Ser>
|
167
167
|
<SerUid>
|
168
|
-
<UniUid
|
168
|
+
<UniUid>
|
169
169
|
<txtName>PUJAUT TWR</txtName>
|
170
170
|
</UniUid>
|
171
171
|
<codeType>APP</codeType>
|
@@ -179,7 +179,7 @@ describe AIXM::Feature::Unit do
|
|
179
179
|
<Fqy>
|
180
180
|
<FqyUid>
|
181
181
|
<SerUid>
|
182
|
-
<UniUid
|
182
|
+
<UniUid>
|
183
183
|
<txtName>PUJAUT TWR</txtName>
|
184
184
|
</UniUid>
|
185
185
|
<codeType>APP</codeType>
|
@@ -212,10 +212,10 @@ describe AIXM::Feature::Unit do
|
|
212
212
|
subject.to_xml.must_equal <<~END
|
213
213
|
<!-- Unit: PUJAUT TWR -->
|
214
214
|
<Uni source="LF|GEN|0.0 FACTORY|0|0">
|
215
|
-
<UniUid
|
215
|
+
<UniUid>
|
216
216
|
<txtName>PUJAUT TWR</txtName>
|
217
217
|
</UniUid>
|
218
|
-
<OrgUid
|
218
|
+
<OrgUid>
|
219
219
|
<txtName>FRANCE</txtName>
|
220
220
|
</OrgUid>
|
221
221
|
<codeType>TWR</codeType>
|
@@ -15,26 +15,6 @@ describe AIXM::Feature do
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
describe :region= do
|
19
|
-
it "fails on invalid values" do
|
20
|
-
-> { subject.region = 123 }.must_raise ArgumentError
|
21
|
-
end
|
22
|
-
|
23
|
-
it "accepts nil value" do
|
24
|
-
subject.tap { |s| s.region = nil }.region.must_be_nil
|
25
|
-
end
|
26
|
-
|
27
|
-
it "upcases value" do
|
28
|
-
subject.tap { |s| s.region = 'lol' }.region.must_equal 'LOL'
|
29
|
-
end
|
30
|
-
|
31
|
-
it "falls back to configuration default" do
|
32
|
-
AIXM.config.region = 'foo'
|
33
|
-
subject.region.must_equal 'FOO'
|
34
|
-
AIXM.config.region = nil
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
18
|
describe :== do
|
39
19
|
it "recognizes features with identical UID as equal" do
|
40
20
|
a = AIXM::Factory.organisation
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aixm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Schwyn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -206,6 +206,8 @@ files:
|
|
206
206
|
- schemas/aixm/4.5/AIXM-DataTypes.xsd
|
207
207
|
- schemas/aixm/4.5/AIXM-Features.xsd
|
208
208
|
- schemas/aixm/4.5/AIXM-Snapshot.xsd
|
209
|
+
- schemas/ofmx/0/OFMX-CSV-Obstacle.json
|
210
|
+
- schemas/ofmx/0/OFMX-CSV.json
|
209
211
|
- schemas/ofmx/0/OFMX-DataTypes.xsd
|
210
212
|
- schemas/ofmx/0/OFMX-Features.xsd
|
211
213
|
- schemas/ofmx/0/OFMX-Snapshot.xsd
|