0

I'm willing to give up a little accuracy for simplicity.

What is the easiest way to calculate both dawn and dusk times by using sunrise, sunset, latitude, and longitude? (Without using MATLAB or other such libraries.)

I've seen this SO: how to calculate dusk dawn times, but it is far too specific, and relative, to the source code provided which isn't very straightforward. I am looking for a general equation/algorithm which uses sunrise, sunset, latitude, and longitude.

Related, it also seems like dawn/dusk could be computed by knowing the angle of the Sun in the sky at a certain time. Is there an equation where you can plug in some variables to determine the angle of the Sun in the sky? For example, if I were looking for the angle of the Sun at dawn and dusk, let's say at horizon minus and plus 6 degrees or so, I could potentially compute the times from those. Is this possible, too? Which method would be simpler and more straight-forward?

Can this problem even be solved with only these four variables (sunrise/set, lat/lon)?

MarkInTheDark
  • 244
  • 2
  • 15
  • Yes, it is possible to calculate with some spherical trigonometry. You wouldn't even need the longitude. But you need the sun's declination angle (varies between -23.5° and +23.5° over the year). – Thomas Fritsch Jun 03 '17 at 17:50
  • see [Calculate whether it is close to dawn/dusk based on sunrise/sunset?](https://stackoverflow.com/a/27038880/2521214) – Spektre Aug 28 '17 at 08:50

0 Answers0