Google

# File rbot/utils.rb, line 336
      def store_speed(value, windunit, meterspersec, knots, milesperhour)
        # Helper function to convert and store speed based on unit.
        # &$meterspersec, &$knots and &$milesperhour are passed on
        # reference
        if (windunit == 'KT')
          # The windspeed measured in knots:
          @decoded[knots] = sprintf("%.2f", value)
          # The windspeed measured in meters per second, rounded to one decimal place:
          @decoded[meterspersec] = sprintf("%.2f", value.to_f * 0.51444)
          # The windspeed measured in miles per hour, rounded to one decimal place: */
          @decoded[milesperhour] = sprintf("%.2f", value.to_f * 1.1507695060844667)
        elsif (windunit == 'MPS')
          # The windspeed measured in meters per second:
          @decoded[meterspersec] = sprintf("%.2f", value)
          # The windspeed measured in knots, rounded to one decimal place:
          @decoded[knots] = sprintf("%.2f", value.to_f / 0.51444)
          #The windspeed measured in miles per hour, rounded to one decimal place:
          @decoded[milesperhour] = sprintf("%.1f", value.to_f / 0.51444 * 1.1507695060844667)
        elsif (windunit == 'KMH')
          # The windspeed measured in kilometers per hour:
          @decoded[meterspersec] = sprintf("%.1f", value.to_f * 1000 / 3600)
          @decoded[knots] = sprintf("%.1f", value.to_f * 1000 / 3600 / 0.51444)
          # The windspeed measured in miles per hour, rounded to one decimal place:
          @decoded[milesperhour] = sprintf("%.1f", knots.to_f * 1.1507695060844667)
        end
      end