Live data from Hacker News

Sun Position Calculator

drajmarsh.bitbucket.io

31–39 of 39 posts

Re: Sun Position Calculator

#32
Outstanding design and implementation! Really great for visualizing the sun, earth, and seasonal relationships!

One minor nit I notice is the Latitude slider on the right seems reversed from what I'd expect. I would expect Slide UP to move North and increasing positive latitude numbers, and DOWN for South/negative, but this implements the opposite. It seems this may be to match the Longitude negative numbers at the top, but that convention seems a lot less necessary, i.e., either would work for longitude and +=UP/-=DOWN for latitude seems like it is more important to match with the physical and mental models?

Thanks for the cool tool, I'll be using it a lot for garden planning and solar panel install (and just cool to look at)!

Re: Sun Position Calculator

#33

Earlier quoted context omitted.

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

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

Re: Sun Position Calculator

#34
Tangentially related — on my website I track coffees I’ve enjoyed and show their origin on an interactive globe.

https://farrant.me/coffees/

The tilt of the globe on that page changes throughout the year to match The Earth’s tilt when viewed from from The Sun. The initial rotation of Earth is correct for the time of day too. This means that, when you load the page, you see The Earth as The Sun currently sees it.

I’m not sure anyone has ever noticed, and I’m sure my calculation isn’t perfect, but I enjoy watching it change over the course of the year.

Re: Sun Position Calculator

#35
post #8
post #7

I've been wanting to make a little circadian rhythm graphic based on the sun, would love to have a graphic like this to support it. If Andrew Marsh is listening, would love to create something to extend what I have (Preview at sun-taupe.vercel.app)

This is really cool! The clock on your page reminded me too of some sites that show a "real solar" time based on your location where solar noon corresponds to 12:00 PM.

Right. My theories and hunches to support this that got jumbled up due to AI slop, were that syncing to the sun over a “9-5” or “8 hours of sleep” would improve and align our health better than any scientific system would. The sun is the enabler of science in a weird way.

Like there’s culture that have a siesta at solar noon and it’s a time to rest: that means the sun’s noon time not our arbitrary time or 12pm every single day. Lunch annd exercise could also follow for productivity gains to happen at particular times of day.

Re: Sun Position Calculator

#36
post #11

Earlier quoted context omitted.

I flew from central US to western asia (via moscow) and it was an interesting experience for the reasons you mentioned. I think I left early Saturday morning local time and arrived Sunday evening local time. I saw a sunrise, sunset, sunrise, sunset in 18 hours of travel time.

I wonder what the physical toll on a man exprriencing three consecutive solar days?

On a long haul flight, the crew usually tells everyone to shut the window blinds, because many people want to sleep, so you don't get to see the sun.

Re: Sun Position Calculator

#37
post #9

Some friends flew eastwards from New York to Singapore on a direct flight (it's one of the longest flights). I wondered what their experience of sunrises and sunsets were (they departed 10PM), I've noted down the times but haven't plotted it... Later this year I'm flying from Europe to the West Coast of Canada, and it seems I'll be in daylight for the entirity of the flight (departing 2PM local, landing 4PM local aft…

I had interesting flights in end of june from St. Petersburg to Novosibirsk. It departed at around 23:00, and you saw sunset and still a dawn. As the plane flew mostly at latitude of 60°, the dawn in the north was always there, and 1.5 hours later, the sun rose. The plane arrives after 3h30m of flight at ~7:00 local time, in summer solistice the sun is already high enough.

Re: Sun Position Calculator

#38

This is probably the most clear explanation of the seasons and the changing altitude of the Sun that I have seen. This would be perfect for school lessons or popularizing science.

Here's a fascinating video of what the sun does at 90S: https://vimeo.com/208466944

Re: Sun Position Calculator

#39
amazing work...

is it possible to add moon to it as well. that would make it more intuitive.. looking at the night moon its possible to find where the sun is but not possible to imagine the respective location of earth with respect to moon and sun.

Post reply on HN