Skip to content

Display current UV for Météo France results#387

Open
rthery wants to merge 2 commits into
WangDaYeeeeee:masterfrom
rthery:feature/current_uv
Open

Display current UV for Météo France results#387
rthery wants to merge 2 commits into
WangDaYeeeeee:masterfrom
rthery:feature/current_uv

Conversation

@rthery
Copy link
Copy Markdown

@rthery rthery commented Jul 30, 2022

Hello,

Météo France (and I guess probably other providers) just gives the maximum UV value during the day. I've added CommonConverter.getCurrentUV to get the UV at a given time, based on that value. Then I've used this helper method for Météo France results, but it can be used for other providers as well (as long as you know the time of the sunrise and sunset)

This is my first contribution to an Android app, so please don't hesitate to let me know if there are changes you'd like to see for it to be merged!

@papjul
Copy link
Copy Markdown
Contributor

papjul commented Jul 30, 2022

Very nice addition, especially in this season!

I didn't know about the formula, thank you.

@rthery
Copy link
Copy Markdown
Author

rthery commented Jul 31, 2022

Thanks!

For a bit of a context, it's just a very naive approach, based on the graph found on https://en.wikipedia.org/wiki/Ultraviolet_index
This won't take into consideration clouds for example, which can be a big contributor to the final UV index, but it should output the worst UV index with blue sky.
When I compared the computed value from the one from AccuWeather, it's either the same or just one index above. I think this is still better than nothing :) (my last sunburn would agree at least!)

@papjul
Copy link
Copy Markdown
Contributor

papjul commented Dec 18, 2022

Given the lack of reply from main developer, I decided to merge all currently pending pull requests in #440, so you can find your PR there, if you want to compile from source using the other enhancements/fixes

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants