Compute the position of the sun (solar angle)
computeSunPositionDoyHour(doy, hour, latDeg,
longDeg = NA, timeZone = NA, isCorrectSolartime = TRUE)
named numeric matrix with one row for each time with entries
Solar time in fractional hours after midnight, (or given hour if isCorrectSolartime = FALSE).
Solar declination (rad)
Solar elevation (rad) with 0 at horizon increasing towards zenith
Solar azimuth (rad) with 0 at North increasing eastwards
integer vector with day of year [DoY, 1..366], same length as Hour or length 1
numeric vector with local winter time as decimal hour [0..24)
Latitude in (decimal) degrees
Longitude in (decimal) degrees
Time zone (in hours) ahead of UTC (Central Europe is +1)
by default corrects hour (given in local winter time) for latitude to solar time (where noon is exactly at 12:00). Set this to FALSE if times are specified already as solar times.
Thomas Wutzler
This code assumes that Hour is given in local winter time zone.
By default, it corrects by longitude to solar time (where noon
is exactly at 12:00).
Set argument isCorrectSolartime
to FALSE to use the given
local winter time instead.
computeSunPositionDoyHour(
160, hour = 0:24, latDeg = 51, longDeg = 13.6, timeZone = 1L)
Run the code above in your browser using DataLab