frudawski

sunrise

The sunrise function determines the UTC (Coordinated Universal Time) when the sun just rises above the horizon, \gamma = -0,833\degree. The default geographical settings are set in the file “LT_location.mat”. Change the settings to your preferred location and set the file to read-only in order to prevent your settings from being overwritten with the default values in future versions.

Usage:

[utc,lct] = sunrise(day,coord)

Where:

ParameterDescription
utcReturns the UTC time in 'hh:mm:ss' format.
lctReturns the local time, offset to UTC is defined in LT_location.mat file.
daySpecifies the date in ‘DD.MM.YYYY’ format.
coordSpecifies the geographic coordinates, default is defined in LT_location.mat file, default Berlin: [13.326 52.514].

Examples

Determine UTC for sunrise at 13.05.2020 in Berlin:

utc = sunrise('13.05.2020')

Result:

utc = 03:14:01

Determine UTC and local time for sunrise at 21.07.2025 in Berlin:

[utc,lct] = sunrise('13.05.2020')

Result:

utc = 03:14:01
lct = 05:14:01

Determine UTC for sunrise at 21.04.1988 in Athens:

utc = sunrise('21.04.1988',[37.978 23.728])

Result:

utc = 03:01:36

Reference

DIN EN 17037:2019-03: Daylight in buildings. 2019.

Leave a comment

* I accept the use of cookies as well as the terms in the privacy policy. I accept that data provided by me is processed and saved. I know that comments are saved and published after review.