woheller69 / omweather

GNU General Public License v3.0
386 stars 16 forks source link

Add more units for wind speed #90

Closed rma-x closed 1 month ago

rma-x commented 2 months ago

I suggest to add meters per second (m/s) and knots to the list of units for the wend speed.

woheller69 commented 2 months ago

You can try it:

-Uninstall -Remove .zip and install

app-release.apk.zip

rma-x commented 1 month ago

Thanks for implementing this so quickly! I can confirm that it works with the test package.

But it would be nice to have one decimal place for the m/s value (if the values coming from the server have enough granularity for that), at least in the area with the hourly values which has enough horizontal space for two more characters (or three, for wind speeds > 10 m/s).

BTW, are the wind speed values meant as an average or as the maximum gust speed for the given time span (hour or day)?

woheller69 commented 1 month ago

Wind speed is for the instant according to Open-Meteo docs. I might change to gust for preceeding hour.

rma-x commented 1 month ago

Looking again, I think you applied the formula for converting m/s to kn the wrong way around. The knots value has to be about twice the m/s value for the same speed, so you have to divide the m/s value by .51444 instead of multiplying it.

And please let me once more suggest to add a decimal place to the m/s value for better granularity, maybe optionally like you did it for the temperature.