In response to your request I have some Fortran77 routine that may be
portable. They do a simple linear interpolation. If you still need
help I can mail them.

On the general issue, I would recommend that you consider whether
averaging is really necessary. The problem with time-series averageing
on the basis of a single duration estimate (end of trial, peak
velocity, whatever...) is that it entails an implicit assumption of
homogeneity (is that spelt wright?) of control across trails. Our own
work (Alan Wing & I) required the averaging of the acceleration
profiles (directly sensed) of highly practiced simple arm movements.
Although the series (on a 3-d plot) appeared to be highly stereotyped,
we found that a single estimate (such as the final zero-crossing) of
location/duration could produce highly variable alignment of salient features.
A more robust procedure was to select a suitable order of polynomial
(in this case quartic) that provided a good fit to the data. Fit global
polynomials (appropriately weighted if required) to each series and then
use a feature of the polynomial upon which to average, to give a prototypical
curve + SD window, against which to compare perturbation trials.

The advantage (in our opinion) of this approach is that the average is
not biased by the accuracy of a particular time-point estimate, but
the curves are influenced (least squares) by the full series (or as
much as you wish to include). If a particular feature is deemed to be
important (in our case peaks) these points can be weighted during
fitting to enhance their influence. The procedures we used rely upon
access to the NAG library, but could be adapted.