How do maps apps (Waze, Google maps, etc) actually calculate best routes and time for distance travelled? Is it all from tracking?

255 views
0

How do maps apps (Waze, Google maps, etc) actually calculate best routes and time for distance travelled? Is it all from tracking?

In: 22

They will already have static information like the speed limits of different roads, pre-planned road closures, and the usual traffic conditions at different times, and can use that to provisionally tell you what is probably the best route between any given A and B. That’s what you’ll get if you look a route up in advance.

But when planning an immediate route, they will also be tracking the live progress of other users who are ahead of you on those routes, and add that to their static intelligence, to produce an estimate of what route would be best for you right now.

Of course, they can be wrong. Once google sent me into “5 minute congestion”. The road had actually just been closed 5 minutes earlier, and I was there for 2 hours in the end. But because the road had only just been closed, all Google saw was that other users had been slowed down by 5 minutes. Users can also submit reports, but otherwise, Google doesn’t (yet) have the technology to detect exactly what’s going on (eg traffic stopped, police cars on site) and tell you to get the hell out of there accordingly.

GPS uses the satellites explicitly for guiding you in whichever direction you need to go. I believe it can see if there are areas that are over saturated with cars and then equates that to an accident/traffic.

Time for distance travelled uses simple math.

Speed = Time x Distance

Time = Speed / Distance

Distance = Speed / Time

If you are looking for distance travelled, the GPS relies on the satellite to tell it how fast you are travelling and then calculate using the above formula to “estimate” how much longer it’s going to take for you to get to your destination.

Also the Waze app uses human intervention to tell it if something happens. For example, if there’s an accident, people usually pin the location and say there’s an accident here. Once the accident clears up, people update it to say that the accident cleared up etc.

It’s more or less the same technology that helps get your internet traffic from your computer to Reddit’s servers. It’s a routing protocol.

If they use traffic data, all they’re doing is calculating the “cost” of taking a particular stretch of road. After that, you take those costs and throw them into a routing algorithm. The idea of a routing algorithm is that it keeps reaching out from the road that has the lowest cost.

The particular algorithm (or variation of) that maps use will also add a metric that is basically a measure of “Are we actually getting closer to your target?”. This keeps the rather open routing problem focused on getting to one destination. Here’s a video with a good example on it.