-1

I want to show a car's speeds on iPhone in real time. What can I use?

Wouldn't using gps to calculate the car's speed take many seconds?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Everest
  • 17
  • 2
  • See the following question: http://stackoverflow.com/questions/582511/iphone-corelocation-how-to-get-the-most-accurate-speed –  Aug 30 '11 at 01:28
  • possible duplicate of [How to calculate speed of our car using iphone](http://stackoverflow.com/questions/3818902/how-to-calculate-speed-of-our-car-using-iphone) – Brad Larson Aug 30 '11 at 21:59

2 Answers2

1

I have an app called Speedometer and Map. I use Core Location to figure out where the user is, how far they move every second in miles, and then I convert this number to hours, and update it constantly.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Jack Humphries
  • 13,056
  • 14
  • 84
  • 125
1

If you implement a class that conforms to the CLLocationManagerDelegate protocol, and set an instance of it as the delegate of a CLLocationManager object, your object will receive -locationManager:didUpdateToLocation:fromLocation: messages after you call -[CLLocationManager startUpdatingLocation]. The CLLocation object you receive via that method has a speed property, which is the speed of the device in meters per second. The frequency of updates can be controlled via CLLocationManager's distanceFilter and desiredAccuracy properties.

lemnar
  • 4,063
  • 1
  • 32
  • 44