This code is NOT working because it needs additional data that could be provided by navigation providers. The code is published here just for demonstration the potential way how the privacy can be calculated if you have access to any navigation platform.
I have a strong idea that some maps API provided by Here, Yandex, Google etc. potentially could be used for that.
But for example, right now Google unfortunately does not support research projects. Because research projects don't fit to Maps Platform Terms of Service, e.g. 3.2.4(a) "No Scraping" and 3.2.4(c) "No Creating Content From Google Maps Content" (see https://cloud.google.com/maps-platform/terms/#3-license)
Potential autonomous car sharing privacy calculations. Potential way how to find probability of visit POI/ uncertainty of a user's driving direction with help of any navigation provider.
If you have any questions, contact me via e-mail: [email protected]