Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature suggestion] Change wind speed unit #188

Closed
feliciakri opened this issue May 17, 2017 · 8 comments
Closed

[Feature suggestion] Change wind speed unit #188

feliciakri opened this issue May 17, 2017 · 8 comments

Comments

@feliciakri
Copy link

feliciakri commented May 17, 2017

While get_temperature() supports unit parameter, get_wind() does not support it. OWM has wind speed unit available as Imperial (miles/hour) or Metric (meter/sec) unit.

Suggested implementation:
w.get_wind(unit = 'Imperial') or
w.get_wind(unit = 'miles/hour') or
w.get_wind('Imperial')

References:
https://openweathermap.org/weather-data

@csparpa
Copy link
Owner

csparpa commented May 18, 2017

@feliciakrismanta implemented with #189 :)
cheers!

@csparpa csparpa closed this as completed May 18, 2017
@robinpaulson
Copy link

Would it be possible to expand this to km/h, beaufort and knots also? cheers

@csparpa csparpa reopened this Jun 2, 2019
@csparpa csparpa modified the milestones: Release 2.7.0, Release 3.0.0 Jun 2, 2019
@csparpa
Copy link
Owner

csparpa commented Jun 2, 2019

Yes @robinpaulson .

@alecagayan
Copy link

What are the conversion units for wind direction?

@geofbaum
Copy link

@oopsie1412 What do you mean for conversion of the wind direction? It's already in degrees? If you're looking to convert the degrees into a cardinal direction here's a table with the degree breakdown.
http://snowfence.umn.edu/Components/winddirectionanddegreeswithouttable3.htm

Also remember if you do go that route that the direction in degrees is saying which direction the wind is coming from and not the direction it's blowing.

@csparpa
Copy link
Owner

csparpa commented Oct 21, 2019

@oopsie1412 Please check https://github.com/csparpa/pyowm/blob/master/pyowm/utils/temputils.py
The only conversion currently implemented is metric-imperial back and forth.

User @robinpaulson proposed conversion also to/from "beaufort and knots" months ago... I am not an expert here, so if anybody can provides references to the math I can implement those conversions as well and pack them into version 3 (will be released in 2020)

csparpa added a commit that referenced this issue Nov 29, 2019
@csparpa
Copy link
Owner

csparpa commented Nov 29, 2019

Implemented with 04bd0f5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants