aixm 0.3.8 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +1 -0
  3. data.tar.gz.sig +0 -0
  4. data/CHANGELOG.md +33 -3
  5. data/README.md +166 -56
  6. data/exe/ckmid +14 -0
  7. data/exe/mkmid +14 -0
  8. data/lib/aixm.rb +16 -6
  9. data/lib/aixm/association.rb +369 -0
  10. data/lib/aixm/classes.rb +43 -0
  11. data/lib/aixm/component/fato.rb +45 -53
  12. data/lib/aixm/component/frequency.rb +11 -12
  13. data/lib/aixm/component/geometry.rb +36 -38
  14. data/lib/aixm/component/geometry/arc.rb +2 -2
  15. data/lib/aixm/component/geometry/border.rb +6 -3
  16. data/lib/aixm/component/geometry/circle.rb +8 -2
  17. data/lib/aixm/component/geometry/point.rb +8 -2
  18. data/lib/aixm/component/helipad.rb +30 -38
  19. data/lib/aixm/component/layer.rb +28 -19
  20. data/lib/aixm/component/lighting.rb +12 -13
  21. data/lib/aixm/component/runway.rb +44 -48
  22. data/lib/aixm/{feature → component}/service.rb +37 -36
  23. data/lib/aixm/component/surface.rb +3 -3
  24. data/lib/aixm/component/timetable.rb +2 -2
  25. data/lib/aixm/component/{vertical_limits.rb → vertical_limit.rb} +12 -6
  26. data/lib/aixm/config.rb +2 -1
  27. data/lib/aixm/document.rb +27 -50
  28. data/lib/aixm/executables.rb +85 -0
  29. data/lib/aixm/feature.rb +13 -3
  30. data/lib/aixm/feature/address.rb +12 -13
  31. data/lib/aixm/feature/airport.rb +103 -128
  32. data/lib/aixm/feature/airspace.rb +44 -17
  33. data/lib/aixm/feature/navigational_aid.rb +7 -9
  34. data/lib/aixm/feature/navigational_aid/designated_point.rb +13 -15
  35. data/lib/aixm/feature/navigational_aid/dme.rb +11 -12
  36. data/lib/aixm/feature/navigational_aid/marker.rb +7 -3
  37. data/lib/aixm/feature/navigational_aid/ndb.rb +7 -3
  38. data/lib/aixm/feature/navigational_aid/tacan.rb +7 -3
  39. data/lib/aixm/feature/navigational_aid/vor.rb +23 -15
  40. data/lib/aixm/feature/obstacle.rb +29 -43
  41. data/lib/aixm/feature/obstacle_group.rb +37 -34
  42. data/lib/aixm/feature/organisation.rb +21 -5
  43. data/lib/aixm/feature/unit.rb +36 -46
  44. data/lib/aixm/memoize.rb +89 -0
  45. data/lib/aixm/object.rb +9 -0
  46. data/lib/aixm/payload_hash.rb +114 -0
  47. data/lib/aixm/refinements.rb +29 -76
  48. data/lib/aixm/shortcuts.rb +5 -42
  49. data/lib/aixm/version.rb +1 -1
  50. data/lib/aixm/xy.rb +1 -1
  51. data/schemas/ofmx/0/OFMX-Features.xsd +152 -20
  52. data/schemas/ofmx/0/OFMX-Snapshot.xsd +0 -5
  53. metadata +107 -156
  54. metadata.gz.sig +2 -0
  55. data/.github/workflows/test.yml +0 -26
  56. data/.gitignore +0 -6
  57. data/.ruby-version +0 -1
  58. data/.yardopts +0 -3
  59. data/Guardfile +0 -8
  60. data/aixm.gemspec +0 -35
  61. data/gems.rb +0 -3
  62. data/lib/aixm/component.rb +0 -6
  63. data/rakefile.rb +0 -36
  64. data/spec/factory.rb +0 -559
  65. data/spec/lib/aixm/a_spec.rb +0 -203
  66. data/spec/lib/aixm/component/fato_spec.rb +0 -267
  67. data/spec/lib/aixm/component/frequency_spec.rb +0 -74
  68. data/spec/lib/aixm/component/geometry/arc_spec.rb +0 -73
  69. data/spec/lib/aixm/component/geometry/border_spec.rb +0 -38
  70. data/spec/lib/aixm/component/geometry/circle_spec.rb +0 -68
  71. data/spec/lib/aixm/component/geometry/point_spec.rb +0 -37
  72. data/spec/lib/aixm/component/geometry_spec.rb +0 -316
  73. data/spec/lib/aixm/component/helipad_spec.rb +0 -193
  74. data/spec/lib/aixm/component/layer_spec.rb +0 -135
  75. data/spec/lib/aixm/component/lighting_spec.rb +0 -94
  76. data/spec/lib/aixm/component/runway_spec.rb +0 -479
  77. data/spec/lib/aixm/component/surface_spec.rb +0 -124
  78. data/spec/lib/aixm/component/timetable_spec.rb +0 -47
  79. data/spec/lib/aixm/component/vertical_limits_spec.rb +0 -94
  80. data/spec/lib/aixm/config_spec.rb +0 -41
  81. data/spec/lib/aixm/d_spec.rb +0 -150
  82. data/spec/lib/aixm/document_spec.rb +0 -1884
  83. data/spec/lib/aixm/errors_spec.rb +0 -14
  84. data/spec/lib/aixm/f_spec.rb +0 -85
  85. data/spec/lib/aixm/feature/address_spec.rb +0 -60
  86. data/spec/lib/aixm/feature/airport_spec.rb +0 -776
  87. data/spec/lib/aixm/feature/airspace_spec.rb +0 -394
  88. data/spec/lib/aixm/feature/navigational_aid/designated_point_spec.rb +0 -103
  89. data/spec/lib/aixm/feature/navigational_aid/dme_spec.rb +0 -98
  90. data/spec/lib/aixm/feature/navigational_aid/marker_spec.rb +0 -85
  91. data/spec/lib/aixm/feature/navigational_aid/ndb_spec.rb +0 -95
  92. data/spec/lib/aixm/feature/navigational_aid/tacan_spec.rb +0 -94
  93. data/spec/lib/aixm/feature/navigational_aid/vor_spec.rb +0 -251
  94. data/spec/lib/aixm/feature/navigational_aid_spec.rb +0 -52
  95. data/spec/lib/aixm/feature/obstacle_group_spec.rb +0 -330
  96. data/spec/lib/aixm/feature/obstacle_spec.rb +0 -284
  97. data/spec/lib/aixm/feature/organisation_spec.rb +0 -83
  98. data/spec/lib/aixm/feature/service_spec.rb +0 -59
  99. data/spec/lib/aixm/feature/unit_spec.rb +0 -238
  100. data/spec/lib/aixm/feature_spec.rb +0 -38
  101. data/spec/lib/aixm/p_spec.rb +0 -189
  102. data/spec/lib/aixm/refinements_spec.rb +0 -430
  103. data/spec/lib/aixm/version_spec.rb +0 -7
  104. data/spec/lib/aixm/w_spec.rb +0 -150
  105. data/spec/lib/aixm/xy_spec.rb +0 -180
  106. data/spec/lib/aixm/z_spec.rb +0 -94
  107. data/spec/macros/marking.rb +0 -12
  108. data/spec/macros/organisation.rb +0 -11
  109. data/spec/macros/remarks.rb +0 -12
  110. data/spec/macros/timetable.rb +0 -11
  111. data/spec/macros/xy.rb +0 -11
  112. data/spec/macros/z_qnh.rb +0 -11
  113. data/spec/sounds/failure.mp3 +0 -0
  114. data/spec/sounds/success.mp3 +0 -0
  115. data/spec/spec_helper.rb +0 -62
@@ -1,6 +0,0 @@
1
- module AIXM
2
-
3
- # @abstract
4
- class Component; end
5
-
6
- end
@@ -1,36 +0,0 @@
1
- require 'bundler/gem_tasks'
2
-
3
- require 'rake/testtask'
4
-
5
- Rake::TestTask.new do |t|
6
- t.libs << 'lib'
7
- t.test_files = FileList['spec/lib/**/*_spec.rb']
8
- t.verbose = false
9
- t.warning = true
10
- end
11
-
12
- namespace :schema do
13
- desc "Update OFMX schema"
14
- task :update do
15
- `rm -rf schemas/ofmx/0/*`
16
- `wget http://schema.openflightmaps.org/0/OFMX-CSV-Obstacle.json -P schemas/ofmx/0/ -q --show-progress`
17
- `wget http://schema.openflightmaps.org/0/OFMX-CSV.json -P schemas/ofmx/0/ -q --show-progress`
18
- `wget http://schema.openflightmaps.org/0/OFMX-DataTypes.xsd -P schemas/ofmx/0/ -q --show-progress`
19
- `wget http://schema.openflightmaps.org/0/OFMX-Features.xsd -P schemas/ofmx/0/ -q --show-progress`
20
- `wget http://schema.openflightmaps.org/0/OFMX-Snapshot.xsd -P schemas/ofmx/0/ -q --show-progress`
21
- end
22
- end
23
-
24
- namespace :yard do
25
- desc "Run local YARD documentation server"
26
- task :server do
27
- `rm -rf ./.yardoc`
28
- Thread.new do
29
- sleep 2
30
- `open http://localhost:8808`
31
- end
32
- `yard server -r`
33
- end
34
- end
35
-
36
- task default: :test
@@ -1,559 +0,0 @@
1
- module AIXM
2
- class Factory
3
- class << self
4
-
5
- # Base
6
-
7
- def xy
8
- AIXM.xy(lat: 10, long: 20)
9
- end
10
-
11
- def z
12
- AIXM.z(1000, :qnh)
13
- end
14
-
15
- def d
16
- AIXM.d(123, :m)
17
- end
18
-
19
- def f
20
- AIXM.f(123.35, :mhz)
21
- end
22
-
23
- def a
24
- AIXM.a('34L')
25
- end
26
-
27
- def w
28
- AIXM.w(1.5, :t)
29
- end
30
-
31
- def p
32
- AIXM.p(0.5, :mpa)
33
- end
34
-
35
- # Components
36
-
37
- def address
38
- AIXM.address(
39
- source: 'LF|GEN|0.0 FACTORY|0|0',
40
- type: :radio_frequency,
41
- address: "123.35"
42
- ).tap do |address|
43
- address.remarks = "A/A (callsign PUJAUT)"
44
- end
45
- end
46
-
47
- def lighting
48
- AIXM.lighting(
49
- position: :aiming_point
50
- ).tap do |lighting|
51
- lighting.description = "omnidirectional"
52
- lighting.intensity = :medium
53
- lighting.color = :green
54
- lighting.remarks = "lighting remarks"
55
- end
56
- end
57
-
58
- def timetable
59
- AIXM.timetable(
60
- code: :sunrise_to_sunset
61
- ).tap do |timetable|
62
- timetable.remarks = "timetable remarks"
63
- end
64
- end
65
-
66
- def vertical_limits
67
- AIXM.vertical_limits(
68
- upper_z: AIXM.z(65, :qne),
69
- max_z: AIXM.z(6000, :qnh),
70
- lower_z: AIXM.z(45, :qne),
71
- min_z: AIXM.z(3000, :qfe)
72
- )
73
- end
74
-
75
- def layer
76
- AIXM.layer(
77
- class: :C,
78
- location_indicator: 'XXXX',
79
- vertical_limits: vertical_limits
80
- ).tap do |layer|
81
- layer.activity = :aerodrome_traffic
82
- layer.timetable = AIXM::H24
83
- layer.selective = true
84
- layer.remarks = 'airspace layer'
85
- end
86
- end
87
-
88
- def polygon_geometry
89
- AIXM.geometry.tap do |geometry|
90
- geometry << AIXM.arc(
91
- xy: AIXM.xy(lat: %q(47°51'33"N), long: %q(007°33'36"E)),
92
- center_xy: AIXM.xy(lat: %q(47°54'15"N), long: %q(007°33'48"E)),
93
- clockwise: true
94
- )
95
- geometry << AIXM.border(
96
- xy: AIXM.xy(lat: %q(47°56'37"N), long: %q(007°35'45"E)),
97
- name: 'FRANCE_GERMANY'
98
- )
99
- geometry << AIXM.point(
100
- xy: AIXM.xy(lat: %q(47°51'33"N), long: %q(007°33'36"E))
101
- )
102
- end
103
- end
104
-
105
- def circle_geometry
106
- AIXM.geometry.tap do |geometry|
107
- geometry << AIXM.circle(
108
- center_xy: AIXM.xy(lat: %q(47°35'00"N), long: %q(004°53'00"E)),
109
- radius: AIXM.d(10, :km)
110
- )
111
- end
112
- end
113
-
114
- # Airspaces
115
-
116
- def polygon_airspace
117
- AIXM.airspace(
118
- source: 'LF|GEN|0.0 FACTORY|0|0',
119
- id: 'PA',
120
- type: :danger_area,
121
- local_type: 'POLYGON',
122
- name: 'POLYGON AIRSPACE'
123
- ).tap do |airspace|
124
- airspace.layers << layer
125
- airspace.geometry = polygon_geometry
126
- end
127
- end
128
-
129
- def circle_airspace
130
- AIXM.airspace(
131
- source: 'LF|GEN|0.0 FACTORY|0|0',
132
- id: 'CA',
133
- type: :danger_area,
134
- local_type: 'CIRCLE',
135
- name: 'CIRCLE AIRSPACE'
136
- ).tap do |airspace|
137
- airspace.layers << layer
138
- airspace.geometry = circle_geometry
139
- end
140
- end
141
-
142
- # Navigational aids
143
-
144
- def designated_point
145
- AIXM.designated_point(
146
- source: 'LF|GEN|0.0 FACTORY|0|0',
147
- id: 'DDD',
148
- name: 'DESIGNATED POINT NAVAID',
149
- xy: AIXM.xy(lat: %q(47°51'33"N), long: %q(007°33'36"E)),
150
- z: AIXM.z(500, :qnh),
151
- type: :vfr_reporting_point
152
- ).tap do |designated_point|
153
- designated_point.airport = airport
154
- designated_point.timetable = AIXM::H24
155
- designated_point.remarks = 'designated point navaid'
156
- end
157
- end
158
-
159
- def dme
160
- AIXM.dme(
161
- source: 'LF|GEN|0.0 FACTORY|0|0',
162
- organisation: organisation,
163
- id: 'MMM',
164
- name: 'DME NAVAID',
165
- xy: AIXM.xy(lat: %q(47°51'33"N), long: %q(007°33'36"E)),
166
- z: AIXM.z(500, :qnh),
167
- channel: '95X'
168
- ).tap do |dme|
169
- dme.timetable = AIXM::H24
170
- dme.remarks = 'dme navaid'
171
- end
172
- end
173
-
174
- def marker
175
- AIXM.marker(
176
- source: 'LF|GEN|0.0 FACTORY|0|0',
177
- organisation: organisation,
178
- id: '---',
179
- name: 'MARKER NAVAID',
180
- xy: AIXM.xy(lat: %q(47°51'33"N), long: %q(007°33'36"E)),
181
- z: AIXM.z(500, :qnh),
182
- type: :outer
183
- ).tap do |marker|
184
- marker.timetable = AIXM::H24
185
- marker.remarks = 'marker navaid'
186
- end
187
- end
188
-
189
- def ndb
190
- AIXM.ndb(
191
- source: 'LF|GEN|0.0 FACTORY|0|0',
192
- organisation: organisation,
193
- id: 'NNN',
194
- name: 'NDB NAVAID',
195
- xy: AIXM.xy(lat: %q(47°51'33"N), long: %q(007°33'36"E)),
196
- z: AIXM.z(500, :qnh),
197
- type: :en_route,
198
- f: AIXM.f(555, :khz)
199
- ).tap do |ndb|
200
- ndb.timetable = AIXM::H24
201
- ndb.remarks = 'ndb navaid'
202
- end
203
- end
204
-
205
- def tacan
206
- AIXM.tacan(
207
- source: 'LF|GEN|0.0 FACTORY|0|0',
208
- organisation: organisation,
209
- id: 'TTT',
210
- name: 'TACAN NAVAID',
211
- xy: AIXM.xy(lat: %q(47°51'33"N), long: %q(007°33'36"E)),
212
- z: AIXM.z(500, :qnh),
213
- channel: '29X'
214
- ).tap do |tacan|
215
- tacan.timetable = AIXM::H24
216
- tacan.remarks = 'tacan navaid'
217
- end
218
- end
219
-
220
- def vor
221
- AIXM.vor(
222
- source: 'LF|GEN|0.0 FACTORY|0|0',
223
- organisation: organisation,
224
- id: 'VVV',
225
- name: 'VOR NAVAID',
226
- xy: AIXM.xy(lat: %q(47°51'33"N), long: %q(007°33'36"E)),
227
- z: AIXM.z(500, :qnh),
228
- type: :conventional,
229
- f: AIXM.f(111, :mhz),
230
- north: :geographic
231
- ).tap do |vor|
232
- vor.timetable = AIXM::H24
233
- vor.remarks = 'vor navaid'
234
- end
235
- end
236
-
237
- def vordme
238
- AIXM.vor(
239
- source: 'LF|GEN|0.0 FACTORY|0|0',
240
- organisation: organisation,
241
- id: 'VDD',
242
- name: 'VOR/DME NAVAID',
243
- xy: AIXM.xy(lat: %q(47°51'33"N), long: %q(007°33'36"E)),
244
- z: AIXM.z(500, :qnh),
245
- type: :conventional,
246
- f: AIXM.f(111, :mhz),
247
- north: :geographic
248
- ).tap do |vordme|
249
- vordme.timetable = AIXM::H24
250
- vordme.remarks = 'vor/dme navaid'
251
- vordme.associate_dme(channel: '95X')
252
- end
253
- end
254
-
255
- def vortac
256
- AIXM.vor(
257
- source: 'LF|GEN|0.0 FACTORY|0|0',
258
- organisation: organisation,
259
- id: 'VTT',
260
- name: 'VORTAC NAVAID',
261
- xy: AIXM.xy(lat: %q(47°51'33"N), long: %q(007°33'36"E)),
262
- z: AIXM.z(500, :qnh),
263
- type: :conventional,
264
- f: AIXM.f(111, :mhz),
265
- north: :geographic
266
- ).tap do |vortac|
267
- vortac.timetable = AIXM::H24
268
- vortac.remarks = 'vortac navaid'
269
- vortac.associate_tacan(channel: '29X')
270
- end
271
- end
272
-
273
- # Organisation
274
-
275
- def organisation
276
- AIXM.organisation(
277
- source: 'LF|GEN|0.0 FACTORY|0|0',
278
- name: 'FRANCE',
279
- type: 'S'
280
- ).tap do |organisation|
281
- organisation.id = 'LF'
282
- organisation.remarks = 'Oversea departments not included'
283
- end
284
- end
285
-
286
- # Unit
287
-
288
- def unit
289
- AIXM.unit(
290
- source: 'LF|GEN|0.0 FACTORY|0|0',
291
- organisation: organisation,
292
- name: 'PUJAUT TWR',
293
- type: :aerodrome_control_tower,
294
- class: :icao
295
- ).tap do |unit|
296
- unit.airport = airport
297
- unit.remarks = 'FR only'
298
- unit.add_service(service)
299
- end
300
- end
301
-
302
- def service
303
- AIXM.service(
304
- source: 'LF|GEN|0.0 FACTORY|0|0',
305
- type: :approach_control_service
306
- ).tap do |service|
307
- service.timetable = AIXM::H24
308
- service.remarks = "service remarks"
309
- service.add_frequency(frequency)
310
- end
311
- end
312
-
313
- def frequency
314
- AIXM.frequency(
315
- transmission_f: AIXM.f(123.35, :mhz),
316
- callsigns: { en: "PUJAUT CONTROL", fr: "PUJAUT CONTROLE" }
317
- ).tap do |frequency|
318
- frequency.type = :standard
319
- frequency.reception_f = AIXM.f(124.1, :mhz)
320
- frequency.timetable = AIXM::H24
321
- frequency.remarks = "frequency remarks"
322
- end
323
- end
324
-
325
- # Airport
326
-
327
- def airport
328
- AIXM.airport(
329
- source: 'LF|GEN|0.0 FACTORY|0|0',
330
- organisation: organisation,
331
- id: 'LFNT',
332
- name: 'Avignon-Pujaut',
333
- xy: AIXM.xy(lat: %q(43°59'46"N), long: %q(004°45'16"E))
334
- ).tap do |airport|
335
- airport.gps = "LFPUJAUT"
336
- airport.z = AIXM.z(146, :qnh)
337
- airport.declination = 1.08
338
- airport.transition_z = AIXM.z(10_000, :qnh)
339
- airport.operator = "Municipality of Pujaut"
340
- airport.remarks = "Restricted access"
341
- airport.add_runway(runway)
342
- airport.add_fato(fato)
343
- airport.add_helipad(helipad)
344
- airport.helipads.first.fato = airport.fatos.first # necessary when using factories only
345
- airport.add_usage_limitation :permitted
346
- airport.add_usage_limitation(:reservation_required) do |reservation_required|
347
- reservation_required.add_condition { |c| c.aircraft = :glider }
348
- reservation_required.add_condition { |c| c.origin = :international }
349
- reservation_required.timetable = AIXM::H24
350
- reservation_required.remarks = "reservation remarks"
351
- end
352
- airport.add_address(address)
353
- end
354
- end
355
-
356
- def runway
357
- AIXM.runway(name: '16L/34R').tap do |runway|
358
- runway.length = AIXM.d(650, :m)
359
- runway.width = AIXM.d(80, :m)
360
- runway.surface.composition = :asphalt
361
- runway.surface.preparation = :paved
362
- runway.surface.condition = :good
363
- runway.surface.pcn = "59/F/A/W/T"
364
- runway.surface.siwl_weight = AIXM.w(1500, :kg)
365
- runway.surface.siwl_tire_pressure = AIXM.p(0.5, :mpa)
366
- runway.surface.auw_weight = AIXM.w(30, :t)
367
- runway.surface.remarks = "Paved shoulder on 2.5m on each side of the RWY."
368
- runway.status = :closed
369
- runway.remarks = "Markings eroded"
370
- runway.forth.xy = AIXM.xy(lat: %q(44°00'07.63"N), long: %q(004°45'07.81"E))
371
- runway.forth.z = AIXM.z(145, :qnh)
372
- runway.forth.displaced_threshold = AIXM.xy(lat: %q(44°00'03.54"N), long: %q(004°45'09.30"E))
373
- runway.forth.geographic_orientation = AIXM.a(165)
374
- runway.forth.vfr_pattern = :left_or_right
375
- runway.forth.remarks = "forth remarks"
376
- runway.forth.add_lighting(lighting)
377
- runway.back.xy = AIXM.xy(lat: %q(43°59'25.31"N), long: %q(004°45'23.24"E))
378
- runway.back.z = AIXM.z(147, :qnh)
379
- runway.back.displaced_threshold = AIXM.xy(lat: %q(43°59'31.84"N), long: %q(004°45'20.85"E))
380
- runway.back.geographic_orientation = AIXM.a(345)
381
- runway.back.vfr_pattern = :left
382
- runway.back.remarks = "back remarks"
383
- runway.back.add_lighting(lighting)
384
- end
385
- end
386
-
387
- def fato
388
- AIXM.fato(name: 'H1').tap do |fato|
389
- fato.length = AIXM.d(35, :m)
390
- fato.width = AIXM.d(35, :m)
391
- fato.surface.composition = :concrete
392
- fato.surface.preparation = :paved
393
- fato.surface.condition = :fair
394
- fato.surface.pcn = "30/F/A/W/U"
395
- fato.surface.siwl_weight = AIXM.w(1500, :kg)
396
- fato.surface.siwl_tire_pressure = AIXM.p(0.5, :mpa)
397
- fato.surface.auw_weight = AIXM.w(8, :t)
398
- fato.surface.remarks = "Cracks near the center"
399
- fato.profile = "Northwest from RWY 12/30"
400
- fato.marking = "Dashed white lines"
401
- fato.status = :other
402
- fato.remarks = "Authorizaton by AD operator required"
403
- fato.add_direction(name: '35') do |direction|
404
- direction.geographic_orientation = AIXM.a(355)
405
- direction.remarks = "Avoid flight over residental area"
406
- direction.add_lighting(lighting)
407
- end
408
- end
409
- end
410
-
411
- def helipad
412
- AIXM.helipad(
413
- name: 'H1',
414
- xy: AIXM.xy(lat: %q(43°59'56.94"N), long: %q(004°45'05.56"E))
415
- ).tap do |helipad|
416
- helipad.z = AIXM.z(141, :qnh)
417
- helipad.length = AIXM.d(20, :m)
418
- helipad.width = AIXM.d(20, :m)
419
- helipad.surface.composition = :concrete
420
- helipad.surface.preparation = :paved
421
- helipad.surface.condition = :fair
422
- helipad.surface.pcn = "30/F/A/W/U"
423
- helipad.surface.siwl_weight = AIXM.w(1500, :kg)
424
- helipad.surface.siwl_tire_pressure = AIXM.p(0.5, :mpa)
425
- helipad.surface.auw_weight = AIXM.w(8, :t)
426
- helipad.surface.remarks = "Cracks near the center"
427
- helipad.marking = "Continuous white lines"
428
- helipad.helicopter_class = 1
429
- helipad.status = :other
430
- helipad.remarks = "Authorizaton by AD operator required"
431
- helipad.add_lighting(lighting)
432
- end
433
- end
434
-
435
- # Obstacle
436
-
437
- def obstacle
438
- AIXM.obstacle(
439
- name: "Eiffel Tower",
440
- type: :tower,
441
- xy: AIXM.xy(lat: %q(48°51'29.7"N), long: %q(002°17'40.52"E)),
442
- radius: AIXM.d(88, :m),
443
- z: AIXM.z(1187 , :qnh)
444
- ).tap do |obstacle|
445
- obstacle.lighting = true
446
- obstacle.lighting_remarks = "red strobes"
447
- obstacle.marking = nil
448
- obstacle.marking_remarks = nil
449
- obstacle.height = AIXM.d(324, :m)
450
- obstacle.xy_accuracy = AIXM.d(2, :m)
451
- obstacle.z_accuracy = AIXM.d(1, :m)
452
- obstacle.height_accurate = true
453
- obstacle.valid_from = Time.parse('2018-01-01 12:00:00 +0100')
454
- obstacle.valid_until = Time.parse('2019-01-01 12:00:00 +0100')
455
- obstacle.remarks = "Temporary light installations (white strobes, gyro light etc)"
456
- end
457
- end
458
-
459
- def unlinked_obstacle_group
460
- AIXM.obstacle_group(
461
- name: "Mirmande éoliennes"
462
- ).tap do |obstacle_group|
463
- obstacle_group.xy_accuracy = AIXM.d(50, :m)
464
- obstacle_group.z_accuracy = AIXM.d(10, :m)
465
- obstacle_group.remarks = "Extension planned"
466
- obstacle_group.add_obstacle(
467
- AIXM.obstacle(
468
- name: "La Teissonière 1",
469
- type: :wind_turbine,
470
- xy: AIXM.xy(lat: %q(44°40'30.05"N), long: %q(004°52'21.24"E)),
471
- radius: AIXM.d(80, :m),
472
- z: AIXM.z(1764, :qnh)
473
- ).tap do |obstacle|
474
- obstacle.height = AIXM.d(80, :m)
475
- obstacle.height_accurate = false
476
- end
477
- )
478
- obstacle_group.add_obstacle(
479
- AIXM.obstacle(
480
- name: "La Teissonière 2",
481
- type: :wind_turbine,
482
- xy: AIXM.xy(lat: %q(44°40'46.08"N), long: %q(004°52'25.72"E)),
483
- radius: AIXM.d(80, :m),
484
- z: AIXM.z(1738 , :qnh)
485
- ).tap do |obstacle|
486
- obstacle.height = AIXM.d(80, :m)
487
- obstacle.height_accurate = false
488
- end
489
- )
490
- end
491
- end
492
-
493
- def linked_obstacle_group
494
- AIXM.obstacle_group(
495
- name: "Droitwich longwave antenna"
496
- ).tap do |obstacle_group|
497
- obstacle_group.xy_accuracy = AIXM.d(0, :m)
498
- obstacle_group.z_accuracy = AIXM.d(0, :ft)
499
- obstacle_group.remarks = "Destruction planned"
500
- obstacle_group.add_obstacle(
501
- AIXM.obstacle(
502
- name: "Droitwich LW north",
503
- type: :mast,
504
- xy: AIXM.xy(lat: %q(52°17'47.03"N), long: %q(002°06'24.31"W)),
505
- radius: AIXM.d(200, :m),
506
- z: AIXM.z(848 , :qnh)
507
- ).tap do |obstacle|
508
- obstacle.height = AIXM.d(700, :ft)
509
- obstacle.height_accurate = true
510
- end
511
- )
512
- obstacle_group.add_obstacle(
513
- AIXM.obstacle(
514
- name: "Droitwich LW north",
515
- type: :mast,
516
- xy: AIXM.xy(lat: %q(52°17'40.48"N), long: %q(002°06'20.47"W)),
517
- radius: AIXM.d(200, :m),
518
- z: AIXM.z(848 , :qnh)
519
- ).tap do |obstacle|
520
- obstacle.height = AIXM.d(700, :ft)
521
- obstacle.height_accurate = true
522
- end,
523
- linked_to: :previous,
524
- link_type: :cable
525
- )
526
- end
527
- end
528
-
529
- # Document
530
-
531
- def document
532
- AIXM.document(
533
- region: 'LF',
534
- namespace: '00000000-0000-0000-0000-000000000000',
535
- created_at: (time = Time.parse('2018-01-01 12:00:00 +0100')),
536
- effective_at: time
537
- ).tap do |document|
538
- document.features << organisation
539
- document.features << unit
540
- document.features << airport
541
- document.features << polygon_airspace
542
- document.features << circle_airspace
543
- document.features << designated_point
544
- document.features << dme
545
- document.features << marker
546
- document.features << ndb
547
- document.features << tacan
548
- document.features << vor
549
- document.features << vordme
550
- document.features << vortac
551
- document.features << obstacle
552
- document.features << unlinked_obstacle_group
553
- document.features << linked_obstacle_group
554
- end
555
- end
556
-
557
- end
558
- end
559
- end