Live data from Hacker News

Sun Position Calculator

drajmarsh.bitbucket.io

21–30 of 39 posts

Re: Sun Position Calculator

#21

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

Re: Sun Position Calculator

#26

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.

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

Re: Sun Position Calculator

#27
post #22

The first 'observatory' was a stick placed vertically in the ground such that it's shadow traced the angular relationship of the sun & earth

And in one year of observations they noticed that the point of the stick followed an 8 shaped track on the ground. I wonder what they thought about it.

I attempted to build a naive sundial last year and I was surprised when I saw the sun moving east to west (or vice-versa, can't remember) at the same hour. It's very noticeable week over week.

https://en.wikipedia.org/wiki/Analemma

If only we had a perfectly circular orbit and no axial tilt!

Re: Sun Position Calculator

#30

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 T…

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