schachmat / wego

weather app for the terminal
ISC License
7.82k stars 476 forks source link

Metric wind speeds in m/s? #106

Closed davewhipp closed 7 years ago

davewhipp commented 7 years ago

A number of countries in Europe use meters per second for wind speeds, rather than kilometers per hour. Would it be possible to have another wind speed option that could display wind speeds in m/s? This appears to already be an option available on darksky.net.

schachmat commented 7 years ago

You can use -u si to show m/s speeds, but it will also change temperatures to Kelvin.

davewhipp commented 7 years ago

OK, good to know. I suppose my request is then whether or not we could have wind speeds in m/s with temperatures in degrees Celsius. I understand using Kelvins for the temperature for the SI units option, but for weather I think m/s + °C would be nice. Thanks for the quick response!

schachmat commented 7 years ago

Can you tell me which countries do use that? I think I also checked a few back when I was implementing the support for different unit systems and the three available choices seemed to be enough. You could also create a PR to add the new unit system, as I am currently short on time.

davewhipp commented 7 years ago

It seems to be common in the Nordic countries, but I don't know where else. I'll think about the pull request. Maybe it is a nice little task to learn a bit of Go.

schachmat commented 7 years ago

it's not too hard, you just have to add a new possible argument ("metric-ms"?) in main.go and look at the iface/iface.go file where the unit system transformations are defined and create new if conditions to use the metric or SI system depending on if you are computing distance, temperature or speed.

schachmat commented 7 years ago

@davewhipp, thanks to @R11baka this feature is now merged.