riyaz
riyaz

Reputation: 514

Accuracy of Distance between two lat long ios

I am calculating the distance between two lat long coordinates using -(CLLocation)distanceFomLocation:(CLLocation) and Haversine formula. But its not giving the correct result.
I am using core location framework to find out the lat long of two posions which are 1 meter apart in actual but the above formula gives the distance some times 40m sometimes 30m and so on. I have set the desired accuracy is ten meters. I am using iPhone 4s device.

Just want to know that what is accuracy of method -(CLLocation)distanceFomLocation:(CLLocation) for calculating the distances? I have to calculate the distances whth in 10 m range.

Upvotes: 4

Views: 1696

Answers (1)

AlexWien
AlexWien

Reputation: 28727

The formula is correct, for 1m distance the acuarcy is under 1/1000 of milimeter. That what is wrong is your lat/lon position you got from the GPS device, which can deviate that 40m.

For 10m distance the formula used in either haversine or distanceFromLocation are perfectly accurate. It starts to get interesting when distances are some kilometer apart.

So don't worry. But yor main problem is to get such acurate positions, and that depends what you need it for.

Do you need distance meassure of the coordinates of ONE GPS device, (that works) or between differnet GPS devices (can be appart 30m for two device on same position, but usually 3-6m GPS accuracy when having good view to open sky.

Further make sure that you use desiredAccuracy BestForNavigation or Best.

Upvotes: 2

Related Questions