SunRise

delphimoon

Sun Rise and Set

Algorithms

Top  Previous  Next

 

Calculates the sun rise, set and transit times.

 

procedure Sun_Rise(date:TDateTime; latitude, longitude:extended): TDateTime;

procedure Sun_Set(date:TDateTime; latitude, longitude:extended): TDateTime;

procedure Sun_Transit(date:TDateTime; latitude, longitude:extended): TDateTime;

 

Description

Calculates the times of the sun rise, set and transit on the given date and location. The transit time is the time of the highest elevation during the day. If the sun stays below horizon for the whole day the exception E_NoReseSet is raised.

 

The observer's latitude is negative for the southern hemisphere and positive for the northern hemisphere; the longitude is positive for points west of Greenwich, negative for points east, and both are given in degrees.

 

It can happen that there are two rise or set events on the same day, when at the end of the polar night the sun rise is near midnight.

 

Hint

This function uses the standard definition of the sun rise and set - using the upper limb of the sun and a mean refraction of 0°34', thus 0°50' below the horizon. However, there may be locally different definitions, e.g. in Denmark 0°35' are used.

 

The time of transit is not at noon, but has a constant offset due to the timezone and longitude value, and also changes duting the year by up to 16 minutes away from local noon time, the value calculated by the Equation of Time.

 

Reference

This function is based upon chapter 15 (14) of "Astronomical Algorithms".