Description Usage Arguments Details Value

Calculates the angular speed in rad/frame by comparing the angle of velocity vectors calculated across `framelag`

.

1 | ```
flyturn(trx, framelag = 6)
``` |

`trx` |
a track data frame (only requires CTrax output variables) |

`framelag` |
the number of frames to derive across; defaults to 6 |

For each timepoint t the speed vector is calculated between `t-framelag`

and `t`

, and then between `t`

and `t+framelag`

.
The angles are extracted from these two vectors and subtracted to yield the change in angle over `timeframe`

.
This creates a lot of problems when the angles are close to the discontinuity of 2pi and needs sorting out.
Currently this leaves `framelag NA`

s at the beginning and end of each track. This causes all sorts of problems
and may be best addressed somehow in the future.

Realistic data observation suggests that any angles over pi/2 are either artefacts or discontinuity errors, but at the moment they are not `NA`

'd.

A numeric vector matching the structure of `trx`

containing the angular speed value for each object and timepoint, or `NA`

s when it can't be calculated.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.