Determining solar elevation and azimuth to control glare?

The link above is actually my ‘baby’, but I have crafted another piston that takes this concept to another level… It accurately estimates how many degrees the sun is above the horizon at any given moment… (which can easily be incorporated into a piston that auto-closes blinds before the glare happens)

The math changes based on latitude, and changes every day due to the seasons. And of course, the height of the sun changes at every moment throughout the day, but my formula works year-round(with 99% accuracy during all of the important times of the day)

I have not shared this ‘astronomical’ formula publicly… mostly because of how much work it took to get all 57 unique math formulas to work hand-in-hand. (but it has been tested for well over a year, in many various locations around the globe)

Honestly, it is the only solar altitude estimator I have ever seen anywhere!
(my goal was to make it 100% self-contained, without using any external APIs)

I also use this method to determine when to turn on my porch lights.
(no longer basing it on sunset times, but when the sun drops below 8° from the horizon)

Feel free to send me a PM in the webCoRE forum if you are interested in this technological wonder, LOL.


Note, this is for advanced users who want a truly 'Smart" home…:

There are only a dozen households in the world that are using my code here, so due to the complexity and uniqueness of this, I will only share this beauty when “on-the-clock”…

I hope you can understand.


Edit for clarification:

My formulas were designed for those of us who live between latitude 24.0 and 65.6.

Those who live near the poles, will have days with no sunlight, and days with no darkness…
Those who live near the equator, will have days where the sun is to the north, and days where it’s to the south.

My formulas do not take this into account.

Thankfully, most of us live in the highlighted regions above, where the formulas work very well.

2 Likes