Skip to content
Brandon Willard edited this page May 29, 2016 · 16 revisions

Introduction

Tracking-tools is a set of tools for tracking objects, through GPS, that travel the area of a graph (currently OpenTripPlanner graphs based on OpenStreetMap data). The motion of the object is modeled by a dynamic linear model (e.g. a Kalman filter) under a two state switching regime, where one state models movement on the graph and the other off of it. The states are estimated sequentially with a particle filter.

The working paper for the model behind this code is here: http://arxiv.org/abs/1303.1883

Estimation

This library contains an implementation of a particle-learning filter, which allows for efficient on-line state and state-parameter estimation. On-road and off-road state transitions are estimated in one version and observation and state-transition covariances are included in another.

Simply put, this means that one can start with some simple initial assumptions on things like the error of GPS, the error on a street-snapped location and its initial velocity, and the probabilities of going on-road or off-road at any point, then those values are learned/adjusted real-time.

Design

The classes are designed to reflect the specification of Bayesian models (i.e. in terms of distributions and their priors) and are intended to be customizable, such that re-specification of underlying distributions is straight-forward.

Interface

Included in the library is a Play webapp for debugging--via simulation and file uploads. It provides a graphical view (using Leaflet) of the loaded graph with the observations and filtered/estimated results superimposed. In this view, and with debugging turned on, you can also observe the particle history for each observation, which includes the path's traveled and much internal state information.

Possible Usage

The webapp acts as a server/broker for GPS updates and model results as well, so it can be easily adapted for some standard use cases.

Current and Future Development

  • Changes are being made to better generalize the current implementations and to allow for distributional assumptions across more objects.

  • Ultimately each particle will be able to track an entire graph state, so that, for example, road-to-road transition probabilities can be learned online. Such estimates could be provided to route-planning algorithms for producing real-time best paths (e.g. over the past hour some paths have been systematically favored/dis-favored, so plan accordingly).

  • More motion models. The current models are 2D constant-velocity models. Non-constant velocity and acceleration models are next.

  • Implementations of more stateful parameters. States on velocity parameters allow for classes such as walking, driving, biking, etc.

Notice

The code is currently in an incredibly alpha state.

Clone this wiki locally