3 ms·
Perhaps it's because they implemented the "Sunrise equation" naively, which becomes indeterminate for high latitudes when the Sun is close to the maximum? http
by supernova87a 7y ago
Perhaps it's because they implemented the "Sunrise equation" naively, which becomes indeterminate for high latitudes when the Sun is close to the maximum?
https://en.wikipedia.org/wiki/Sunrise_equation https://en.wikipedia.org/wiki/Sunrise_equation
cos(\Omega) = - tan(\phi) x tan(\delta)
Where \Omega = hour angle (sunrise, sunset offset from noon), \phi = latitude, \delta = sun declination.
Clearly if the right hand side gets big enough (>1), this doesn't work.
- pcwalton 7y agoNever knew about that equation! That's cool. Angles are always such a pain. In my experience it's worth applying trigonometric identities and working in terms of unit vectors, sines, and cosines instead of using angles directly. In this case angles seem unavoidable, though: acos(tan(x)*tan(y)) doesn't simplify to anything useful.
- ccrush 7y agoIt's omega = acos( - tan(x) * tan(y)), not that that makes much of a difference.