notam 0.1.1 → 0.1.2
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 +6 -0
- data/README.md +22 -7
- data/lib/notam/item/d.rb +14 -2
- data/lib/notam/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92a3fd49f8ffbc96bcb45d19f890837af01c255d69d4c083a883c8f446e1758d
|
4
|
+
data.tar.gz: 5fa45d97e28d3bed19a20ec3e841e815b93cb94f3b686172fb9abc5c50cc7118
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42503973261da835cab991b6272b1b12ac17adac8f8a670de29d7b55f5650b35cb4e38d5eddc145c78ba03f81f4247f398cb0aec82d2366205b90a6fb6c96842
|
7
|
+
data.tar.gz: 9f84f55bc3b42c40e7670e72683c05b32d71a8d401a197b38481eeaa56b173d16e62e3279a40134bf48cadb0e227fb30ba68ff5766a9c96ece9d66fe8e1f3a71
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[![Version](https://img.shields.io/gem/v/notam.svg?style=flat)](https://rubygems.org/gems/notam)
|
2
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)
|
3
|
-
[![Code Climate](https://img.shields.io/codeclimate/maintainability/
|
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
|
|
6
6
|
# NOTAM
|
@@ -26,7 +26,7 @@ gem cert --add <(curl -Ls https://raw.github.com/svoop/notam/main/certs/svoop.pe
|
|
26
26
|
Add the following to the `Gemfile` or `gems.rb` of your [Bundler](https://bundler.io) powered Ruby project:
|
27
27
|
|
28
28
|
```ruby
|
29
|
-
gem notam
|
29
|
+
gem 'notam'
|
30
30
|
```
|
31
31
|
|
32
32
|
And then install the bundle:
|
@@ -112,6 +112,19 @@ See the [API documentation](https://www.rubydoc.info/gems/notam) for more.
|
|
112
112
|
|
113
113
|
⚠️ Only NOTAM compatible with the ICAO annex 15 are supported for now. Most notably in the USA other NOTAM formats exist which cannot be parsed using this gem.
|
114
114
|
|
115
|
+
### Anatomy of a NOTAM message
|
116
|
+
|
117
|
+
A NOTAM message consists of a header followed by the following items:
|
118
|
+
|
119
|
+
* [Q item](https://www.rubydoc.info/gems/notam/NOTAM/Q): Essential information such as purpose or center point and radius
|
120
|
+
* [A item](https://www.rubydoc.info/gems/notam/NOTAM/A): Affected locations
|
121
|
+
* [B item](https://www.rubydoc.info/gems/notam/NOTAM/B): When the NOTAM becomes effective
|
122
|
+
* [C item](https://www.rubydoc.info/gems/notam/NOTAM/C): When the NOTAM expires
|
123
|
+
* [D item](https://www.rubydoc.info/gems/notam/NOTAM/D): Activity schedules (optional)
|
124
|
+
* [E item](https://www.rubydoc.info/gems/notam/NOTAM/E): Free text description
|
125
|
+
* [F item](https://www.rubydoc.info/gems/notam/NOTAM/F): Upper limit (optional)
|
126
|
+
* [G item](https://www.rubydoc.info/gems/notam/NOTAM/G): Lower limit (optional)
|
127
|
+
|
115
128
|
### FIR
|
116
129
|
|
117
130
|
Four letter FIR codes assigned by the ICAO follow some logic, albeit there exist exceptions and inconsistencies e.g. for historical reasons. Let's take an easy example:
|
@@ -119,14 +132,14 @@ Four letter FIR codes assigned by the ICAO follow some logic, albeit there exist
|
|
119
132
|
```
|
120
133
|
L F M M
|
121
134
|
┬ ┬ ─┬─
|
122
|
-
│ │ └─
|
135
|
+
│ │ └─ subsection: MM => Marseille
|
123
136
|
│ └──── geopolitical unit: F => France
|
124
|
-
└──────
|
137
|
+
└────── global area: L => lower Europe
|
125
138
|
```
|
126
139
|
|
127
140
|
The informal use of only the first two letters often stands for a combination of all subsections contained therein. Example: `LF` is a combination of `LFBB`, `LFEE`, `LFFF`, `LFMM` and `LFRR`.
|
128
141
|
|
129
|
-
FIR codes ending with `XX` specify more than one subsection. Example: `LFXX`
|
142
|
+
FIR codes ending with `XX` specify more than one subsection. Example: `LFXX` can be any combination of at least two subsections within `LF`. In NOTAM, this notation may be used on the Q item if (and only if) the affected subsections are listed on the A item.
|
130
143
|
|
131
144
|
### Series
|
132
145
|
|
@@ -151,18 +164,20 @@ AIS are free to define series as they please, however, a few conventions have em
|
|
151
164
|
|
152
165
|
#### Checklist
|
153
166
|
|
154
|
-
Checklist NOTAM are periodically issued lists of all currently effective NOTAM. They are used for cross checking and can usually be ignored for flight planning. Their Q item contain `
|
167
|
+
Checklist NOTAM are periodically issued lists of all currently effective NOTAM. They are used for cross checking and can usually be ignored for flight planning. Their Q item contain `QKKKK` which is decoded as `condition: :checklist`, here's an example:
|
155
168
|
|
156
169
|
```
|
157
170
|
Q) EDXX/QKKKK/K /K /K /000/999/5123N01018E999
|
171
|
+
^^^^^
|
158
172
|
```
|
159
173
|
|
160
174
|
#### Trigger
|
161
175
|
|
162
|
-
Trigger NOTAM are referring to another source of information such as AIP SUP (AIP supplement). Their Q item contain `Q..TT` which is decoded as
|
176
|
+
Trigger NOTAM are referring to another source of information such as AIP SUP (AIP supplement). Their Q item contain `Q..TT` which is decoded as `condition: :trigger`, here's an example:
|
163
177
|
|
164
178
|
```
|
165
179
|
Q) LFXX/QRTTT/IV/BO /W /000/035/4708N00029E010
|
180
|
+
^ ^^
|
166
181
|
```
|
167
182
|
|
168
183
|
Note: Trigger NOTAM are never published as series `T`.
|
data/lib/notam/item/d.rb
CHANGED
@@ -28,11 +28,17 @@ module NOTAM
|
|
28
28
|
schedules.any? { _1.active?(at: at, xy: data[:center_point]) }
|
29
29
|
end
|
30
30
|
|
31
|
+
# Calculate the relevant, consolidated schedules for five days.
|
32
|
+
#
|
33
|
+
# The beginning of the five day window is either today (if +effective_at+
|
34
|
+
# is in the past) or +effective_at+ (otherwise).
|
35
|
+
#
|
36
|
+
# @return [Array<NOTAM::Schedule>]
|
31
37
|
def five_day_schedules
|
32
38
|
schedules.map do |schedule|
|
33
39
|
schedule
|
34
|
-
.slice(AIXM.date(
|
35
|
-
.resolve(on:
|
40
|
+
.slice(AIXM.date(five_day_base), AIXM.date(five_day_base + 4 * 86_400))
|
41
|
+
.resolve(on: AIXM.date(five_day_base), xy: data[:center_point])
|
36
42
|
end.map { _1 unless _1.empty? }.compact
|
37
43
|
end
|
38
44
|
|
@@ -43,6 +49,12 @@ module NOTAM
|
|
43
49
|
|
44
50
|
private
|
45
51
|
|
52
|
+
# @return [Time]
|
53
|
+
def five_day_base
|
54
|
+
@five_day_base ||= [data[:effective_at], Time.now.utc.round].max
|
55
|
+
end
|
56
|
+
|
57
|
+
# @params string [String] string to clean up
|
46
58
|
# @return [String]
|
47
59
|
def cleanup(string)
|
48
60
|
string
|
data/lib/notam/version.rb
CHANGED
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: 0.1.
|
4
|
+
version: 0.1.2
|
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: 2022-
|
33
|
+
date: 2022-05-19 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: aixm
|
@@ -258,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
258
|
- !ruby/object:Gem::Version
|
259
259
|
version: '0'
|
260
260
|
requirements: []
|
261
|
-
rubygems_version: 3.3.
|
261
|
+
rubygems_version: 3.3.14
|
262
262
|
signing_key:
|
263
263
|
specification_version: 4
|
264
264
|
summary: Parser for NOTAM (Notice to Airmen) messages
|
metadata.gz.sig
CHANGED
Binary file
|