find.stationary.location {FLightR}R Documentation

find unknown calibration location

Description

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!

Usage

find.stationary.location(
  Proc.data,
  calibration.start,
  calibration.stop,
  plot = TRUE,
  initial.coords = NULL,
  print.optimization = TRUE,
  reltol = 1e-04
)

Arguments

Proc.data

processed data object generated by get.tags.data

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 optim for more details

Details

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.

Value

vector with coordinates - longitude and latitude.

Author(s)

Eldar Rakhimberdiev

Examples

#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))


[Package FLightR version 0.5.5 Index]