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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13877684972454db0a5b1d1e7e6d9c55caf802ce
4
- data.tar.gz: 7e459b43420eb05da8dd959850f38c8a8bea83ff
3
+ metadata.gz: 6bdc87ba7a9821800fa64c52655a0201f9a9e04a
4
+ data.tar.gz: 212b05657e9fcae28b40c4f35c4ecac881cf75c4
5
5
  SHA512:
6
- metadata.gz: cea2197e32e8c2d5b2f6e03aac6f98ced5e3add087e2f45ec0123eb2cb9dbfdf2d8496f49db69aa01aba13d86c15027690965b20b776676436e9900653be6e81
7
- data.tar.gz: fe8b364b3314f3051e6af17b1d7a38f70e168cb8842380180f4851999886a68219985dd5d8554ddfe4d3758098f2f2ceac8b35b7536d7c4d176a4ab31e971bd4
6
+ metadata.gz: a7b0bfbc1e61146947a58229ced5f2c7e5603b51859bcf67cdc6f8181fe6036b12f4d862f50b677d94944bd5a813da7a41ed07e669099187193a09de8fa60dad
7
+ data.tar.gz: 710ef525658f2061a58228e86ebab0d90633107a0578db371e8f3fc97ddd11f5c561d6d0c7a792d1180f02b14e4ec1edaf324c2be491989cbc201cdc5113af5d
data/README.md CHANGED
@@ -1,15 +1,13 @@
1
1
  # ComtecDr
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/comtec_dr`. To experiment with that code, run `bin/console` for an interactive prompt.
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 'comtec_dr'
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 comtec_dr
19
+ $ gem install comtec-dr
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
23
+ movファイルもしくはディレクトリを引数に取ることが出来ます
28
24
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
25
+ ### CSVデータで取り出し
30
26
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
27
+ ```
28
+ comtec_mov_to_csv /Volumes/NO\ NAME/DCIM/20171005_003/007_130755_G.MOV
29
+ ```
32
30
 
33
- ## Contributing
31
+ ```
32
+ comtec_mov_to_csv /Volumes/NO\ NAME/DCIM/20171005_003
33
+ ```
34
34
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/comtec_dr.
35
+ ### GPXデータで取り出し
36
36
 
37
- ## License
37
+ ```
38
+ comtec_mov_to_gpx /Volumes/NO\ NAME/DCIM/20171005_003/007_130755_G.MOV
39
+ ```
38
40
 
39
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+ ```
42
+ comtec_mov_to_gpx /Volumes/NO\ NAME/DCIM/20171005_003
43
+ ```
@@ -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
@@ -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
@@ -33,15 +33,15 @@ class GpsLog
33
33
  end
34
34
 
35
35
  def x_acceleration
36
- @x_acceleration.to_f/10000
36
+ @x_acceleration.to_f/1000
37
37
  end
38
38
 
39
39
  def y_acceleration
40
- @y_acceleration.to_f/10000
40
+ @y_acceleration.to_f/1000
41
41
  end
42
42
 
43
43
  def z_acceleration
44
- @z_acceleration.to_f/10000
44
+ @z_acceleration.to_f/1000
45
45
  end
46
46
 
47
47
  def csv_line
@@ -1,6 +1,6 @@
1
1
  module ComtecDR
2
2
  MAJOR = 0
3
- MINOR = 4
3
+ MINOR = 6
4
4
  PATCH = 0
5
5
  VERSION = [MAJOR, MINOR, PATCH].compact.join('.')
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comtec-dr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shogo Kawaguchi