calculate_gaps_perc function

Compute the percentile value of each height