Hacker News new | ask | show | jobs
by superpermutat0r 2268 days ago
If you track the vehicles every day and collect the location data, you can easily augment the Open Source Routing Machine to give you traffic accounted estimates.[0] Combined with some Kalman filters you'd get almost perfect estimates when live.

Of course, this is for a use case where you have similar routes every day, this allows you to really tune the Kalman filters.

0: https://github.com/Project-OSRM/osrm-backend/wiki/Traffic

2 comments

My understanding is that Google's does real time traffic reporting so well because it's constantly pinging the location of android devices. There have been several write ups on how to spoof it, but historical data is never going to be a match for a feed like that.
If you carry lots of android devices it will alter the traffic on Google Maps - https://www.youtube.com/watch?v=k5eL_al_m7Q
I find it insane that the fact that Google is constantly harvesting device locations is blatantly obvious from things like this, but yet if you make that claim in other contexts people will be extremely skeptical and demand extensive proof.
Those phones all had Google Maps app open. That Google is harvesting device locations while you have a Google app open showing your GPS location should not be a surprise.

What would be a surprise is if Google forced on your GPS to gather your location in other contexts.

It is not a surprise, it is already happening. You can turn it off, but AFAIK if you don't it collects this information even if the Google maps application is not open.
From my personal experience, I have an Iphone and it asks me about once a week about Google Maps using my location in the background and if that is okay. I always tell it no. I didn't know I could turn it off directly in the app, thank you for the information.
GPS is definitely the best way of ascertaining a device's location but far from the only one. Google's own location API lets you access fine location (GPS) or coarse (triangulating via cell towers). After public outcry and legal action Google stopped driveby data harvesting by Street View vehicles but it remains unclear if they stopped collecting SSIDs and MAC addresses (I guess if you squint hard enough you could say that these are publicly available data points).

It doesn't take too much tin foil to think that android may be phoning home when it detects an SSID, the physical location of which is already known.

I have to keep location services (android) disabled to keep my daily movement from appearing in google location history.
Google absolutely harvests phone GPS data to enhance things like AGPS (mapping of wifi MAC addresses, or celll towers to location coordinates), and it does this regardless of the location setting in the system UI.

https://www.theverge.com/2017/11/21/16684818/google-location...

And Apple too - I am constantly seeing this (traffic/congestion flags) on side and residential streets with no traffic monitoring devices in my Apple Maps.
It sounds like you could use Google's live traffic info to augment your own predictions. You should be fine with just a few API calls. This would be pretty cheap - perhaps even within the free tier.
It would violate the ToS.
Which part of the ToS (that isn't getting violated already)?

The real problem with this approach is that you will never know when real time is conflicting with historical unless you're calling the API constantly anyway

Google's ToS says you're not allowed to do any computation on your own?

I mean, I'm not disputing it, I just hadn't realized we were already there.

Section 3.2.3 of the Google Maps ToS

> (c) No Creating Content From Google Maps Content. Customer will not create content based on Google Maps Content.

> (d) No Re-Creating Google Products or Features. Customer will not use the Services to create a product or service with features that are substantially similar to or that re-create the features of another Google product or service.

https://cloud.google.com/maps-platform/terms/

For the use case described in the article it sounds just fine. The content part is a big vague. If read very broadly it would be super prohibitive. Perhaps it is?
i don't see how using this is different from using the directions api for the purpose in the article?
Where is the best place to get/purchase traffic data for use with OSRM?