tuscan 0.0.3 → 0.0.6

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: 948c01cc438d0840c2d9f905accded3215c9f606
4
- data.tar.gz: c4b2e1ab5c2db49de85d2beb6ca2ff454915e1af
3
+ metadata.gz: 3728f465a1aabd2f4b350998fa2eedaf9c9ef59c
4
+ data.tar.gz: d62b8f0be3a3c579dca8b8ca7d8c2200860d5e28
5
5
  SHA512:
6
- metadata.gz: 6fbc61cc1b7badcd7db81487f069719927d7400cb9b2cc4fc22b4ad49101caa88a2a4ddc5ef6ec945350fa3a4d07c95fdd9d5a6c1f532fbbccda0560e64ac15e
7
- data.tar.gz: 1b16e2a96b9ab7237e9fe3280757d64ade3c79a8c315f22af5398cda4f7d921f36584e681ada261eff4bb943ca742eea1a60b5f52a5695707e1562c030118f66
6
+ metadata.gz: 61a0dc1c6b9e651948ce5f8e68cc3c58f00177e57fd04c0cb8cc5da762f0ef6fc6a8c5c94c2e11cfc8ff50c253eba5a441592278da044c0a26d2d77c03e2bb21
7
+ data.tar.gz: 69299ceb7829cf0bb2ac30fe5285358901e5ecf7135f568c8e11012d5d54aa92d3fcab513872c7b8410a361372c25cdfe7fd830844e327435391578ac9da0b79
data/README.md CHANGED
@@ -55,7 +55,7 @@ Tuscan.res(:iec60751, t: 10, r0: 99.876, a:3.9083e-03, b:-5.7750e-07, c:-4.1830e
55
55
  **IEC 60584**
56
56
  ```ruby
57
57
  Tuscan.t90r(:iec60584, emf: 1.234, type: :k) # emf im mV
58
- Tuscan.emfir(:iec60584, t: 10.123, type: :k) # t90 in ºC
58
+ Tuscan.emfr(:iec60584, t: 10.123, type: :k) # t90 in ºC
59
59
  ```
60
60
 
61
61
 
@@ -0,0 +1,38 @@
1
+ module Tuscan
2
+ module Iec60584
3
+ module TypeB
4
+ T90_RANGE = 60.0..1820.00
5
+ EMF_RANGE = 0.290..13.821
6
+ extend self
7
+
8
+ def emfr_unbound t90
9
+ if t90 < 630.615
10
+ Polynomial.new(
11
+ 0.000000000000e+00, -0.246508183460e-03, 0.590404211710e-05, -0.132579316360e-08,
12
+ 0.156682919010e-11, -0.169445292400e-14, 0.629903470940e-18
13
+ ).solve_for t90
14
+ else
15
+ Polynomial.new(
16
+ -0.389381686210e+01, 0.285717474700e-01, -0.848851047850e-04, 0.157852801640e-06,
17
+ -0.168353448640e-09, 0.111097940130e-12, -0.445154310330e-16, 0.989756408210e-20,
18
+ -0.937913302890e-24
19
+ ).solve_for t90
20
+ end
21
+ end
22
+
23
+ def t90r_guess emf
24
+ if emf < 2.431
25
+ Polynomial.new(
26
+ 9.8423321e+01, 6.9971500e+02, -8.4765304e+02, 1.0052644e+03, -8.3345952e+02,
27
+ 4.5508542e+02, -1.5523037e+02, 2.9886750e+01, -2.4742860e+00
28
+ ).solve_for emf
29
+ else
30
+ Polynomial.new(
31
+ 2.1315071e+02, 2.8510504e+02, -5.2742887e+01, 9.9160804e+00, -1.2965303e+00,
32
+ 1.1195870e-01, -6.0625199e-03, 1.8661696e-04, -2.4878585e-06
33
+ ).solve_for emf
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,17 @@
1
+ module Tuscan
2
+ module Iec60584
3
+ module TypeC
4
+ T90_RANGE = 0.0..2320.0
5
+ EMF_RANGE = nil
6
+
7
+ extend self
8
+
9
+ def emfr_unbound t90
10
+ Polynomial.new(
11
+ -3.109077870000e-04, 1.338547130000e-02, 1.226236040000e-05, -1.050537530000e-08,
12
+ 3.613274640000e-12, -4.990804550000e-16, 6.434651840000e-22
13
+ ).solve_for t90
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,42 @@
1
+ module Tuscan
2
+ module Iec60584
3
+ module TypeE
4
+ T90_RANGE = -270.0..1000.0
5
+ EMF_RANGE = -8.825..76.373
6
+
7
+ extend self
8
+
9
+ def emfr_unbound t90
10
+ if t90 < 0.0
11
+ Polynomial.new(
12
+ 0.000000000000e+00, 0.586655087080e-01, 0.454109771240e-04, -0.779980486860e-06,
13
+ -0.258001608430e-07, -0.594525830570e-09, -0.932140586670e-11, -0.102876055340e-12,
14
+ -0.803701236210e-15, -0.439794973910e-17, -0.164147763550e-19, -0.396736195160e-22,
15
+ -0.558273287210e-25, -0.346578420130e-28
16
+ ).solve_for t90
17
+ else
18
+ Polynomial.new(
19
+ 0.000000000000e+00, 0.586655087100e-01, 0.450322755820e-04, 0.289084072120e-07,
20
+ -0.330568966520e-09, 0.650244032700e-12, -0.191974955040e-15, -0.125366004970e-17,
21
+ 0.214892175690e-20, -0.143880417820e-23, 0.359608994810e-27
22
+ ).solve_for t90
23
+ end
24
+ end
25
+
26
+ def t90r_guess emf
27
+ if emf < 0.0
28
+ Polynomial.new(
29
+ 0.0000000e+00, 1.6977288e+01, -4.3514970e-01, -1.5859697e-01, -9.2502871e-02,
30
+ -2.6084314e-02, -4.1360199e-03, -3.4034030e-04, -1.1564890e-05, 0.0000000e+00
31
+ ).solve_for emf
32
+ else
33
+ Polynomial.new(
34
+ 0.0000000e+00, 1.7057035e+01, -2.3301759e-01, 6.5435585e-03, -7.3562749e-05,
35
+ -1.7896001e-06, 8.4036165e-08, -1.3735879e-09, 1.0629823e-11, -3.2447087e-14
36
+ ).solve_for emf
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+
@@ -0,0 +1,45 @@
1
+ module Tuscan
2
+ module Iec60584
3
+ module TypeJ
4
+ T90_RANGE = -210.0..1200.0
5
+ EMF_RANGE = -8.096..69.554
6
+
7
+ extend self
8
+
9
+ def emfr_unbound t90
10
+ if t90 < 760.0
11
+ Polynomial.new(
12
+ 0.000000000000e+00, 0.503811878150e-01, 0.304758369300e-04, -0.856810657200e-07,
13
+ 0.132281952950e-09, -0.170529583370e-12, 0.209480906970e-15, -0.125383953360e-18,
14
+ 0.156317256970e-22
15
+ ).solve_for t90
16
+ else
17
+ Polynomial.new(
18
+ 0.296456256810e+03, -0.149761277860e+01, 0.317871039240e-02, -0.318476867010e-05,
19
+ 0.157208190040e-08, -0.306913690560e-12
20
+ ).solve_for t90
21
+ end
22
+ end
23
+
24
+ def t90r_guess emf
25
+ if emf < 0.0
26
+ Polynomial.new(
27
+ 0.0000000e+00, 1.9528268e+01, -1.2286185e+00, -1.0752178e+00, -5.9086933e-01,
28
+ -1.7256713e-01, -2.8131513e-02, -2.3963370e-03, -8.3823321e-05
29
+ ).solve_for emf
30
+ elsif emf < 42.919
31
+ Polynomial.new(
32
+ 0.000000e+00, 1.978425e+01, -2.001204e-01, 1.036969e-02, -2.549687e-04,
33
+ 3.585153e-06, -5.344285e-08, 5.099890e-10
34
+ ).solve_for emf
35
+ else
36
+ Polynomial.new(
37
+ -3.11358187e+03, 3.00543684e+02, -9.94773230e+00, 1.70276630e-01, -1.43033468e-03,
38
+ 4.73886084e-06
39
+ ).solve_for emf
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+
@@ -0,0 +1,50 @@
1
+ module Tuscan
2
+ module Iec60584
3
+ module TypeK
4
+ T90_RANGE = -270.0..1372.0
5
+ EMF_RANGE = -5.892..54.887
6
+
7
+ include Math
8
+
9
+ extend self
10
+
11
+ def emfr_unbound t90
12
+ if t90 < 0.0
13
+ Polynomial.new(
14
+ 0.000000000000e+00, 0.394501280250e-01, 0.236223735980e-04, -0.328589067840e-06,
15
+ -0.499048287770e-08, -0.675090591730e-10, -0.574103274280e-12, -0.310888728940e-14,
16
+ -0.104516093650e-16, -0.198892668780e-19, -0.163226974860e-22
17
+ ).solve_for t90
18
+ else
19
+ Polynomial.new(
20
+ -0.176004136860e-01, 0.389212049750e-01, 0.185587700320e-04, -0.994575928740e-07,
21
+ 0.318409457190e-09, -0.560728448890e-12, 0.560750590590e-15, -0.320207200030e-18,
22
+ 0.971511471520e-22, -0.121047212750e-25
23
+ ).solve_for(t90) +
24
+ 0.1185976e+00 * exp(-0.1183432e-03 * (t90 - 0.1269686e+03)**2)
25
+ end
26
+ end
27
+
28
+ def t90r_guess emf
29
+ if emf < 0.0
30
+ Polynomial.new(
31
+ 0.0000000e+00, 2.5173462e+01, -1.1662878e+00, -1.0833638e+00, -8.9773540e-01,
32
+ -3.7342377e-01, -8.6632643e-02, -1.0450598e-02, -5.1920577e-04
33
+ ).solve_for emf
34
+ elsif emf < 20.644
35
+ Polynomial.new(
36
+ 0.000000e+00, 2.508355e+01, 7.860106e-02, -2.503131e-01, 8.315270e-02,
37
+ -1.228034e-02, 9.804036e-04, -4.413030e-05,
38
+ 1.057734e-06, -1.052755e-08
39
+ ).solve_for emf
40
+ else
41
+ Polynomial.new(
42
+ -1.318058e+02, 4.830222e+01, -1.646031e+00, 5.464731e-02, -9.650715e-04,
43
+ 8.802193e-06, -3.110810e-08
44
+ ).solve_for emf
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
@@ -0,0 +1,46 @@
1
+ module Tuscan
2
+ module Iec60584
3
+ module TypeN
4
+ T90_RANGE = -270.0..1300.0
5
+ EMF_RANGE = -3.991..47.513
6
+
7
+ extend self
8
+
9
+ def emfr_unbound t90
10
+ if t90 < 0.0
11
+ Polynomial.new(
12
+ 0.000000000000e+00, 0.261591059620e-01, 0.109574842280e-04, -0.938411115540e-07,
13
+ -0.464120397590e-10, -0.263033577160e-11, -0.226534380030e-13, -0.760893007910e-16,
14
+ -0.934196678350e-19
15
+ ).solve_for t90
16
+ else
17
+ Polynomial.new(
18
+ 0.000000000000e+00, 0.259293946010e-01, 0.157101418800e-04, 0.438256272370e-07,
19
+ -0.252611697940e-09, 0.643118193390e-12, -0.100634715190e-14, 0.997453389920e-18,
20
+ -0.608632456070e-21, 0.208492293390e-24, -0.306821961510e-28
21
+ ).solve_for t90
22
+ end
23
+ end
24
+
25
+ def t90r_guess emf
26
+ if emf < 0.0
27
+ Polynomial.new(
28
+ 0.0000000e+00, 3.8436847e+01, 1.1010485e+00, 5.2229312e+00, 7.2060525e+00,
29
+ 5.8488586e+00, 2.7754916e+00, 7.7075166e-01, 1.1582665e-01, 7.3138868e-03
30
+ ).solve_for emf
31
+ elsif emf < 20.613
32
+ Polynomial.new(
33
+ 0.00000e+00, 3.86896e+01, -1.08267e+00, 4.70205e-02, -2.12169e-06,
34
+ -1.17272e-04, 5.39280e-06, -7.98156e-08
35
+ ).solve_for emf
36
+ else
37
+ Polynomial.new(
38
+ 1.972485e+01, 3.300943e+01, -3.915159e-01, 9.855391e-03, -1.274371e-04,
39
+ 7.767022e-07
40
+ ).solve_for emf
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+
@@ -0,0 +1,55 @@
1
+ module Tuscan
2
+ module Iec60584
3
+ module TypeR
4
+ T90_RANGE = -50.00..1768.10
5
+ EMF_RANGE = -0.227..21.103
6
+
7
+ extend self
8
+
9
+ def emfr_unbound t90
10
+ if t90 < 1064.18
11
+ Polynomial.new(
12
+ 0.000000000000e+00, 0.528961729765e-02, 0.139166589782e-04, -0.238855693017e-07,
13
+ 0.356916001063e-10, -0.462347666298e-13 , 0.500777441034e-16, -0.373105886191e-19,
14
+ 0.157716482367e-22, -0.281038625251e-26
15
+ ).solve_for t90
16
+ elsif t90 < 1664.50
17
+ Polynomial.new(
18
+ 0.295157925316e+01, -0.252061251332e-02, 0.159564501865e-04, -0.764085947576e-08,
19
+ 0.205305291024e-11, -0.293359668173e-15
20
+ ).solve_for t90
21
+ else
22
+ Polynomial.new(
23
+ 0.152232118209e+03, -0.268819888545e+00, 0.171280280471e-03, -0.345895706453e-07,
24
+ -0.934633971046e-14
25
+ ).solve_for t90
26
+ end
27
+ end
28
+
29
+ def t90r_guess emf
30
+ if emf < 1.923
31
+ Polynomial.new(
32
+ 0.0000000e+00, 1.8891380e+02, -9.3835290e+01, 1.3068619e+02, -2.2703580e+02,
33
+ 3.5145659e+02, -3.8953900e+02, 2.8239471e+02, -1.2607281e+02, 3.1353611e+01,
34
+ -3.3187769e+00
35
+ ).solve_for emf
36
+ elsif emf < 13.228
37
+ Polynomial.new(
38
+ 1.334584505e+01, 1.472644573e+02, -1.844024844e+01, 4.031129726e+00, -6.249428360e-01,
39
+ 6.468412046e-02, -4.458750426e-03, 1.994710149e-04, -5.313401790e-06, 6.481976217e-08
40
+ ).solve_for emf
41
+ elsif emf < 19.739
42
+ Polynomial.new(
43
+ -8.199599416e+01, 1.553962042e+02, -8.342197663e+00, 4.279433549e-01, -1.191577910e-02,
44
+ 1.492290091e-04
45
+ ).solve_for emf
46
+ else
47
+ Polynomial.new(
48
+ 3.406177836e+04, -7.023729171e+03, 5.582903813e+02, -1.952394635e+01, 2.560740231e-01
49
+ ).solve_for emf
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
@@ -0,0 +1,54 @@
1
+ module Tuscan
2
+ module Iec60584
3
+ module TypeS
4
+ T90_RANGE = -50.00..1768.10
5
+ EMF_RANGE = -0.236..18.693
6
+
7
+ extend self
8
+
9
+ def emfr_unbound t90
10
+ if t90 < 1064.18
11
+ Polynomial.new(
12
+ 0.000000000000e+00, 0.540313308631e-02, 0.125934289740e-04, -0.232477968689e-07,
13
+ 0.322028823036e-10, -0.331465196389e-13, 0.255744251786e-16, -0.125068871393e-19,
14
+ 0.271443176145e-23
15
+ ).solve_for t90
16
+ elsif t90 < 1664.50
17
+ Polynomial.new(
18
+ 0.132900444085e+01, 0.334509311344e-02, 0.654805192818e-05, -0.164856259209e-08,
19
+ 0.129989605174e-13
20
+ ).solve_for t90
21
+ else
22
+ Polynomial.new(
23
+ 0.146628232636e+03, -0.258430516752e+00, 0.163693574641e-03, -0.330439046987e-07,
24
+ -0.943223690612e-14
25
+ ).solve_for t90
26
+ end
27
+ end
28
+
29
+ def t90r_guess emf
30
+ if emf < 1.874
31
+ Polynomial.new(
32
+ 0.00000000e+00, 1.84949460e+02, -8.00504062e+01, 1.02237430e+02, -1.52248592e+02,
33
+ 1.88821343e+02, -1.59085941e+02, 8.23027880e+01, -2.34181944e+01, 2.79786260e+00
34
+ ).solve_for emf
35
+ elsif emf < 11.950
36
+ Polynomial.new(
37
+ 1.291507177e+01, 1.466298863e+02, -1.534713402e+01, 3.145945973e+00, -4.163257839e-01,
38
+ 3.187963771e-02, -1.291637500e-03, 2.183475087e-05, -1.447379511e-07, 8.211272125e-09
39
+ ).solve_for emf
40
+ elsif emf < 17.536
41
+ Polynomial.new(
42
+ -8.087801117e+01, 1.621573104e+02, -8.536869453e+00, 4.719686976e-01, -1.441693666e-02,
43
+ 2.081618890e-04
44
+ ).solve_for emf
45
+ else
46
+ Polynomial.new(
47
+ 5.333875126e+04, -1.235892298e+04, 1.092657613e+03, -4.265693686e+01, 6.247205420e-01
48
+ ).solve_for emf
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+
@@ -0,0 +1,41 @@
1
+ module Tuscan
2
+ module Iec60584
3
+ module TypeT
4
+ T90_RANGE = -270.0..400.0
5
+ EMF_RANGE = -5.603..20.872
6
+
7
+ extend self
8
+
9
+ def emfr_unbound t90
10
+ if t90 < 0.0
11
+ Polynomial.new(
12
+ 0.000000000000e+00, 0.387481063640e-01, 0.441944343470e-04, 0.118443231050e-06,
13
+ 0.200329735540e-07, 0.901380195590e-09, 0.226511565930e-10, 0.360711542050e-12,
14
+ 0.384939398830e-14, 0.282135219250e-16, 0.142515947790e-18, 0.487686622860e-21,
15
+ 0.107955392700e-23, 0.139450270620e-26, 0.797951539270e-30
16
+ ).solve_for t90
17
+ else
18
+ Polynomial.new(
19
+ 0.000000000000e+00, 0.387481063640e-01, 0.332922278800e-04, 0.206182434040e-06,
20
+ -0.218822568460e-08, 0.109968809280e-10, -0.308157587720e-13, 0.454791352900e-16,
21
+ -0.275129016730e-19
22
+ ).solve_for t90
23
+ end
24
+ end
25
+
26
+ def t90r_guess emf
27
+ if emf < 0.0
28
+ Polynomial.new(
29
+ 0.0000000e+00, 2.5949192e+01, -2.1316967e-01, 7.9018692e-01, 4.2527777e-01,
30
+ 1.3304473e-01, 2.0241446e-02, 1.2668171e-03
31
+ ).solve_for emf
32
+ else
33
+ Polynomial.new(
34
+ 0.000000e+00, 2.592800e+01, -7.602961e-01, 4.637791e-02, -2.165394e-03,
35
+ 6.048144e-05, -7.293422e-07
36
+ ).solve_for emf
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -1,391 +1,46 @@
1
+ require 'byebug'
2
+
1
3
  module Tuscan
2
4
  module Iec60584
3
- include Math
4
5
  extend self
5
6
 
7
+ def t90 emf, type:, a: 0.0, b: 0.0, c: 0.0, d: 0.0, err: 1e-3, num: 10
8
+ emfc = emf - emfdev(t90r(emf, type, err, num), a, b, c, d)
9
+ t90r emfc, type, err, num
10
+ end
11
+ alias_method :t, :t90
12
+ alias_method :temperature, :t90
6
13
 
7
- def emfr t90, type, range_check = true
8
- a = emf_a_coeffs t90, type
9
- result = emf_c_coeffs(t90, type).each_with_index.map{ |c,i| c*t90**i }.reduce(:+)
10
- result += a[0] * exp(a[1] * (t90 - a[2])**2)
14
+ def emfr t90, type
15
+ raise RangeError, 't90 is outside the valid range' if out_of_range? t90, type
16
+ emfr_unbound t90, type
11
17
  end
12
18
 
13
- def t90r emf, type, err: 1e-3, num: 100
19
+ def t90r emf, type, err, num
14
20
  guess = t90r_guess emf, type
15
- Rical.inverse_for f: method(:emfr), fargs: type,
16
- x0: guess - 0.5, x1: guess + 0.5,
17
- y: emf, method: :secant,
18
- num: num, err: err * 1e-3
21
+ Rical.inverse_for f: method(:emfr_unbound), fargs: type, x0: guess - 0.5, x1: guess + 0.5,
22
+ y: emf, method: :secant, num: num, err: err * 1e-3
19
23
  end
20
24
 
25
+ def emfdev t90, a, b, c, d
26
+ Polynomial.new(a, b, c, d).solve_for t90
27
+ end
21
28
 
22
29
  private
23
30
  def t90r_guess emf, type
24
- t90_coeffs(emf, type).each_with_index.map{ |d,i| d*emf**i }.reduce(:+)
25
- end
26
-
27
- def emf_c_coeffs t90, type
28
- case type
29
- when :b then emf_c_coeffs_b t90
30
- when :c then emf_c_coeffs_c t90
31
- when :e then emf_c_coeffs_e t90
32
- when :j then emf_c_coeffs_j t90
33
- when :k then emf_c_coeffs_k t90
34
- when :n then emf_c_coeffs_n t90
35
- when :r then emf_c_coeffs_r t90
36
- when :s then emf_c_coeffs_s t90
37
- when :t then emf_c_coeffs_t t90
38
- end
39
- end
40
-
41
- def emf_c_coeffs_b t90
42
- # 0.000..630.615
43
- # 630.615..1820.00
44
- if t90 < 630.615
45
- [ 0.000000000000e+00, -0.246508183460e-03, 0.590404211710e-05,
46
- -0.132579316360e-08, 0.156682919010e-11, -0.169445292400e-14,
47
- 0.629903470940e-18 ]
48
- else
49
- [ -0.389381686210e+01, 0.285717474700e-01, -0.848851047850e-04,
50
- 0.157852801640e-06, -0.168353448640e-09, 0.111097940130e-12,
51
- -0.445154310330e-16, 0.989756408210e-20, -0.937913302890e-24 ]
52
- end
53
- end
54
-
55
- def emf_c_coeffs_c t90
56
- # 0.0..2320.0
57
- [ -3.109077870000e-04, 1.338547130000e-02, 1.226236040000e-05,
58
- -1.050537530000e-08, 3.613274640000e-12, -4.990804550000e-16,
59
- 6.434651840000e-22 ]
60
- end
61
-
62
- def emf_c_coeffs_e t90
63
- # -270.0..0.0
64
- # 0.0..1000.0
65
- if t90 < 0.0
66
- [ 0.000000000000e+00, 0.586655087080e-01, 0.454109771240e-04,
67
- -0.779980486860e-06, -0.258001608430e-07, -0.594525830570e-09,
68
- -0.932140586670e-11, -0.102876055340e-12, -0.803701236210e-15,
69
- -0.439794973910e-17, -0.164147763550e-19, -0.396736195160e-22,
70
- -0.558273287210e-25, -0.346578420130e-28 ]
71
- else
72
- [ 0.000000000000e+00, 0.586655087100e-01, 0.450322755820e-04,
73
- 0.289084072120e-07, -0.330568966520e-09, 0.650244032700e-12,
74
- -0.191974955040e-15, -0.125366004970e-17, 0.214892175690e-20,
75
- -0.143880417820e-23, 0.359608994810e-27 ]
76
- end
77
- end
78
-
79
- def emf_c_coeffs_j t90
80
- # -210.0..760.0
81
- # 760.0..1200.0
82
- if t90 < 760.0
83
- [ 0.000000000000e+00, 0.503811878150e-01, 0.304758369300e-04,
84
- -0.856810657200e-07, 0.132281952950e-09, -0.170529583370e-12,
85
- 0.209480906970e-15, -0.125383953360e-18, 0.156317256970e-22 ]
86
- else
87
- [ 0.296456256810e+03, -0.149761277860e+01, 0.317871039240e-02,
88
- -0.318476867010e-05, 0.157208190040e-08, -0.306913690560e-12 ]
89
- end
90
- end
91
-
92
- def emf_c_coeffs_k t90
93
- # -270.0..0.0
94
- # 0.0..1372.0
95
- if t90 < 0.0
96
- [ 0.000000000000e+00, 0.394501280250e-01, 0.236223735980e-04,
97
- -0.328589067840e-06, -0.499048287770e-08, -0.675090591730e-10,
98
- -0.574103274280e-12, -0.310888728940e-14, -0.104516093650e-16,
99
- -0.198892668780e-19, -0.163226974860e-22 ]
100
- else
101
- [ -0.176004136860e-01, 0.389212049750e-01, 0.185587700320e-04,
102
- -0.994575928740e-07, 0.318409457190e-09, -0.560728448890e-12,
103
- 0.560750590590e-15, -0.320207200030e-18, 0.971511471520e-22,
104
- -0.121047212750e-25 ]
105
- end
106
- end
107
-
108
- def emf_c_coeffs_n t90
109
- # -270.0..0.0
110
- # 0.0..1300.0
111
- if t90 < 0.0
112
- [ 0.000000000000e+00, 0.261591059620e-01, 0.109574842280e-04,
113
- -0.938411115540e-07, -0.464120397590e-10, -0.263033577160e-11,
114
- -0.226534380030e-13, -0.760893007910e-16, -0.934196678350e-19 ]
115
- else
116
- [ 0.000000000000e+00, 0.259293946010e-01, 0.157101418800e-04,
117
- 0.438256272370e-07, -0.252611697940e-09, 0.643118193390e-12,
118
- -0.100634715190e-14, 0.997453389920e-18, -0.608632456070e-21,
119
- 0.208492293390e-24, -0.306821961510e-28 ]
120
- end
121
- end
122
-
123
- def emf_c_coeffs_r t90
124
- # -50.00..1064.18
125
- # 1064.18..1664.50
126
- # 1664.50..1768.10
127
- if t90 < 1064.18
128
- [ 0.000000000000e+00, 0.528961729765e-02, 0.139166589782e-04,
129
- -0.238855693017e-07, 0.356916001063e-10, -0.462347666298e-13,
130
- 0.500777441034e-16, -0.373105886191e-19, 0.157716482367e-22,
131
- -0.281038625251e-26 ]
132
- elsif t90 < 1664.50
133
- [ 0.295157925316e+01, -0.252061251332e-02, 0.159564501865e-04,
134
- -0.764085947576e-08, 0.205305291024e-11, -0.293359668173e-15 ]
135
- else
136
- [ 0.152232118209e+03, -0.268819888545e+00, 0.171280280471e-03,
137
- -0.345895706453e-07, -0.934633971046e-14 ]
138
- end
139
- end
140
-
141
- def emf_c_coeffs_s t90
142
- # -50.00..1064.18
143
- # 1064.18..1664.50
144
- # 1664.50..1768.10
145
- if t90 < 1064.18
146
- [ 0.000000000000e+00, 0.540313308631e-02, 0.125934289740e-04,
147
- -0.232477968689e-07, 0.322028823036e-10, -0.331465196389e-13,
148
- 0.255744251786e-16, -0.125068871393e-19, 0.271443176145e-23 ]
149
- elsif t90 < 1664.50
150
- [ 0.132900444085e+01, 0.334509311344e-02, 0.654805192818e-05,
151
- -0.164856259209e-08, 0.129989605174e-13 ]
152
- else
153
- [ 0.146628232636e+03, -0.258430516752e+00, 0.163693574641e-03,
154
- -0.330439046987e-07, -0.943223690612e-14 ]
155
- end
156
- end
157
-
158
- def emf_c_coeffs_t t90
159
- # -270.0..0.0
160
- # 0.0..400.0
161
- if t90 < 0.0
162
- [ 0.000000000000e+00, 0.387481063640e-01, 0.441944343470e-04,
163
- 0.118443231050e-06, 0.200329735540e-07, 0.901380195590e-09,
164
- 0.226511565930e-10, 0.360711542050e-12, 0.384939398830e-14,
165
- 0.282135219250e-16, 0.142515947790e-18, 0.487686622860e-21,
166
- 0.107955392700e-23, 0.139450270620e-26, 0.797951539270e-30 ]
167
- else
168
- [ 0.000000000000e+00, 0.387481063640e-01, 0.332922278800e-04,
169
- 0.206182434040e-06, -0.218822568460e-08, 0.109968809280e-10,
170
- -0.308157587720e-13, 0.454791352900e-16, -0.275129016730e-19 ]
171
- end
172
- end
173
-
174
- def emf_a_coeffs t90, type
175
- case type
176
- when :b then emf_a_coeffs_b t90
177
- when :c then emf_a_coeffs_c t90
178
- when :e then emf_a_coeffs_e t90
179
- when :j then emf_a_coeffs_j t90
180
- when :k then emf_a_coeffs_k t90
181
- when :n then emf_a_coeffs_n t90
182
- when :r then emf_a_coeffs_r t90
183
- when :s then emf_a_coeffs_s t90
184
- when :t then emf_a_coeffs_t t90
185
- end
186
- end
187
-
188
- def emf_a_coeffs_b t90
189
- [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00 ]
190
- end
191
-
192
- def emf_a_coeffs_c t90
193
- [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00 ]
194
- end
195
-
196
- def emf_a_coeffs_e t90
197
- [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00 ]
198
- end
199
-
200
- def emf_a_coeffs_j t90
201
- [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00 ]
202
- end
203
-
204
- def emf_a_coeffs_k t90
205
- if t90 < 0.0
206
- [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00 ]
207
- else
208
- [ 0.1185976e+00, -0.1183432e-03, 0.1269686e+03 ]
209
- end
210
- end
211
-
212
- def emf_a_coeffs_n t90
213
- [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00 ]
214
- end
215
-
216
- def emf_a_coeffs_r t90
217
- [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00 ]
218
- end
219
-
220
- def emf_a_coeffs_s t90
221
- [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00 ]
222
- end
223
-
224
- def emf_a_coeffs_t t90
225
- [ 0.0000000e+00, 0.0000000e+00, 0.0000000e+00 ]
226
- end
227
-
228
-
229
- def t90_coeffs emf, type
230
- case type
231
- when :b then t90_coeffs_b emf
232
- when :e then t90_coeffs_e emf
233
- when :j then t90_coeffs_j emf
234
- when :k then t90_coeffs_k emf
235
- when :n then t90_coeffs_n emf
236
- when :r then t90_coeffs_r emf
237
- when :s then t90_coeffs_s emf
238
- when :t then t90_coeffs_t emf
239
- end
240
- end
241
-
242
- def t90_coeffs_b emf
243
- # 0.290..2.431
244
- # 2.431..13.821
245
- if emf < 2.431
246
- [ 9.8423321e+01, 6.9971500e+02, -8.4765304e+02,
247
- 1.0052644e+03, -8.3345952e+02, 4.5508542e+02,
248
- -1.5523037e+02, 2.9886750e+01, -2.4742860e+00 ]
249
- else
250
- [ 2.1315071e+02, 2.8510504e+02, -5.2742887e+01,
251
- 9.9160804e+00, -1.2965303e+00, 1.1195870e-01,
252
- -6.0625199e-03, 1.8661696e-04, -2.4878585e-06 ]
253
- end
254
- end
255
-
256
- def t90_coeffs_e emf
257
- # -8.825..0.000
258
- # 0.000..76.373
259
- if emf < 0.0
260
- [ 0.0000000e+00, 1.6977288e+01, -4.3514970e-01,
261
- -1.5859697e-01, -9.2502871e-02, -2.6084314e-02,
262
- -4.1360199e-03, -3.4034030e-04, -1.1564890e-05,
263
- 0.0000000e+00 ]
264
- else
265
- [ 0.0000000e+00, 1.7057035e+01, -2.3301759e-01,
266
- 6.5435585e-03, -7.3562749e-05, -1.7896001e-06,
267
- 8.4036165e-08, -1.3735879e-09, 1.0629823e-11,
268
- -3.2447087e-14 ]
269
- end
270
- end
271
-
272
- def t90_coeffs_j emf
273
- # -8.096..0.000
274
- # 0.000..42.919
275
- # 42.919..69.554
276
- if emf < 0.0
277
- [ 0.0000000e+00, 1.9528268e+01, -1.2286185e+00,
278
- -1.0752178e+00, -5.9086933e-01, -1.7256713e-01,
279
- -2.8131513e-02, -2.3963370e-03, -8.3823321e-05 ]
280
- elsif emf < 42.919
281
- [ 0.000000e+00, 1.978425e+01, -2.001204e-01,
282
- 1.036969e-02, -2.549687e-04, 3.585153e-06,
283
- -5.344285e-08, 5.099890e-10 ]
284
- else
285
- [ -3.11358187e+03, 3.00543684e+02, -9.94773230e+00,
286
- 1.70276630e-01, -1.43033468e-03, 4.73886084e-06 ]
287
- end
288
- end
289
-
290
- def t90_coeffs_k emf
291
- # -5.892..0.000
292
- # 0.000..20.644
293
- # 20.644..54.887
294
- if emf < 0.0
295
- [ 0.0000000e+00, 2.5173462e+01, -1.1662878e+00,
296
- -1.0833638e+00, -8.9773540e-01, -3.7342377e-01,
297
- -8.6632643e-02, -1.0450598e-02, -5.1920577e-04 ]
298
- elsif emf < 20.644
299
- [ 0.000000e+00, 2.508355e+01, 7.860106e-02,
300
- -2.503131e-01, 8.315270e-02, -1.228034e-02,
301
- 9.804036e-04, -4.413030e-05, 1.057734e-06,
302
- -1.052755e-08 ]
303
- else
304
- [ -1.318058e+02, 4.830222e+01, -1.646031e+00,
305
- 5.464731e-02, -9.650715e-04, 8.802193e-06,
306
- -3.110810e-08 ]
307
- end
308
- end
309
-
310
- def t90_coeffs_n emf
311
- # -3.991..0.000
312
- # 0.000..20.613
313
- # 20.613..47.513
314
- if emf < 0.0
315
- [ 0.0000000e+00, 3.8436847e+01, 1.1010485e+00,
316
- 5.2229312e+00, 7.2060525e+00, 5.8488586e+00,
317
- 2.7754916e+00, 7.7075166e-01, 1.1582665e-01,
318
- 7.3138868e-03 ]
319
- elsif emf < 20.613
320
- [ 0.00000e+00, 3.86896e+01, -1.08267e+00,
321
- 4.70205e-02, -2.12169e-06, -1.17272e-04,
322
- 5.39280e-06, -7.98156e-08 ]
323
- else
324
- [ 1.972485e+01, 3.300943e+01, -3.915159e-01,
325
- 9.855391e-03, -1.274371e-04, 7.767022e-07 ]
326
- end
31
+ tc(type).t90r_guess emf
327
32
  end
328
33
 
329
- def t90_coeffs_r emf
330
- # -0.227..1.923
331
- # 1.923..13.228
332
- # 11.361..19.739
333
- # 19.739..21.103
334
- if emf < 1.923
335
- [ 0.0000000E+00, 1.8891380E+02, -9.3835290E+01,
336
- 1.3068619E+02, -2.2703580E+02, 3.5145659E+02,
337
- -3.8953900E+02, 2.8239471E+02, -1.2607281E+02,
338
- 3.1353611E+01, -3.3187769E+00 ]
339
- elsif emf < 13.228
340
- [ 1.334584505E+01, 1.472644573E+02, -1.844024844E+01,
341
- 4.031129726E+00, -6.249428360E-01, 6.468412046E-02,
342
- -4.458750426E-03, 1.994710149E-04, -5.313401790E-06,
343
- 6.481976217E-08 ]
344
- elsif emf < 19.739
345
- [ -8.199599416E+01, 1.553962042E+02, -8.342197663E+00,
346
- 4.279433549E-01, -1.191577910E-02, 1.492290091E-04 ]
347
- else
348
- [ 3.406177836E+04, -7.023729171E+03, 5.582903813E+02,
349
- -1.952394635E+01, 2.560740231E-01 ]
350
- end
34
+ def emfr_unbound t90, type
35
+ tc(type).emfr_unbound t90
351
36
  end
352
37
 
353
- def t90_coeffs_s emf
354
- # -0.236..1.874
355
- # 1.874..11.950
356
- # 10.332..17.536
357
- # 17.536..18.693
358
- if emf < 1.874
359
- [ 0.00000000E+00, 1.84949460E+02, -8.00504062E+01,
360
- 1.02237430E+02, -1.52248592E+02, 1.88821343E+02,
361
- -1.59085941E+02, 8.23027880E+01, -2.34181944E+01,
362
- 2.79786260E+00 ]
363
- elsif emf < 11.950
364
- [ 1.291507177E+01, 1.466298863E+02, -1.534713402E+01,
365
- 3.145945973E+00, -4.163257839E-01, 3.187963771E-02,
366
- -1.291637500E-03, 2.183475087E-05, -1.447379511E-07,
367
- 8.211272125E-09 ]
368
- elsif emf < 17.536
369
- [ -8.087801117E+01, 1.621573104E+02, -8.536869453E+00,
370
- 4.719686976E-01, -1.441693666E-02, 2.081618890E-04 ]
371
- else
372
- [ 5.333875126E+04, -1.235892298E+04, 1.092657613E+03,
373
- -4.265693686E+01, 6.247205420E-01 ]
374
- end
38
+ def out_of_range? t90, type
39
+ !tc(type)::T90_RANGE.include? t90
375
40
  end
376
41
 
377
- def t90_coeffs_t emf
378
- # -5.603..0.000
379
- # 0.000..20.872
380
- if emf < 0.0
381
- [ 0.0000000E+00, 2.5949192E+01, -2.1316967E-01,
382
- 7.9018692E-01, 4.2527777E-01, 1.3304473E-01,
383
- 2.0241446E-02, 1.2668171E-03 ]
384
- else
385
- [ 0.000000E+00, 2.592800E+01, -7.602961E-01,
386
- 4.637791E-02, -2.165394E-03, 6.048144E-05,
387
- -7.293422E-07 ]
388
- end
42
+ def tc type
43
+ self.const_get "Type#{type.upcase}"
389
44
  end
390
45
  end
391
46
  end
@@ -7,38 +7,43 @@ module Tuscan
7
7
  B = -5.7750e-07
8
8
  C = -4.1830e-12
9
9
 
10
+ R_RANGE = 18.5201..390.4811
11
+ T90_RANGE = -200.000..850.000
12
+
10
13
  extend self
11
14
 
12
15
  def r t90, r0: R0, a: A, b: B, c: C
13
- t90 >= 0 ?
14
- r0*(1 + a*t90 + b*t90**2) :
15
- r0*(1 + a*t90 + b*t90**2 - 100*c*t90**3 + c*t90**4)
16
+ raise RangeError, 't90 is outside the valid range' unless T90_RANGE.include? t90
17
+ r_unbound t90, r0, a, b, c
16
18
  end
17
19
  alias_method :res, :r
18
20
  alias_method :resistance, :r
19
21
 
20
22
  def t90 r, r0: R0, a: A, b: B, c: C, num: 10, err: 1e-4
23
+ raise RangeError, 'r is outside the valid range' unless R_RANGE.include? r
21
24
  if r >= r0
22
25
  (-a + (a**2 - 4 * b * (1 - r / r0))**(0.5)) / (2 * b)
23
26
  else
24
- args = { r0: r0, a: a, b: b, c: c }
25
- Rical.inverse_for f: method(:r), fargs: args,
26
- df: method(:dr), dfargs: args,
27
- x0: t90_guess(r, args), y: r,
28
- method: :n, num: num, err: err
29
- end.to_f
30
- rescue RangeError
31
- Float::NAN
27
+ args = [r0, a, b, c]
28
+ Rical.inverse_for f: method(:r_unbound), fargs: args, df: method(:dr), dfargs: args,
29
+ x0: t90_guess(r, *args), y: r, method: :newton, num: num, err: err
30
+ end
32
31
  end
33
32
  alias_method :t, :t90
34
33
  alias_method :temperature, :t90
35
34
 
36
35
  private
37
- def t90_guess r, r0:, a:, b:, c:
36
+ def r_unbound t90, r0, a, b, c
37
+ t90 >= 0 ?
38
+ r0*(1 + a*t90 + b*t90**2) :
39
+ r0*(1 + a*t90 + b*t90**2 - 100*c*t90**3 + c*t90**4)
40
+ end
41
+
42
+ def t90_guess r, r0, a, b, c
38
43
  ((r / r0) - 1) / (a + 100 * b) # valid for r < r0
39
44
  end
40
45
 
41
- def dr t90, r0:, a:, b:, c:
46
+ def dr t90, r0, a, b, c
42
47
  r0 * (a + 2*b*t90 - 300*c*t90**2 + 4*c*t90**3) # valid for t90 < 0
43
48
  end
44
49
  end
data/lib/tuscan/its90.rb CHANGED
@@ -28,7 +28,7 @@ module Tuscan
28
28
 
29
29
  def t90 r, rtpw:, **args
30
30
  w = r / rtpw
31
- Its90.t90r w - wdev(Its90.t90r(w), args)
31
+ t90r w - wdev(t90r(w), args)
32
32
  end
33
33
  alias_method :t, :t90
34
34
  alias_method :temperature, :t90
@@ -87,7 +87,7 @@ module Tuscan
87
87
  c1: 0.0, c2: 0.0, c3: 0.0, c4: 0.0, c5: 0.0
88
88
  equation = WDEV_EQUATIONS[subrange - 1]
89
89
  # return nil unless equation[:valid].include? t90
90
- wr_t90 = Its90.wr t90
90
+ wr_t90 = wr t90
91
91
  case subrange
92
92
  when 1..4
93
93
  wdev = a * (wr_t90 - 1)
@@ -0,0 +1,11 @@
1
+ module Tuscan
2
+ class Polynomial
3
+ def initialize *coeffs
4
+ @coeffs = coeffs
5
+ end
6
+
7
+ def solve_for x
8
+ @coeffs.each_with_index.map{ |c,i| c*x**i }.reduce(:+)
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Tuscan
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.6'
3
3
  end
data/lib/tuscan.rb CHANGED
@@ -1,7 +1,17 @@
1
1
  require 'tuscan/version'
2
+ require 'tuscan/polynomial'
2
3
  require 'tuscan/its90'
3
4
  require 'tuscan/iec60751'
4
5
  require 'tuscan/iec60584'
6
+ require 'tuscan/iec60584/type_b'
7
+ require 'tuscan/iec60584/type_c'
8
+ require 'tuscan/iec60584/type_e'
9
+ require 'tuscan/iec60584/type_j'
10
+ require 'tuscan/iec60584/type_k'
11
+ require 'tuscan/iec60584/type_n'
12
+ require 'tuscan/iec60584/type_r'
13
+ require 'tuscan/iec60584/type_s'
14
+ require 'tuscan/iec60584/type_t'
5
15
 
6
16
  module Tuscan
7
17
  extend self
@@ -2,15 +2,17 @@ require 'spec_helper'
2
2
 
3
3
  #
4
4
  # TODO:
5
- # 1. implement deviation function (polynomial)
6
- # 2. check B, 0 mV t90 computation (errorin inverse coeffs?)
5
+ # 1. implement emf(t90, ...) as an inverse of t90(emf, ...)
6
+ # 2. compute better t90_guess for 50..250 ºC to allow extension of T90_RANGE down to 50ºC
7
7
  #
8
8
  module Tuscan
9
9
  describe Iec60584 do
10
10
  context 'reference functions' do
11
+ err = 1e-3
12
+ num = 10
11
13
  examples = {
12
14
  b: [
13
- # { emf: 0.000000, t90: 0.0 },
15
+ { emf: 0.006197, t90: 60.0 },
14
16
  { emf: 0.291279, t90: 250.0 },
15
17
  { emf: 1.974546, t90: 630.0 },
16
18
  { emf: 1.980771, t90: 631.0 },
@@ -104,12 +106,57 @@ module Tuscan
104
106
  context "on a type #{type.upcase} thermocouple" do
105
107
  examples[type].each do |example|
106
108
  it "yields #{example[:t90]} ºC when emf equals #{example[:emf]} mV" do
107
- expect(Iec60584.t90r(example[:emf], type)).to be_within(1e-3).of(example[:t90])
109
+ expect(Iec60584.t90r(example[:emf], type, err, num)).to be_within(1e-3).of(example[:t90])
108
110
  end
109
111
  end
110
112
  end
111
113
  end
112
114
  end
115
+
116
+ context 'deviation functions' do
117
+ context 'emfdev computation' do
118
+ it 'delegates to Polynomial' do
119
+ expect(Polynomial).to receive(:new).with(1, 2, 3, 4).and_call_original
120
+ Iec60584.emfdev 0, 1, 2, 3, 4
121
+ end
122
+
123
+ it 'calls Polynomial#solve_for' do
124
+ expect_any_instance_of(Polynomial).to receive(:solve_for).with(0)
125
+ Iec60584.emfdev 0, 1, 2, 3, 4
126
+ end
127
+ end
128
+ end
129
+
130
+ context 'range validation' do
131
+ %i{ b c e j k n r s t }.each do |type|
132
+ context "on a type #{type.upcase} thermocouple" do
133
+ t90lo = examples[type].first[:t90] - 1.0
134
+ it "raises RangeError when t90 is #{t90lo} ºC" do
135
+ expect{ Iec60584.emfr t90lo, type }.to raise_error RangeError
136
+ end
137
+
138
+ t90hi = examples[type].last[:t90] + 1.0
139
+ it "raises RangeError when t90 is #{t90hi} ºC" do
140
+ expect{ Iec60584.emfr t90hi, type }.to raise_error RangeError
141
+ end
142
+ end
143
+ end
144
+ end
145
+
146
+ context 't90 function' do
147
+ tc = { type: :r, a: 0, b: -1.39363e-05, c: 3.75578e-08, d: -2.17624e-11 }
148
+ examples = [
149
+ { emf: 3.6105, t90: 419.527 },
150
+ { emf: 10.0054, t90: 961.78 },
151
+ { emf: 11.6417, t90: 1084.62 }
152
+ ]
153
+
154
+ examples.each do |example|
155
+ it "complies with NPL cert. 2014040275/1/PM03, #{example[:emf]} mV => #{example[:t90]} ºC" do
156
+ expect(Iec60584.t90 example[:emf], tc).to be_within(0.01).of(example[:t90])
157
+ end
158
+ end
159
+ end
113
160
  end
114
161
  end
115
162
  end
@@ -22,13 +22,14 @@ module Tuscan
22
22
  expect(Iec60751.r 0, r0: 101.0).to be_within(1e-4).of(101)
23
23
  end
24
24
  end
25
- end
26
25
 
27
- context 'temperature computation' do
28
- it 'yields complex temperatures as NaN' do
29
- expect(Iec60751.t90 1000).to be Float::NAN
26
+ it 'raises RangeError when t90 is out of range' do
27
+ expect{ Iec60751.r -201.0 }.to raise_error RangeError
28
+ expect{ Iec60751.r 851.0 }.to raise_error RangeError
30
29
  end
30
+ end
31
31
 
32
+ context 'temperature computation' do
32
33
  context 'standard coefficients' do
33
34
  examples.each do |example|
34
35
  it "yields #{example[:t90]} Celius when resistance equals #{example[:r]} Ohm" do
@@ -42,6 +43,11 @@ module Tuscan
42
43
  expect(Iec60751.t90 101, r0: 101.0).to be_within(1e-4).of(0)
43
44
  end
44
45
  end
46
+
47
+ it 'raises RangeError when r is out of range' do
48
+ expect{ Iec60751.t90 18.0 }.to raise_error RangeError
49
+ expect{ Iec60751.t90 391.0 }.to raise_error RangeError
50
+ end
45
51
  end
46
52
  end
47
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tuscan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Bacelar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-15 00:00:00.000000000 Z
11
+ date: 2015-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rical
@@ -83,8 +83,18 @@ files:
83
83
  - Rakefile
84
84
  - lib/tuscan.rb
85
85
  - lib/tuscan/iec60584.rb
86
+ - lib/tuscan/iec60584/type_b.rb
87
+ - lib/tuscan/iec60584/type_c.rb
88
+ - lib/tuscan/iec60584/type_e.rb
89
+ - lib/tuscan/iec60584/type_j.rb
90
+ - lib/tuscan/iec60584/type_k.rb
91
+ - lib/tuscan/iec60584/type_n.rb
92
+ - lib/tuscan/iec60584/type_r.rb
93
+ - lib/tuscan/iec60584/type_s.rb
94
+ - lib/tuscan/iec60584/type_t.rb
86
95
  - lib/tuscan/iec60751.rb
87
96
  - lib/tuscan/its90.rb
97
+ - lib/tuscan/polynomial.rb
88
98
  - lib/tuscan/version.rb
89
99
  - spec/spec_helper.rb
90
100
  - spec/tuscan/iec60584_spec.rb