mk_coord 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +9 -0
- data/Guardfile +42 -0
- data/LICENSE.txt +21 -0
- data/README.md +81 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/mk_coord +26 -0
- data/lib/mk_coord/const.rb +11 -0
- data/lib/mk_coord/matrix.rb +102 -0
- data/lib/mk_coord/trigonometric.rb +84 -0
- data/lib/mk_coord/version.rb +3 -0
- data/lib/mk_coord.rb +59 -0
- data/mk_coord.gemspec +33 -0
- metadata +104 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 057fe547daa1b16ae2cc6ee1d096bb05624f53c1
|
4
|
+
data.tar.gz: 25945cca78c92dca05268b5be3802f56bc53c972
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 16b4b5547a73286dc8d56bc17fa5df76c59f01853a747472266385bba6aebc1b118136e026f79c3330700abbab03ce270777d40f14e85e9501038980fa05e228
|
7
|
+
data.tar.gz: f21b48b716863f1358164e0b4ec02fafdd2005a8319e223fff02c6ec73091aea3c0c68e7cca0efa8edb5c2e826e00a32c856a6c4b20e23aad34c1260f612de37
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
5
|
+
# directories %w(app lib config test spec features) \
|
6
|
+
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
+
|
8
|
+
## Note: if you are using the `directories` clause above and you are not
|
9
|
+
## watching the project directory ('.'), then you will want to move
|
10
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
+
#
|
12
|
+
# $ mkdir config
|
13
|
+
# $ mv Guardfile config/
|
14
|
+
# $ ln -s config/Guardfile .
|
15
|
+
#
|
16
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
+
|
18
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
19
|
+
# rspec may be run, below are examples of the most common uses.
|
20
|
+
# * bundler: 'bundle exec rspec'
|
21
|
+
# * bundler binstubs: 'bin/rspec'
|
22
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
23
|
+
# installed the spring binstubs per the docs)
|
24
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
25
|
+
# * 'just' rspec: 'rspec'
|
26
|
+
|
27
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
28
|
+
require "guard/rspec/dsl"
|
29
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
30
|
+
|
31
|
+
# Feel free to open issues for suggestions and improvements
|
32
|
+
|
33
|
+
# RSpec files
|
34
|
+
rspec = dsl.rspec
|
35
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
36
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
37
|
+
watch(rspec.spec_files)
|
38
|
+
|
39
|
+
# Ruby files
|
40
|
+
ruby = dsl.ruby
|
41
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
42
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Masaru Koizumi
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
# MkCoord
|
2
|
+
|
3
|
+
## Introduction
|
4
|
+
|
5
|
+
This is the gem library which converts coordinates.
|
6
|
+
|
7
|
+
## Computable items
|
8
|
+
|
9
|
+
* Rectangular position:
|
10
|
+
- Equator coordinates -> Ecliptic coordinates
|
11
|
+
- Ecliptic coordinates -> Equator coordinates
|
12
|
+
* Polar position:
|
13
|
+
- Equator coordinates -> Ecliptic coordinates
|
14
|
+
- Ecliptic coordinates -> Equator coordinates
|
15
|
+
* Rectangular coordinates -> Polar coordinates
|
16
|
+
* Polar coordinates -> Rectangular coordinates
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
Add this line to your application's Gemfile:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
gem 'mk_coord'
|
24
|
+
```
|
25
|
+
|
26
|
+
And then execute:
|
27
|
+
|
28
|
+
$ bundle
|
29
|
+
|
30
|
+
Or install it yourself as:
|
31
|
+
|
32
|
+
$ gem install mk_coord
|
33
|
+
|
34
|
+
## Usage
|
35
|
+
|
36
|
+
require 'mk_coord'
|
37
|
+
|
38
|
+
eps = 0.409
|
39
|
+
pos_rect = [
|
40
|
+
0.99443659220700997281,
|
41
|
+
-0.03816291768957833647,
|
42
|
+
-0.01655177670960058384
|
43
|
+
]
|
44
|
+
pos_pol = [
|
45
|
+
6.24482770879939,
|
46
|
+
-0.016630599800372015
|
47
|
+
]
|
48
|
+
r = 0.9951686008947793
|
49
|
+
p pos_rect
|
50
|
+
p pos_pol
|
51
|
+
p r
|
52
|
+
puts "---"
|
53
|
+
p MkCoord.rect_eq2ec(pos_rect, eps)
|
54
|
+
p MkCoord.rect_ec2eq(pos_rect, eps)
|
55
|
+
p MkCoord.pol_eq2ec(pos_pol, eps)
|
56
|
+
p MkCoord.pol_ec2eq(pos_pol, eps)
|
57
|
+
p MkCoord.rect2pol(pos_rect)
|
58
|
+
p MkCoord.pol2rect(pos_pol, r)
|
59
|
+
|
60
|
+
About the units:
|
61
|
+
|
62
|
+
* The unit of epsilon(eps) should be radian.
|
63
|
+
* The unit of polar postion(pos_pol) should be radian.
|
64
|
+
* Everything is good for the unit of rectangular postion(pos_pol).
|
65
|
+
* Everything is good for the unit of distance(r).
|
66
|
+
|
67
|
+
## Development
|
68
|
+
|
69
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
70
|
+
|
71
|
+
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).
|
72
|
+
|
73
|
+
## Contributing
|
74
|
+
|
75
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/komasaru/mk_coord.
|
76
|
+
|
77
|
+
|
78
|
+
## License
|
79
|
+
|
80
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
81
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "mk_coord"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/exe/mk_coord
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "mk_coord"
|
4
|
+
|
5
|
+
eps = 23.43929 * MkCoord::Const::PI / 180.0
|
6
|
+
pos_rect = [
|
7
|
+
0.99443659220700997281,
|
8
|
+
-0.03816291768957833647,
|
9
|
+
-0.01655177670960058384
|
10
|
+
]
|
11
|
+
pos_pol = [
|
12
|
+
6.24482770879939,
|
13
|
+
-0.016630599800372015
|
14
|
+
]
|
15
|
+
r = 0.9951686008947793
|
16
|
+
p pos_rect
|
17
|
+
p pos_pol
|
18
|
+
p r
|
19
|
+
puts "---"
|
20
|
+
p MkCoord.rect_eq2ec(pos_rect, eps)
|
21
|
+
p MkCoord.rect_ec2eq(pos_rect, eps)
|
22
|
+
p MkCoord.pol_eq2ec(pos_pol, eps)
|
23
|
+
p MkCoord.pol_ec2eq(pos_pol, eps)
|
24
|
+
p MkCoord.rect2pol(pos_rect)
|
25
|
+
p MkCoord.pol2rect(pos_pol, r)
|
26
|
+
|
@@ -0,0 +1,102 @@
|
|
1
|
+
module MkCoord
|
2
|
+
module Matrix
|
3
|
+
module_function
|
4
|
+
|
5
|
+
#=========================================================================
|
6
|
+
# 回転行列(x 軸中心)
|
7
|
+
#
|
8
|
+
# @param: phi (回転量(rad))
|
9
|
+
# @param: r (回転行列)
|
10
|
+
# @return: r_a (回転後)
|
11
|
+
#=========================================================================
|
12
|
+
def r_x(phi, r = R_UNIT)
|
13
|
+
r_a = Array.new
|
14
|
+
|
15
|
+
begin
|
16
|
+
s, c = Math.sin(phi), Math.cos(phi)
|
17
|
+
a10 = c * r[1][0] + s * r[2][0]
|
18
|
+
a11 = c * r[1][1] + s * r[2][1]
|
19
|
+
a12 = c * r[1][2] + s * r[2][2]
|
20
|
+
a20 = - s * r[1][0] + c * r[2][0]
|
21
|
+
a21 = - s * r[1][1] + c * r[2][1]
|
22
|
+
a22 = - s * r[1][2] + c * r[2][2]
|
23
|
+
r_a << r[0]
|
24
|
+
r_a << [a10, a11, a12]
|
25
|
+
r_a << [a20, a21, a22]
|
26
|
+
return r_a
|
27
|
+
rescue => e
|
28
|
+
raise
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
#=========================================================================
|
33
|
+
# 回転行列(y 軸中心)
|
34
|
+
#
|
35
|
+
# @param: theta (回転量(rad))
|
36
|
+
# @param: r (回転行列)
|
37
|
+
# @return: r_a (回転後)
|
38
|
+
#=========================================================================
|
39
|
+
def r_y(theta, r = R_UNIT)
|
40
|
+
r_a = Array.new
|
41
|
+
|
42
|
+
begin
|
43
|
+
s, c = Math.sin(theta), Math.cos(theta)
|
44
|
+
a00 = c * r[0][0] - s * r[2][0]
|
45
|
+
a01 = c * r[0][1] - s * r[2][1]
|
46
|
+
a02 = c * r[0][2] - s * r[2][2]
|
47
|
+
a20 = s * r[0][0] + c * r[2][0]
|
48
|
+
a21 = s * r[0][1] + c * r[2][1]
|
49
|
+
a22 = s * r[0][2] + c * r[2][2]
|
50
|
+
r_a << [a00, a01, a02]
|
51
|
+
r_a << r[1]
|
52
|
+
r_a << [a20, a21, a22]
|
53
|
+
return r_a
|
54
|
+
rescue => e
|
55
|
+
raise
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
#=========================================================================
|
60
|
+
# 回転行列(z 軸中心)
|
61
|
+
#
|
62
|
+
# @param: psi (回転量(rad))
|
63
|
+
# @param: r (回転行列)
|
64
|
+
# @return: r_a (回転後)
|
65
|
+
#=========================================================================
|
66
|
+
def r_z(psi, r = R_UNIT)
|
67
|
+
r_a = Array.new
|
68
|
+
|
69
|
+
begin
|
70
|
+
s, c = Math.sin(psi), Math.cos(psi)
|
71
|
+
a00 = c * r[0][0] + s * r[1][0];
|
72
|
+
a01 = c * r[0][1] + s * r[1][1];
|
73
|
+
a02 = c * r[0][2] + s * r[1][2];
|
74
|
+
a10 = - s * r[0][0] + c * r[1][0];
|
75
|
+
a11 = - s * r[0][1] + c * r[1][1];
|
76
|
+
a12 = - s * r[0][2] + c * r[1][2];
|
77
|
+
r_a << [a00, a01, a02]
|
78
|
+
r_a << [a10, a11, a12]
|
79
|
+
r_a << r[2]
|
80
|
+
return r_a
|
81
|
+
rescue => e
|
82
|
+
raise
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
#=========================================================================
|
87
|
+
# 座標回転
|
88
|
+
#
|
89
|
+
# @param: r (回転行列)
|
90
|
+
# @param: pos (回転前直角座標)
|
91
|
+
# @return: pos_r (回転後直角座標)
|
92
|
+
#=========================================================================
|
93
|
+
def rotate(r, pos)
|
94
|
+
return (0..2).map do |i|
|
95
|
+
(0..2).inject(0) { |sum, j| sum + r[i][j] * pos[j] }
|
96
|
+
end
|
97
|
+
rescue => e
|
98
|
+
raise
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
@@ -0,0 +1,84 @@
|
|
1
|
+
module MkCoord
|
2
|
+
module Trigonometric
|
3
|
+
module_function
|
4
|
+
|
5
|
+
#=========================================================================
|
6
|
+
# λ の計算
|
7
|
+
#
|
8
|
+
# * λ = arctan((sinδ sinε + cosδ sinα cosε ) / cosδ cosα)
|
9
|
+
#
|
10
|
+
# @param: alpha (unit: rad)
|
11
|
+
# @param: delta (unit: rad)
|
12
|
+
# @param: eps (unit: rad)
|
13
|
+
# @return: lambda (unit: rad)
|
14
|
+
#=========================================================================
|
15
|
+
def compute_lambda(alpha, delta, eps)
|
16
|
+
a = Math.sin(delta) * Math.sin(eps) \
|
17
|
+
+ Math.cos(delta) * Math.sin(alpha) * Math.cos(eps)
|
18
|
+
b = Math.cos(delta) * Math.cos(alpha)
|
19
|
+
lambda = Math.atan2(a, b)
|
20
|
+
lambda %= PI2 if lambda < 0
|
21
|
+
return lambda
|
22
|
+
rescue => e
|
23
|
+
raise
|
24
|
+
end
|
25
|
+
|
26
|
+
#=========================================================================
|
27
|
+
# β の計算
|
28
|
+
#
|
29
|
+
# * β = arcsisn((sinδ cosε - cosδ sinα sinε )
|
30
|
+
#
|
31
|
+
# @param: alpha (unit: rad)
|
32
|
+
# @param: delta (unit: rad)
|
33
|
+
# @param: eps (unit: rad)
|
34
|
+
# @return: lambda (unit: rad)
|
35
|
+
#=========================================================================
|
36
|
+
def compute_beta(alpha, delta, eps)
|
37
|
+
a = Math.sin(delta) * Math.cos(eps) \
|
38
|
+
- Math.cos(delta) * Math.sin(alpha) * Math.sin(eps)
|
39
|
+
return Math.asin(a)
|
40
|
+
rescue => e
|
41
|
+
raise
|
42
|
+
end
|
43
|
+
|
44
|
+
#=========================================================================
|
45
|
+
# α の計算
|
46
|
+
#
|
47
|
+
# * α = arctan((-sinβ sinε + cosβ sinλ cosε ) / cosβ cosλ)
|
48
|
+
#
|
49
|
+
# @param: lambda (unit: rad)
|
50
|
+
# @param: beta (unit: rad)
|
51
|
+
# @param: eps (unit: rad)
|
52
|
+
# @return: alpha (unit: rad)
|
53
|
+
#=========================================================================
|
54
|
+
def compute_alpha(lambda, beta, eps)
|
55
|
+
a = -Math.sin(beta) * Math.sin(eps) \
|
56
|
+
+ Math.cos(beta) * Math.sin(lambda) * Math.cos(eps)
|
57
|
+
b = Math.cos(beta) * Math.cos(lambda)
|
58
|
+
alpha = Math.atan2(a, b)
|
59
|
+
alpha %= PI2 if a < 0
|
60
|
+
return alpha
|
61
|
+
rescue => e
|
62
|
+
raise
|
63
|
+
end
|
64
|
+
|
65
|
+
#=========================================================================
|
66
|
+
# δ の計算
|
67
|
+
#
|
68
|
+
# * δ = arcsisn((sinβ cosε + cosβ sinλ sinε )
|
69
|
+
#
|
70
|
+
# @param: lambda (unit: rad)
|
71
|
+
# @param: beta (unit: rad)
|
72
|
+
# @param: eps (unit: rad)
|
73
|
+
# @return: delta (unit: rad)
|
74
|
+
#=========================================================================
|
75
|
+
def compute_delta(lambda, beta, eps)
|
76
|
+
a = Math.sin(beta) * Math.cos(eps) \
|
77
|
+
+ Math.cos(beta) * Math.sin(lambda) * Math.sin(eps)
|
78
|
+
return Math.asin(a)
|
79
|
+
rescue => e
|
80
|
+
raise
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
data/lib/mk_coord.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
require "mk_coord/version"
|
2
|
+
require "mk_coord/const"
|
3
|
+
require "mk_coord/matrix"
|
4
|
+
require "mk_coord/trigonometric"
|
5
|
+
include MkCoord::Const
|
6
|
+
include MkCoord::Matrix
|
7
|
+
include MkCoord::Trigonometric
|
8
|
+
|
9
|
+
module MkCoord
|
10
|
+
def self.rect_eq2ec(rect_eq, eps)
|
11
|
+
mtx = r_x(eps)
|
12
|
+
return rotate(mtx, rect_eq)
|
13
|
+
rescue => e
|
14
|
+
raise
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.rect_ec2eq(rect_ec, eps)
|
18
|
+
mtx = r_x(-eps)
|
19
|
+
return rotate(mtx, rect_ec)
|
20
|
+
rescue => e
|
21
|
+
raise
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.pol_eq2ec(pol_eq, eps)
|
25
|
+
lambda = compute_lambda(*pol_eq, eps)
|
26
|
+
beta = compute_beta(*pol_eq, eps)
|
27
|
+
return [lambda, beta]
|
28
|
+
rescue => e
|
29
|
+
raise
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.pol_ec2eq(pol_ec, eps)
|
33
|
+
alpha = compute_alpha(*pol_ec, eps)
|
34
|
+
delta = compute_delta(*pol_ec, eps)
|
35
|
+
return [alpha, delta]
|
36
|
+
rescue => e
|
37
|
+
raise
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.rect2pol(rect)
|
41
|
+
x, y, z = rect
|
42
|
+
r = Math.sqrt(x * x + y * y)
|
43
|
+
lambda = Math.atan2(y, x)
|
44
|
+
phi = Math.atan2(z, r)
|
45
|
+
lambda %= PI2 if lambda < 0
|
46
|
+
return [lambda, phi]
|
47
|
+
rescue => e
|
48
|
+
raise
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.pol2rect(pol, r)
|
52
|
+
lambda, phi = pol
|
53
|
+
mtx = r_y(lambda)
|
54
|
+
mtx = r_z(phi, mtx)
|
55
|
+
return rotate(mtx, [r, 0.0, 0.0])
|
56
|
+
rescue => e
|
57
|
+
raise
|
58
|
+
end
|
59
|
+
end
|
data/mk_coord.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'mk_coord/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "mk_coord"
|
8
|
+
spec.version = MkCoord::VERSION
|
9
|
+
spec.authors = ["komasaru"]
|
10
|
+
spec.email = ["masaru@mk-mode.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Coordinate conversion library.}
|
13
|
+
spec.description = %q{This is a coordinate conversion library.}
|
14
|
+
spec.homepage = "https://github.com/komasaru/mk_coord"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
#if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
#else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
#end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mk_coord
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- komasaru
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-07-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.12'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.12'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description: This is a coordinate conversion library.
|
56
|
+
email:
|
57
|
+
- masaru@mk-mode.com
|
58
|
+
executables:
|
59
|
+
- mk_coord
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- ".rspec"
|
65
|
+
- ".travis.yml"
|
66
|
+
- Gemfile
|
67
|
+
- Guardfile
|
68
|
+
- LICENSE.txt
|
69
|
+
- README.md
|
70
|
+
- Rakefile
|
71
|
+
- bin/console
|
72
|
+
- bin/setup
|
73
|
+
- exe/mk_coord
|
74
|
+
- lib/mk_coord.rb
|
75
|
+
- lib/mk_coord/const.rb
|
76
|
+
- lib/mk_coord/matrix.rb
|
77
|
+
- lib/mk_coord/trigonometric.rb
|
78
|
+
- lib/mk_coord/version.rb
|
79
|
+
- mk_coord.gemspec
|
80
|
+
homepage: https://github.com/komasaru/mk_coord
|
81
|
+
licenses:
|
82
|
+
- MIT
|
83
|
+
metadata: {}
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
requirements: []
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 2.6.6
|
101
|
+
signing_key:
|
102
|
+
specification_version: 4
|
103
|
+
summary: Coordinate conversion library.
|
104
|
+
test_files: []
|