Calculates the angle of the velocity vector in rad by comparing centroid location across
flyangle(trx, framelag = 6)
a track data frame (only requires CTrax output variables)
the number of frames to derive velocity across; defaults to 6
For each timepoint t the velocity vector is calculated between
Currently this leaves
framelag/2 NAs at the beginning and end of each track. This causes all sorts of problems
and may be best addressed somehow in the future.
The angle is expressed in reference to the (arbitrary) coordinate system of the video and therefore this value is not overly useful.
A numeric vector matching the structure of
trx containing the angle value for each object and timepoint, or
NAs when it can't be calculated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.