# How does GPS calculate est. arival times?

**URL:** <https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691>\
**Category:** Factual Questions\
**Created:** [August 6, 2011, 4:10am UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691 "2011-08-06T04:10:49Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Fish\_Cheer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/fish_cheer/32/17179_2.png) [@Fish\_Cheer](https://boards.straightdope.com/u/Fish_Cheer)\
**Post date:** [August 7, 2011, 2:35pm UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/21 "2011-08-07T14:35:29Z")

</div>

> [@guestchaz](#):
>
> the more accurate your reading will be up to the limits set by the DoD.

The accuracy of GPS for civilian users is no longer deliberately limited by the DoD.

[http://ngs.woc.noaa.gov/FGCS/info/sans\_SA/docs/GPS\_SA\_Event\_QAs.pdf](http://ngs.woc.noaa.gov/FGCS/info/sans_SA/docs/GPS_SA_Event_QAs.pdf)

> [@](#):
>
> Q. What is Selective Availability (SA)?  
> A. SA was a technique to reduce the accuracy of unaugmented, single-receiver GPS  
> measurements. This was accomplished by altering (or “dithering”) the GPS  
> satellite clock signals, and by modifying orbital elements of the broadcast  
> navigation message. These alterations were done in a coded fashion, and could be  
> removed by authorized users. This alteration caused horizontal positional errors  
> on the order of 100 meters (95%), and varied in a manner that prevented rapid  
> averaging of positional data.
> 
> Q. When will SA be turned off?  
> A. SA will be turned off beginning at midnight GMT on May 1, 2000.

---

<div class="post-metadata">

**Author:** ![enipla](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@enipla](https://boards.straightdope.com/u/enipla)\
**Post date:** [August 7, 2011, 5:22pm UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/22 "2011-08-07T17:22:38Z")

</div>

> [@Boyo\_Jim](#):
>
> That’s not really the point. The point is that stopping for an extended period, for whatever reason, does not seem to update the ETA in a reasonable fashion.
> 
> So maybe the question is, how long does your speed need to be zero, or very near it, for the ETA to take that into account? Even if it pays no attention to instantaneous speed. surely it should know that if the trip still has a hundred mile left, it’s not going to be done in an hour – or whatever. If it doesn’t make a reasonable ETA based on remaining distance and a reasonable speed estimate, it is failing.

Updates mine just fine.  
Just checked in on my Garmin loaded into my BB Storm. The software is about 2 years old as is the phone. It updated the time every minute that I was sitting on my couch and not moving to my destination.

Time to destination -  
3:00  
3:01  
3:02  
etc.

Read the OP again. A GPS cannot predict that you will travel for however much time below the speed limit. It ain’t magic. Just seems like it. The GPS ONLY calculates how long it’s going to get to your destination from your current position (and traffic conditions). It can’t take into account that you are going to go 30mph under the posted limit and it can’t read your mind.

If you are going from Chi Town to LA and plug the numbers into the GPS while you happen to be going at 10 MPH on Lake Shore Drive, you really don’t want the GPS to tell you that it is going to take you 3 months to get to Las Angeles because you are only going 10mph.

---

<div class="post-metadata">

**Author:** ![iamthewalrus\_3](https://avatars.discourse-cdn.com/v4/letter/i/258eb7/32.png) [@iamthewalrus\_3](https://boards.straightdope.com/u/iamthewalrus_3)\
**Post date:** [August 7, 2011, 6:28pm UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/23 "2011-08-07T18:28:38Z")

</div>

> [@Chronos](#):
>
> It wouldn’t make any sense to base the calculation on your current speed. If you’re driving 1500 miles across the country, but need to go a while on residential city streets to reach the freeway on-ramp, you wouldn’t want your navigation system assuming that you’ll be making the whole trip at 25 MPH.

That just means it wouldn’t make sense to do a naive extrapolation from your current speed, not that it wouldn’t make sense to consider your current speed. A pretty reasonable way to estimate ETA is to start with the constant weighted segments in your map, then compare the actual time this trip has covered them in, and adjust based on that.

> [@Reply](#):
>
> In CS, what do you call this type of problem? Do you know if there are any open toolkits/code snippets/etc that specifically address it?

It’s called the [Shortest Path problem](http://en.wikipedia.org/wiki/Shortest_path_problem). The algorithms are not particularly complicated to understand; take a look at the Wikipedia pseudocode. Any reasonable graph library should include algorithms like Dijkstra’s (single point to all points shortest path) and Floyd-Warshall (all points to all points shortest path) implementations. I googled “graph library” and found [Boost](http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/index.html).

---

<div class="post-metadata">

**Author:** ![Boyo\_Jim](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@Boyo\_Jim](https://boards.straightdope.com/u/Boyo_Jim)\
**Post date:** [August 7, 2011, 6:30pm UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/24 "2011-08-07T18:30:54Z")

</div>

> [@enipla](#):
>
> …Read the OP again. …

No. How about you read post 11 again? That is the comment you quoted, and my assumption is that is the comment you were responding too. In order to provide a reasonable ETA, a GPS only need look at remaining distance and speed limits on the planned routes. We agree about that, I think. However, taking Finagle’s comments at face value, his GPS does not to that, or does it too infrequently, or uses some other scheme altogether, creating impossible to achieve ETAs as a result.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [August 7, 2011, 6:55pm UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/25 "2011-08-07T18:55:51Z")

</div>

> [@iamthewalrus\_3](#):
>
> It’s called the [Shortest Path problem](http://en.wikipedia.org/wiki/Shortest_path_problem). The algorithms are not particularly complicated to understand; take a look at the Wikipedia pseudocode. Any reasonable graph library should include algorithms like Dijkstra’s (single point to all points shortest path) and Floyd-Warshall (all points to all points shortest path) implementations. I googled “graph library” and found [Boost](http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/index.html).

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 7, 2011, 7:39pm UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/26 "2011-08-07T19:39:32Z")

</div>

Another point is that Google navigation will feed GPS location and speed back to Google so that they can infer traffic conditions. Their navigation app will then use this traffic data to modify the ETA.

Of course, it’s unlikely that any one person could significantly alter the data, but they will still be counted in the average somewhere. So the current speed is affecting the ETA, if only indirectly.

---

<div class="post-metadata">

**Author:** ![enipla](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@enipla](https://boards.straightdope.com/u/enipla)\
**Post date:** [August 7, 2011, 7:58pm UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/27 "2011-08-07T19:58:51Z")

</div>

> [@Boyo\_Jim](#):
>
> No. How about you read post 11 again? That is the comment you quoted, and my assumption is that is the comment you were responding too. In order to provide a reasonable ETA, a GPS only need look at remaining distance and speed limits on the planned routes. We agree about that, I think. However, taking Finagle’s comments at face value, his GPS does not to that, or does it too infrequently, or uses some other scheme altogether, creating impossible to achieve ETAs as a result.

So we agree and you are arguing with me. Fine. Whatever floats your boat.

---

<div class="post-metadata">

**Author:** ![Boyo\_Jim](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@Boyo\_Jim](https://boards.straightdope.com/u/Boyo_Jim)\
**Post date:** [August 7, 2011, 8:29pm UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/28 "2011-08-07T20:29:41Z")

</div>

Why were you telling me to read the OP again as if I didn’t understand something in it? Your comment was not about the OP and my response to you was not about the OP.

---

<div class="post-metadata">

**Author:** ![Hermitian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hermitian/32/470_2.png) [@Hermitian](https://boards.straightdope.com/u/Hermitian)\
**Post date:** [August 7, 2011, 8:42pm UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/29 "2011-08-07T20:42:53Z")

</div>

> [@CookingWithGas](#):
>
> The frustrating part is that it does not make any allowance for time at red lights or stop signs so it is overly optimistic about travel times on local roads. This is worst downtown when you have a red light every couple of blocks or so. Therefore it occasionally routes me onto secondary roads when a slightly longer highway route is much faster.

This never ceases to irritate me. Even though I have it set to “fastest time” it continues to chose secondary roads with a multitude of stop signs and stoplights that make it take twice as long as the “estimate.”

If they can program in speed limits for roads, can’t they also program in lights and make them cost an average time of 1.5 minutes per light or something. That’s better than presuming you will sail through all of them, which it does.

---

<div class="post-metadata">

**Author:** ![tellyworth](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@tellyworth](https://boards.straightdope.com/u/tellyworth)\
**Post date:** [August 7, 2011, 11:18pm UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/30 "2011-08-07T23:18:51Z")

</div>

[Obligatory xkcd link](http://www.xkcd.com/612/).

---

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [August 8, 2011, 1:41am UTC](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691/31 "2011-08-08T01:41:36Z")

</div>

> [@tellyworth](#):
>
> [Obligatory xkcd link](http://www.xkcd.com/612/).

And this explains why using an “extrapolate using actual rate at the moment” approach for ETA in a GPS would be just awful.

[Previous page](https://boards.straightdope.com/t/how-does-gps-calculate-est-arival-times/591691.md?page=1)
