View source: R/data_preparation.R
find.stationary.location | R Documentation |
Functions attempts to find a location where The function attempts to find a location for a time period assuming animal was not moving. Does not work well will shaded data!
find.stationary.location(
Proc.data,
calibration.start,
calibration.stop,
plot = TRUE,
initial.coords = NULL,
print.optimization = TRUE,
reltol = 1e-04
)
Proc.data |
processed data object generated by |
calibration.start |
POSIXct time when stationary period started |
calibration.stop |
POSIXct time when stationary period ended |
plot |
plots every iteration |
initial.coords |
location vector with initial values for location (longitude and latitude). Should be close (+-2000 km from the real location) |
print.optimization |
do you want every optimization iteration to be printed? If TRUE - Lon, Lat, calibration mean and calibration sd are being printed. Optimization tries to minimize the latter. |
reltol |
tolerance for optimization, see |
The idea behind the function is that it tries to minimize variance between slopes for the whole period by optimizing location. It can be seen as an extension of Hill-Ekstrom calibration idea.
vector with coordinates - longitude and latitude.
Eldar Rakhimberdiev
#this example takes about 15 minutes to run
File<-system.file("extdata", "Godwit_TAGS_format.csv", package = "FLightR")
Proc.data<-get.tags.data(File)
plot_slopes_by_location(Proc.data=Proc.data, location=c(5.43, 52.93))
abline(v=as.POSIXct("2013-08-20", tz='GMT')) # end of first calibration period
abline(v=as.POSIXct("2014-05-05", tz='GMT')) # start of the second calibration period
Location<-find.stationary.location(Proc.data, '2013-07-20', '2013-08-20', initial.coords=c(10, 50))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.