Skip to contents

Get the time of nautical (sun at 12 degrees below horizon), civil (sun at 6 degrees below horizon) and solar (sun at 0 degrees below horizon) dawn and dusk for each day over a given time range.

Usage

twilight(timeRange, latLon, crs_datum = "WGS84", timeZone)

Arguments

timeRange

A two-element character vector with elements of the form %Y-%m-%d defining the start and end of the timerange for which you want to get the twilight information.

latLon

A list of X, Y coordinates

crs_datum

The coordinate reference system and datum of the X, Y coordinates. Default = "WGS84.

timeZone

The time zone of the area of interest

Value

A data frame with the results

Author

Fabian Hertner, Birgen Haest

Examples

if (FALSE) { # \dontrun{
sunrisesunset = twilight(
  timeRange = c(
    "2021-01-15 00:00",
    "2021-01-31 00:00"
  ),
  latLon = c(47.494427, 8.716432),
  timeZone = "Etc/GMT0"
)
} # }