Functions for the analysis of baboon trajectory data