getElevation | R Documentation |
Function to calculate the sun elevation angle for light measurements at a known location and the choosen light threshold.
getElevation(
tFirst,
tSecond,
type,
twl,
known.coord,
method = "log-norm",
plot = TRUE
)
tFirst |
vector of sunrise/sunset times (e.g. 2008-12-01 08:30). |
tSecond |
vector of of sunrise/sunset times (e.g. 2008-12-01 17:30). |
type |
vector of either 1 or 2, defining |
twl |
data.frame containing twilights and at least |
known.coord |
a |
method |
the function can either estimate the sun elevation angle and the twilight error parameters using a log-normal ("log-norm") or a gamma ("gamma") error distribution. It is recommended to try both and evaluate the fit using the plot. |
plot |
|
NEW: The function provides two different sun elevation angle. The first (a1) refers to the median twiligth error and
is needed for threshold based locaiton estimation (e.g. coord
). The second (a0) refers to the zero elevation
angle of the twilight error distribution and is required for e.g. mergeSites2
, siteEstimate
. The function
also provides the parameters (log.mean and log.sd) of the fitted log-normal distribution (see red line in plot),
Simeon Lisovski
Lisovski, S., Hewson, C.M, Klaassen, R.H.G., Korner-Nievergelt, F., Kristensen, M.W & Hahn, S. (2012) Geolocation by light: Accuracy and precision affected by environmental factors. Methods in Ecology and Evolution, DOI: 10.1111/j.2041-210X.2012.00185.x.
data(calib2)
calib2$tFirst <- as.POSIXct(calib2$tFirst, tz = "GMT")
calib2$tSecond <- as.POSIXct(calib2$tSecond, tz = "GMT")
getElevation(calib2, known.coord = c(7.1,46.3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.