I need to determine sunrise and sunset times (local time) for the current day given a specific latitude and longitude and using Delphi (I am using XE2). I've found this article and used the SysTools library but the results do not agree with published tables for the UK.
Has anyone seen a pascal algorithm for this?
How are the times of sunset and sunrise determined? A. Sunset and sunrise have exactly the same definition: the time when the apparent uppermost ray of the Sun is on the astronomical horizon. If it is the first ray, it is sunrise and if it is the last ray, it is sunset.
The angles are accurate to about 0.5 degrees (the Sun's diameter), except when the Sun is at the horizon where the accuracy decreases slightly due to atmospheric refraction, which is not taken into account in these calculations.
"Sunrise and sunset conventionally refer to the times when the upper edge of the disk of the Sun is on the horizon, considered unobstructed relative to the location of interest.
Some random sites:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With