fHSpeed.addSegmentFunction(tmin, tmax, smooth(time, dist)
.derivative());
fVSpeed.addSegmentFunction(tmin, tmax,
smooth(fEle.getSegmentFor(tmin), tmin, tmax, n)
.derivative());
final DifferentiableUnivariateRealFunction latseg = smooth(
fLati.getSegmentFor(tmin), tmin, tmax, n);
fBearing.addSegmentFunction(tmin, tmax, new BearingFunction(
smooth(fLongi.getSegmentFor(tmin), tmin, tmax, n)
.derivative(), latseg.derivative(), latseg));
/* Calculate total ascent and total descent */
List<Double> vpoints = getZeros(fVSpeed, time);
vpoints.add(tmax);
double z0 = fEle.value(tmin);