Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Relatedly, has anyone seen tooling or approaches to calculate shadows behind particular hills and mountains, depending on the season and time of day? The sunset calculation for Boulder Colorado is quite inaccurate as we are in the foothills with mountains to the west. I've been pondering how to calculate this precisely.


You would basically want to calculate the solar altitude angle (or, equivalently the zenith angle): https://en.wikipedia.org/wiki/Solar_zenith_angle

Given the mountains, the sun would appear to set when it descends below some altitude angle. Given the equation in the wikipedia article you'd then just solve for the hour angle. (You'd then have to use your latitude to convert the local solar time to Mountain Standard Time.)


Of course, if the mountains are not flat then the altitude is then a function of the azimuth...


Perhaps a rough look-up table for (say) each 10 degrees of azimuth around the observing point that gives the altitude to solve for? Finally a couple of iterations to find what azimuth the Sun will be nearer the actual setting time, perhaps taking the 'flat horizon' setting time as a starting value?

https://stjarnhimlen.se/comp/riset.html#2

I live in a street that faces roughly north/south so we get an early dusk at this time of year in the front room. I feel a spreadsheet coming on...


https://shademap.app/@40.02101,-105.3587,10.26063z,176851848...

Don't immediately see a way to get the actual estimated sunset out of it, but you can fiddle around manually




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: