开发者

What is a reasonable timeout for acquiring a GPS fix?

I am creating a BREW app that requests the user's position.

If the phone cannot acquire the position, I would like to display an error.

How long shou开发者_如何学Gold I wait for my callback to be called before I determine that the phone is not likely to get a GPS fix?


When a cold start is required, the receiver has to download a full set of Ephemeris data, which is broadcast from the GPS satellite over a 30 second cycle and re-transmitted every 30 seconds.

So I would say that 60-90 seconds (two or three Ephemeris cycles) would be a suitable time to wait before declaring failure.

http://www.navigadget.com/index.php/gps-knowledge/ttff-time-to-first-fix

Note that if a device requires an almanac download, the startup time can be much longer (on the order of 12.5 to 15 minutes). This is referred to as a Factory TTFF (Time to First Fix).


I might go with an increment (say 20 or 30 seconds) between notifying the user that you have failed to establish a link, and give them the option to stop trying. Keep at it until they stop you, or a set number of iterations have passes (say 5 - 10 iterations).


45-90 seconds.

For more information, see the GPS Time To First Fix article at Wikipedia.

But you can never know when the user actually has view to the satellites or not, maybe they are still inside when they start your program, so the approach suggested by Matthew Vines is much better than a constant delay.


Cellphone-specifically, I've had a Motorola phone that had a GPS receiver, but was horrendously bad at it - it could take it around 5 minutes to get a fix where my standalone Bluetooth receiver would manage in less than a minute.

Why are you declaring failure after a fixed timeout anyway? Why not, after a reasonable time has passed (say, a minute), display a message to the tune of "GPS fix still not available; but I'm still trying" with a possibility to cancel at any time if the user is fed up? What do you expect the user to do with the failure message you're proposing to give him?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜