notam 1.0.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3f0a2b936b2f99302c03166135f539d6d9aa8c90ded6da55052e72c27937dcf
4
- data.tar.gz: de7f1ff14e4c8c5de825f88a3d83cb22b7726a41b6ed5fffa7bf99c19ac856b9
3
+ metadata.gz: 417d4bc6e661b8d3a79cf54a3f191eea69643e6e40de00152589b12bedf8e768
4
+ data.tar.gz: 51e949d622b8da7772b8dc1e2247ffe41529e787ec2ee133a7852d728bfdf251
5
5
  SHA512:
6
- metadata.gz: 53d1288241008d166fde8a71b1e13ae0cc088f62f552503f70282e2de4cca086e22b6cc80437d3dbfd911ec8056e55481a6aaa8f7221c963ab3dc99ff1799eba
7
- data.tar.gz: 6c94aa7b09ec15c27d9af9ba4232cf8e5b39086a4444d14bda82c4f5ddd8414ee89c6d9cb53694663b36aa1a0861cb87de2bcbc16b2fe965af3bafbdf36bcc7a
6
+ metadata.gz: 6717133961de80fed0c49d88af287526e71654ea04ac51baeb69e1fc7b4bfdda8149bddec3949dc1292ad9bec69d1c4aa395224e6db5f17973bf9dd01a915b7e
7
+ data.tar.gz: 1827871715ad368903c2a91bc8da784a248f7cb44bf926d982efab3243c3ddc3afde83e2fecd1474c8b7725bf8ca4e824fd00ecade6710e9447c1c7e2a98ec18
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
-
2
- xE��(0qk>�\����afcUs���K���1���
1
+ ��*-bxsk:� ��,�d'��������%3O��7$=B� ы�A�\�w�[�.�
2
+ RCu�==���9=��4-fdqf&��j��x�P��\2�A�F���|�g��լ~ǵ7�ih��T��$nz�g���h��Ù ��k�
3
+ w&㛷r��G�۳��6�
data/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  Nothing so far
4
4
 
5
+ ## 1.1.1
6
+
7
+ #### Fixes
8
+ * Carry over base date for multiple D-item elements which partially omit to
9
+ mention the month in every element
10
+
11
+ ## 1.1.0
12
+
13
+ #### Additions
14
+ * Extract subject group and condition group on Q item
15
+
5
16
  ## 1.0.0
6
17
 
7
18
  #### Breaking Changes
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [![Version](https://img.shields.io/gem/v/notam.svg?style=flat)](https://rubygems.org/gems/notam)
2
- [![Tests](https://img.shields.io/github/workflow/status/svoop/notam/Test.svg?style=flat&label=tests)](https://github.com/svoop/notam/actions?workflow=Test)
2
+ [![Tests](https://img.shields.io/github/actions/workflow/status/svoop/notam/test.yml?style=flat&label=tests)](https://github.com/svoop/notam/actions?workflow=Test)
3
3
  [![Code Climate](https://img.shields.io/codeclimate/maintainability/svoop/notam.svg?style=flat)](https://codeclimate.com/github/svoop/notam/)
4
4
  [![Donorbox](https://img.shields.io/badge/donate-on_donorbox-yellow.svg)](https://donorbox.org/bitcetera)
5
5
 
@@ -66,7 +66,9 @@ The resulting hash for this example looks as follows:
66
66
  id_year: 2022,
67
67
  new?: true,
68
68
  fir: "LSAS",
69
+ subject_group: :airspace_restrictions,
69
70
  subject: :restricted_area,
71
+ condition_group: :changes,
70
72
  condition: :activated,
71
73
  traffic: :vfr,
72
74
  purpose: [:operational_significance, :flight_operations],
data/lib/locales/en.yml CHANGED
@@ -307,6 +307,22 @@ en:
307
307
  ZSHA: "Shanghai ACC"
308
308
  ZWUQ: "Urumqi ACC"
309
309
  ZYSH: "Shenyang ACC"
310
+ subject_groups:
311
+ airspace_organization: "airspace organization"
312
+ communications_and_surveillance_facilities: "communications and surveillance facilities"
313
+ facilities_and_services: "facilities and services"
314
+ gnss_services: "GNSS services"
315
+ instrument_and_microwave_landing_system: "instrument and microwave landing system"
316
+ checklist: "checklist"
317
+ lighting_facilities: "lighting facilities"
318
+ movement_and_landing_area: "movement and landing area"
319
+ terminal_and_en_route_navigation_facilities: "terminal and en route navigation facilities"
320
+ other_information: "other information"
321
+ air_traffic_procedures: "air traffic procedures"
322
+ airspace_restrictions: "airspace restrictions"
323
+ air_traffic_and_volmet_services: "air traffic and VOLMET services"
324
+ warning: "warning"
325
+ other: "other"
310
326
  subjects:
311
327
  minimum_altitude: "minimum altitude"
312
328
  class_bcde_surface_area: "class B/C/D/E surface area"
@@ -488,6 +504,14 @@ en:
488
504
  aerial_survey: "aerial survey"
489
505
  model_flying: "model flying"
490
506
  other: "other"
507
+ condition_groups:
508
+ availability: "availabiity"
509
+ changes: "changes"
510
+ hazard_conditions: "hazard conditions"
511
+ checklist: "checklist"
512
+ limitations: "limitations"
513
+ trigger: "trigger"
514
+ other: "other"
491
515
  conditions:
492
516
  withdrawn_for_maintenance: "withdrawn for maintenance"
493
517
  available_for_daylight_operation: "available for daylight operation"
data/lib/notam/item/d.rb CHANGED
@@ -15,7 +15,11 @@ module NOTAM
15
15
  def parse
16
16
  base_date = AIXM.date(data[:effective_at])
17
17
  @schedules = text.sub(/\AD\)/, '').split(',').flat_map do |string|
18
- Schedule.parse(string, base_date: base_date)
18
+ Schedule.parse(string, base_date: base_date).tap do |schedule|
19
+ if (date = schedule.first.actives.first).instance_of? AIXM::Schedule::Date
20
+ base_date = date # carry over month
21
+ end
22
+ end
19
23
  end
20
24
  self
21
25
  rescue
data/lib/notam/item/q.rb CHANGED
@@ -26,11 +26,21 @@ module NOTAM
26
26
  captures['fir']
27
27
  end
28
28
 
29
+ # @return [Symbol]
30
+ def subject_group
31
+ NOTAM.subject_group_for(captures['subject'][0,1])
32
+ end
33
+
29
34
  # @return [Symbol]
30
35
  def subject
31
36
  NOTAM.subject_for(captures['subject'])
32
37
  end
33
38
 
39
+ # @return [Symbol]
40
+ def condition_group
41
+ NOTAM.condition_group_for(captures['condition'][0,1])
42
+ end
43
+
34
44
  # @return [Symbol]
35
45
  def condition
36
46
  NOTAM.condition_for(captures['condition'])
@@ -82,7 +92,7 @@ module NOTAM
82
92
 
83
93
  # @see NOTAM::Item#merge
84
94
  def merge
85
- super(:fir, :subject, :condition, :traffic, :purpose, :scope, :lower_limit, :upper_limit, :center_point, :radius)
95
+ super(:fir, :subject_group, :subject, :condition_group, :condition, :traffic, :purpose, :scope, :lower_limit, :upper_limit, :center_point, :radius)
86
96
  end
87
97
 
88
98
  end
@@ -26,6 +26,14 @@ module NOTAM
26
26
  FIRS.fetch(fir)
27
27
  end
28
28
 
29
+ # Translates the NOTAM subject group code to human/machine readable symbol
30
+ #
31
+ # @param code [String] one letter subject group code
32
+ # @return [Symbol] value from {NOTAM::SUBJECT_GROUPS}
33
+ def subject_group_for(code)
34
+ SUBJECT_GROUPS.fetch(code)
35
+ end
36
+
29
37
  # Translates the NOTAM subject code to human/machine readable symbol
30
38
  #
31
39
  # @param code [String] two letter subject code
@@ -34,6 +42,14 @@ module NOTAM
34
42
  SUBJECTS.fetch(code)
35
43
  end
36
44
 
45
+ # Translates the NOTAM condition group code to human/machine readable symbol
46
+ #
47
+ # @param code [String] one letter condition group code
48
+ # @return [Symbol] value from {NOTAM::CONDITION_GROUPS}
49
+ def condition_group_for(code)
50
+ CONDITION_GROUPS.fetch(code)
51
+ end
52
+
37
53
  # Translates the NOTAM condition code to human/machine readable symbol
38
54
  #
39
55
  # @param code [String] two letter condition code
@@ -393,6 +409,27 @@ module NOTAM
393
409
  'ZYSH' => [:CH]
394
410
  }.freeze
395
411
 
412
+ # International NOTAM Q codes for subject groups
413
+ #
414
+ # @see https://www.faa.gov/air_traffic/publications/atpubs/notam_html/appendix_b.html
415
+ SUBJECT_GROUPS = {
416
+ 'A' => :airspace_organization,
417
+ 'C' => :communications_and_surveillance_facilities,
418
+ 'F' => :facilities_and_services,
419
+ 'G' => :gnss_services,
420
+ 'I' => :instrument_and_microwave_landing_system,
421
+ 'K' => :checklist,
422
+ 'L' => :lighting_facilities,
423
+ 'M' => :movement_and_landing_area,
424
+ 'N' => :terminal_and_en_route_navigation_facilities,
425
+ 'O' => :other_information,
426
+ 'P' => :air_traffic_procedures,
427
+ 'R' => :airspace_restrictions,
428
+ 'S' => :air_traffic_and_volmet_services,
429
+ 'W' => :warning,
430
+ 'X' => :other
431
+ }.freeze
432
+
396
433
  # International NOTAM Q codes for subjects
397
434
  #
398
435
  # @see https://www.faa.gov/air_traffic/publications/atpubs/notam_html/appendix_b.html
@@ -579,6 +616,19 @@ module NOTAM
579
616
  'XX' => :other
580
617
  }.freeze
581
618
 
619
+ # International NOTAM Q codes for condition groups
620
+ #
621
+ # @see https://www.faa.gov/air_traffic/publications/atpubs/notam_html/appendix_b.html
622
+ CONDITION_GROUPS = {
623
+ 'A' => :availability,
624
+ 'C' => :changes,
625
+ 'H' => :hazard_conditions,
626
+ 'K' => :checklist,
627
+ 'L' => :limitations,
628
+ 'T' => :trigger,
629
+ 'X' => :other
630
+ }.freeze
631
+
582
632
  # International NOTAM Q codes for conditions
583
633
  #
584
634
  # @see https://www.faa.gov/air_traffic/publications/atpubs/notam_html/appendix_b.html
data/lib/notam/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NOTAM
4
- VERSION = "1.0.0".freeze
4
+ VERSION = "1.1.1".freeze
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notam
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Schwyn
@@ -29,7 +29,7 @@ cert_chain:
29
29
  kAyiRqgxF4dJviwtqI7mZIomWL63+kXLgjOjMe1SHxfIPo/0ji6+r1p4KYa7o41v
30
30
  fwIwU1MKlFBdsjkd
31
31
  -----END CERTIFICATE-----
32
- date: 2022-11-18 00:00:00.000000000 Z
32
+ date: 2023-06-07 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: aixm
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  - !ruby/object:Gem::Version
258
258
  version: '0'
259
259
  requirements: []
260
- rubygems_version: 3.3.26
260
+ rubygems_version: 3.4.13
261
261
  signing_key:
262
262
  specification_version: 4
263
263
  summary: Parser for NOTAM (Notice to Airmen) messages
metadata.gz.sig CHANGED
Binary file