aixm 1.4.2 → 1.5.0

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: 17c37db68c0bd400f252a05376c97844c89287a062c0dc26ceb4e8b4fc53fe62
4
- data.tar.gz: 9fd668c694f127adfe07bceb74765785d913bb65413b93330e6870e8ce8761ee
3
+ metadata.gz: d0556be7c2b4e19ac4c4aa8f15571cb1d891e68877d4a18c97364770f0831fad
4
+ data.tar.gz: 68845e8b79c9e2ff381e90f0ba04487457148dedb630ce8be5efba2aa9e51811
5
5
  SHA512:
6
- metadata.gz: 4b594ea96f955f07ad380ec021a6b330eb4ec569d92b9dc44897bdc46603431057db81c2091cefddab50d5d6ed1b12ad9cafd13be5fca20627bcaeb7f481cc15
7
- data.tar.gz: 5b1910e5db2280d5e74a93ec7709c5ee7972ad1328b5de01c2c542f4c4c02b2e03bdfeeefd5ffd253078f8c65e4acc756d1ae606c116a1ba13d4f4f46ac67752
6
+ metadata.gz: c6e12a9221b2cb64c4b5555c23ad5dbc5713d90c89e7c4c4fe831e16f2a4c096ec62902828a5488c812bc53d1e8d23a984488cc8fd7eeea63ef2b62a2f601b18
7
+ data.tar.gz: b8d8e45f79be86f24b6c9c4633e409dc8600740aff27873285cc37ad5f38453635d1f04536548143ec029767cfdc5f1cc534641066bf98f4b8e917c610e67516
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  Nothing so far
4
4
 
5
+ ## 1.5.0
6
+
7
+ ### Changes
8
+ * Bump OFMX schema to 0.2
9
+
10
+ ## 1.4.3
11
+
12
+ ### Additions
13
+ * `AIXM::EMERGENCY` shortcut for 121.5 MHz and `AIXM::F#voice_emergency?`
14
+ * Support Ruby 3.3
15
+
5
16
  ## 1.4.2
6
17
 
7
18
  #### Changes
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  [![Version](https://img.shields.io/gem/v/aixm.svg?style=flat)](https://rubygems.org/gems/aixm)
2
2
  [![Tests](https://img.shields.io/github/actions/workflow/status/svoop/aixm/test.yml?style=flat&label=tests)](https://github.com/svoop/aixm/actions?workflow=Test)
3
3
  [![Code Climate](https://img.shields.io/codeclimate/maintainability/svoop/aixm.svg?style=flat)](https://codeclimate.com/github/svoop/aixm/)
4
- [![Donorbox](https://img.shields.io/badge/donate-on_donorbox-yellow.svg)](https://donorbox.org/bitcetera)
4
+ [![GitHub Sponsors](https://img.shields.io/github/sponsors/svoop.svg)](https://github.com/sponsors/svoop)
5
5
 
6
6
  # AIXM
7
7
 
@@ -13,6 +13,8 @@ For now, only the parts needed to automize the AIP import of [open flightmaps](h
13
13
  * [API](https://www.rubydoc.info/gems/aixm)
14
14
  * Author: [Sven Schwyn - Bitcetera](https://bitcetera.com)
15
15
 
16
+ Thank you for supporting free and open-source software by sponsoring on [GitHub](https://github.com/sponsors/svoop) or on [Donorbox](https://donorbox.com/bitcetera). Any gesture is appreciated, from a single Euro for a ☕️ cup of coffee to 🍹 early retirement.
17
+
16
18
  ## Install
17
19
 
18
20
  ### Security
@@ -69,6 +69,7 @@ module AIXM
69
69
  end
70
70
  end
71
71
  end
72
+ method
72
73
  end
73
74
  end
74
75
 
data/lib/aixm/config.rb CHANGED
@@ -9,8 +9,8 @@ module AIXM
9
9
  },
10
10
  ofmx: {
11
11
  version: '0',
12
- namespace: 'http://schema.openflightmaps.org/0.1/OFMX-Snapshot.xsd',
13
- xsd: Pathname(__dir__).join('..', '..', 'schemas', 'ofmx', '0.1', 'OFMX-Snapshot.xsd'),
12
+ namespace: 'http://schema.openflightmaps.org/0.2/OFMX-Snapshot.xsd',
13
+ xsd: Pathname(__dir__).join('..', '..', 'schemas', 'ofmx', '0.2', 'OFMX-Snapshot.xsd'),
14
14
  root: 'OFMX-Snapshot'
15
15
  }
16
16
  }.freeze
data/lib/aixm/f.rb CHANGED
@@ -84,6 +84,13 @@ module AIXM
84
84
  end
85
85
  end
86
86
 
87
+ # Whether this frequency is for emergencies only.
88
+ #
89
+ # @return [Boolean]
90
+ def voice_emergency?
91
+ self == AIXM::EMERGENCY
92
+ end
93
+
87
94
  private
88
95
 
89
96
  # Whether this frequency is part of the voice airband for civil aviation
@@ -27,4 +27,7 @@ module AIXM
27
27
  # Time which marks midnight at end of the day
28
28
  END_OF_DAY = AIXM.time('24:00').freeze
29
29
 
30
+ # Emergency frequency
31
+ EMERGENCY = AIXM.f(121.5, :mhz).freeze
32
+
30
33
  end
data/lib/aixm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module AIXM
2
- VERSION = "1.4.2".freeze
2
+ VERSION = "1.5.0".freeze
3
3
  end
data/lib/aixm/xy.rb CHANGED
@@ -107,6 +107,7 @@ module AIXM
107
107
 
108
108
  # Distance to another point as calculated by the Haversine formula
109
109
  #
110
+ # @param other [AIXM::XY] other point
110
111
  # @return [AIXM::D]
111
112
  def distance(other)
112
113
  if self == other
@@ -125,6 +126,7 @@ module AIXM
125
126
 
126
127
  # Bearing to another point
127
128
  #
129
+ # @param other [AIXM::XY] other point
128
130
  # @return [AIXM::A]
129
131
  def bearing(other)
130
132
  fail "cannot calculate bearing to identical point" if self == other
@@ -141,6 +143,8 @@ module AIXM
141
143
 
142
144
  # Calculate a new point by adding the distance in the given bearing
143
145
  #
146
+ # @param distance [AIXM::D]
147
+ # @param bearing [AIXM::A]
144
148
  # @return [AIXM::XY]
145
149
  def add_distance(distance, bearing)
146
150
  angular_dist = distance.to_m.dim / EARTH_RADIUS
@@ -0,0 +1,209 @@
1
+ {
2
+ "fields": [
3
+ {
4
+ "name": "codeId",
5
+ "type": "integer",
6
+ "constraints": {
7
+ "required": true,
8
+ "unique": true,
9
+ "minimum": 1
10
+ }
11
+ },
12
+ {
13
+ "name": "codeType",
14
+ "type": "string",
15
+ "constraints": {
16
+ "required": true,
17
+ "enum": [
18
+ "ANTENNA",
19
+ "BUILDING",
20
+ "CHIMNEY",
21
+ "CRANE",
22
+ "MAST",
23
+ "TOWER",
24
+ "TREE",
25
+ "WINDTURBINE",
26
+ "OTHER"
27
+ ]
28
+ }
29
+ },
30
+ {
31
+ "name": "txtName",
32
+ "type": "string",
33
+ "constraints": {
34
+ "pattern": "[A-Z]*"
35
+ }
36
+ },
37
+ {
38
+ "name": "codeLgt",
39
+ "type": "string",
40
+ "constraints": {
41
+ "enum": [
42
+ "Y",
43
+ "N"
44
+ ]
45
+ }
46
+ },
47
+ {
48
+ "name": "codeMarking",
49
+ "type": "string",
50
+ "constraints": {
51
+ "enum": [
52
+ "Y",
53
+ "N"
54
+ ]
55
+ }
56
+ },
57
+ {
58
+ "name": "txtDescrLgt",
59
+ "type": "string"
60
+ },
61
+ {
62
+ "name": "txtDescrMarking",
63
+ "type": "string"
64
+ },
65
+ {
66
+ "name": "geoLat",
67
+ "type": "string",
68
+ "constraints": {
69
+ "required": true,
70
+ "pattern": "(([0-8][0-9](\\.\\d{1,8}){0,1}(N|S))|(90(\\.0{1,8}){0,1}(N|S)))"
71
+ }
72
+ },
73
+ {
74
+ "name": "geoLong",
75
+ "type": "string",
76
+ "constraints": {
77
+ "required": true,
78
+ "pattern": "((((0[0-9])|(1[0-7]))[0-9](\\.\\d{1,8}){0,1}(E|W))|(180(\\.0{1,8}){0,1}(E|W)))"
79
+ }
80
+ },
81
+ {
82
+ "name": "valGeoAccuracy",
83
+ "type": "integer",
84
+ "constraints": {
85
+ "minimum": 0
86
+ }
87
+ },
88
+ {
89
+ "name": "uomGeoAccuracy",
90
+ "type": "string",
91
+ "constraints": {
92
+ "enum": [
93
+ "FT",
94
+ "KM",
95
+ "M",
96
+ "NM"
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ "name": "valElev",
102
+ "type": "integer",
103
+ "constraints": {
104
+ "required": true
105
+ }
106
+ },
107
+ {
108
+ "name": "valElevAccuracy",
109
+ "type": "integer",
110
+ "constraints": {
111
+ "minimum": 0
112
+ }
113
+ },
114
+ {
115
+ "name": "valHgt",
116
+ "type": "integer",
117
+ "constraints": {
118
+ "minimum": 1
119
+ }
120
+ },
121
+ {
122
+ "name": "codeHgtAccuracy",
123
+ "type": "string",
124
+ "constraints": {
125
+ "enum": [
126
+ "Y",
127
+ "N"
128
+ ]
129
+ }
130
+ },
131
+ {
132
+ "name": "uomDistVer",
133
+ "type": "string",
134
+ "constraints": {
135
+ "required": true,
136
+ "enum": [
137
+ "FT",
138
+ "M"
139
+ ]
140
+ }
141
+ },
142
+ {
143
+ "name": "valRadius",
144
+ "type": "integer",
145
+ "constraints": {
146
+ "minimum": 1
147
+ }
148
+ },
149
+ {
150
+ "name": "uomRadius",
151
+ "type": "string",
152
+ "constraints": {
153
+ "enum": [
154
+ "FT",
155
+ "KM",
156
+ "M",
157
+ "NM"
158
+ ]
159
+ }
160
+ },
161
+ {
162
+ "name": "codeGroupId",
163
+ "type": "string",
164
+ "constraints": {
165
+ "pattern": "(\\d+|[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12})?"
166
+ }
167
+ },
168
+ {
169
+ "name": "txtGroupName",
170
+ "type": "string"
171
+ },
172
+ {
173
+ "name": "codeLinkedToId",
174
+ "type": "integer"
175
+ },
176
+ {
177
+ "name": "codeLinkType",
178
+ "type": "string",
179
+ "constraints": {
180
+ "enum": [
181
+ "CABLE",
182
+ "SOLID",
183
+ "OTHER"
184
+ ]
185
+ }
186
+ },
187
+ {
188
+ "name": "datetimeValidWef",
189
+ "type": "string",
190
+ "format": "datetime"
191
+ },
192
+ {
193
+ "name": "datetimeValidTil",
194
+ "type": "string",
195
+ "format": "datetime"
196
+ },
197
+ {
198
+ "name": "txtRmk",
199
+ "type": "string"
200
+ },
201
+ {
202
+ "name": "source",
203
+ "type": "string",
204
+ "constraints": {
205
+ "required": true
206
+ }
207
+ }
208
+ ]
209
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "dialect": {
3
+ "csvddfVersion": 1.2,
4
+ "header": true,
5
+ "caseSensitiveHeader": true,
6
+ "delimiter": ",",
7
+ "quoteChar": "\"",
8
+ "doubleQuote": true,
9
+ "lineTerminator": "\r\n",
10
+ "skipInitialSpace": false
11
+ }
12
+ }