Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

greg1067

macrumors newbie
Original poster
Nov 30, 2009
17
0
Have a quick question for the veteran programmers. I want to capture/record gps coords in an app by pressing a button in the interface. How would I code this? And how accurate is the accuracy of the receiver in the iphone?

Thanks
 
The iPhone OS is more of an event driven system. So you don't capture anything when the user presses the button. Instead you turn on location services before you present the button, and get callbacks when the OS is good and ready. Present the button after the 3rd location callback (the first two locations or so might be yesterdays), then save the location callback closest in time to when the user pressed the button.

The accuracy varies a lot (from a few meters to a few thousand), depending on sky coverage, overhead absorption, satellite orbits in view, how long you wait, radio interference, etc., but each callback estimates its accuracy.

ymmv
 
The iPhone OS is more of an event driven system. So you don't capture anything when the user presses the button. Instead you turn on location services before you present the button, and get callbacks when the OS is good and ready. Present the button after the 3rd location callback (the first two locations or so might be yesterdays), then save the location callback closest in time to when the user pressed the button.

The accuracy varies a lot (from a few meters to a few thousand), depending on sky coverage, overhead absorption, satellite orbits in view, how long you wait, radio interference, etc., but each callback estimates its accuracy.

ymmv

Hmmm. Ok. Maybe I need to do some more reading on the subject-because I have no idea what you just told me...lol
What my basic idea is, is to walk a perimeter and "store/record" the coordinates into an app that I am writing and then use the stored coords to determine either area or linear dimentions.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.