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

Jeremy1026

macrumors 68020
Original poster
Nov 3, 2007
2,215
1,029
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.
 

JNB

macrumors 604
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.
 

Jeremy1026

macrumors 68020
Original poster
Nov 3, 2007
2,215
1,029
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.

Because I am trying to get a very accurate location, so that I can find the distance between two points (within .01mi)
 

Jeremy1026

macrumors 68020
Original poster
Nov 3, 2007
2,215
1,029
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?


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

mspatts

macrumors newbie
Aug 28, 2008
8
0
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.
 

firewood

macrumors G3
Jul 29, 2003
8,141
1,384
Silicon Valley
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.

.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.