Skip to content

Commit

Permalink
Windchill fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
onewheelskyward committed Dec 19, 2019
1 parent 916400b commit d5a827c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/lita/handlers/forecasts.rb
Expand Up @@ -206,8 +206,9 @@ def do_the_windchill_temp_thing(forecast, chars, hours)
end

# Temp must be F.
def calculate_windchill(temp, wind)
35.74 + (0.6215 * temp) - (35.75 * wind ** 0.16) + (0.4275 * temp * wind ** 0.16)
def calculate_windchill(temp_c, wind)
temp_f = (temp_c * 9/5) + 32
35.74 + (0.6215 * temp_f) - (35.75 * wind ** 0.16) + (0.4275 * temp_f * wind ** 0.16)
end

def ansi_wind_direction_forecast(forecast)
Expand Down
2 changes: 1 addition & 1 deletion lita-onewheel-forecast-io.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = 'lita-onewheel-forecast-io'
spec.version = '1.14.1'
spec.version = '1.14.2'
spec.authors = ['Andrew Kreps']
spec.email = ['andrew.kreps@gmail.com']
spec.description = <<-EOS
Expand Down

0 comments on commit d5a827c

Please sign in to comment.