Hacker news

  • Top
  • New
  • Past
  • Ask
  • Show
  • Jobs

Sun Position Calculator (https://drajmarsh.bitbucket.io)

168 points by sanbor 4 days ago | 36 comments | View on ycombinator

sanbor 4 days ago |

netsharc 4 days 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...

paxys 4 days 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.

agent013 3 days 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.

joshfarrant 3 days ago |

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.

sllabres 4 days 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!

teraflop 4 days 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.)

rogerallen 3 days ago |

This is really, really well done. I’m very impressed by all the features implemented here and I wish I could look over the source. I wonder how it is done.

jborichevskiy 4 days 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.

toss1 3 days ago |

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

deepsun 3 days 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)

sanbor 4 days ago |

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

samcheng 4 days 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

mannanj 4 days 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)

suchoudh 2 days ago |

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.

sawjet 3 days 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

recallingmemory 4 days ago |

Rate limit for this resource has been exceeded

Nora23 4 days ago |

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

fennec-posix 4 days ago |

This is incredibly cool!

wumms 4 days ago |

Love it. Needs a moon.

Fnoord 3 days ago |

OSINT tooling.

olya_pllkh 3 days ago |

[dead]

abicklefitch 4 days ago |

[dead]