
Using Open Street Maps and Kalman Filters to Clean Up GPS Data - tapan_pandita
https://blog.hypertrack.io/2016/09/11/our-framework-for-real-time-filtering-of-location-streams/
======
johneth
Kalman filters are very useful. There are several variants that can be
implemented, depending on the available data and what you want to achieve. I
found a great place to get your head around them was Roger Labbe's tutorials:

[http://nbviewer.jupyter.org/github/rlabbe/Kalman-and-
Bayesia...](http://nbviewer.jupyter.org/github/rlabbe/Kalman-and-Bayesian-
Filters-in-Python/blob/master/table_of_contents.ipynb)

~~~
arjun27
My favourite resource on Kalman is Tucker McClure's work:
[http://www.anuncommonlab.com/articles/how-kalman-filters-
wor...](http://www.anuncommonlab.com/articles/how-kalman-filters-work/)

------
grecy
Slightly related: I'm driving through West Africa now, and I loaded OSM onto
my cheap-o used Garmin. [1]

I have been absolutely shocked and blown away by the accuracy and detail of
the maps. In the tiniest dirt street village, with less than 100 people, it
correctly maps all the roads and even all the walking trails.

Of course, in the big cities too.

I'm staggered they have this level of detail.

[1] [http://garmin.openstreetmap.nl/](http://garmin.openstreetmap.nl/)

~~~
arjun27
Totally. Have you seen OSM Analytics - it has some really visualizations on
how the data of geographies has evolved over time - in terms of roads,
buildings etc. This link[1] shows Tanzania, for example.

[1] [http://osm-
analytics.org/#/show/polygon:ivf~DvjpdAgots%40i~s...](http://osm-
analytics.org/#/show/polygon:ivf~DvjpdAgots%40i~sBbfiB_ghe%40hyiK%7BdbHtczR%7DxoJlco%5Cnu_C/buildings/recency)

------
Doctor_Fegg
Sorry to be that guy, but: OpenStreetMap. One word, not pluralised.

~~~
pmontra
And I wonder if the PostgresDB they're using is PostgreSQL or something else.
I googled
[https://betalist.com/startups/postgresdb](https://betalist.com/startups/postgresdb)
but the link to the site doesn't work.

~~~
tapan_pandita
It's just plain old postgres

------
wyldfire
> OSM Filter: This uses publicly available OpenStreetMap road data and maps
> our GPS traces to nearest possible roads

OSM is considered a reference for HyperTrack -- they snap to the OSM roads.
But I wonder how they [OSM] might've constructed their maps given the
similarly noisy GPS samples they likely would've crowdsourced from. Do they
use kalman filters/more samples/higher precision GPS reference devices?

~~~
amirathi
Data quality and coverage of OSM data varies widely. Their philosophy is to
accept low quality data in an uncovered area and then improve it as multiple
traces along the same routes come in from contributors. So my understanding is
quality quickly increases as the community of contributor in the area grows.

Besides OSM data source are not limited to individual's GPS traces, they also
include publicly available satellite imagery, official data released by
government agencies under appropriate licenses. E.g. In the United States, OSM
uses Landsat 7 satellite imagery, Prototype Global Shorelines from National
Oceanic and Atmospheric Administration (NOAA). They have managed to get their
hands on high quality data sources in a lot of countries.

~~~
maxerickson
In the US there is also pretty active aerial imaging, between state and local
efforts and the National Aerial Imaging Program. The pdf linked at this page
seems to have a nice discussion of it:

[http://pubs.usgs.gov/fs/2009/3055/](http://pubs.usgs.gov/fs/2009/3055/)

------
karussell
Not sure what stack exactly they use under the hood, but we have created a
sophisticated, very fast but similar algorithm implemented in Java.

Bonus: everything is open source: [https://github.com/graphhopper/map-
matching](https://github.com/graphhopper/map-matching) including web API,
routing engine, easy setup (no DB involved), simple demo UI, ...

Only disadvantage I see: we currently do not support online map matching but
this will surely come.

BTW: kalman filters are very similar to our approach (hidden markov model).

BTW2: Their FAQ is ridiculous: "Do you have competitors? No..." There are many
companies with tracking and also open source products ...

------
hahaker
This seems very useful, but isn't Google Maps doing similar stuff already? And
if not, what are their concerns?

~~~
tapan_pandita
The Google Maps APIs are point in time. Using OSM and Kalman filters, we can
continuously snap points to the road in realtime. Plus it's a lot faster doing
it on our own database than calling external APIs.

