Sunday, August 14, 2011

How does GoogleMaps know how long it takes to drive somewhere?

(Picture courtesy of GoogleMaps.com)

Have you ever noticed that when you look up directions on GoogleMaps that along with possible routes it lists the estimated time it will take to reach the destination? Well, this is yet another example of how math from the classroom appears again in our daily lives.

We'll have to leave the topic of how it determines possible routes for another blog post, but for now let's look at how it determines how long a given route will take.

The simple formula that the site uses to calculate time uses the distance on each road divided by the approximate speed of travel on each road (speed limit). In equation form we can represent this as (Miles Traveled) /(Miles per Hour) = Hours.

However, this calculation is not the total distance divided by the average speed limit because you may be on a road with a faster speed limit for a longer distance. In the "Driving Directions" list in the left column individual distances on each road are listed step-by-step. For each step GoogleMaps will use the equation above and divide the distance traveled by the speed limit to get the estimated time. So if you drive 10 miles on a road at 60 miles per hour, you would drive for 1/6th of an hour, or 10 minutes. GoogleMaps adds all of these individual distances together to give you an estimated total travel time.

The reason it is estimated is because there are many other variables to take into account that are all random. It is nearly impossible to take into account stop signs or stop lights where no distance is being covered and time is passing. Think about when you are at a stop light - sometimes the light is green and you pass straight through, and other times it is red and you will wait for several minutes.

GoogleMaps does take traffic into account by adjusting the "expected" speed of travel to closer mirror what the driver will experience. For example: in traffic a highway that is normally a 65 mph zone would be estimated at 35 mph to accommodate for the additional traffic. So if you look up directions you may find that the website give two estimates for travel time: one based off of our formula above, and the other that takes traffic into account.

Will the time estimation be more accurate for shorter drives or longer drives? Why do you think that will be the case? Please post your comments below.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home