1

I'm looking for a bit of guidance from anyone who has worked with Core Location on the iPhone. My app is almost complete, I'm just trying to finish off one last thing for my client.

My app is to assist users with their workouts. Similar functionality to MapMyRun. It has a timer screen with a Start/Stop button and a Reset button. When the start button is tapped, the timer starts counting and Core Location starts tracking the users progress, calculating speed and distance. The issue I'm having is with core location trying to find the users current location. Scenario below:

Day 1 User has gone out for a jog and uses the app to track their progress, user has jogged for an hour, workout is saved. Everything works as it should.

Day 2 User decides to go jogging again, this time in a different area than yesterdays jog. Lets say 10 miles away. So they start the timer, but core location takes some time to initialise to the users current position. This causes the distance field to jump irrationally as core location tries to determine the current location.

I've explained why this happens but my client is not very happy, they don't want to see the distance field jump, which is fair enough.

So I'm wondering if anybody has a nice solution to initialising core location to the users current location. I could perhaps break the link between core location and the distance field for a certain period of time which will give core location a chance to get an accurate reading.

Any help greatly appreciated.

Regards, Stephen

Stephen
  • 4,715
  • 8
  • 53
  • 78

3 Answers3

0

Stabilise the readings by reporting "calibrating..." until the position readings roughly match the speed readings, which are generally more accurate than position.

Marcelo Cantos
  • 181,030
  • 38
  • 327
  • 365
  • Marcelo, sorry for the late acceptance of your answer. I took your advice and went down this route. – Stephen Jan 24 '11 at 17:32
0

Yeah, CoreLocation and the GPS-tracking really can annoy one.

some time ago someone had a quite similar problem and got posted some ideas and code: CoreLocation

Pherhaps this helps. But still I would show an activityIndicator untill you got your exact location. And it's not like GPS-tracking is a matter of tenth of seconds... Just explain your client by referencing to navigation systems in cars. Pherhaps he will understand then....

Community
  • 1
  • 1
Amandir
  • 679
  • 1
  • 7
  • 20
0

Try to find the user current location before going in to the App. So that you can directly show the users current location with out taking much time.

halfer
  • 19,824
  • 17
  • 99
  • 186
Satya
  • 3,320
  • 1
  • 20
  • 19