disc_correct: Correct tracks (camera frame of reference) based on rotation...

Description Usage Arguments See Also Examples

View source: R/disc_correct.R

Description

Correct tracks (camera frame of reference) based on rotation of DISC to get polar-relevant coordinates

Usage

1
2
disc_correct(dir, max.time.difference = 2, camera.compass.angle = NULL,
  verbose = FALSE, ...)

Arguments

dir

path the to the deployment directory

max.time.difference

maximum number of seconds allowed between successive positions for the computation of movement of the organism. When the time difference is larger than max.time.difference, heading and speed are NA. This should not be too large because movement over several seconds is rarely in a straight line and the heading and speed computed here would therefore be meaningless.

camera.compass.angle

angle between the top of the camera and the N of the digital compass. If NULL, should be read from a file named "angle_camera_compass.txt" in the deployment directory

verbose

output messages on the console when TRUE

...

passthrough argument

See Also

Other action.functions: disc_calibrate, disc_camera_compass_angle, disc_stats, disc_track_compass, disc_track, disc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# get example deployments included with the package
deploys <- system.file("extdata", "deployments", package = "discr")
# copy them to a writable, temporary directory
temp <- tempdir()
file.copy(deploys, temp, recursive=TRUE)
dd <- paste0(temp, "/deployments/")
deploy1 <- paste0(dd, "1")  # digital compass
deploy2 <- paste0(dd, "2")  # analog compass

# run the action
disc_conf(deploy.dir=dd)
disc_correct(dir=deploy1, max.time.difference=5, verbose=TRUE)
# inspect results
list.files(deploy1)
head(read.csv(paste0(deploy1, "/larvae_tracks.csv")))
head(read.csv(paste0(deploy1, "/rotated_larvae_tracks.csv")))
tail(read.csv(paste0(deploy1, "/rotated_larvae_tracks.csv")))

disc_correct(dir=deploy2, verbose=TRUE)
list.files(deploy2)

jiho/discr documentation built on May 19, 2019, 9:30 a.m.