Skytrack compares geolocator based light measurements in lux with those modelled by the sky illuminance model of Janiczek and DeYoung (1987).
A skytrackr data frame.
A start location of logging as a vector of latitude and longitude
Tolerance distance on the search window for optimization, given in km (left/right, top/bottom). Sets a hard limit on the search window regardless of the step selection function used.
Range of values to consider during processing, should be provided in lux c(min, max) or the equivalent if non-calibrated.
Scale / sky condition factor, by default covering the skylight() range of 1-10 (from clear sky to extensive cloud coverage) but can be extended for more flexibility to account for coverage by plumage, note that in case of non-physical accurate lux measurements values can have a range starting at 0.0001 (a multiplier instead of a divider). Values need to be provided on a log scale (default = log(c(0.00001, 50)))
Control settings for the Bayesian optimization, generally should not be altered (defaults to a Monte Carlo method). For detailed information I refer to the BayesianTools package documentation.
Mask to constrain positions to land
A step selection function on the distance of a proposed move, step selection is specified on distance (in km) basis.
Plot a map during location estimation (updated every seven days)
Give feedback including a progress bar (TRUE or FALSE)
A data frame with location estimate, their uncertainties, and ancillary model parameters useful in quality control.
Model fits are applied by default to values up to sunrise or after sunset only as most critical to the model fit (capturing daylength, i.e. latitude and the location of the diurnal pattern - longitudinal displacement).
# \donttest{
# define land mask with a bounding box
# and an off-shore buffer (in km), in addition
# you can specify the resolution of the resulting raster
mask <- stk_mask(
bbox = c(-20, -40, 60, 60), #xmin, ymin, xmax, ymax
buffer = 150, # in km
resolution = 0.5 # map grid in degrees
)
#> Spherical geometry (s2) switched off
# define a step selection distribution/function
ssf <- function(x, shape = 0.9, scale = 100, tolerance = 1500){
norm <- sum(stats::dgamma(1:tolerance, shape = shape, scale = scale))
prob <- stats::dgamma(x, shape = shape, scale = scale) / norm
}
# estimate locations
locations <- cc876 |> skytrackr(
plot = TRUE,
mask = mask,
step_selection = ssf,
start_location = c(50, 4),
control = list(
sampler = 'DEzs',
settings = list(
iterations = 10, # change iterations
message = FALSE
)
)
)
#> ══ Estimating locations ══════════════════════════════════════ skytrackr v1.0 ══
#>
#> ℹ Processing logger: CC876!
#> ℹ (preview plot will update every 7 days)
#> - Estimating positions ■■ 3% | ETA: 45s
#> - Estimating positions ■■■■ 10% | ETA: 27s
#> - Estimating positions ■■■■■■■■■■■■■■■■ 50% | ETA: 5s
#> - Estimating positions ■■■■■■■■■■■■■■■■■■■■■■■■■■ 83% | ETA: 2s
#> - Estimating positions ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100% | ETA: 0s
#> ℹ Data processing done ...
# }