def interpolateGaps(y_vals, space):
    """ Fill in any large gaps in the depths list

    Args:
        y_vals(list): elevation values.
        space(float): maximum allowable difference between interpolation values.

    Return:
        list of new y values to calculate conveyance for.
    """

    depths = sorted(y_vals)
    location = len(y_vals) - 1
    while location > 0:
        diff = depths[location] - depths[location - 1]
        if diff > space:
            no_insert = int(diff / space)

            for j in range(0, no_insert):
                baseline = depths[location]
                depths.insert(location, baseline - space)
            location -= 1
        else:
            location -= 1

    return depths