# File rbot/utils.rb, line 604 def store_temp(temp,temp_cname,temp_fname) # Given a numerical temperature temp in Celsius, coded to tenth of # degree, store in @decoded[temp_cname], convert to Fahrenheit # and store in @decoded[temp_fname] # Note: temp is converted to negative if temp > 100.0 (See # Federal Meteorological Handbook for groups T, 1, 2 and 4) # Temperature measured in Celsius, coded to tenth of degree temp = temp.to_f/10 if (temp >100.0) # first digit = 1 means minus temperature temp = -(temp - 100.0) end @decoded[temp_cname] = sprintf("%.1f", temp) # The temperature in Fahrenheit. @decoded[temp_fname] = sprintf("%.1f", (temp * (9/5)) + 32) end