ogn_client-ruby 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +1 -0
- data/CHANGELOG.md +5 -0
- data/README.md +37 -26
- data/exe/ogn2geojson +89 -0
- data/exe/ogn2kml +87 -92
- data/lib/ogn_client/version.rb +1 -1
- metadata +92 -37
- metadata.gz.sig +0 -0
- data/.code_climate.yml +0 -14
- data/.editorconfig +0 -12
- data/.gitignore +0 -10
- data/.ruby-version +0 -1
- data/.travis.yml +0 -7
- data/Gemfile +0 -9
- data/Guardfile +0 -7
- data/Rakefile +0 -13
- data/bin/console +0 -10
- data/bin/setup +0 -7
- data/ogn_client-ruby.gemspec +0 -29
- data/tasks/test.rake +0 -61
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c71a796b6402c225b74aaa7a65066b06667385ed6bb40144dd75ae15acd3b804
|
4
|
+
data.tar.gz: 719035ac056ac89494ae5d4ff4a5fe9d01ddf9695d97365913ae5a81b123d4a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a70ce58df1ec9376658643dd01a3fea2ab81868b9868019c43327cdcd8a3c80b49fd0817fda6fa8fe0f695abf5975431b1681e0e4f3225f495cf45cb1013526
|
7
|
+
data.tar.gz: 0de3c502dec0a989d2ec5516be66862eaa96e09fc23003c56f30811b8a5bff80ee85f77da6616c16098114b0af4912d0c7418934537d9da252491c51ff9703be
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
���O?ہ��u��c�4��v�w��sK��>�E|�0l:����~�Y1��h>���������'���g*����G��/�J�t���̘n.��̵��a��m��*y���9:,��W�����-0���3��j3���`�i��l�hF?Hc�+�4X��̲Eih 97�JsD\���(>�U�,�3�;��~+��̈́qu� �)8p�D:fc�h���JY�}��!f�WtٱF��}a�s���o:Y5��|�B
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,33 +1,48 @@
|
|
1
1
|
[](https://rubygems.org/gems/ogn_client-ruby)
|
2
|
-
[](https://donorbox.org/bitcetera-ogn_client-ruby)
|
2
|
+
[](https://github.com/svoop/ogn_client-ruby/actions?workflow=Test)
|
3
|
+
[](https://codeclimate.com/github/svoop/ogn_client-ruby)
|
4
|
+
[](https://donorbox.org/bitcetera)
|
6
5
|
|
7
6
|
# ogn_client-ruby
|
8
7
|
|
9
8
|
[OGN](http://glidernet.org) broadcasts aircraft positions as [APRS](http://www.aprs.org)/[APRS-IS](http://www.aprs-is.net) messages. This gem hooks into this stream of data and provides the necessary classes to parse the raw message strings into meaningful objects.
|
10
9
|
|
11
|
-
* Author: [Sven Schwyn](http://bitcetera.com)
|
12
10
|
* Homepage: https://github.com/svoop/ogn_client-ruby
|
11
|
+
* Author: [Sven Schwyn](http://bitcetera.com)
|
13
12
|
|
14
13
|
:loudspeaker: A word from the shameless commerce division: Looking for a freelance Ruby developer? Surf to http://bitcetera.com and contact Sven. Or [show your support with a donation](https://donorbox.org/bitcetera-ogn_client-ruby). Yes, we do sponsored features, too.
|
15
14
|
|
16
15
|
## Installation
|
17
16
|
|
18
|
-
|
17
|
+
### Security
|
18
|
+
|
19
|
+
This gem is [cryptographically signed](https://guides.rubygems.org/security/#using-gems) in order to assure it hasn't been tampered with. Unless already done, please add the author's public key as a trusted certificate now:
|
20
|
+
|
21
|
+
```
|
22
|
+
gem cert --add <(curl -Ls https://raw.github.com/svoop/ogn_client-ruby/master/certs/svoop.pem)
|
23
|
+
```
|
24
|
+
|
25
|
+
### Bundler
|
26
|
+
|
27
|
+
Add the following to the <tt>Gemfile</tt> or <tt>gems.rb</tt> of your [Bundler](https://bundler.io) powered Ruby project:
|
19
28
|
|
20
29
|
```ruby
|
21
30
|
gem 'ogn_client-ruby', require: 'ogn_client'
|
22
31
|
```
|
23
32
|
|
24
|
-
And then
|
33
|
+
And then install the bundle:
|
25
34
|
|
26
|
-
|
35
|
+
```
|
36
|
+
bundle install --trust-policy MediumSecurity
|
37
|
+
```
|
27
38
|
|
28
|
-
|
39
|
+
### Standalone
|
29
40
|
|
30
|
-
|
41
|
+
If you're only going to use [the executables](#executables):
|
42
|
+
|
43
|
+
```
|
44
|
+
gem install ogn_client-ruby --trust-policy MediumSecurity
|
45
|
+
```
|
31
46
|
|
32
47
|
## Usage
|
33
48
|
|
@@ -195,11 +210,12 @@ A simple daemon to log raw APRS messages to daily files.
|
|
195
210
|
|
196
211
|
ognlogd --help
|
197
212
|
|
198
|
-
### ogn2kml
|
213
|
+
### ogn2kml and ogn2geojson
|
199
214
|
|
200
|
-
Convert raw APRS messages (e.g. from `ognlogd`) to KML.
|
215
|
+
Convert raw APRS messages (e.g. from `ognlogd`) to KML or GeoJSON.
|
201
216
|
|
202
217
|
ogn2kml --help
|
218
|
+
ogn2geojson --help
|
203
219
|
|
204
220
|
## Community Support
|
205
221
|
|
@@ -211,25 +227,20 @@ Convert raw APRS messages (e.g. from `ognlogd`) to KML.
|
|
211
227
|
|
212
228
|
## Development
|
213
229
|
|
214
|
-
|
215
|
-
|
216
|
-
$ git clone git@github.com:svoop/ogn_client-ruby.git
|
217
|
-
$ cd ogn_client-ruby
|
218
|
-
$ gem install bundler
|
219
|
-
$ bin/setup
|
220
|
-
$ rake
|
221
|
-
|
222
|
-
If you are on macOS, *guard*, *guard-minitest* and *minitest-osx* are also installed and therefore you get the test results as notifications by running a guard watchdog with:
|
230
|
+
To install the development dependencies and then run the test suite:
|
223
231
|
|
224
|
-
|
232
|
+
bundle install
|
233
|
+
bundle exec rake # run tests once
|
234
|
+
bundle exec guard # run tests whenever files are modified
|
225
235
|
|
226
|
-
|
236
|
+
Please submit issues on:
|
227
237
|
|
228
|
-
|
238
|
+
https://github.com/svoop/ogn_client-ruby/issues
|
229
239
|
|
230
|
-
|
240
|
+
To contribute code, fork the project on Github, add your code and submit a
|
241
|
+
pull request:
|
231
242
|
|
232
|
-
|
243
|
+
https://help.github.com/articles/fork-a-repo
|
233
244
|
|
234
245
|
## Feature Brainstorming
|
235
246
|
|
data/exe/ogn2geojson
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/inline'
|
4
|
+
require 'optparse'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
gemfile do
|
8
|
+
source 'https://rubygems.org'
|
9
|
+
ruby '>= 2.4'
|
10
|
+
gem 'ogn_client-ruby', '~> 0.2', require: 'ogn_client'
|
11
|
+
end
|
12
|
+
|
13
|
+
class Converter
|
14
|
+
RED = 140.freeze
|
15
|
+
GREEN = 112.freeze
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
OptionParser.new do |o|
|
19
|
+
o.banner = <<~END
|
20
|
+
Convert raw OGN APRS to GeoJSON.
|
21
|
+
Usage: ogn2geojson [options] infile
|
22
|
+
END
|
23
|
+
o.on('-a', '--about', 'author and license information') { puts 'Written by Sven Schwyn (bitcetera.com) and distributed under MIT license.'; exit }
|
24
|
+
o.on('-c', '--callsign STRING', String, 'aircraft callsign (e.g. FLRAABBCC)') { |v| @callsign = v }
|
25
|
+
o.on('-d', '--date YYYY-MM-DD', String, 'date the APRS messages were recorded (default: today)') { |v| @date = v }
|
26
|
+
o.on('-o', '--outfile FILE', String, 'generated GeoJSON file (default: INFILE.geojson)') { |v| @outfile = v.sub(/\.geojson$/, '') + '.geojson' }
|
27
|
+
end.parse!
|
28
|
+
@infile = ARGV.pop
|
29
|
+
fail 'infile not found' unless @infile && File.exists?(@infile)
|
30
|
+
@outfile ||= @infile.sub(/\.\w+$/, '') + '.geojson'
|
31
|
+
end
|
32
|
+
|
33
|
+
def feature(from_point, to_point, properties={})
|
34
|
+
{
|
35
|
+
type: 'Feature',
|
36
|
+
geometry: {
|
37
|
+
type: 'LineString',
|
38
|
+
coordinates: [from_point, to_point]
|
39
|
+
},
|
40
|
+
properties: {
|
41
|
+
'stroke-width': 2,
|
42
|
+
'stroke-opacity': 1
|
43
|
+
}.merge(properties)
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
def stroke_for(climb_rate)
|
48
|
+
case
|
49
|
+
when climb_rate == 0
|
50
|
+
"rgb(0, 0, 0)"
|
51
|
+
when climb_rate < 0
|
52
|
+
color = RED + ([climb_rate.abs, 5].min * ((250 - RED) / 5)).round
|
53
|
+
"rgb(#{color}, 0, 0)"
|
54
|
+
when climb_rate > 0
|
55
|
+
color = GREEN + ([climb_rate, 5].min * ((250 - GREEN) / 5)).round
|
56
|
+
"rgb(0, #{color}, 0)"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def convert!
|
61
|
+
lines = File.readlines(@infile)
|
62
|
+
features = lines.each.with_object([]) do |line, features|
|
63
|
+
if (sender = OGNClient::Message.parse(line, date: @date)).is_a? OGNClient::SenderBeacon
|
64
|
+
if !@callsign || sender.callsign == @callsign
|
65
|
+
to_point = [sender.longitude, sender.latitude, sender.altitude]
|
66
|
+
if @from_point
|
67
|
+
features << feature(@from_point, to_point,
|
68
|
+
time: sender.time.getlocal.strftime('%H:%M:%S'),
|
69
|
+
heading: sender.heading,
|
70
|
+
'ground-speed': sender.ground_speed,
|
71
|
+
'climb-rate': sender.climb_rate,
|
72
|
+
'turn-rate': sender.turn_rate,
|
73
|
+
stroke: stroke_for(sender.climb_rate)
|
74
|
+
)
|
75
|
+
end
|
76
|
+
@from_point = to_point
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
File.write(@outfile, JSON.pretty_generate(type: "FeatureCollection", features: features))
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
begin
|
85
|
+
Converter.new.convert!
|
86
|
+
rescue => exception
|
87
|
+
puts "#{File.basename($0)}: #{exception.message}"
|
88
|
+
exit 1
|
89
|
+
end
|
data/exe/ogn2kml
CHANGED
@@ -6,8 +6,7 @@ require 'optparse'
|
|
6
6
|
gemfile do
|
7
7
|
source 'https://rubygems.org'
|
8
8
|
ruby '>= 2.4'
|
9
|
-
gem '
|
10
|
-
gem 'libxml-ruby', '~> 3.0', require: 'xml'
|
9
|
+
gem 'builder', '~> 3'
|
11
10
|
gem 'ogn_client-ruby', '~> 0.2', require: 'ogn_client'
|
12
11
|
end
|
13
12
|
|
@@ -28,104 +27,100 @@ class Converter
|
|
28
27
|
@outfile ||= @infile.sub(/\.\w+$/, '') + '.kml'
|
29
28
|
end
|
30
29
|
|
31
|
-
def style_nodes
|
32
|
-
fragment = <<~END
|
33
|
-
<Fragment>
|
34
|
-
<Style id="track_normal">
|
35
|
-
<IconStyle>
|
36
|
-
<Icon>
|
37
|
-
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
|
38
|
-
</Icon>
|
39
|
-
</IconStyle>
|
40
|
-
<LineStyle>
|
41
|
-
<color>99ffac59</color>
|
42
|
-
<width>6</width>
|
43
|
-
</LineStyle>
|
44
|
-
</Style>
|
45
|
-
<Style id="track_highlight">
|
46
|
-
<IconStyle>
|
47
|
-
<scale>1.2</scale>
|
48
|
-
<Icon>
|
49
|
-
<href>http://earth.google.com/images/kml-icons/track-directional/track-0.png</href>
|
50
|
-
</Icon>
|
51
|
-
</IconStyle>
|
52
|
-
<LineStyle>
|
53
|
-
<color>99ffac59</color>
|
54
|
-
<width>8</width>
|
55
|
-
</LineStyle>
|
56
|
-
</Style>
|
57
|
-
<StyleMap id="track">
|
58
|
-
<Pair>
|
59
|
-
<key>normal</key>
|
60
|
-
<styleUrl>#track_normal</styleUrl>
|
61
|
-
</Pair>
|
62
|
-
<Pair>
|
63
|
-
<key>highlight</key>
|
64
|
-
<styleUrl>#track_highlight</styleUrl>
|
65
|
-
</Pair>
|
66
|
-
</StyleMap>
|
67
|
-
</Fragment>
|
68
|
-
END
|
69
|
-
XML::Parser.string(fragment).parse.root.each_child { |c| yield c }
|
70
|
-
end
|
71
|
-
|
72
30
|
def convert!
|
73
31
|
lines = File.readlines(@infile)
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
32
|
+
points = lines.map do |line|
|
33
|
+
message = OGNClient::Message.parse(line, date: @date)
|
34
|
+
if message.is_a?(OGNClient::SenderBeacon) && (!@callsign || @callsign == message.callsign)
|
35
|
+
{
|
36
|
+
when: message.time.xmlschema,
|
37
|
+
coord: "#{message.longitude} #{message.latitude} #{message.altitude}",
|
38
|
+
angles: "#{message.heading} 0 0",
|
39
|
+
time: message.time.getlocal.strftime('%H:%M:%S'),
|
40
|
+
ground_speed: message.ground_speed.to_i.to_s,
|
41
|
+
climb_rate: message.climb_rate.to_i.to_s,
|
42
|
+
turn_rate: message.turn_rate.to_i.to_s
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end.compact
|
46
|
+
xml = Builder::XmlMarkup.new indent: 2
|
47
|
+
xml.instruct!
|
48
|
+
xml.kml(
|
49
|
+
xmlns: 'http://www.opengis.net/kml/2.2',
|
50
|
+
'xmlns:gx': 'http://www.google.com/kml/ext/2.2'
|
51
|
+
) do
|
52
|
+
xml.Document do
|
53
|
+
xml.name 'OGN'
|
54
|
+
# Styles
|
55
|
+
xml.Style(id: 'track_normal') do
|
56
|
+
xml.IconStyle do
|
57
|
+
xml.Icon do
|
58
|
+
xml.href 'http://earth.google.com/images/kml-icons/track-directional/track-0.png'
|
59
|
+
end
|
60
|
+
end
|
61
|
+
xml.LineStyle do
|
62
|
+
xml.color '99ffac59'
|
63
|
+
xml.width '6'
|
64
|
+
end
|
65
|
+
end
|
66
|
+
xml.Style(id: 'track_highlight') do
|
67
|
+
xml.IconStyle do
|
68
|
+
xml.scale '1.2'
|
69
|
+
xml.Icon do
|
70
|
+
xml.href 'http://earth.google.com/images/kml-icons/track-directional/track-0.png'
|
71
|
+
end
|
72
|
+
end
|
73
|
+
xml.LineStyle do
|
74
|
+
xml.color '99ffac59'
|
75
|
+
xml.width '8'
|
76
|
+
end
|
77
|
+
end
|
78
|
+
xml.StyleMap(id: 'track') do
|
79
|
+
xml.Pair do
|
80
|
+
xml.key 'normal'
|
81
|
+
xml.styleUrl '#track_normal'
|
82
|
+
end
|
83
|
+
xml.Pair do
|
84
|
+
xml.key 'highlight'
|
85
|
+
xml.styleUrl '#track_highlight'
|
86
|
+
end
|
87
|
+
end
|
88
|
+
# Tracks
|
89
|
+
xml.Folder do
|
90
|
+
xml.name 'Tracks'
|
91
|
+
xml.Placemark do
|
92
|
+
xml.name @callsign || 'all'
|
93
|
+
xml.styleUrl '#track'
|
94
|
+
xml.tag!('gx:Track') do
|
95
|
+
xml.altitudeMode 'absolute'
|
96
|
+
points.each { |p| xml.when p[:when] }
|
97
|
+
points.each { |p| xml.tag!('gx:coord', p[:coord]) }
|
98
|
+
points.each { |p| xml.tag!('gx:angles', p[:angles]) }
|
99
|
+
xml.ExtendedData do
|
100
|
+
xml.SchemaData(schemaUrl: '#schema') do
|
101
|
+
xml.tag!('gx:SimpleArrayData', name: 'Time') do
|
102
|
+
points.each { |p| xml.tag!('gx:value', p[:time]) }
|
103
|
+
end
|
104
|
+
xml.tag!('gx:SimpleArrayData', name: 'Ground Speed') do
|
105
|
+
points.each { |p| xml.tag!('gx:value', p[:ground_speed]) }
|
106
|
+
end
|
107
|
+
xml.tag!('gx:SimpleArrayData', name: 'Turn Rate') do
|
108
|
+
points.each { |p| xml.tag!('gx:value', p[:turn_rate]) }
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
108
114
|
end
|
109
115
|
end
|
110
|
-
progressbar.increment
|
111
|
-
end
|
112
|
-
array_data.keys.each do |key|
|
113
|
-
array_data[key].each { |d| track << d }
|
114
116
|
end
|
115
|
-
|
116
|
-
extended_data << (schema_data = XML::Node.new(:SchemaData))
|
117
|
-
schema_data['schemaUrl'] = '#schema'
|
118
|
-
schema_data << time
|
119
|
-
schema_data << ground_speed
|
120
|
-
schema_data << climb_rate
|
121
|
-
schema_data << turn_rate
|
122
|
-
xml.save(@outfile, encoding: XML::Encoding::UTF_8)
|
117
|
+
File.write(@outfile, xml.target!)
|
123
118
|
end
|
124
119
|
end
|
125
120
|
|
126
121
|
begin
|
127
122
|
Converter.new.convert!
|
128
|
-
rescue => exception
|
129
|
-
puts "#{File.basename($0)}: #{exception.message}"
|
130
|
-
exit 1
|
123
|
+
#rescue => exception
|
124
|
+
# puts "#{File.basename($0)}: #{exception.message}"
|
125
|
+
# exit 1
|
131
126
|
end
|
data/lib/ogn_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,45 +1,67 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ogn_client-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Schwyn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ0wCwYDVQQDDARydWJ5
|
14
|
+
MRkwFwYKCZImiZPyLGQBGRYJYml0Y2V0ZXJhMRMwEQYKCZImiZPyLGQBGRYDY29t
|
15
|
+
MB4XDTIwMDMxNDE5NDgwNVoXDTIxMDMxNDE5NDgwNVowPzENMAsGA1UEAwwEcnVi
|
16
|
+
eTEZMBcGCgmSJomT8ixkARkWCWJpdGNldGVyYTETMBEGCgmSJomT8ixkARkWA2Nv
|
17
|
+
bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL4k2DCa8/eAFiak4Kwe
|
18
|
+
0Iu8dk0JfHWeywjVVSNv6PtnQ96B/1jLmw5Wb+xYJSyvG6KEOzEMWA/lqO+nIrdO
|
19
|
+
2LDRxuWojH5GROp/dtQ+SxsWlvui4cs9iBmI5Mj0mc1UgST3UFf60ry8OnyR+E9N
|
20
|
+
RVVZZykAGmxwyAqD1aq5Yt0lZMdvrGnaLWcZdKC99e812pdTN948k8Iw2GJAaNtH
|
21
|
+
Tp17XDfDNBANHjYy9xCqrxvNTfT4Bs43rPA1A77+mkPgI2Vx51u2CWA+K3hP4gAZ
|
22
|
+
F50xqnagzgXSOzCme1mC/sUUmoAAB39g2CuNocWuhv0R3/HeqdwAsA/1XpDF2NfQ
|
23
|
+
zW8CAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFDfY
|
24
|
+
gRWUI+J6nX7Po7Zq0zvDopfYMB0GA1UdEQQWMBSBEnJ1YnlAYml0Y2V0ZXJhLmNv
|
25
|
+
bTAdBgNVHRIEFjAUgRJydWJ5QGJpdGNldGVyYS5jb20wDQYJKoZIhvcNAQEFBQAD
|
26
|
+
ggEBAFsTSBbxIkTdppL8yFl0KglyUMq9DjkMwvz7ORJzHMfw1S2OmXMYnJ5fSXFu
|
27
|
+
C/9puwYMdD6V3THyqc1Rhj6RRZ/576MDwIXMgOETQfPTT6jNE+p4cRougDrQ32aV
|
28
|
+
29WIAY21/o0FBuJZqxLDRTu6O7AHrjFnv7Kkpr1oYiR9G4MNEihyNt909nHnSixC
|
29
|
+
qn5dLDjawWVvAz5oeD1sE0Kyp6CDY8i3NfBu4aqz8uAbaEJh3jpY5NW2Lv++s7hf
|
30
|
+
EUqN8dad5Oosf9hYbfFXPzkJIIGiKMS4e1cbnAr/vadELoccfEN9tSlLuW/voNqA
|
31
|
+
2635TmaVXxUEgIOzRhGlE1+frXI=
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2020-03-16 00:00:00.000000000 Z
|
12
34
|
dependencies:
|
13
35
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
36
|
+
name: rake
|
15
37
|
requirement: !ruby/object:Gem::Requirement
|
16
38
|
requirements:
|
17
|
-
- - "
|
39
|
+
- - ">="
|
18
40
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
41
|
+
version: '0'
|
20
42
|
type: :development
|
21
43
|
prerelease: false
|
22
44
|
version_requirements: !ruby/object:Gem::Requirement
|
23
45
|
requirements:
|
24
|
-
- - "
|
46
|
+
- - ">="
|
25
47
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
48
|
+
version: '0'
|
27
49
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
50
|
+
name: pry
|
29
51
|
requirement: !ruby/object:Gem::Requirement
|
30
52
|
requirements:
|
31
|
-
- - "
|
53
|
+
- - ">="
|
32
54
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
55
|
+
version: '0'
|
34
56
|
type: :development
|
35
57
|
prerelease: false
|
36
58
|
version_requirements: !ruby/object:Gem::Requirement
|
37
59
|
requirements:
|
38
|
-
- - "
|
60
|
+
- - ">="
|
39
61
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
62
|
+
version: '0'
|
41
63
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
64
|
+
name: minitest
|
43
65
|
requirement: !ruby/object:Gem::Requirement
|
44
66
|
requirements:
|
45
67
|
- - ">="
|
@@ -53,7 +75,7 @@ dependencies:
|
|
53
75
|
- !ruby/object:Gem::Version
|
54
76
|
version: '0'
|
55
77
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: minitest
|
78
|
+
name: minitest-reporters
|
57
79
|
requirement: !ruby/object:Gem::Requirement
|
58
80
|
requirements:
|
59
81
|
- - ">="
|
@@ -67,7 +89,7 @@ dependencies:
|
|
67
89
|
- !ruby/object:Gem::Version
|
68
90
|
version: '0'
|
69
91
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: minitest-
|
92
|
+
name: minitest-sound
|
71
93
|
requirement: !ruby/object:Gem::Requirement
|
72
94
|
requirements:
|
73
95
|
- - ">="
|
@@ -94,30 +116,54 @@ dependencies:
|
|
94
116
|
- - ">="
|
95
117
|
- !ruby/object:Gem::Version
|
96
118
|
version: '0'
|
97
|
-
|
98
|
-
|
99
|
-
|
119
|
+
- !ruby/object:Gem::Dependency
|
120
|
+
name: guard
|
121
|
+
requirement: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
type: :development
|
127
|
+
prerelease: false
|
128
|
+
version_requirements: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: guard-minitest
|
135
|
+
requirement: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
type: :development
|
141
|
+
prerelease: false
|
142
|
+
version_requirements: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
description: |
|
148
|
+
OGN (glidernet.org) broadcasts aircraft positions as APRS/APRS-IS messages.
|
149
|
+
This gem hooks into this stream of data and provides the necessary classes
|
150
|
+
to parse the raw message strings into meaningful objects.
|
100
151
|
email:
|
101
152
|
- ruby@bitcetera.com
|
102
153
|
executables:
|
154
|
+
- ogn2geojson
|
103
155
|
- ogn2kml
|
104
156
|
- ognlogd
|
105
157
|
extensions: []
|
106
|
-
extra_rdoc_files:
|
158
|
+
extra_rdoc_files:
|
159
|
+
- README.md
|
160
|
+
- CHANGELOG.md
|
161
|
+
- LICENSE.txt
|
107
162
|
files:
|
108
|
-
- ".code_climate.yml"
|
109
|
-
- ".editorconfig"
|
110
|
-
- ".gitignore"
|
111
|
-
- ".ruby-version"
|
112
|
-
- ".travis.yml"
|
113
163
|
- CHANGELOG.md
|
114
|
-
- Gemfile
|
115
|
-
- Guardfile
|
116
164
|
- LICENSE.txt
|
117
165
|
- README.md
|
118
|
-
-
|
119
|
-
- bin/console
|
120
|
-
- bin/setup
|
166
|
+
- exe/ogn2geojson
|
121
167
|
- exe/ogn2kml
|
122
168
|
- exe/ognlogd
|
123
169
|
- lib/ogn_client.rb
|
@@ -129,29 +175,38 @@ files:
|
|
129
175
|
- lib/ogn_client/messages/receiver_status.rb
|
130
176
|
- lib/ogn_client/messages/sender_beacon.rb
|
131
177
|
- lib/ogn_client/version.rb
|
132
|
-
- ogn_client-ruby.gemspec
|
133
|
-
- tasks/test.rake
|
134
178
|
homepage: https://github.com/svoop/ogn_client-ruby
|
135
179
|
licenses:
|
136
180
|
- MIT
|
137
|
-
metadata:
|
181
|
+
metadata:
|
182
|
+
homepage_uri: https://github.com/svoop/ogn_client-ruby
|
183
|
+
changelog_uri: https://github.com/svoop/ogn_client-ruby/blob/master/CHANGELOG.md
|
184
|
+
source_code_uri: https://github.com/svoop/ogn_client-ruby
|
185
|
+
documentation_uri: https://www.rubydoc.info/gems/ogn_client-ruby
|
186
|
+
bug_tracker_uri: https://github.com/svoop/ogn_client-ruby/issues
|
138
187
|
post_install_message:
|
139
|
-
rdoc_options:
|
188
|
+
rdoc_options:
|
189
|
+
- "--title"
|
190
|
+
- OGN Subscriber and Parser
|
191
|
+
- "--main"
|
192
|
+
- README.md
|
193
|
+
- "--line-numbers"
|
194
|
+
- "--inline-source"
|
195
|
+
- "--quiet"
|
140
196
|
require_paths:
|
141
197
|
- lib
|
142
198
|
required_ruby_version: !ruby/object:Gem::Requirement
|
143
199
|
requirements:
|
144
200
|
- - ">="
|
145
201
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
202
|
+
version: 2.4.0
|
147
203
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
204
|
requirements:
|
149
205
|
- - ">="
|
150
206
|
- !ruby/object:Gem::Version
|
151
207
|
version: '0'
|
152
208
|
requirements: []
|
153
|
-
|
154
|
-
rubygems_version: 2.6.11
|
209
|
+
rubygems_version: 3.1.2
|
155
210
|
signing_key:
|
156
211
|
specification_version: 4
|
157
212
|
summary: Subscriber and parser for APRS messages from OGN
|
metadata.gz.sig
ADDED
Binary file
|
data/.code_climate.yml
DELETED
data/.editorconfig
DELETED
data/.gitignore
DELETED
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.4.1
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Guardfile
DELETED
data/Rakefile
DELETED
@@ -1,13 +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 = true
|
9
|
-
end
|
10
|
-
|
11
|
-
task :default => :test
|
12
|
-
|
13
|
-
Dir.glob('tasks/*.rake').each { |task| load task }
|
data/bin/console
DELETED
data/bin/setup
DELETED
data/ogn_client-ruby.gemspec
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'ogn_client/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = 'ogn_client-ruby'
|
8
|
-
spec.version = OGNClient::VERSION
|
9
|
-
spec.authors = ['Sven Schwyn']
|
10
|
-
spec.email = ['ruby@bitcetera.com']
|
11
|
-
spec.summary = %q{Subscriber and parser for APRS messages from OGN}
|
12
|
-
spec.description = %q{OGN (glidernet.org) broadcasts aircraft positions as APRS/APRS-IS messages. This gem hooks into this stream of data and provides the necessary classes to parse the raw message strings into meaningful objects.}
|
13
|
-
spec.homepage = 'https://github.com/svoop/ogn_client-ruby'
|
14
|
-
spec.license = 'MIT'
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
-
spec.bindir = 'exe'
|
18
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
-
spec.require_paths = ['lib']
|
20
|
-
|
21
|
-
spec.required_ruby_version = '>= 2.1'
|
22
|
-
|
23
|
-
spec.add_development_dependency 'bundler', '~> 1.10'
|
24
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
-
spec.add_development_dependency 'pry'
|
26
|
-
spec.add_development_dependency 'minitest'
|
27
|
-
spec.add_development_dependency 'minitest-reporters'
|
28
|
-
spec.add_development_dependency 'minitest-matchers'
|
29
|
-
end
|
data/tasks/test.rake
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
require 'ogn_client'
|
2
|
-
require 'tempfile'
|
3
|
-
require 'fileutils'
|
4
|
-
|
5
|
-
namespace :test do
|
6
|
-
|
7
|
-
desc "Reset the test suite"
|
8
|
-
task :reset do
|
9
|
-
FileUtils.rm_f('spec/fixtures/messages.txt')
|
10
|
-
end
|
11
|
-
|
12
|
-
desc "Feed live APRS messages to the parser"
|
13
|
-
task :live do
|
14
|
-
callsign = "ROCT#{rand(1000)}"
|
15
|
-
counter = 0
|
16
|
-
loop do
|
17
|
-
OGNClient::APRS.start(callsign: callsign) do |aprs|
|
18
|
-
while raw = aprs.gets do
|
19
|
-
begin
|
20
|
-
OGNClient::Message.parse raw
|
21
|
-
rescue OGNClient::Error => error
|
22
|
-
puts "ERROR: #{error.message}"
|
23
|
-
end
|
24
|
-
counter += 1
|
25
|
-
puts "INFO: captured #{counter} messages" if counter % 1000 == 0
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
namespace :live do
|
32
|
-
desc "Record live APRS messages"
|
33
|
-
task :record do
|
34
|
-
callsign = "ROCT#{rand(1000)}"
|
35
|
-
counter = 0
|
36
|
-
File.open("#{Dir.tmpdir}/ogn_messages.txt", "w") do |file|
|
37
|
-
OGNClient::APRS.start(callsign: callsign) do |aprs|
|
38
|
-
while raw = aprs.gets do
|
39
|
-
file.print raw
|
40
|
-
counter += 1
|
41
|
-
puts "INFO: captured #{counter} messages" if counter % 1000 == 0
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
desc "Feed recorded APRS messages to the parser"
|
48
|
-
task :replay do
|
49
|
-
File.open("#{Dir.tmpdir}/ogn_messages.txt") do |file|
|
50
|
-
while raw = file.gets do
|
51
|
-
begin
|
52
|
-
OGNClient::Message.parse raw
|
53
|
-
rescue OGNClient::Error => error
|
54
|
-
puts "ERROR: #{error.message}"
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
end
|