Possible Duplicate:
GPS coordinates in degrees to calculate distances
using GPS I am capure the string string how to separate latitude and longitude in string <+37.33168900, -122.03073100> +/- 100.00m (speed -1.00 mp / course -1.00) @ 2011-08-26 12:56:57 +0530
when i am calling location manager this is method is called
// Delegate method from the CLLocationManagerDelegate protocol.
- (void)locationManager:(CLLocationManager *)manage didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
NSLog@("%@",newLocation) //<+37.33168900, -122.03073100> +/- 100.00m (speed -1.00 mp / course -1.00) @ 2011-08-26 12:56:57 +0530
NSLog@("%@",oldLocation) //null
}
My problem is how to save my old location and how to using newlocation and oldlocation how to calculate the distance i searched for google but i can't find out please help me. i am very struggle for how to save oldLocation.