public short interpolateEle(final short e1, final short e2, final double fraction) {
        if (e1 == Short.MIN_VALUE || e2 == Short.MIN_VALUE) {
            return Short.MIN_VALUE;
        }
        return (short) (e1 * (1. - fraction) + e2 * fraction);
    }
The cost of that path (a modified distance)
main/src/main/java/cgeo/geocaching/brouter/core/OsmPath.java