This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/320/. Also, please do not modify any references to the original work (if any) contained in this content.
Continuing on the topic started in the article Sunrise and sunset calculator.
Calculating the sun's azimuth and its altitude above the horizon at any time at the point with given coordinates is on the agenda. We calculate azimuth from the north in a clockwise direction.
I used this algorithm. Some good old Swede described it. He tried as hard as he could, but a casual person still wouldn't understand it. For example, I can still understand how we move from one coordinate system to another, but I can't get why the longitude of the perihelion of the Sun is calculated like that
, where d is - the number of days out of epoch J2000 - that's beyond my strength.
It seems like somewhere far away, in an ivory tower sitting the astronomers and calculating this, and then all of us, mortals, use this then. Maybe some of these astronomers will explain things to us, but we have to believe in all these magical numbers and perform the calculation for now.
Apparently, so does the majority of people.
Some books are usually recommended to people on forums when somebody doesn't want to explain things and say "search there". I also would like to put these books here:
Jean Meeus. Astronomical algorithms
Peter Duffett-Smith. Practical Astronomy with your calculator.
As in the case of calculators of the time of sunrise and sunset, here are two calculators - the first uses the information about the coordinates and the time zone information from the directory of cities, i.e., you have to choose the city and enter the time of observation, and the second allows you to set the coordinates and time zone manually. Information about the city can be added to the directory by the registered users.
The negative altitude above the horizon corresponds to the dark time of the day - the Sun is "under" the horizon. The intersection with the horizon in the morning occurs at the 90 degrees azimuth, from which you can make a bold conclusion that the Sun still rises in the East.
Paul Schlyter (that Swede) claims that the calculations' error does not exceed one minute of arc for dates in the range from 1900 to 2100.