computeSunPositionDoyHour {solartime}R Documentation

computeSunPositionDoyHour

Description

Compute the position of the sun (solar angle)

Usage

computeSunPositionDoyHour(doy, hour, latDeg, 
    longDeg = NA, timeZone = NA, isCorrectSolartime = TRUE)

Arguments

doy

integer vector with day of year [DoY, 1..366], same length as Hour or length 1

hour

numeric vector with local winter time as decimal hour [0..24)

latDeg

Latitude in (decimal) degrees

longDeg

Longitude in (decimal) degrees

timeZone

Time zone (in hours) ahead of UTC (Central Europe is +1)

isCorrectSolartime

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.

Details

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.

Value

named numeric matrix with one row for each time with entries

hour

Solar time in fractional hours after midnight, (or given hour if isCorrectSolartime = FALSE).

declination

Solar declination (rad)

elevation

Solar elevation (rad) with 0 at horizon increasing towards zenith

azimuth

Solar azimuth (rad) with 0 at North increasing eastwards

Author(s)

Thomas Wutzler

Examples

computeSunPositionDoyHour(
  160, hour = 0:24, latDeg = 51, longDeg = 13.6, timeZone = 1L)

[Package solartime version 0.0.2 Index]