FLightR (version 0.4.5)

make.calibration: Creates a calibration object, further used for calculation of coordinates in the run.particle.filter.

Description

Function estimates all nesessary parameters from the calibration data logged in a known location or locations.

Usage

make.calibration(Proc.data, Calibration.periods, model.ageing = FALSE, plot.each = FALSE, plot.final = FALSE, likelihood.correction = "auto", suggest.irrad.borders = FALSE)

Arguments

Proc.data
processed data object generated by get.tags.data
Calibration.periods
a data frame containing start and end dates of all the calibration periods (POSIXct) and geographic coordinates of the corresponding calibration locations.
model.ageing
if set to TRUE, accounts for the tag ageing (with opacification of its transparent shell of a light sensor), resulting into decreasing sensitivity of the device. This option is useful only if there were several calibration periods or if calibration period was very long (~ longer than a month).
plot.each
Do you want every twilight to be plotted while processing
plot.final
Do you want final calibration graph to be plotted. On the graph you can see all the observed versus expected light levels. All slopes should be similar.
likelihood.correction
will estimate correction of likelihood for the current calibration paramters. Highly recommended not to be change from 'auto'. In this case FLightR will switch it to FALSE in case tage saved dat on 10 minutes or longre period
suggest.irrad.borders
experimental parameter! If set to TRUE faunction will try to find the best velues for the log.irrad.borders

Examples

Run this code
File<-system.file("extdata", "Godwit_TAGS_format.csv", package = "FLightR")
Proc.data<-get.tags.data(File, end.date=as.POSIXct('2013-08-20', tz='GMT'))
Calibration.periods<-data.frame(
       calibration.start=NA,
       calibration.stop=as.POSIXct("2013-08-20"),
       lon=5.43, lat=52.93) 
       #use c() also for the geographic coordinates, if you have more than one calibration location
       # (e. g.,  lon=c(5.43, 6.00), lat=c(52.93,52.94))
print(Calibration.periods)

# NB Below likelihood.correction is set to FALSE for fast run! 
# Leave it as default 'auto' for real examples
Calibration<-make.calibration(Proc.data, Calibration.periods, likelihood.correction=FALSE)

Run the code above in your browser using DataCamp Workspace