我想2个corelocation对象之间计算这样的距离:为什么我没有得到两个corelocation之间的正确距离?
float meters = [destinationLocation distanceFromLocation:currentLocationNew];
distanceBtwTwoLocations = [NSString stringWithFormat:@"%f miles",meters];
但它没有给我确切的距离。为什么?我刚刚检查了控制台中的数值
currentLocationNew < +17.42369091,+ 78.43235230> +/- 0.00m(speed -1.00 mps/course -1.00)@ 10/06/11 12:43:59 PM印度标准时间
destinationLocation < 16.29850960,80.43364716> +/-0.00米(-1.00速度MPS /当然-1.00)@ 10/06/11下午12时44分07秒印度标准时间
distanceBtwTwoLocations247043英里
我错过了什么?
不,我将精确的经度和纬度值给予2个corelocation对象..即使我没有得到确切的距离。 – Dee 2011-06-10 07:38:24
@Dee,你认为它应该是正确的距离。这些坐标代表哪个城市? – paxdiablo 2011-06-10 07:39:51
海德拉巴距离Guntur约153英里,显示为247,043英里。 – Dee 2011-06-10 07:43:14