Learn R Programming

trajr (version 1.0.0)

TrajMeanVectorOfTurningAngles: Mean vector of turning angles

Description

Returns the mean vector of the turning angles, as defined by Batschelet, (1981). A unit vector is created for each turning angle in the trajectory, and the centre-of-mass/mean vector is returned.

Usage

TrajMeanVectorOfTurningAngles(trj, compass.direction = NULL)

Arguments

trj

Trajectory object.

compass.direction

If not NULL, step angles are calculated relative to this angle (in radians), otherwise they are calculated relative to the previous step angle.

Value

A complex number r which represents the mean vector, Mod(r) is the length of the mean vector which varies between 0 and 1, Arg(r) is the angle.

Details

According to Batschelet (1981), r may serve as a straightness index ranging from 0 to 1, where r is the length of the mean vector of turning angles of a trajectory with constant step length. Values of r near 1 indicating straighter paths. Hence, r = Mod(TrajMeanVectorOfTurningAngles(trj)), assuming that trj has a constant step length.

See Also

TrajStraightness