INS
INS

Reputation: 10820

GPS intermediate points

I'm developing an algorithm that involves inserting intermediary points between GPS coordinates. To be precisely let's assume that I have these 2 coordinates:

25.60593,45.65151

25.60662,45.65164000000001

I want to add extra points between these coordinates (on the same "line"). Is it wise to consider a linear variation (in this case I consider the intermediate points as points on the segment defined by the 2 given coordinates).

This involves actual GPS data obtained from a computed route -> this would mean that the distance is less than 1000 meters between each consecutive shape point (on highway the distance between consecutive points can be quite big due to the fact that it is a straight line).

Is linear variation a good approximation, or are they any other methods? (given the fact that the distance between points is less than 1km)

Thanks,

Iulian

Upvotes: 1

Views: 1244

Answers (2)

dmuir
dmuir

Reputation: 644

If the you have two points a and b, and the distance from a to b is less than 1km, then the maximimum distance between the midpoint (coordinates obtained by averaging) and the "middle point" (coordinates obtained by going halway along the shortest path between a and b) is tiny (1 micrometer) if a is on the equator, around 5cm at the arctic circle and 25cm at 85 north. If the distance between a and b was up to 10km, then the figures above should be multiplied by 100. These figures were calculated using the GPS ellipsoid, WGS84.

PS You have to be a bit careful averaging longitudes. The average of 179 and -179 is 180, not 0.

Upvotes: 1

John R. Strohm
John R. Strohm

Reputation: 7667

Given that the distance between the points is less than 1 km, AND *ASSUMING* that you're not playing very close to the North or South Pole, linear interpolation is probably good enough.

After linear interpolation is shown in live testing on real data NOT to be good enough, you can try spherical trig interpolation. Math involved.

If both of those fall short, then you will need very specialized expert assistance.

Upvotes: 3

Related Questions