iOS Distance between two GPS Location

506 views Asked by At

I have confusion calculating the distance between two GPS points is distance or displacement?

Like there are two coordinates (A&B) which are on same x axis with respect to earth. But i take a long u-turn to reach from A to B. i think it will only give me a displacement?

2

There are 2 answers

4
abhishekkharwar On BEST ANSWER

Its distance - for two points but if you are trying to get the distance from start point and end point it could be displacement.

Eg. Suppose that your have four points A, B, C, D

If you have get the distance between A & D

Total Distance (Path Distance) = distance b/w A and B + distance b/w b and C + distance b/w C & D

Displacement = distance b/w A and D

0
AlexWien On

The word distance between two GPS coordinates is well defined.

It is the shortest distance (along the great circle on a sphere) between two points on earth.

Also called line of sight distance. (But this explanation is not perfect since the earth is aproximated as sphere) It has nothing to do with road distance, etc. Whether or not you made a u-turn, has nothing to do with the term distance.

About U-Turn: You probably mean the length of the path you walked/drove between start and end point. But this is the trip distance or road distance, or route distance. Sometimes for simplicity abreviated with distance.

From the context it depends what is meant with distance. The ios Location API delivers the great circle distance between two points. (Probably calculated with the haversine formula)