notam 0.1.0 → 0.1.3
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 +16 -0
- data/README.md +22 -7
- data/lib/notam/item/d.rb +14 -2
- data/lib/notam/item/f.rb +3 -3
- data/lib/notam/item/g.rb +3 -3
- data/lib/notam/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +11 -5
- 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: b793dbd67af43de50525171950c176860cb7095b865e2362d1aaf31c4a4e737c
|
4
|
+
data.tar.gz: e3915a6680b06eb3a43270012dfb552b84443605a21dafd44f7c72597973a3de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cccba536bce34a893bdc717ba2b4983bf09e66d499acc33cec4ec949a52bb4685319c36fe99c30ee73ba82e91d33a8c5446a96f7ba18abf468c5fd6dc147daa1
|
7
|
+
data.tar.gz: 1acee0ea83919ed99d2825d81ea34d1e0fba3464a31c68706e870baa8e72c8e2e05c5ac282410bf09cde59be5a01b809c8fe780771c12197bee7331b13d9318b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,22 @@
|
|
2
2
|
|
3
3
|
Nothing so far
|
4
4
|
|
5
|
+
## 0.1.3
|
6
|
+
|
7
|
+
#### Fixes
|
8
|
+
* Reverse accidentally flipped F and G item.
|
9
|
+
|
10
|
+
## 0.1.2
|
11
|
+
|
12
|
+
#### Changes
|
13
|
+
* The five day schedules are calculated starting today if `effective_at` is
|
14
|
+
in the past.
|
15
|
+
|
16
|
+
## 0.1.1
|
17
|
+
|
18
|
+
#### Changes
|
19
|
+
* Update dependency on AIXM gem
|
20
|
+
|
5
21
|
## 0.1.0
|
6
22
|
|
7
23
|
#### Initial Implementation
|
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/item/f.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module NOTAM
|
4
4
|
|
5
|
-
# The F item defines the
|
5
|
+
# The F item defines the lower limit for this NOTAM.
|
6
6
|
class F < Item
|
7
7
|
|
8
8
|
RE = %r(
|
@@ -17,7 +17,7 @@ module NOTAM
|
|
17
17
|
)x.freeze
|
18
18
|
|
19
19
|
# @return [AIXM::Z]
|
20
|
-
def
|
20
|
+
def lower_limit
|
21
21
|
case captures['all']
|
22
22
|
when 'UNL' then AIXM::UNLIMITED
|
23
23
|
when 'SFC', 'GND' then AIXM::GROUND
|
@@ -27,7 +27,7 @@ module NOTAM
|
|
27
27
|
|
28
28
|
# @see NOTAM::Item#merge
|
29
29
|
def merge
|
30
|
-
super(:
|
30
|
+
super(:lower_limit)
|
31
31
|
end
|
32
32
|
|
33
33
|
end
|
data/lib/notam/item/g.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module NOTAM
|
4
4
|
|
5
|
-
# The G item defines the
|
5
|
+
# The G item defines the upper limit for this NOTAM.
|
6
6
|
class G < Item
|
7
7
|
|
8
8
|
RE = %r(
|
@@ -17,7 +17,7 @@ module NOTAM
|
|
17
17
|
)x.freeze
|
18
18
|
|
19
19
|
# @return [AIXM::Z]
|
20
|
-
def
|
20
|
+
def upper_limit
|
21
21
|
case captures['all']
|
22
22
|
when 'UNL' then AIXM::UNLIMITED
|
23
23
|
when 'SFC', 'GND' then AIXM::GROUND
|
@@ -27,7 +27,7 @@ module NOTAM
|
|
27
27
|
|
28
28
|
# @see NOTAM::Item#merge
|
29
29
|
def merge
|
30
|
-
super(:
|
30
|
+
super(:upper_limit)
|
31
31
|
end
|
32
32
|
|
33
33
|
end
|
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.3
|
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-24 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: aixm
|
@@ -38,14 +38,20 @@ dependencies:
|
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '1
|
41
|
+
version: '1'
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 1.3.0
|
42
45
|
type: :runtime
|
43
46
|
prerelease: false
|
44
47
|
version_requirements: !ruby/object:Gem::Requirement
|
45
48
|
requirements:
|
46
49
|
- - "~>"
|
47
50
|
- !ruby/object:Gem::Version
|
48
|
-
version: '1
|
51
|
+
version: '1'
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.3.0
|
49
55
|
- !ruby/object:Gem::Dependency
|
50
56
|
name: i18n
|
51
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
258
|
- !ruby/object:Gem::Version
|
253
259
|
version: '0'
|
254
260
|
requirements: []
|
255
|
-
rubygems_version: 3.3.
|
261
|
+
rubygems_version: 3.3.14
|
256
262
|
signing_key:
|
257
263
|
specification_version: 4
|
258
264
|
summary: Parser for NOTAM (Notice to Airmen) messages
|
metadata.gz.sig
CHANGED
Binary file
|