Monday, July 14, 2008

GPS under the hood (of the SDK)

I had a look of what the iPhones SDK offers in terms of GPS. I found it a bit interesting, that you will get accuracy alongside positional info, but there is no flag that would report the origin of the data.
This means, that you won't be able to know if you just received an accurate GPS bearing or just a kind of cellular based triangulation "guess". Also, this implies that you can't choose if you want GPS data only upon initialization, although the chipset used would feature such functionality.

Sure, you can be almost sure, that an inaccuracy of 300 feet and more almost definitely means the data was collected by triangulation, just as well as an inaccuracy of 30 feet and below means that you got GPS positional info. But - you cannot be sure about that.

However, upon defining the interface (trough creating the corresponding instance), you can request a certain level of accuracy, thus being sort of able to "filter" any positional data gained by triangulation.

There is another interesting fact. Usually, you get an update of you location e.g. every second (at least a device providing NMEA data, like a Garmin GPS receiver or an external bluetooth device would do so). On the iPhone, you can provide a distance threshold, meaning you would receive a update event if the location changes more than the threshold distance.

No comments:

Post a Comment