tac_scribe 0.7.6-java → 0.8.0-java

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: 3f82a0b04b2ff323c9d23b16afaed5420b51f96aaa745c38fab58de09eca450e
4
- data.tar.gz: 4930d70de79e8f1c732f0cb810e6f45f8043242d3756e8101bfe7d522d7756d6
3
+ metadata.gz: 919cea3cc82c8e3c7b1341cf39d738adc9de5fc5f6c38860a6c865f430f72afc
4
+ data.tar.gz: 6f79e789707f2d93c77460ca7407547669a5b736cad0f3e04a6678449e6c9f30
5
5
  SHA512:
6
- metadata.gz: 194a4241896ba3186b35d05481675dcc4ccf27585a855ba8695397dadbf95ff3763c6f926284080426b8d86cb0f7a38f721a55d9f5af847a12cb60bfa077a2d5
7
- data.tar.gz: 6c9caa386972d7a3fcd70f0cba3f86c02d4c05683ced09ade1e5374725b758caa5f842f9e4327b9f48dd261d224704c2824af2ae857c771a88653830661b4632
6
+ metadata.gz: e994f93d31d05296c77ac2e6e92203e47772041641ffb68a5a54ff2f459b069345531c0619ad0a8b3cdcf31e5011937b7001381a7da1aafc82d13824f39eeb72
7
+ data.tar.gz: 17e15f0f0906944fa2ba1570b6814b06d9510e109b0b0e2a097086f0a0b1f349a604f073f59ed45a55d79ef4da9763dfd09c06c4e59647f919d878e471a1bb4a
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.8.0] - 2021-01-09
10
+ ### Changed
11
+ - Remove airfield loading from json files
12
+ - CinC is now mandatory
13
+
14
+ ### Fixed
15
+ - Aerodromes (including oilrigs... ) no longer have special position handling.
16
+ This is in relation to the removal of airfields from json files and requiring
17
+ CinC. Side effect is oilrigs will now be positioned correctly.
18
+
9
19
  ## [0.7.6] - 2020-08-13
10
20
  ### Changed
11
21
  - Fix the default port number
@@ -46,10 +46,6 @@ OptionParser.new do |opts|
46
46
  end
47
47
 
48
48
  opts.separator "\nCommander-In-Chief Options"
49
- opts.on('-b', '--enable-cinc',
50
- 'Is Cinc enabled? (Default: false)') do |_v|
51
- options[:cinc_enabled] = true
52
- end
53
49
  opts.on('-m', '--cinc-port=port',
54
50
  'Cinc server port (Default: 9001)') do |v|
55
51
  options[:cinc_port] = v
@@ -78,10 +74,6 @@ OptionParser.new do |opts|
78
74
  options[:db_name] = v
79
75
  end
80
76
  opts.separator "\nMisc options"
81
- opts.on('-f', '--populate-airfields',
82
- 'Populate DCS airfield locations') do |_v|
83
- options[:populate_airfields] = true
84
- end
85
77
  opts.on('-t', '--threads=threads',
86
78
  'Thread Count (Default: 1)') do |v|
87
79
  options[:threads] = v
@@ -122,8 +114,6 @@ TacScribe::Daemon.new(
122
114
  db_password: options[:db_password],
123
115
  verbose_logging: options[:verbose],
124
116
  thread_count: options[:threads].to_i,
125
- populate_airfields: options[:populate_airfields],
126
117
  whitelist: options[:whitelist],
127
- cinc_enabled: options[:cinc_enabled],
128
118
  cinc_port: options[:cinc_port]
129
119
  ).start_processing
@@ -23,7 +23,7 @@ module TacScribe
23
23
  end
24
24
 
25
25
  def write_object(object)
26
- if (reference_latitude != 0 || reference_longitude != 0) && object[:type] != "Ground+Static+Aerodrome"
26
+ if (reference_latitude != 0 || reference_longitude != 0)
27
27
  localize_position(object)
28
28
  end
29
29
 
@@ -16,7 +16,7 @@ module TacScribe
16
16
  def initialize(db_host:, db_port:, db_name:, db_user:, db_password:,
17
17
  tacview_host:, tacview_port:, tacview_password:,
18
18
  tacview_client_name:, verbose_logging:, thread_count:,
19
- populate_airfields:, whitelist: nil, cinc_enabled:, cinc_port:)
19
+ whitelist: nil, cinc_port:)
20
20
  Datastore.instance.configure do |config|
21
21
  config.host = db_host
22
22
  config.port = db_port
@@ -30,7 +30,6 @@ module TacScribe
30
30
 
31
31
  @verbose_logging = verbose_logging
32
32
 
33
- @populate_airfields = populate_airfields
34
33
  @thread_count = thread_count
35
34
  @threads = {}
36
35
  @whitelist = Set.new(IO.read(whitelist).split) if whitelist
@@ -43,12 +42,10 @@ module TacScribe
43
42
  client_name: tacview_client_name
44
43
  )
45
44
 
46
- if cinc_enabled
47
- @cinc_client = Cinc::Client.new(
48
- host: tacview_host,
49
- port: cinc_port
50
- )
51
- end
45
+ @cinc_client = Cinc::Client.new(
46
+ host: tacview_host,
47
+ port: cinc_port
48
+ )
52
49
  end
53
50
 
54
51
  # Starts processing and reconnects if the client was disconnected.
@@ -66,7 +63,6 @@ module TacScribe
66
63
  start_cinc_thread
67
64
  start_db_sync_thread
68
65
  start_reporting_thread
69
- populate_airfields if @populate_airfields
70
66
  @threads.each_pair do |key, _value|
71
67
  puts "#{key} thread started"
72
68
  end
@@ -113,7 +109,6 @@ module TacScribe
113
109
  end
114
110
 
115
111
  def start_cinc_thread
116
- return unless @cinc_client
117
112
  cinc_thread = Thread.new do
118
113
  loop do
119
114
  @cinc_client.connect
@@ -175,22 +170,5 @@ module TacScribe
175
170
  reporting_thread.name = 'Reporting'
176
171
  @threads[:reporting] = reporting_thread
177
172
  end
178
-
179
- def populate_airfields
180
- json = File.read(File.join(File.dirname(__FILE__),
181
- '../../data/airfields.json'))
182
- airfields = JSON.parse(json)
183
- airfields.each_with_index do |airfield, i|
184
- @event_queue.update_object(
185
- object_id: (45_000_000 + i).to_s,
186
- latitude: BigDecimal(airfield['lat'].to_s),
187
- longitude: BigDecimal(airfield['lon'].to_s),
188
- altitude: BigDecimal(airfield['alt'].to_s),
189
- type: 'Ground+Static+Aerodrome',
190
- name: airfield['name'],
191
- coalition: 0 # Neutral
192
- )
193
- end
194
- end
195
173
  end
196
174
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TacScribe
4
- VERSION = '0.7.6'
4
+ VERSION = '0.8.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tac_scribe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.8.0
5
5
  platform: java
6
6
  authors:
7
7
  - Jeffrey Jones
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-13 00:00:00.000000000 Z
11
+ date: 2021-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -228,7 +228,6 @@ files:
228
228
  - Rakefile
229
229
  - bin/console
230
230
  - bin/setup
231
- - data/airfields.json
232
231
  - data/whitelist.example
233
232
  - db/001_create_unit_table.rb
234
233
  - db/README.md
@@ -263,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
262
  version: '0'
264
263
  requirements: []
265
264
  rubyforge_project:
266
- rubygems_version: 2.7.6
265
+ rubygems_version: 2.7.10
267
266
  signing_key:
268
267
  specification_version: 4
269
268
  summary: Write Tacview data to PostGIS database
@@ -1,121 +0,0 @@
1
- [{
2
- "lon": 45.01909093846007,
3
- "lat": 41.637735936261556,
4
- "alt": 464.5004577636719,
5
- "name": "Vaziani"
6
- },
7
- {
8
- "lon": 44.94687659192431,
9
- "lat": 41.67471935873423,
10
- "alt": 479.69482421875,
11
- "name": "Tbilisi-Lochini"
12
- },
13
- {
14
- "lon": 43.62488628801948,
15
- "lat": 43.50998473505967,
16
- "alt": 430.01043701171875,
17
- "name": "Nalchik"
18
- },
19
- {
20
- "lon": 38.92520230077506,
21
- "lat": 45.087429883845076,
22
- "alt": 30.010032653808594,
23
- "name": "Krasnodar-Center"
24
- },
25
- {
26
- "lon": 37.35978347755592,
27
- "lat": 45.01317473377168,
28
- "alt": 43.00004196166992,
29
- "name": "Anapa-Vityazevo"
30
- },
31
- {
32
- "lon": 41.876483823101026,
33
- "lat": 41.93210535345338,
34
- "alt": 18.01001739501953,
35
- "name": "Kobuleti"
36
- },
37
- {
38
- "lon": 43.100679733081456,
39
- "lat": 44.21864682380681,
40
- "alt": 320.01031494140625,
41
- "name": "Mineralnye Vody"
42
- },
43
- {
44
- "lon": 44.62032726210201,
45
- "lat": 43.79130325093825,
46
- "alt": 154.61184692382812,
47
- "name": "Mozdok"
48
- },
49
- {
50
- "lon": 44.94718306531669,
51
- "lat": 41.64116326678661,
52
- "alt": 449.4102478027344,
53
- "name": "Soganlug"
54
- },
55
- {
56
- "lon": 44.588922553542936,
57
- "lat": 43.20850098738094,
58
- "alt": 524.0057983398438,
59
- "name": "Beslan"
60
- },
61
- {
62
- "lon": 42.49568635853585,
63
- "lat": 42.179154028210135,
64
- "alt": 45.010047912597656,
65
- "name": "Kutaisi"
66
- },
67
- {
68
- "lon": 37.786226060479564,
69
- "lat": 44.6733296041269,
70
- "alt": 40.010040283203125,
71
- "name": "Novorossiysk"
72
- },
73
- {
74
- "lon": 40.021427482235985,
75
- "lat": 44.67144025735508,
76
- "alt": 180.01019287109375,
77
- "name": "Maykop-Khanskaya"
78
- },
79
- {
80
- "lon": 39.924231880466095,
81
- "lat": 43.43937843405085,
82
- "alt": 30.010034561157227,
83
- "name": "Sochi-Adler"
84
- },
85
- {
86
- "lon": 41.142447588488196,
87
- "lat": 42.852741071634995,
88
- "alt": 13.339526176452637,
89
- "name": "Sukhumi-Babushara"
90
- },
91
- {
92
- "lon": 42.061021312855914,
93
- "lat": 42.23872808157328,
94
- "alt": 13.23994255065918,
95
- "name": "Senaki-Kolkhi"
96
- },
97
- {
98
- "lon": 40.56417576840064,
99
- "lat": 43.124233340197144,
100
- "alt": 21.01003074645996,
101
- "name": "Gudauta"
102
- },
103
- {
104
- "lon": 37.985886938697085,
105
- "lat": 44.961383022734175,
106
- "alt": 20.010303497314453,
107
- "name": "Krymsk"
108
- },
109
- {
110
- "lon": 38.0041463505281,
111
- "lat": 44.56767458600406,
112
- "alt": 22.00992202758789,
113
- "name": "Gelendzhik"
114
- },
115
- {
116
- "lon": 39.20306690632454,
117
- "lat": 45.0460996415433,
118
- "alt": 34.01003646850586,
119
- "name": "Krasnodar-Pashkovsky"
120
- }
121
- ]