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

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...




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

Search: