Description Usage Arguments Value Author(s) Examples
View source: R/utilSolarTime.R
computes the time difference in hours between (apparent) solar time and local time
1 2 3 | computeSolarToLocalTimeDifference(longDeg,
timeZone, doy = NA, fracYearInRad = 2 *
pi * (doy - 1)/365.24)
|
longDeg |
Longitude in (decimal) degrees |
timeZone |
Time zone (in hours) ahead of UTC (Berlin is +1) |
doy |
integer vector with day of year [DoY, 1..366], Specify NA get mean solar time across the year instead of apparent solar time (i.e. with differences throughout the year due to eccentricity of earth orbit) |
fracYearInRad |
may specify instead of doy for efficiency. |
time difference in hours to be added to local winter time to get solar time
Thomas Wutzler
1 2 3 4 5 6 7 8 9 | # Jena: 50.927222, 11.586111
longDeg <- 11.586
doi <- 1:366
# due to longitude: west of timezone meridian: sun culminates later,
# solar time is less than local time
(localDiff <- computeSolarToLocalTimeDifference(longDeg, 1L)*60)
# taking into account shift during the year due to earth orbit eccentricity
plot( computeSolarToLocalTimeDifference(longDeg, 1L, doi)*60 ~ doi )
abline(h = localDiff)
|
[1] -13.656
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.