get_br: Get fluke stroking signal from magnetometer data

View source: R/get_br.R

get_brR Documentation

Get fluke stroking signal from magnetometer data

Description

For derivation see: Martin López L, Aguilar de Soto N, Miller P, Johnson M 2016: Tracking the kinematics of caudal-oscillatory swimming: A comparison of two on-animal sensing methods. J Exp Biol 219:2103-2109. Note: to estimate the stroking rate of small animals for which the specific acceleration is larger, it may be simpler to find the zero crossings on the high-pass-filtered acceleration (z axis for cetaceans, y axis for pinnipeds and fish) directly rather than using get_br.

Usage

get_br(Ma, sampling_rate, fh, thr = 0.2, ax = "z")

Arguments

Ma

input data: sensor data structure, or matrix with magnetometer data

sampling_rate

sampling rate of Ma in Hz (required if Ma is not a sensor data structure, and ignored if it is)

fh

is the high-pass filter frequency in Hz to use to separate orientation changes from locomotory strokes. It should be about half of the dominant stroke frequency if needed. Use dsf to estimate the dominant stroke frequency.

thr

is an optional minimum field strength threshold to prevent errors in the computation. Errors arise if the plane of rotations is nearly perpendicular to the local magnetic field vector. To avoid these, the body rotation signal is replaced with NA if the field strength in the locomotory plane drops below thr fraction of the total field strength.

ax

is an optional indicator that the locomotion is in the x-y plane. The function expects the locomotion to be in the x-z plane (e.g., cetacean swimming) by default. To comoute body rotations in x-y plane (e.g., for pinnipeds and many fish), use ax='y'.

Value

The body rotation signal in radians. It is a vector with the same sampling rate and number of samples as Ma.


stacyderuiter/FBtagtools documentation built on June 1, 2025, 6:26 p.m.