GPS coordinates

Discussion in 'iOS Programming' started by greg1067, Feb 13, 2010.

  1. greg1067 macrumors newbie

    Nov 30, 2009
    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?

  2. firewood macrumors 604

    Jul 29, 2003
    Silicon Valley
    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.

  3. greg1067 thread starter macrumors newbie

    Nov 30, 2009
    Hmmm. Ok. Maybe I need to do some more reading on the subject-because I have no idea what you just told
    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.

Share This Page