From: Walter Roberson on
Miguel wrote:

> Thanks to all for the help. I think I figured the first step out. Since
> my GPS records in degrees and not in degrees-minutes, I think I can do a
> direct interp1 with this. Even if it did record in degrees-minutes, I
> could have converted that to just degrees and again used interp1.

interp1() is not suitable for interpolating along a curve -- though you might
be able to get away with it if you could be certain that no coordinate was
repeated along some axes (possibly after rotation to get that situation.)

> Now with this however, I would like to extrapolate equidistant points
> from this curve, and it looks like I can only do extrapolate equidistant
> points along an axis. Is that correct?

If I recall correctly, earlier this year either Roger Stafford or John
D'Errico showed someone how to extrapolate equidistant points along a curve.
The method involved (as I recall) integrating the path length at test points
to bracket the desired distance, and then doing a search within that interval
to find the actual point. The difficulty of integrating the path length is
going to depend upon how you want to join the points: for example it becomes
fairly simple for plain linear interpolation, and I _think_ it is reasonable
for piecewise quadratic interpolation, but if you went even just as far as
cubic splines then analytic methods do not work well and you start needing
numeric methods. John D'Errico would probably have some good ideas on the path
integration of piecewise cubic splines.

Accuracy of the equidistant is likely to be a difficulty. If you have a bit of
slack allowed, the problem probably becomes easier, I would guess -- I'm
thinking that once you get to within a "good" estimate of the proper
placement, that there might plausibly be a reasonable polynomial interpolation
that is "good enough" over short distances. If, though, you need the points to
be as equidistant as is numerically feasible then you are likely going to end
up doing a lot of EllipticK calculations, at least if you want your joining
path to be any more complex than quadratic.