assign_distance: Calculate distance to median center for each animal location

View source: R/1_ctmm_data.R

assign_distanceR Documentation

Calculate distance to median center for each animal location

Description

If there are big gaps in sampling time, median center for each time group is used. To reduce duplicate calculation, speed calculation will use some columns created in distance calculation. Always update data.table with assign_distance() first then use assign_speed().

Usage

assign_distance(animals_dt, tele_list, device_error = 10)

Arguments

animals_dt

location data.table from combine(). The original input data.table will be modified in place by reference after calculation.

tele_list

the ctmm::as.telemetry() telemetry obj list. Calculation need error information from it.

device_error

standardized device error in meter. Example: GPS: 10, VHF: 100

Value

The input data.table with distance columns added. The name assign hint on this nature.


ctmm-initiative/ctmm-webapp documentation built on Aug. 21, 2023, 4:39 a.m.