Gathering location data (GPS)

Discussion in 'iPhone/iPad Programming' started by Jeremy1026, Jul 15, 2008.

  1. macrumors 68000

    Joined:
    Nov 3, 2007
    #1
    I am trying to gather location data via GPS only (making this a iPhone 3G only app) but am running into trouble with it. I am trying to get the actual longitude and latitude of the device, then store that information into one of two sets of variables. latCurrent / longCurrent and latPrevious / longPrevious.
     
  2. JNB
    macrumors 604

    JNB

    Joined:
    Oct 7, 2004
    Location:
    In a Hell predominately of my own making
    #2
    Not an answer, but why GPS only? Seems to me that the location being provided is not necessarily being tagged as to method of generation (meaning that the location data output is hardware-ignorant), and I doubt you'll be able to tap into the GPS receiver at the hardware level. (I admit total ignorance as to how Apple makes this available, and whether any of the above is valid).

    As the 1st Gen iPhone also uses location-based services and features as part of the 2.0 firmware--the only difference being the relative accuracy--I wonder why you'd try to limit this to 3G phones only.
     
  3. thread starter macrumors 68000

    Joined:
    Nov 3, 2007
    #3
    Because I am trying to get a very accurate location, so that I can find the distance between two points (within .01mi)
     
  4. JNB
    macrumors 604

    JNB

    Joined:
    Oct 7, 2004
    Location:
    In a Hell predominately of my own making
    #4
    53'? I'm within that on cell data right now. Granted, that isn't always a reliable resolution, but then neither is phone-based GPS, for that matter. Is this for commercial or personal use?
     
  5. thread starter macrumors 68000

    Joined:
    Nov 3, 2007
    #5

    Free app in the app store if I can get it to work. I am trying to mimic the functions of a Garmin Forerunner.
     
  6. macrumors newbie

    Joined:
    Aug 28, 2008
    #6
    i'm looking for the same thing for a personal app for some scientific testing i'm doing (with no budget).. i'm looking to track location over time as accurately and as often as possible within a 250km^2 area. I am not sure regular GPS is accurate enough (10m) for my purposes, so I think I'm screwed anyway, but figured i'd try.

    any low level functions i can get at here? or a way to update the GPS update frequency? maybe if i go into Airplane Mode, will cell/wifi be disabled and therefore only give me GPS (or is that disabled too in Airplane mode)? i'd rather not go this way because i was thinking of transmitting data off the iPhone over 3G or WiFi every so often for monitoring.
     
  7. macrumors 603

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #7
    GPS accuracy will vary. Even the dedicated Garmin GPS units will lose lock on enough satellites (when under heavy trees, near tall buildings, etc.), and thus produce lower accuracy. The signals themselves will change (the satellites are moving pretty fast, even if you're not). I had a handheld GPS which said my porch was moving up and down 10M every now and then. Another which said I was weaving back and forth across an 8 lane highway.

    Best bet for accurate distance measurement is to use two iPhone 3G's, hold them both still until the accuracy goes up, time stamp the measurements, and then compare and subtract just those measurement pairs with similar accuracy and time stamps.

    .
     

Share This Page