local beaufortScale = {
[0] = 0.2,
[1] = 1.5,
[2] = 3.3,
[3] = 5.4,
[4] = 7.9,
[5] = 10.7,
[6] = 13.8,
[7] = 17.1,
[8] = 20.7,
[9] = 24.4,
[10] = 28.4,
[11] = 32.6,
[12] = 32.7
}
local windSpeed = GetWindSpeed()
for i = 0, 12 do
if windSpeed <= beaufortScale[i] or i == 12 then
print(string.format("The current wind speed (%.2f m/s) is the equivalent to Beaufort number %s on the Beaufort scale", windSpeed, i))
break
end
end