This function appends columns of sun times for recording selection such as sunrise/sunset.

getSunCalcs(
  data,
  calc = c("solarNoon", "sunrise", "sunset", "sunriseEnd", "sunsetStart", "nightEnd",
    "goldenHourEnd"),
  doParallel = FALSE
)

Arguments

data

Selection data.frame as created by the getwavs() function. Must contain existing datetime, Latitude, and Longitude columns to compute.

calc

The type of calculations to derive. Default is all: c("solarNoon", "nadir", "sunrise", "sunset", "sunriseEnd","sunsetStart", "dawn", "dusk", "nauticalDawn", "nauticalDusk", "nightEnd", "night", "goldenHourEnd", "goldenHour")

doParallel

Binary TRUE or FALSE whether to run process in parallel to save time. Will work better on some machines vs others.

Value

A data.frame with appended columns of sun times as selected.

Examples

data <- getSunCalcs(data, calc = c("sunrise","sunset"))