Sun Position Calculator

drajmarsh.bitbucket.io

121 points by sanbor 15 hours ago


sanbor - 14 hours ago

Archived version: https://web.archive.org/web/20260111135022/https://drajmarsh...

netsharc - 12 hours ago

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 after a 10 hour flight).

Edit: well, FR24 has a handy flight tracking that includes the daylight progression: https://www.flightradar24.com/data/flights/sq23#3de5a306

So they flew 18 hours and experienced a full daylight cycle, arriving just before the second sunrise...

deepsun - 3 hours ago

> The resource from “https://drajmarsh.bitbucket.io/earthsun.min.js?vpd-10161” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff)

jborichevskiy - 7 hours ago

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.

teraflop - 7 hours ago

Cool demo!

I notice that the stars don't seem to be rendered correctly. If you zoom out, you can see the sun's position relative to the stars. As you scroll the date slider through the course of a year, the sun should make a complete 360-degree revolution around the ecliptic. Or, when the camera view is locked to the sun, the stars should appear to revolve relative to the sun.

Instead, the sun appears motionless against the stars, regardless of the time of year. (If the demo used actual star positions, I would be able to point to how the sun was in the wrong constellation for a given date. But the starfield is randomly generated, so you have to actually observe the sun in motion to see the bug.)

agent013 - 3 hours ago

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.

paxys - 10 hours ago

Neat. Similar to https://www.suncalc.org, which also lets you zoom to the neighborhood level. Very useful to figure out when/where sunlight will hit your house.

sawjet - 5 hours ago

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

sllabres - 7 hours ago

I would say this is the prettiest interface I've seen for explaining seasons, analemma, solstice, ... to someone or experimenting myself.

Thanks for the find!

sanbor - 14 hours ago

I recommend activating "Show Illuminating Sun Beam" under "Explanatory tools" by clicking the graduation cap icon in the top right corner.

samcheng - 12 hours ago

This is a cool visualization. I wonder if it uses the excellent solpos.c library from NREL as the core engine?

https://www.nrel.gov/grid/solar-resource/solpos

Nora23 - 10 hours ago

This is great for photographers planning golden hour shoots. The neighborhood-level zoom is particularly useful.

recallingmemory - 12 hours ago

Rate limit for this resource has been exceeded

wumms - 12 hours ago

Love it. Needs a moon.

fennec-posix - 14 hours ago

This is incredibly cool!

mannanj - 14 hours ago

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)

olya_pllkh - 3 hours ago

[dead]

abicklefitch - 14 hours ago

[dead]