pf_tracker: Wrapper function to the Gaussian Mixture PF tracker

Description Usage Arguments Details Value Examples

View source: R/pf.R

Description

Wrapper function to the Gaussian Mixture PF tracker

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
pf_tracker(
  x,
  varnames,
  type = "constant-velocity-model",
  init_field = NULL,
  N = 200,
  T_s,
  sigma2_process,
  sigma2_measure,
  resampling = "adaptive",
  Nthreshold = 1,
  boost = FALSE,
  alpha = 0.1,
  tau = 0.01,
  clustering = FALSE,
  kinematic_list,
  gate = 1,
  boostAssociation = "simple",
  return_particles = FALSE,
  display_tracking = FALSE,
  position_only = FALSE
)

Arguments

x

data.frame: requires time, utm position north and east (m), utm speed north and east (m/s).

varnames

vector: vector of names. Default to "north", "east", "v_north", "v_east".

type

string: random-walk, constant-velocity-model or coordinated-turn-model (Type of kinematic)

init_field

list: List of starting parameters

N

scalar: number of particles

T_s

scalar: Time interval to start the filter

sigma2_process

scalar, vector or matrix: Process variance of the kinematic movement

sigma2_measure

scalar, vector or matrix: Measurement variance

resampling

string: type of resampling (adaptive, systematic)

Nthreshold

scalar: Threshold value for adaptive resampling

boost

logical: should the algorithm use boost detections (TRUE or FALSE)

alpha

scalar: proportion of boost detections in the proposal

tau

scalar: clustering threshold

clustering

logical: should there be automated clustering (TRUE or FALSE)

kinematic_list

list: list of kinematic parameters

gate

scalar: size of the gate for association

boostAssociation

string: track association procedure

return_particles

logical: Returns all the parameters required to calculate the pdf (TRUE or FALSE)

display_tracking

logical: interactive tracking animation

position_only

logical: only measure the positions?

Details

The GM PF tracker that is implemented here proposes multiple options to choose from in terms of kinematic type (linear vs non-linear), data association options.

Value

data.frame with an additional column indication the target id, unique for the entire tracking history, and a few additional kinematic columns

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
library(tidyverse)
library(ggrepel)
data(maritime2)
obs_x <- mutate(maritime2, time = time / 60, radar_north = (radar_north - min(north))/1000,
radar_east = (radar_east - min(east))/1000, radar_range = radar_range/1000,
north = (north - min(north))/1000, east = (east-min(east))/1000,
) %>% filter(between(time, 150,250))
plot_obs(obs_x, varnames = c("north", "east"))
mI = unlist(obs_x[obs_x$time == min(obs_x$time),c("north", "east", "v_north", "v_east")])
init_field = list(list(m = mI, P = diag(.1, nrow = 4), w = 1, l = 1))
set.seed(1)
res <- pf_tracker(x=  obs_x, varnames = c("north", "east"), T_s = 1, sigma2_process = 1e-2,
gate = 1, sigma2_measure = 1e-2,init_field = init_field, check = FALSE, resampling = "systematic",
boostAssociation = "Pollard2011", position_only = TRUE,N = 200,
type = "constant-velocity-model", alpha = 0.1, boost = TRUE, clustering= FALSE)
plot(res, varnames = c("north", "east"))
plot_traj(res, varnames = c("east", "north"))


## End(Not run)

ick003/vesselett documentation built on July 20, 2020, 9:08 p.m.