Looking for an API that lets me query the current (estimated) brightness (ideally in lux) for a given set of geo coordinates. Was hoping OpenWeatherMap would offer something like that... sadly not.
@fribbledom this would be the 1.0 of "i can geo-database now". download sat maps, process them, calc. love this challenge.
@fribbledom What would this take into account? Daylight + cloudiness, basically? Maybe precipitation/cloud, uh, density?
Pretty much that.
@fribbledom Interesting... Based on the sun or lights/cities?
Weather-based would be good enough.
They don't seem to have light level (though I haven't searched their entire API), but you might be able to use the UV Index as a proxy.
If you think about it, the UV index is already pretty close to what you want, as it takes both sunlight and cloud cover into account.
Alternately, you could calculate it from the predictable patterns of sunlight intensity and the more complex cloud cover data.
@fribbledom Maybe something like this would be a way in?
Pretty sure there's something similar for Germany though can't remember where I saw it. Dunno about anything more global but maybe there's something more real-time associated with this:
@fribbledom Redshift must have something for this in their code.
Does it do more than just calculate the time for sunset and sunrise?
As I understand Müsli, he wants the angle of the sun over/under the horizon, resulting sunlight intensity and proportion of light lost to cloud cover.
I saw a thing which did this except for cloud cover, but can't remember what and where...
Oooh, but the latest Blender release has a date/time-dependent daylight simulation environment -- maybe something useful in there?
Yeah, I think that would be good enough.
@fribbledom Redshift and others use position to get the time.Then they make a timespan where it should be active and gradient the colour change over that span.With time of day and some date intelligence the brightness of daylight is calculateable IIRC
@fribbledom In the US we have "ASOS" weather systems at major airports. They all have an "ambient light sensor" used to calculate "runway visual range". If you get access to the raw data from the system, that should have what you want. Countries with developed airports should have similar data.
Many non-US weather systems also have a solar radiation sensor. Contact your national weather agency to find how to access their data.
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!