View source: R/get_DaytTimeLimits.r
| get_DayTimeLimits | R Documentation |
Estimating the timing of sunrise, sunset, astronomical and nautical twilight events in POSIXct-format based on geolocations and a similar time vector. The function is a simplified call of the sunriset and crepuscule functions of the suntools package, which use algorithms provided by NOAA.
get_DayTimeLimits(pos)
pos |
A data.frame with columns |
The input data.frame pos extended by the time vectors sunrise, sunset, dawn.naut, dawn.ast, dusk.naut, and dusk.ast.
Robert K. Bauer
Meeus, J. (1991) Astronomical Algorithms. Willmann-Bell, Inc.
sunriset, crepuscule, classify_DayTime
#### Example 1: estimate current times of dawn, sunrise, dusk and sunset in Mainz, Germany
pos <- data.frame(Lat = 50, Lon = 8.2667)
pos$datetime <- strptime(Sys.Date(),"%Y-%m-%d")
get_DayTimeLimits(pos)
#### Example 1b: classify current time of the day in Mainz, Germany
classify_DayTime(get_DayTimeLimits(pos))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.