Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Display wind direction along wind speed #289

Open
Matsyir opened this issue Apr 20, 2022 · 2 comments
Open

Display wind direction along wind speed #289

Matsyir opened this issue Apr 20, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Matsyir
Copy link

Matsyir commented Apr 20, 2022

Is your feature request related to a problem? Please describe.
Not really a problem, but this seems to be easily accessible from the openweathermap api and could be a nice little compact addition.

Describe the solution you'd like
A small arrow or 1 to 2 letter indicator of the wind direction, either before or after the existing wind speed value (I would say after. For example: 32 km/h ↑ for winds heading North.

Additional context (optional)
There are good solutions to convert degrees to letters/arrows on this stackoverflow post: https://stackoverflow.com/questions/7490660/converting-wind-direction-in-angles-to-text-words,
and it seems you can get 0-360 degrees from wind_deg of the openweathermap api.

@Matsyir Matsyir added the enhancement New feature or request label Apr 20, 2022
@prestosole
Copy link
Member

LGTM! I'm looking forward into implementing this in the next feature update.

@prestosole prestosole self-assigned this Apr 20, 2022
@Matsyir
Copy link
Author

Matsyir commented Apr 20, 2022

Sweet!

Also, the initial question on that stackoverflow link is asking about 16 cardinal directions, but I think just 8 is fine, especially for a minimal app like this. There are also solutions for that among the answers.

Although hmm I just thought about this more & realized, instead of using a solution like the stackoverflow with fixed text arrows/letters, you could simply use one arrow/icon as an image and precisely rotate it depending on the degrees. Definitely a bit more complex to implement, but would be neat to see it update precisely, and it would probably look cleaner than text arrows/icons.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants