sun_angles
, given geographical coordinates and dates. They can be also
used to find the time for an arbitrary solar elevation between 90 and -90
degrees by supplying "twilight" angle(s) as argument.
day_night(date = lubridate::today(), tz = Sys.timezone(), geocode = data.frame(lon = 0, lat = 51.5, address = "Greenwich"), twilight = "none", unit.out = "hours")
noon_time(date = lubridate::today(), tz = Sys.timezone(), geocode = data.frame(lon = 0, lat = 51.5, address = "Greenwich"), twilight = "none", unit.out = "datetime")
sunrise_time(date = lubridate::today(), tz = Sys.timezone(), geocode = data.frame(lon = 0, lat = 51.5, address = "Greenwich"), twilight = "sunlight", unit.out = "datetime")
sunset_time(date = lubridate::today(), tz = Sys.timezone(), geocode = data.frame(lon = 0, lat = 51.5, address = "Greenwich"), twilight = "sunlight", unit.out = "datetime")
day_length(date = lubridate::today(), tz = "UTC", geocode = data.frame(lon = 0, lat = 51.5, address = "Greenwich"), twilight = "sunlight", unit.out = "hours")
night_length(date = lubridate::today(), tz = "UTC", geocode = data.frame(lon = 0, lat = 51.5, address = "Greenwich"), twilight = "sunlight", unit.out = "hours")
numeric
vector of length one, or two, giving
solar elevation angle(s) in degrees (negative if below the horizon).noon_time
, sunrise_time
and sunset_time
return a
vector of POSIXct timesday_length
and night_length
return numeric a vector
giving the length in hours
format.solar_time
,
is.solar_time
,
print.solar_time
, solar_time
,
sun_angles
library(lubridate)
my.geocode <- data.frame(lat = 60, lon = 25)
day_night(ymd("2015-05-30"), geocode = my.geocode, twilight = "civil")
Run the code above in your browser using DataLab