filterMatches: Filter matched locations so points travel forward along shape

Description Usage Arguments Value Examples

Description

Removes vehicle positions that result in negative distance traveled between observations. When "odometer" values are available, also excludes positions with odometer values that decrease for increasing timestamp values.

Usage

1
filterMatches(avl_matches, max_speed = Inf)

Arguments

avl_matches

vehicle positions matched to route shapes. See matchAVL for matching.

max_speed

maximum expected speed (in units of projection per second, typically m/s). Observations over max_speed will be dropped and speeds recalculated.

Value

data.table of filtered values in avl_matches, with dist_to_next and mps (meters per second) columns.

Examples

1
2
3
4
5
6
## Not run: 
avl <- readVehiclePosition(system.file('extdata', 'vehiclePositions', package = 'speedRT'))
matched <- matchAVL(avl, gtfs = system.file('extdata', 'gtfs.zip', package = 'speedRT'))
filtered <- filterMatches(matched)

## End(Not run)

metrotransit/speedrt documentation built on June 13, 2019, 5:09 p.m.