comtec-dr 0.4.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -14
- data/exe/comtec_mov_to_csv +1 -1
- data/exe/comtec_mov_to_gpx +1 -4
- data/lib/comtec-dr/gps_log.rb +3 -3
- data/lib/comtec-dr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bdc87ba7a9821800fa64c52655a0201f9a9e04a
|
4
|
+
data.tar.gz: 212b05657e9fcae28b40c4f35c4ecac881cf75c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7b0bfbc1e61146947a58229ced5f2c7e5603b51859bcf67cdc6f8181fe6036b12f4d862f50b677d94944bd5a813da7a41ed07e669099187193a09de8fa60dad
|
7
|
+
data.tar.gz: 710ef525658f2061a58228e86ebab0d90633107a0578db371e8f3fc97ddd11f5c561d6d0c7a792d1180f02b14e4ec1edaf324c2be491989cbc201cdc5113af5d
|
data/README.md
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
# ComtecDr
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
コムテックのドライブレコーダーの動画からGPSログデータを取り出します
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
7
|
Add this line to your application's Gemfile:
|
10
8
|
|
11
9
|
```ruby
|
12
|
-
gem '
|
10
|
+
gem 'comtec-dr'
|
13
11
|
```
|
14
12
|
|
15
13
|
And then execute:
|
@@ -18,22 +16,28 @@ And then execute:
|
|
18
16
|
|
19
17
|
Or install it yourself as:
|
20
18
|
|
21
|
-
$ gem install
|
19
|
+
$ gem install comtec-dr
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
26
|
-
|
27
|
-
## Development
|
23
|
+
movファイルもしくはディレクトリを引数に取ることが出来ます
|
28
24
|
|
29
|
-
|
25
|
+
### CSVデータで取り出し
|
30
26
|
|
31
|
-
|
27
|
+
```
|
28
|
+
comtec_mov_to_csv /Volumes/NO\ NAME/DCIM/20171005_003/007_130755_G.MOV
|
29
|
+
```
|
32
30
|
|
33
|
-
|
31
|
+
```
|
32
|
+
comtec_mov_to_csv /Volumes/NO\ NAME/DCIM/20171005_003
|
33
|
+
```
|
34
34
|
|
35
|
-
|
35
|
+
### GPXデータで取り出し
|
36
36
|
|
37
|
-
|
37
|
+
```
|
38
|
+
comtec_mov_to_gpx /Volumes/NO\ NAME/DCIM/20171005_003/007_130755_G.MOV
|
39
|
+
```
|
38
40
|
|
39
|
-
|
41
|
+
```
|
42
|
+
comtec_mov_to_gpx /Volumes/NO\ NAME/DCIM/20171005_003
|
43
|
+
```
|
data/exe/comtec_mov_to_csv
CHANGED
@@ -8,7 +8,7 @@ require "comtec-dr"
|
|
8
8
|
ARGV.each do |arg|
|
9
9
|
path = Pathname arg
|
10
10
|
if path.file? && path.basename.to_s.end_with?('.MOV')
|
11
|
-
CSV.open("#{path.basename.to_s}.csv",'w') do |csv|
|
11
|
+
CSV.open("#{path.basename.to_s.gsub('.MOV','')}.csv",'w') do |csv|
|
12
12
|
ComtecDR::UdatAnalyzer.analyze(ComtecDR::MovDemuxer.demux path.to_s).each do |line|
|
13
13
|
log = GpsLog.new *line
|
14
14
|
csv << log.csv_line
|
data/exe/comtec_mov_to_gpx
CHANGED
@@ -4,13 +4,10 @@ require "bundler/setup"
|
|
4
4
|
require 'pathname'
|
5
5
|
require "comtec-dr"
|
6
6
|
|
7
|
-
data = []
|
8
|
-
|
9
7
|
ARGV.each do |arg|
|
10
8
|
path = Pathname arg
|
11
9
|
if path.file? && path.basename.to_s.end_with?('.MOV')
|
12
|
-
|
13
|
-
gpx = ComtecDR::GpxGenerator.new "#{path.basename.to_s}.gpx"
|
10
|
+
gpx = ComtecDR::GpxGenerator.new "#{path.basename.to_s.gsub('.MOV','')}.gpx"
|
14
11
|
csv = ComtecDR::UdatAnalyzer.analyze(ComtecDR::MovDemuxer.demux path.to_s).map do |line|
|
15
12
|
log = GpsLog.new *line
|
16
13
|
log.csv_line
|
data/lib/comtec-dr/gps_log.rb
CHANGED
@@ -33,15 +33,15 @@ class GpsLog
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def x_acceleration
|
36
|
-
@x_acceleration.to_f/
|
36
|
+
@x_acceleration.to_f/1000
|
37
37
|
end
|
38
38
|
|
39
39
|
def y_acceleration
|
40
|
-
@y_acceleration.to_f/
|
40
|
+
@y_acceleration.to_f/1000
|
41
41
|
end
|
42
42
|
|
43
43
|
def z_acceleration
|
44
|
-
@z_acceleration.to_f/
|
44
|
+
@z_acceleration.to_f/1000
|
45
45
|
end
|
46
46
|
|
47
47
|
def csv_line
|
data/lib/comtec-dr/version.rb
CHANGED