Learn R Programming

photobiology (version 0.9.6)

sun_angles: Solar angles

Description

This function returns the solar angles for a given time and location.

Usage

sun_angles(time = lubridate::now(), geocode = NULL, lon = 0, lat = 0,
  use_refraction = FALSE)

Arguments

time
POSIXct Time, any valid time zone (TZ) is allowed, default is current time
geocode
data frame with variables lon and lat as numeric values (degrees).
lon
numeric Vector of longitudes (degrees)
lat
numeric Vector of latitudes (degrees)
use_refraction
logical Flag indicating whether to correct for fraction in the atmosphere

Value

  • A list with components time in same TZ as input, azimuth, elevation, diameter, and distance.

See Also

Other astronomy related functions: day_night

Examples

Run this code
require(lubridate)
sun_angles()
sun_angles(ymd_hms("2014-09-23 12:00:00"))
sun_angles(ymd_hms("2014-09-23 12:00:00"), lat=60, lon=0)

Run the code above in your browser using DataLab