climb_factor_gem 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/climb_factor.rb +6 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3de080785de7f1f7833f2d69a8323197e026bb3e621dfd395539f152ce9966ca
4
- data.tar.gz: 4b697e0f6cea23b5c2fbdb5b650ac90e7912b5367b87d0d96a3cce7efda9e1c7
3
+ metadata.gz: 98c2707b602b41892a2b2a7834fc868403bcc7761c57c0c13b204d7c813f8109
4
+ data.tar.gz: 3362677bc2c7a156c08365a507ff982a107499a38681453f4087740882ec907d
5
5
  SHA512:
6
- metadata.gz: 7f3b2ff8ce4b33182e3407b7f214b711404f888ee8d6dae3d06f5d07c543c2d86afe38015f1315a9480f32ad9d7217079b8043bed3e2e3de14974f30933ad47c
7
- data.tar.gz: 3fac167ac1c40cc6d30f2ae4639cd5eb40f1adefdaf00eb3fba6723abca53539679778af68d0963931b230966484a7b59b72c9723f9f27ba296ded124933a388
6
+ metadata.gz: 5dcdfacc1d169376bd37c7c673320a7a57986be24be97ef403cffd734907cac6f3e8cf187212acd55771e74973b68638846ca559bb16b4a756d1137208a9d663
7
+ data.tar.gz: 4b8fa59d162af9a1e39a60e55d59de9141a911e31572dc2d855ca01d79d3a02a95f73df52d779636e3788783a75d82aa070c0e24cbfa064daa258bb700fb6340
data/lib/climb_factor.rb CHANGED
@@ -11,6 +11,12 @@ module ClimbFactor
11
11
  # filtering = get rid of bogus fluctuations in vertical data that occur on horizontal scales less than this
12
12
  # output:
13
13
  # cf = a floating-point number representing a climb factor, expressed as a percentage
14
+ hv = hv.map do |a|
15
+ unless a.all? { |v| v.is_a?(Numeric) }
16
+ raise ArgumentError, "error in type of input, got #{a.inspect}, should be pairs of Floats"
17
+ end
18
+ a.map(&:to_f)
19
+ end
14
20
  hv = Filtering.resample_and_filter_hv(hv,filtering)
15
21
  rescale = 1.0
16
22
  if !nominal_distance.nil? then
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: climb_factor_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Crowell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-14 00:00:00.000000000 Z
11
+ date: 2023-08-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: